Repository navigation
Cut-short scan stops re-reading label history for issues it never acts on - #53
Merged
Merged
Conversation
…s, isolates failures
Red: the tests call unassignedClaims with a known set and a ClaimMemo and expect a
{ claims, unread } result, none of which exist yet (compile errors count as red).
Issue: #48
… issues The scan took one serial GraphQL history call per unassigned triage/building issue on every pass, including issues the pass then dropped for having a run, and one failed read failed the scan for the whole repo. It now takes the issue numbers the pass has runs for and reads nothing for them, remembers issues judged not the factory's while their updatedAt is unchanged (for the life of the process), and reports a failed read for that issue only, which the pass prints as one error line. Issue: #48
…short scan The two new tests fail: such a failure is still swallowed into unread and the scan goes on to the next issue. Issue: #48
…scan A rate limit, a timeout or a gh spawn failure would fail every remaining history read, so it now ends the scan like a failing issue list does. Only GitHubFailed, GitHubParse and GitHubOutputTooLarge are kept per issue. Issue: #48
…c failures Four cases a mutation review showed were missing. They pass against the current code (test-only cycle): - index: a judgement that an issue is not the factory's lasts across passes of one world (one history read over two scans) - index: a failed history read reaches the pass as an unread entry with the issue and a non-empty message - github: an unparseable history is that issue's GitHubParse error and the next issue is still read - pass: a run in another repo is left out of the known set handed to the scan Issue: #48
rawphp
marked this pull request as ready for review
October 16, 2026 03:44
Author
|
Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head
|
…ssue and label The memo now keys by login, repo, issue and state label and stores the updatedAt it judged at, so a re-authenticated gh judges again and a newer judgement replaces the old one instead of piling up. Tests pin each part of the key, a re-read after a failed read, an oversized history as that issue's error, and a gh that cannot start ending the scan.
Author
|
Factory gate: passed again (attempt 2, run by the factory in a fresh checkout of the pull request's head
|
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 #48
Contract
unassignedClaimsskips issues the pass knows runs for and issues it already judged not the factory's at the sameupdatedAt; a history read that fails for that issue alone is reported for that issue and the scan goes on; the pass prints one error line per such issue; an issue that is the factory's is still moved tofactory:proposedas before.CLAIM_GRACE_MSorreleaseClaim; no new files.vp test run apps/server/src/factory/tracker/github.test.ts apps/server/src/factory/pass.test.ts apps/server/src/factory/index.test.ts→ pass (325 tests)Design decisions settled in this run:
updatedAt(the state label is added to the issue's key so an issue carrying both labels is judged per label).ClaimMemois built inliveWorld, which is built once per process, so a judgement lasts for the life of the factory process.GitHubRateLimited,GitHubTimedOutorGitHubSpawnErroron a history read would fail every following call too, so it ends the repo's scan as a failing list call does (one "cannot list the unassigned claims" line), instead of spending one refused call per remaining issue every pass. OnlyGitHubFailed,GitHubParseandGitHubOutputTooLargeare isolated per issue. This narrows "a history read that fails" in criterion 3 to the failures that are the issue's own; the budget protection the issue asks for is why.Acceptance criteria
github.test.ts"unassignedClaims reads no history for an issue the pass knows a run for";pass.test.ts"the issues with runs are handed to the scan so their history is not read"updatedAtis unchanged, one history call per issue over two scans —github.test.ts"unassignedClaims remembers an issue judged not the factory's while updatedAt is unchanged";index.test.ts"a judgement that an issue is not the factory's lasts across passes of one world"github.test.ts"unassignedClaims: a history read that fails is an error for that issue only" and "… an unparseable history is that issue's error and the next is still read";index.test.ts"a history read that fails is reported to the pass with the issue and the message";pass.test.ts"an issue whose label history cannot be read is one error line and the others are still moved"pass.test.ts"a triage or building issue with no run and no assignee is moved to proposed" andindex.test.ts"a cut-short claim is commented on, then moved to proposed" still pass; all 952 tests underapps/server/src/factorypassGate
vp test run apps/server/src/factory→ exit 0 (31 files, 952 tests)vp run --filter t3 typecheck→ exit 0Models
modelsblock in.dw/config.yml; roster default)Review
index.test.tscases proving the memo lives for the world and thatunreadreaches the pass; also the two nits (an unparseable history case, a run in another repo left out ofknown).Lessons
Read the branch name from git, not from the launch snapshot. Symptom: the first push failed with "src refspec does not match any". Cause: the harness's git status snapshot named a different branch from the one the worktree was on. Default: run
git branch --show-currentat Isolate and use that name on every push.Never
cdinto the skill directory to read a reference. Symptom: the session's working directory flipped to the skill checkout and back, and a later compound command ran from the wrong place. Default: read reference files by absolute path withcat; every product command starts withcd <worktree>.Pass
--repo <owner/repo>togh pr createin a fork. Symptom: the draft PR opened on the upstream parent (pingdotgg/t3code#20137, closed within a minute) instead of the watched repo. Cause: a checkout with anupstreamremote makesghdefault to the parent repository. Default: always pass--repowith the issue's repo and--headwith the worktree's own branch name, then check the URL's owner before linking.Commits
aa444d356test(factory): cut-short scan skips known issues, remembers judgements, isolates failures— Make slice (red)a8fc4b268fix(factory): cut-short scan reads no history for known or remembered issues— Make slice (green)bc58f39a6test(factory): a rate-limited or timed-out history read ends the cut-short scan— Check cycle 1 (red)ba10b6f22fix(factory): only a call's own failure is isolated in the cut-short scan— Check cycle 1 (green)ac95256fdtest(factory): cover the cut-short scan's wiring and the call-specific failures— Check cycle 2 (test-only, no red phase: behaviour already worked)Files
ClaimMemo,ClaimScan,isCallSpecific;unassignedClaimstakesknownandmemo, isolates an issue's own failureClaimScanResult,Known.issues; the pass hands known issues to the scan and prints one error line per unread issueClaimMemoperliveWorld; maps tracker errors to messages for the passLabels: all seven
factory:*labels already existed; none created. The worktree was fast-forwarded from e4bcce9 to origin/main (9e80956) at Isolate.