Skip to content

Forge: link session query completion events - #20

Merged
GolaraJ merged 1 commit into
mainfrom
fix/forge-session-query-call-linkage
Aug 18, 2026
Merged

Forge: link session query completion events#20
GolaraJ merged 1 commit into
mainfrom
fix/forge-session-query-call-linkage

Conversation

@GolaraJ

@GolaraJ GolaraJ commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • match the exact controller SQL on the local tool.execution_start event
  • associate its result through the shared toolCallId on tool.execution_complete
  • retain detailed-content matching as backward-compatible fallback
  • add regression coverage for completions that omit SQL text

Root cause

Task f810e547-693b-4fd3-9ce2-f63e3d832cd0 materialized discovery, metadata, references, and files successfully. Its large tool query completed, but the completion detail did not contain matchable SQL, so the bridge reported that the result was absent. Runtime start events preserve the full exact SQL and a stable call ID.

Validation

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

Match exact session_store_sql start arguments and associate results by tool-call ID when large completion details omit the SQL text.

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 improves how materialize-session-query.py associates a session_store_sql tool completion with its originating query by linking tool.execution_start and tool.execution_complete via the shared toolCallId, allowing results to be materialized even when completion events omit SQL text in detailedContent.

Changes:

  • Track matching toolCallId values from tool.execution_start events whose arguments.query exactly equals the requested SQL.
  • Prefer matching tool.execution_complete events by toolCallId, while keeping the existing detailedContent SQL matching as a fallback.
  • Add a regression test covering completions where SQL is omitted from the detailed output.
Show a summary per file
File Description
plugins/repo-dreamer/skills/repository-skill-forge/scripts/materialize-session-query.py Links query start → completion via toolCallId and retains the existing detailed-content matcher as fallback.
plugins/repo-dreamer/skills/repository-skill-forge/tests/test_materialize_session_query.py Adds regression coverage ensuring call-id matching works when completion detailedContent lacks SQL.

Review details

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

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

@GolaraJ
GolaraJ merged commit 940c3f3 into main Aug 18, 2026
1 check passed
@GolaraJ
GolaraJ deleted the fix/forge-session-query-call-linkage branch August 18, 2026 04:49
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