Skip to content

fix: unblock stalled workflow control reconciliation#678

Merged
julianknutsen merged 2 commits intofix/track1-gascity-example-pack-schemafrom
fix/scoped-terminal-reconcile
Apr 15, 2026
Merged

fix: unblock stalled workflow control reconciliation#678
julianknutsen merged 2 commits intofix/track1-gascity-example-pack-schemafrom
fix/scoped-terminal-reconcile

Conversation

@julianknutsen
Copy link
Copy Markdown
Collaborator

Summary

  • close enclosing scope bodies when retry / ralph control beads finish terminally, not just from fanout paths
  • propagate non-gc.* member metadata when a scope auto-closes through terminal-member reconciliation
  • let built-in control-dispatcher workers claim legacy workflow-control routes / assignees so pre-rename workflows keep moving

This was driven by live workflow stalls in the ga store:

  • old review loops could leave a gc.kind=scope body open forever after terminal retry / ralph members closed
  • older graphs still routed control work to workflow-control / gascity/workflow-control, while the runtime only woke control-dispatcher

Testing

  • make check
  • make check-docs if docs, navigation, or links changed
  • make test-integration if runtime, controller, or workflow behavior changed

Additional validation:

  • focused regressions in internal/dispatch for retry / ralph terminal scope reconciliation
  • executable internal/config tests proving control-dispatcher work queries claim legacy workflow-control assignees and routes
  • live verification against the shared ga store:
    • repaired stale scope ga-qljmkm, then gc convoy control ga-vc6558 resumed the loop (action=retry created=1)
    • legacy rig control bead ga-rwpb6 processed under the new path
    • legacy city-scoped control bead ga-4ujz processed to gc.outcome=pass

Checklist

  • Linked an issue, or explained why one is not needed
    • No single repo issue existed; this came from live workflow incident triage.
  • Added or updated tests for behavior changes
  • Updated docs for user-facing changes
  • Called out breaking changes or migration notes
    • No breaking API change. This adds backward compatibility for legacy workflow-control metadata.

@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Apr 13, 2026
@julianknutsen julianknutsen force-pushed the fix/scoped-terminal-reconcile branch from 649e2fd to bc2c9b3 Compare April 13, 2026 19:57
@julianknutsen julianknutsen added this to the 1.0 milestone Apr 14, 2026
- close enclosing scope bodies when retry / ralph control beads finish
  terminally, not just from fanout paths
- propagate non-`gc.*` member metadata when a scope auto-closes through
  terminal-member reconciliation
- let built-in `control-dispatcher` workers claim legacy `workflow-control`
  routes / assignees so pre-rename workflows keep moving

Squashed rebase of PR #678 (commits 9acb796 + bc2c9b3) onto current main,
extracting only the two intentional commits from a branch that had diverged
by ~118 unrelated commits.
Three maintainer fixups from the adoption review:

1. controller_error paths now reconcile enclosing scope. When
   spawnNextAttempt fails inside a scoped retry/ralph, the control
   bead was closing with gc.final_disposition=controller_error but
   never reconciling the scope body — the exact stall this PR aims
   to remove. Added reconcileClosedScopeMember calls after both
   controller_error close sites.

2. Metadata propagation now runs on scope-fail auto-close, not just
   scope-pass. reconcileTerminalScopedMember's fail branch now calls
   propagateScopeMemberMetadata before setOutcomeAndClose so
   review.verdict / review.summary-style metadata survives failure
   auto-close instead of being dropped.

3. GC_SESSION_ORIGIN ephemeral-only gate is now scoped to
   control-dispatchers (legacy branch) only. The non-legacy branch
   in EffectiveWorkQuery preserves main's prior Tier 3 behavior for
   persistent sessions — demand-detection restrictions only apply to
   control-dispatcher workers, not every agent.

Tests pass: internal/config, internal/dispatch.
@julianknutsen julianknutsen force-pushed the fix/scoped-terminal-reconcile branch from bc2c9b3 to 739fbdb Compare April 15, 2026 04:23
@julianknutsen julianknutsen changed the base branch from main to fix/track1-gascity-example-pack-schema April 15, 2026 04:23
@julianknutsen julianknutsen merged commit 1bfd8b3 into fix/track1-gascity-example-pack-schema Apr 15, 2026
13 checks passed
@julianknutsen julianknutsen deleted the fix/scoped-terminal-reconcile branch April 15, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant