Skip to content

fix: resend a stalled worker brief on the live pane - #337

Open
douglasjarquin wants to merge 1 commit into
mainfrom
sum/t-29e911157349
Open

douglasjarquin wants to merge 1 commit into
mainfrom
sum/t-29e911157349

Conversation

@douglasjarquin

@douglasjarquin douglasjarquin commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

A submitted worker brief that returns agent_prompt_stalled is sent again on that same live pane.
The same start retries the recorded opening while the pane is still alive, and a later start retries that pane instead of allocating another terminal.
repair send of that recorded opening is accepted while the attempt is still uncertain.
Any other repair text still waits until the attempt is running.
A lost or malformed launch response, a proven-unsent opening, a blocked startup, and a name collision stay on the old path.
The coordinator is not asked for permission to resend.

Validation

  • I followed the contributor checklist.
  • I recorded the canonical verification command, result, and evidence path.
  • I recorded applicable manual or live checks, including anything not run.
  • I stated deployment or release impact when relevant.

Human review and the branch-protection owner decide merge readiness.

The contributor checklist box is open because mise install go python node was not re-run in this session.
The pinned toolchain was already present, and the verify runner used it.

Canonical command: python3 .agents/skills/verify/scripts/verify_run.py --base 934085e0056300af8c9009c25cbebc43ea65da42 --json
Result: fail.
Run id: 20261102T033507Z-2e68a343.
Candidate: ab6389fd743e66e3aec1a1b3b21ac5967fff5e75.
Record: .artifacts/verification/20261102T033507Z-2e68a343/run.json.
Log: .artifacts/verification/20261102T033507Z-2e68a343/verify.log.
requires_root_review is true.
certifies is null.
Policy files changed since the base: docs/features/coordination.md and skills/sum-dispatch/SKILL.md.
The map audit is clean: .artifacts/verification/audit/20261102T033507Z-6987cf87.json.

mise run verify failed in go/internal/cli on TestContextEnvironmentAndUpdateSections_pinStdoutAcrossScenarios.
Two golden stdout files still pin skills/sum-dispatch/SKILL.md at 19888 bytes and sha prefix 2add0328b8d9c02e.
The live file is 20131 bytes and sha prefix 14ff5a0c173e8246.
The pinned worker procedure forbids rewriting golden files, so those pins were left as they are.
The Go suite stopped there, so the Python unit tests and the web install, check, unit, and build steps did not run.
mise run test-live was not run.
This change has no live Herdr scenario.

Before the commit, gofmt -l on the five changed Go files was empty and go vet of prepare, repair, and hcclient exited 0.
go test of prepare, repair, and hcclient passed.
The same cli golden test failed in that earlier package run, and the 180 second package budget then expired while another cli test was still in flight.
Full mise run lint was not re-run after the commit.

No test was added.
The worker procedure forbids adding or expanding tests unless this task explicitly asks for one, and it does not.
A temporary driver checked the resend and was deleted before the commit.
The feature-map rows dispatch.launch-recovery and dispatch.agent-start-timeout say that, and they were not flipped to claim a committed driver for the resend.

Grok Bot impact: none.
This change does not alter grok-bots/sum/, grok-bots/square/, Bot commands, or recipes.
No attribution update is due.

Deployment: none until this pull request is merged and the installation is updated.
The serving runtime stays on its current release.
There is no schema migration.

Documentation skipped.
The retry rule, the one-live-pane bound, and the lost-response exclusion are already in skills/sum-dispatch/SKILL.md and docs/features/coordination.md.

Browser: no pages.
Skip.

Unapplied review findings

No eligible review fixes were applied.
None were mechanical under the review bar, so there is no fix(review) commit.

  • P1 - go/internal/prepare/stall.go:243 - Lost stall send stays replayable
    When the send error is an hcclient.Error with Effect Uncertain, persist launch-uncertain with a reason that does not contain agent_prompt_stalled, on both the starting path and the already-uncertain path, and do not call landPrompt again for that attempt. Refused or not-submitted send errors may keep the stall reason so a later start can retry a send that did not occur.
  • P1 - go/internal/prepare/native.go:115 - Persist failure leaves start stuck starting
    In persistStalled, SaveTask the opening, endpoint, and launch-uncertain or brief-landed transition before any registration write. If that save fails, or persistStalled returns before a save, have startNative call FailStart when the worker is still starting so the attempt cannot remain starting. A registration write that fails after the task save should return the error without rolling the attempt back to an unrecorded start.
  • P1 - go/internal/prepare/native.go:135 - Unmatched stall is recorded as success
    If the run result or the run error is an agent_prompt_stalled opening and settleStalled does not handle it, do not fall through to the created-success path and do not call FailStart. Save the opening, mark the attempt launch-uncertain, set needs-attention, set task.error to stallMessage, and return that error. Propagate a list error instead of collapsing it into handled=false. Do not name execution redeliver. Do not allocate another terminal.
  • P1 - go/internal/prepare/prepare.go:707 - Overlapping stall sends are not claimed
    Under the lock, before any send, record an in-flight resend claim on native_launch and make stalledOpening and stalledOriginal false while that claim is current. Clear it in persistStalled and in the repair result path. A submitted repair or a landed resend should append brief-landed and transition uncertain to starting so a later start does not send again. An uncertain send result should keep launch-uncertain with a non-replayable reason. Assumption: a claim whose holder dies is recovered by the same explicit inspect path as a claimed redelivery, not by an automatic second paste.
  • P1 - go/internal/prepare/stall.go:88 - Idle stall resend repeats the brief
    Send at most once per landPrompt call. Send only when status is idle and set If to idle; if status is nil, do not send, matching NativeRecipient.Send. After one accepted Send, stop this call even if a later Get is still idle, and return not landed so the attempt stays launch-uncertain. A later start may retry that same pane once; that retry is the feature contract and is not another paste inside this loop. Keep stallSendBound as a refusal of a second send in the same call, not a quota of three. In sendStalledOpening, do not send when status is nil.
  • P2 - go/internal/prepare/stall.go:226 - Landed stall skips attestation failure
    In persistStalled, when template or submit does not attest, set needs-attention, record launch-uncertain with reason template attestation mismatch, save, and return before registration and before setting status starting. Do not mark that attempt starting.

Review run: 20261101-213802-31356251.
Artifact path: /tmp/compound-engineering-502/ce-code-review/20261101-213802-31356251.

The recovery skill still does not describe the later-start retry, and a mismatched repair text still returns the running-attempt refusal.
Those notes were not selected findings, and those files were not edited.

Compound Engineering

Pipeline

Generated by sum

Stage Status Result
Intent ✅ Approved brief recorded
Rebase ⏳ Not observed; run pipeline rebase
Review ⏳ No review recorded for this candidate
Test ⏳ No coordinator verification for this candidate
Document ⏳ No documentation audit for this candidate
Lint ⏳ Not observed; run pipeline lint
Push ✅ On origin: the reconciled PR head is this candidate
PR ✅ Open: #337
CI ❌ Failed: verify; 1 of 3 checks passed; GitHub reports no required checks (as of 2026-11-02T03:51Z)

A submitted brief that returns agent_prompt_stalled is sent again on that same pane during the start and on a later start.
Repair of the recorded opening is accepted while the attempt is still uncertain.
A lost response, an unsent opening, a blocked startup, and a name collision stay on the old path.
@douglasjarquin

Copy link
Copy Markdown
Owner Author

Babysit stopped at needs-human. No fix was pushed.

decision:538023dcc55e50a0bcc992616a0088a289564be6b401f1d95d659d81f10cbbe1

Verify on https://github.com/douglasjarquin/sum/actions/runs/41384599576/job/125082545135 failed for head ab6389f.
The suite exit is the two golden pins for skills/sum-dispatch/SKILL.md, still 19888 bytes and sha prefix 2add0328b8d9c02e.
The live file is 20131 bytes and sha prefix 14ff5a0c173e8246.
The worker procedure forbids rewriting those golden files, so they were left unchanged.

Leave the pins unchanged for this task.
Update them only in a later change that is allowed to edit tests.

This branch has not been deployed

No deployments
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.

1 participant