Repository navigation
A forward that T3 refuses is dropped with a notice instead of retried forever - #84
Merged
Merged
Conversation
Red: 9 refusal tests in forward.test.ts (the replaced pinned test and the new "forward: a send T3 refuses" describe) and 4 readers in progress.test.ts (body-edit-dropped, idle forward-wait, cancel, new session) fail against the code that treats every send error as transient. Issue: #74
…ying forever A MessageRejectedError on a forwarded comment or body edit is final: T3 keeps the refusal under the command id. forward now drops the item, tells the issue once (comment-dropped <id> / body-edit-dropped <edited_at>), goes on with the rest, counts the item as not sent so the gate is not held, and cancels a forward-wait nothing was sent under (forward-wait-cancelled <k>) so advance does not wait for a run that nothing started. Transport failures still stop the call and retry. Issue: #74
rawphp
marked this pull request as ready for review
October 16, 2026 23:22
Author
|
Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head
|
… has nothing to send
…sed every send under it
# Conflicts: # apps/server/src/factory/runner/messages.ts # apps/server/src/factory/runner/progress.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74
Contract
MessageRejectedErroron a forwarded comment posts the dropped-comment notice with the reason "T3 refused it", then writescomment-dropped <id>; the comment is never sent again. A refused body edit posts the fixed notice ("The factory did not send the edited issue body to the build session, because T3 refused it. Post the change as a new comment and the factory will send it.") then writesbody-edit-dropped <edited_at>, which the ledger reader treats likebody-edit-forwarded; a newer edit is still sent. A refusal does not stop the call. Refused items are left out ofForwardOutcome, so an all-refused call returns{comments: 0, bodyEdit: false}and the pass does not hold the gate. Aforward-wait <k>under which nothing was sent is cancelled withforward-wait-cancelled <k>; the reader clearswaitingAfterfor that forward marker and restoreslastWait, soadvancedoes not answerrunning. Transport and timeout failures (SessionsError) and a gone thread keep today's behaviour."refused"; softfac's docs.vp test run apps/server/src/factory/runner/forward.test.ts apps/server/src/factory/runner/progress.test.ts→ pass (117). At thetest:commit's tests against the base product code: 13 failed, 104 passed (red confirmed before ship).Acceptance criteria
comment-dropped <id>; never sent again; posted once —forward.test.ts"a send T3 refuses is dropped with a notice, and the call goes on"body-edit-dropped <edited_at>; not sent or reported again; a newer edit still forwarded — "a refused body edit is dropped with a notice and its step, and a newer edit is still sent";progress.test.ts"keeps the time of every body-edit-dropped step with the forwarded ones"forward-waitdoes not keepadvanceatrunning— "a call whose every send was refused holds no gate and leaves no wait" (outcome{0,false},forward-wait-cancelled 1,advance→ready-for-gate, then a fresh marker on the next send);progress.test.ts"a cancel for the idle marker clears the wait and restores the last wait", "a cancel does not undo a marker a send used"Gate
factory/scripts/check.sh→ exit 0 (check-seams;vp test run apps/server/src/factory: 41 files, 1666 tests passed;vp run --filter t3 typecheck;vp run --filter @t3tools/web typecheck). Log:.factory/gate-0.log(not committed).Models
modelsblock in.dw/config.yml, so Tom's roster)Review
3aeeda02a)!editSentfrom the cancel condition) and testing-2 (nit) →e353b8d51, a test on an idle session that pins the marker stays when the edit went in; the mutant now fails that testforward-waitand its cancel, and the refused comment then disappears before the next pass (deleted, or now reported as a tracker drop), the nothing-to-send early return never cancels the idle marker and the run waits until the time limit. Both reviewers note the same stale wait exists today for a crash between the marker and the first send. Out of this issue's scope; a follow-up could cancelseen.idleForwardWaiton the early-return path when the session is still idle at that ordinal.Lessons
t3/c19a1b2a(from the session's git status snapshot) while the factory's worktree was ont3/factory-issue-74; the maker noticed and stayed put. Cause: the factory names its worktree branch after the issue, and the snapshot was taken before that. Default: rungit branch --show-currentat Isolate and put that name in every packet and push.test:commit red in place, not in a detached worktree. Symptom: a detached worktree needs its ownnode_modulesand a fresh install to run vitest. Default: with the maker and reviewers idle andgit statusclean,git checkout <base> -- <the product files>(name each path; zsh does not split an unquoted$VAR), run the contract's test files, thengit checkout HEAD -- <the same paths>and run once more for green. Record both counts on the receipt.Commits
413e6231etest(factory): pin that a forward T3 refuses is dropped with a notice— Make slice (red: 13 failing)3aeeda02afix(factory): drop a forward T3 refuses with a notice instead of retrying forever— Make slice (green)e353b8d51test(factory): a sent edit keeps the forward-wait its refused comments shared— Check cycle 1Files
forwardcatches a refusal per send, goes on, counts only what was sent, cancels an idleforward-wait, and tells the issue through onetellIssuehelper (replacesreportDrops)BODY_EDIT_DROPPED,FORWARD_WAIT_CANCELLED,Seen.idleForwardWait; the reader treatsbody-edit-droppedlikebody-edit-forwardedand applies the cancelREFUSED_BODY_EDITDropReasongains"refused"(the runner's own; the tracker never produces it)idleForwardWaitRun notes
214c0e092toorigin/main(5df529b18) at Isolate before any read or write.factory:*labels already existed; none created.