GeezerVison is showing github.com — Pass loop: claim ready issues fairly · Issue #15 · original-solutions/t3code-factory
Pass loop: claim ready issues fairly #15DescriptionOutcome
The fork watches its configured repos and claims approved, unblocked factory:ready issues the way softfac's pass does.
Acceptance criteria
FactoryLayer runs a pass when the server starts and every poll_seconds after. Passes never overlap. wake() starts the next pass now if none is running.
- For each configured repo a pass reads the
factory block from the default branch, lists factory:ready issues oldest first, applies the approval rule and blockers, and claims while slots are free. max_concurrent_runs slots in all; a run holds its slot from claim until pr-open, needs-info or stuck; the repo with the fewest runs goes first.
- A claim needs an issue with no assignee. It assigns the factory's login, swaps
factory:ready for factory:triage, and writes claimed to a new run file. A refusal moves the issue back to factory:proposed with softfac's comment.
- An untracked claim (
factory:triage, assigned to the factory's login, no run file) older than 15 minutes is handled as softfac handles it.
- While
<data>/claims-paused exists no claims are made, and the pass logs that once per pass.
- Machine log lines (
pass_started, claim_skipped and the rest) match softfac's.
- softfac's tick tests for ordering, fairness, slots, pause and untracked claims (
src/tick/tests) are ported and pass.
Depends on
Notes
Reference
- softfac, the Rust factory this ports, pinned at
rawphp/softfac@bf273a1. Read it from a separate clone: git clone --filter=blob:none https://github.com/rawphp/softfac /tmp/softfac-ref && git -C /tmp/softfac-ref checkout bf273a1d93651992b4fc95b4dd6c111f8f3322cf. Its docs/lifecycle.md, docs/reference/ledger.md and docs/issues.md describe the behaviour; its tests pin it.
- Design:
factory/docs/design.md in this repo.
- Upstream's
AGENTS.md applies. Run only the tests and typechecks for the paths you touch (vp test run <path>, vp run --filter t3 typecheck), never the repo-wide checks.
- Edit no upstream file that is not listed in
factory/SEAMS. A new seam needs a line in factory/SEAMS and a reason in the PR body.
- Port behaviour, not code: port the named test cases first (TypeScript, vitest /
@effect/vitest), then make them pass. Exact comment and ledger wording is ported as is.
Activityrawphp commented on Oct 15, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|