Skip to content

Harden Forge interrupted extraction handling - #27

Merged
GolaraJ merged 1 commit into
mainfrom
fix/forge-terminal-and-query-volume
Aug 18, 2026
Merged

Harden Forge interrupted extraction handling#27
GolaraJ merged 1 commit into
mainfrom
fix/forge-terminal-and-query-volume

Conversation

@GolaraJ

@GolaraJ GolaraJ commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add assert-terminal so running extraction cannot be reported as blocked or complete
  • mark action batches explicitly nonterminal and terminal controller results explicitly terminal
  • compare SQL token streams so punctuation-only formatting does not trigger handoff recovery
  • deduplicate repeated session_files edits by session, path, and tool before pagination
  • document the mandatory terminal-state gate

Root cause

Task 5add9972-e910-4f5f-935c-7945b2552686 stopped with three valid tool actions still pending. The controller remained running, but the agent reported BLOCKED after processing large repetitive file pages and a formatting-only SQL handoff mismatch.

Validation

  • 61 Skill Forge tests pass
  • all Python scripts compile
  • git diff --check passes

Require terminal controller state before reporting outcomes, compare SQL as tokens so punctuation formatting is harmless, and deduplicate repeated file edits before pagination.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b8cf0691-0fe3-4d67-92ce-ce2a529c400c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens Repository Skill Forge extraction runs against interrupted/slow processing by adding an explicit terminal-state gate, improving controller payload signaling, and reducing false-positive SQL handoff mismatches and redundant file evidence pagination.

Changes:

  • Added an assert-terminal controller command and documented a mandatory “terminal-state gate” before reporting blocked/complete outcomes.
  • Improved controller output semantics by explicitly marking terminal results as terminal: true and parallel action manifests as terminal: false.
  • Made SQL handoff matching resilient to punctuation-only formatting differences, and updated file evidence queries to deduplicate session_files entries before keyset pagination.
Show a summary per file
File Description
plugins/repo-dreamer/skills/repository-skill-forge/tests/test_materialize_session_query.py Adds coverage for SQL normalization across punctuation spacing and for preserving string literal contents.
plugins/repo-dreamer/skills/repository-skill-forge/tests/test_extraction_controller.py Adds CLI-level tests for assert-terminal, validates nonterminal action-batch manifests, and verifies file-query dedupe/pagination behavior.
plugins/repo-dreamer/skills/repository-skill-forge/SKILL.md Documents the required assert-terminal gate and clarifies blocked vs. running behavior.
plugins/repo-dreamer/skills/repository-skill-forge/scripts/session_queries.py Updates file evidence SQL to deduplicate before pagination and changes the keyset cursor columns accordingly.
plugins/repo-dreamer/skills/repository-skill-forge/scripts/materialize-session-query.py Replaces whitespace-only SQL normalization with token-based normalization to ignore punctuation spacing while preserving literals.
plugins/repo-dreamer/skills/repository-skill-forge/scripts/extraction-controller.py Adds terminal_summary + assert-terminal, marks terminal/nonterminal outputs explicitly, and aligns file pagination cursor fields with the new query.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

@GolaraJ
GolaraJ merged commit 181d73d into main Aug 18, 2026
1 check passed
@GolaraJ
GolaraJ deleted the fix/forge-terminal-and-query-volume branch August 18, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants