GeezerVison is showing github.com — Pass loop: claim ready issues fairly by rawphp · Pull Request #20083 · pingdotgg/t3code
Pass loop: claim ready issues fairly
#20083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from 1 commit
Commits
Show all changes
168 commits
Select commit
Hold shift + click to select a range
55f49ea
chore: factory block for softfac
rawphp Oct 15, 2026
e4bcce9
Merge pull request #29 from original-solutions/factory/dw-config
tomkaczocha Oct 15, 2026
7abf1e1
test: factory layer logs factory started
rawphp Oct 15, 2026
f5af01a
feat(server): wire an empty FactoryLayer through server.ts
rawphp Oct 15, 2026
595cc20
test: check-seams.sh passes allowed changes and names unlisted ones
rawphp Oct 15, 2026
f07d8e2
feat(factory): add UPSTREAM, SEAMS and check-seams.sh
rawphp Oct 15, 2026
95afcec
test(factory): boundary test for factory imports
rawphp Oct 15, 2026
611af0d
docs(factory): design copy and README
rawphp Oct 15, 2026
cc1c0ac
test(factory): import vitest helpers from vite-plus/test
rawphp Oct 15, 2026
cbcf91a
test(factory): rename into an allowed path is named, seam assertions …
rawphp Oct 15, 2026
0aadcf1
fix(factory): check-seams.sh diffs without rename detection
rawphp Oct 15, 2026
71ba6b4
fix(factory): close boundary and seam-check gaps from review
rawphp Oct 15, 2026
f1dba9a
Merge pull request #30 from original-solutions/t3/t3code-factory-issue-1
tomkaczocha Oct 15, 2026
4a84519
test(factory): check.sh runs the gate steps in order and stops at the…
rawphp Oct 15, 2026
5efa406
feat(factory): check.sh runs seams, factory tests and typechecks in o…
rawphp Oct 15, 2026
aef688a
ci(factory): factory-ci workflow runs check.sh on pull requests and p…
rawphp Oct 15, 2026
bf609da
docs(factory): gate and CI run factory/scripts/check.sh
rawphp Oct 15, 2026
30845a3
test(factory): check.sh test names its logs with a counter, not Math.…
rawphp Oct 15, 2026
c97ed4f
test(factory): check.sh test runs from a subdirectory and names calls…
rawphp Oct 15, 2026
212cf43
test: install, rollback and build version scripts
rawphp Oct 15, 2026
10a3b70
feat(factory): build, install and rollback scripts for the darwin-arm…
rawphp Oct 15, 2026
8b45673
test(factory): pin run() env allowlist, process-group kill and output…
rawphp Oct 15, 2026
5a1d95e
feat(factory): run commands with a cleared env, a time limit and an o…
rawphp Oct 15, 2026
b60ba30
fix(factory): process tests read time through Effect's Clock
rawphp Oct 15, 2026
f49f63b
docs(factory): answer open question 2, process.ts uses node:child_pro…
rawphp Oct 15, 2026
afde3af
test(factory): ledger run id, issue key, next attempt and timestamp t…
rawphp Oct 15, 2026
b7e3a11
feat(factory): ledger run ids, issue keys and timestamps
rawphp Oct 15, 2026
208f2f9
test(factory): ledger write, read, finish and crash-rule tests
rawphp Oct 15, 2026
f2e3f81
test(factory): sessions and paths adapter cases
rawphp Oct 15, 2026
ed64725
test(factory): a TERM-trapping grandchild gets its grace before SIGKILL
rawphp Oct 15, 2026
9463426
test(factory): port lifecycle and result-line tests from softfac
rawphp Oct 15, 2026
f0a605d
feat(factory): lifecycle transitions and result-line parsing in the p…
rawphp Oct 15, 2026
a5b811b
feat(factory): run ledger writer and reader
rawphp Oct 15, 2026
fb7399f
fix(factory): build.sh ignores host cargo config and bounds each smok…
rawphp Oct 15, 2026
9d2568d
test(factory): machine log writer and scanner tests
rawphp Oct 15, 2026
ace3154
feat(factory): machine log writer and scanner
rawphp Oct 15, 2026
0768fc4
test(factory): pin the Unicode whitespace rules of the result line
rawphp Oct 15, 2026
cbfc11c
fix(factory): give the whole group its SIGTERM grace, signal the lead…
rawphp Oct 15, 2026
2ff87a2
test(factory): text before FACTORY-DONE on the last line is no result…
rawphp Oct 15, 2026
3c84183
test: install keeps the live version on a bad archive; restart waits …
rawphp Oct 15, 2026
d0229ba
fix(factory): install validates the archive before replacing a versio…
rawphp Oct 15, 2026
4e286e0
test(factory): gate attempts count only a gate_command that fully parses
rawphp Oct 15, 2026
dd6c446
test(factory): pin env override, post-exit stray cleanup and argv std…
rawphp Oct 15, 2026
75d81f6
fix(factory): count a gate command only when every field parses
rawphp Oct 15, 2026
a2df0ce
test: reinstalling the current version keeps previous; invalid names …
rawphp Oct 15, 2026
d7462b8
test(factory): machine log writes an issue key as softfac's IssueKey …
rawphp Oct 15, 2026
7d855fa
fix(factory): write a machine-log issue key as softfac's IssueKey does
rawphp Oct 15, 2026
ca6554a
fix(factory): restore the LedgerOptions type dropped by the gate-atte…
rawphp Oct 15, 2026
fdf45a1
test(factory): open never creates a run file
rawphp Oct 15, 2026
8f5aa55
fix(factory): Ledger.open opens without creating the file
rawphp Oct 15, 2026
d5845d4
test(factory): the write path cleans a hand-built cause
rawphp Oct 15, 2026
3a030ce
fix(factory): clean cause text on the write path
rawphp Oct 15, 2026
3903c62
refactor(factory): one open-and-repair helper for the run file and ma…
rawphp Oct 15, 2026
92a0df4
fix(factory): write the u64 bound as 2 ** 64 for the gate-attempt check
rawphp Oct 15, 2026
380c5ff
refactor(factory): check the event field tables cover every data key
rawphp Oct 15, 2026
53d91d5
feat(factory): sessions adapter over T3's launch and projection services
rawphp Oct 15, 2026
aa0abf2
test(factory): port config parsing tests and the config-driven start
rawphp Oct 15, 2026
45a137e
feat(factory): load the machine config and start only when it is valid
rawphp Oct 15, 2026
55551d4
test(factory): blank ids fail typed, last assistant message is the last
rawphp Oct 15, 2026
24a0161
fix(factory): blank ids fail as the declared sessions errors
rawphp Oct 15, 2026
7265e29
refactor(factory): define the config error shape once
rawphp Oct 15, 2026
b679ddd
Merge pull request #31 from original-solutions/t3/factory-issue-2
tomkaczocha Oct 15, 2026
00bade3
fix(factory): trim the result line in linear time and drop unused mar…
rawphp Oct 15, 2026
4d016bb
fix(factory): typed sync spawn errors, bounded error attributes, inte…
rawphp Oct 15, 2026
92ae186
test(factory): sync.sh picks the newest nightly tag and merges it thr…
rawphp Oct 15, 2026
dc320eb
feat(factory): daily sync merges upstream's newest nightly tag throug…
rawphp Oct 15, 2026
d2ce21d
docs(factory): describe the daily upstream sync
rawphp Oct 15, 2026
a282f3b
fix(factory): status reads only runs and assistant messages
rawphp Oct 15, 2026
d9f006d
test(factory): sync.sh keeps the token from upstream code and stops o…
rawphp Oct 15, 2026
11c6cfd
fix(factory): sync.sh stops on a merge or push failure and keeps the …
rawphp Oct 15, 2026
dee5cff
fix(factory): smoke-test before release, share the job restart, mark …
rawphp Oct 15, 2026
a50605f
Merge pull request #36 from original-solutions/t3/factory-issue-5
tomkaczocha Oct 15, 2026
eada7ef
fix(factory): ledger handles see each other's lines, and retries sync…
rawphp Oct 15, 2026
a25530e
fix(factory): a dirty build's version carries a hash of its uncommitt…
rawphp Oct 15, 2026
434d8f9
Merge origin/main into t3/factory-issue-11
rawphp Oct 15, 2026
9b077e3
test(factory): sync.sh matches the conflicts issue title itself; modi…
rawphp Oct 15, 2026
159886a
fix(factory): sync.sh matches the conflicts issue title in shell, not…
rawphp Oct 15, 2026
a4cdc63
Merge pull request #37 from original-solutions/t3/factory-issue-11
tomkaczocha Oct 15, 2026
20cbe28
fix(factory): an append ends a cut-off last line before checking for …
rawphp Oct 15, 2026
e34bdd4
test(factory): run status change stream cases
rawphp Oct 15, 2026
e88277b
refactor(factory): expose run through a FactoryProcess service
rawphp Oct 15, 2026
36b6789
fix(factory): LedgerError is a tagged error, and the line-break repai…
rawphp Oct 15, 2026
034cdfb
test(factory): send, archive and removeWorktree on FactorySessions
rawphp Oct 15, 2026
8a65faf
Merge pull request #33 from original-solutions/t3/factory-issue-8
tomkaczocha Oct 15, 2026
8420dce
test(factory): an open whose cut-off-line repair fails is Io and a la…
rawphp Oct 15, 2026
b227c8f
feat(factory): stream of threads whose latest run changed status
rawphp Oct 15, 2026
af2ef33
feat(factory): send, archive and removeWorktree on FactorySessions
rawphp Oct 15, 2026
8826ac0
docs(factory): answer open question 4, T3 leaves an archived thread's…
rawphp Oct 15, 2026
57c4bb7
fix(factory): transition returns InvalidTransition as a typed failure
rawphp Oct 15, 2026
71c5aeb
refactor(factory): one Schema.TaggedError class per ledger failure
rawphp Oct 15, 2026
54af80e
test(factory): events contract asserts completed and proves no replay…
rawphp Oct 15, 2026
783be3f
fix(factory): an answered needs-info issue can go back to ready
rawphp Oct 15, 2026
fca723a
Merge pull request #35 from original-solutions/t3/factory-issue-9
tomkaczocha Oct 15, 2026
0362d86
test(factory): separate stderr and truncation flag for FactoryProcess
rawphp Oct 15, 2026
cb35ead
Merge pull request #32 from original-solutions/t3/factory-issue-10
tomkaczocha Oct 15, 2026
2646c2d
feat(factory): separate stderr and truncation flag for FactoryProcess
rawphp Oct 15, 2026
0dbf91c
fix(factory): build.sh refuses a tree with uncommitted changes
rawphp Oct 15, 2026
874956d
test(factory): second launch fails on a missing ref, not an exhausted…
rawphp Oct 15, 2026
23156bb
Merge remote-tracking branch 'origin/main' into t3/c78b74ad
rawphp Oct 15, 2026
64180c8
test(factory): port softfac's gh tracker cases
rawphp Oct 15, 2026
6ce1de0
feat(factory): gh tracker over FactoryProcess
rawphp Oct 15, 2026
c9ce5c1
Merge remote-tracking branch 'origin/main' into t3/factory-issue-12
rawphp Oct 15, 2026
aeb0727
Merge pull request #34 from original-solutions/t3/factory-issue-3
tomkaczocha Oct 15, 2026
938fa21
test(factory): events contract counts one id per status change of the…
rawphp Oct 15, 2026
04c6c63
test(factory): prove the removeWorktree wait and cover archive and se…
rawphp Oct 15, 2026
5db9a2a
Merge remote-tracking branch 'origin/main' into t3/factory-issue-4
rawphp Oct 15, 2026
3fd0495
test(factory): github tracker speaks the lifecycle State, refuses NUL…
rawphp Oct 15, 2026
353be93
fix(factory): github tracker uses the lifecycle State and refuses NUL…
rawphp Oct 15, 2026
5b21304
Merge remote-tracking branch 'origin/main' into t3/c78b74ad
rawphp Oct 15, 2026
557f045
test(factory): stub the filesystem so the removeWorktree wait needs n…
rawphp Oct 15, 2026
4d396f5
test(factory): fileAt refuses an oversize file whose content is whole
rawphp Oct 15, 2026
5acb4cc
test(factory): the gate's checkout, merge, commands, locks and cleanup
rawphp Oct 15, 2026
893c887
fix(factory): gh tracker types the secondary rate limit, a missing gh…
rawphp Oct 15, 2026
4c3a434
fix(factory): run status changes include a new run's first status
rawphp Oct 15, 2026
ed9fdb8
Merge pull request #41 from original-solutions/t3/factory-issue-12
tomkaczocha Oct 15, 2026
7a122b8
feat(factory): run a repo's provision and gate commands on a fresh ch…
rawphp Oct 15, 2026
952129a
Merge pull request #39 from original-solutions/t3/c78b74ad
tomkaczocha Oct 15, 2026
6cf596e
Merge remote-tracking branch 'origin/main' into t3/factory-issue-18
rawphp Oct 15, 2026
c610ca8
Merge remote-tracking branch 'origin/main' into t3/factory-issue-6
rawphp Oct 15, 2026
9b690bb
test(factory): port softfac's pull request, compare and check-run cases
rawphp Oct 15, 2026
e764b35
test(factory): a spawn error leaves no gate_command line, and git out…
rawphp Oct 15, 2026
9a11376
feat(factory): pull request reads and writes through gh
rawphp Oct 15, 2026
ce276d1
fix(factory): write a gate's command lines only when its commands hav…
rawphp Oct 15, 2026
06f885e
fix(factory): git calls parse stdout only and fail when they print pa…
rawphp Oct 15, 2026
307947e
fix(factory): sync.sh reports every stop, targets the fork, and keeps…
rawphp Oct 15, 2026
e979b80
fix(factory): remove a gate checkout without blocking the server's ev…
rawphp Oct 15, 2026
1019204
docs(factory): note the git environment drift, and share the results …
rawphp Oct 15, 2026
32b4a18
test(factory): markPrDraft reads the PR state after any failure
rawphp Oct 15, 2026
249fae9
fix(factory): markPrDraft reads the PR state after any failure
rawphp Oct 15, 2026
35c4efd
fix(factory): sync.sh lands exactly the checked commit and never wait…
rawphp Oct 15, 2026
4940198
fix(factory): a refused send fails as MessageRejectedError, archive i…
rawphp Oct 15, 2026
44cd981
test(factory): a check's conclusion and link come from the deciding run
rawphp Oct 15, 2026
848d2f6
test(factory): a head behind the base is checked for a second parent,…
rawphp Oct 15, 2026
adc30c8
fix(factory): a refused landing files an issue, and up to date reads …
rawphp Oct 15, 2026
b919a6f
test(factory): sync.sh reads UPSTREAM from origin's main, and a secon…
rawphp Oct 15, 2026
3cbe475
fix(factory): upstream code runs in a job with no write token
rawphp Oct 15, 2026
7dffcf6
fix(factory): removeWorktree deletes a leftover directory up to three…
rawphp Oct 15, 2026
fdaee1f
Merge pull request #40 from original-solutions/t3/factory-issue-6
tomkaczocha Oct 15, 2026
7f0d01c
Merge remote-tracking branch 'origin/main' into t3/placeholder
rawphp Oct 15, 2026
a75706a
fix(factory): pullRequest refuses a head that is not a full commit id
rawphp Oct 15, 2026
fd33a2d
test(factory): publish refuses forged merges; docs say what stays pre…
rawphp Oct 15, 2026
dd768b6
Merge pull request #42 from original-solutions/t3/placeholder
tomkaczocha Oct 15, 2026
9f418c1
fix(factory): only parsed git output is refused past the cap
rawphp Oct 15, 2026
fa51b2a
fix(factory): a regenerated route tree waits for a person instead of …
rawphp Oct 15, 2026
5ec8efc
docs(factory): a ledger failure while gate_command lines are written …
rawphp Oct 15, 2026
465a1e5
Merge pull request #38 from original-solutions/t3/factory-issue-4
tomkaczocha Oct 15, 2026
34cd4d6
test(factory): port softfac's approval, text check and blocker tests
rawphp Oct 15, 2026
f82bda8
feat(factory): the approval rule, text checks and blockers over gh
rawphp Oct 15, 2026
072e64c
refactor(factory): split the pure approval judgement and Depends on p…
rawphp Oct 15, 2026
9e349c7
Merge pull request #43 from original-solutions/t3/factory-issue-18
rawphp Oct 15, 2026
f96097b
test(factory): a blocker in a state other than the exact `closed` sti…
rawphp Oct 15, 2026
706ac98
fix(factory): a ledger failure once the attempt is counted is a GateR…
rawphp Oct 15, 2026
fcd513a
fix(factory): bound and tighten the Depends on reads, and judge appro…
rawphp Oct 15, 2026
a618ea5
Merge pull request #45 from original-solutions/t3/factory-issue-18
tomkaczocha Oct 15, 2026
88c871b
Merge pull request #44 from original-solutions/t3/factory-issue-13-1
tomkaczocha Oct 15, 2026
7061a13
test(factory): duration, unfinished run listing and the claims pause …
rawphp Oct 15, 2026
31812be
feat(factory): duration, unfinished run listing and the claims pause …
rawphp Oct 15, 2026
d31b95a
test(factory): gh login, the claim edit, unassigned claims and the ne…
rawphp Oct 15, 2026
4913224
feat(factory): gh login, the claim edit, unassigned claims and the ne…
rawphp Oct 15, 2026
768a8d5
test(factory): the claim: approval, the claim edit and its repair, re…
rawphp Oct 15, 2026
99efe70
feat(factory): the claim: approval, the claim edit and its repair, re…
rawphp Oct 15, 2026
74a39f3
style(factory): catch the missing-ledger tag with catchTags, as the l…
rawphp Oct 15, 2026
1863af8
test(factory): softfac's tick tests for ordering, fairness, slots, bl…
rawphp Oct 15, 2026
0a06867
feat(factory): one pass: load repos, count runs, handle untracked and…
rawphp Oct 15, 2026
cf3532a
test(factory): the pass loop runs at start, every poll_seconds, on wa…
rawphp Oct 15, 2026
1c66f2d
feat(factory): FactoryLayer runs the pass loop over the live world an…
rawphp Oct 15, 2026
dd396c2
test(factory): a FIFO pause file does not block, a failed start's err…
rawphp Oct 15, 2026
641145b
fix(factory): review cycle 1: a FIFO pause file cannot block, a faile…
rawphp Oct 15, 2026
File filter
Filter by extension
.md
(1)
All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
docs(factory): answer open question 2, process.ts uses node:child_pro…
Loading branch information
Uh oh!
There was an error while loading. Please reload this page.
commit f49f63b9bee1cd3bed683c8d4879a84d5e0db897
There are no files selected for viewing
Original file line number
Diff line number
Diff line change
Expand Up
@@ -56,10 +56,10 @@ One process, one binary, one LaunchAgent, one log. Agent sessions are ordinary T
```
apps/server/src/factory/
index.ts FactoryLayer: the only symbol server.ts imports
process.ts node:child_process with env allowlist, process group kill and a bounded output tail
t3/ the adapter: the only factory code that imports T3 internals
sessions.ts launch, send, archive, status over ThreadLaunchService, OrchestratorV2, ProjectionStoreV2
events.ts EventSinkV2.stream → wake the run that owns the thread
process.ts ProcessRunner (or node:child_process) with env allowlist and process groups
paths.ts ServerConfig → base dir, worktrees dir, factory dir
domain/ pure: lifecycle states, result-line parsing, approval, limits, fairness
ledger/ JSONL ledger, same format as softfac docs/reference/ledger.md
Expand Down
Expand Up
@@ -231,7 +231,7 @@ The fork replaces Rust softfac if its output is at least as good and the sync co
## Open questions to settle in step 1 or 2
1. Do routes added through `layerMakeRoutes` get T3's auth? The Factory page needs it. If they don't, the page has to use T3's RPC, which means more seams.
2. Does `ProcessRunner` kill the whole process group on timeout, and can it clear the environment? If not, ` process.ts` uses `node:child_process` directly, which needs no seam.
2. Answered (#8): `ProcessRunner` spawns through Effect's Node spawner, which does put the child in its own process group (`detached: true` on POSIX) and sends the group `SIGTERM` when the effect is interrupted. It cannot do the rest: it always extends the parent environment (`extendEnv` is true whenever `env` is set), it reads stdout and stderr on separate pipes, and on timeout it drops the partial output and never escalates to `SIGKILL`. `apps/server/src/factory/ process.ts` therefore uses `node:child_process` directly, outside `factory/t3/`, and needs no seam.
3. Is a YAML parser already a server dependency? If not, adding one touches `package.json` and the lockfile, so they join the seam list.
4. How does T3 handle a thread's worktree on archive? softfac removes worktrees with git today and may still need to.
5. Is the installed 0.0.46 nightly already on orchestration v2? The Rust factory works against it with protocol 2, so probably yes. It only affects which upstream tag the first sync starts from.
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.