GeezerVison is showing github.com — GitHub: the approval rule and blockers by rawphp · Pull Request #44 · original-solutions/t3code-factory
Conversation
rawphp
commented
Oct 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Closes #13
Contract
- done:
makeGitHub gains approval, textCheck, textEditedSince, openBlockers and textBlockers, reading label events, renames and the body's edit history with softfac's approval GraphQL query byte for byte and the same gh argv; a pure dependsOn parser for the ## Depends on section; domain/approval.ts holds the Approval, Refusal and TextCheck types and the pure refusalReason and unapprovedComment with softfac's exact wording. softfac's tracker-level tests are ported.
- out: claim, the start step, when to post the refusal comment and the second look (Pass loop: claim ready issues fairly #15, Start: launch the /factory session for a claimed issue #16);
activity_since, mover, ready_by, pr_feedback; Linear; every upstream file.
- settled (rawphp, 2026-10-15): tracker-level tests from
src/github.rs instead of the runner "start:" sections; textCheck and textEditedSince ship here; the refusal comment is a pure domain function.
- risk: none
- test:
vp test run apps/server/src/factory/tracker apps/server/src/factory/domain → pass (279 tests, 7 files)
Acceptance criteria
- The approval rule: who applied the current
factory:ready, then every body edit and title rename at or after that moment; same second counts as after; only User actors; logins match without regard to case; approved or one of the four fixed refusals — tracker/github.test.ts "approval reads the real shapes and sends one call", "an edit in the same second as the label counts as after it", "a rename in the same second as the label counts as after it", "a label applied by an actor that is not a user is refused whatever its login", "the instructor comparison ignores case", "a hundred events of a longer history without the label is incomplete"; wording in domain/approval.test.ts "is softfac's literal comment for an edit after the label" and "for a history that is too long".
- Same GraphQL queries as softfac —
tracker/approvalHistory.test.ts "the approval query is softfac's, byte for byte"; argv in the ported delegation tests ("makeGitHub approval sends one graphql call", "makeGitHub text check sends one graphql call per check").
- Blockers: open
blockedBy links; otherwise each #n and owner/repo#n under ## Depends on up to the next heading that is still open; an unreadable blocker is an error — tracker/github.test.ts "open blockers keep the repo they are in", "text blockers are the named issues that are not closed", "a named issue that cannot be read is an error, not a resolved blocker", "an open blocker whose repo is unknown is an error, not a guess"; domain/dependsOn.test.ts (the 13 depends_on_* cases).
- Tests ported (as settled by the instructor): all
approval_* and the rest of softfac's approval section, text_check_*, text_edited_since_*, the open_blockers block, text_blockers_*, depends_on_*, and the two "Issues impl for GitHub" delegation tests for approval and text_check. Not ported: unchanged_since_is_the_text_check_said_unchanged (its subject, unchanged_since, is not shipped); the other unchanged_since_* cases were ported as textCheck cases because they pin shared cut-off rules.
Gate
factory/scripts/check.sh → exit 0 (.factory/gate-1.log: seams clean; vp test run apps/server/src/factory 670 passed in 24 files; vp run --filter t3 typecheck 0 errors; vp run --filter @t3tools/web typecheck 0 errors)
Models
- maker: claude-sonnet-5-5 (no
models block in .dw/config.yml; Tom's roster)
- checker: claude-opus-5-5
- orchestrator: this session
Review
- cycles: 2
- cycle 1 (correctness, security, maintainability, read-only): correctness approved and confirmed the
docs/issues.md prose asks nothing the code does differently; security approved; maintainability-1 (pure logic left in github.ts, file over 1k lines) → refactor: commit splitting tracker/approvalHistory.ts and domain/dependsOn.ts.
- cycle 2 (testing, mutating, once): 12 named mutants, 11 killed, 1 survived (testing-1:
openBlockers had no test for a state that is neither open nor closed) → test: commit pinning softfac's exact rule (only the lowercase closed resolves a blocker).
- fixed: maintainability-1, testing-1
- leftovers: testing-2 (nit, dropped): the pure functions in
approvalHistory.ts are covered only through makeGitHub; all 11 kills came from those tests. github.ts is 1170 lines after the split; the remaining size is pre-existing gh calls this issue did not touch.
Notes
-
The worktree the factory launched was cut from a stale main; it was fast-forwarded to origin/main (465a1e5) at Isolate, clean tree.
-
No labels created: all seven factory:* labels exist on the repo.
-
Red phase verified: with the product files at the test: commit, 90 of the ported tests fail; all pass at the feat: tip.
-
Two differences from the Rust that the tests cannot see: an issue number above 2^53 in ## Depends on is skipped (JS safe integers), and the ## Depends on heading match uses toLowerCase(), which differs from eq_ignore_ascii_case only for non-ASCII headings.
-
The first gh pr create without --repo opened the draft on the fork's parent, GitHub: the approval rule and blockers pingdotgg/t3code#20040; it was closed within a minute with a comment and recreated here. Nothing else was written to the upstream repo.
Lessons
- Do not prescribe
timeout in a reviewer packet on macOS. Symptom: the mutating reviewer reports timeout is not installed and bounds each run by the tool's own limit instead. Cause: the packet's example command used GNU coreutils' timeout, which macOS lacks. Default: say "bounded by the tool's timeout" or give a portable form (perl -e 'alarm 120; exec @ARGV' -- …), and keep one mutant per command so a hang costs one call.
- Check a size target against in-scope code before sending the finding to Make. Symptom: a maintainability finding asks for a file under 1,000 lines; the in-scope move lands at 1,170 because the rest is code the issue never touched. Cause: the reviewer's fix line named a number, and the maker reported a miss against it. Default: when a finding names a target the issue's own lines cannot reach, send the move and write the gap on the receipt instead of a second cycle.
- In a fork,
gh pr create needs --repo and --head. Symptom: the draft pull request opens on the upstream repository the fork was made from, not on the fork. Cause: gh resolves a fork's parent as the default repository for pull requests. Default: at Ship, always pass --repo <owner/repo from the issue> and --head <branch>, and read the URL back before linking or reporting it; if it names another repo, close it with a comment at once and recreate.
Commits
34cd4d6c1 test(factory): port softfac's approval, text check and blocker tests — Make slice (red)
f82bda835 feat(factory): the approval rule, text checks and blockers over gh — Make slice (green; also a two-line lint fix in the ported tests)
072e64cb0 refactor(factory): split the pure approval judgement and Depends on parser out of github.ts — Check cycle 1
f96097b2e test(factory): a blocker in a state other than the exact \closed` still blocks` — Check cycle 2
Files
- apps/server/src/factory/tracker/github.ts — the five new
gh-calling methods and Blocker
- apps/server/src/factory/tracker/approvalHistory.ts — the approval query, GitHub's answer shape and the pure judgement over it
- apps/server/src/factory/domain/approval.ts —
Approval, Refusal, TextCheck, refusalReason, unapprovedComment
- apps/server/src/factory/domain/dependsOn.ts — the
## Depends on parser
- apps/server/src/factory/tracker/github.test.ts, tracker/approvalHistory.test.ts, domain/approval.test.ts, domain/dependsOn.test.ts — the ported tests
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Issue: #13
Red: domain/approval.ts and the new github.ts exports do not exist yet.
…arser out of github.ts
Issue: #13
Addresses maintainability-1.
…ll blocks
Issue: #13
Pins the rule testing-1 found untested: openBlockers resolves a row only on
REST's exact lowercase `closed`, as softfac does. Passes at this tip.
|
Factory gate: passed (attempt 1, run by the factory in a fresh checkout of the pull request's head f96097b merged with the base branch tip 9e349c7)
| Command |
Exit |
Time |
factory/scripts/check.sh |
0 |
31.6 s |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…val in pure code
- textBlockers resolves a named issue only on the exact REST state `closed`, as openBlockers does.
- textBlockers refuses a Depends on section naming more than MAX_DEPENDS_ON (100) issues before
reading any of them, so an issue body cannot fan out into thousands of gh calls.
- dependsOn skips an owner or repo made only of dots, which would step out of the API path.
- The approval judgement and textEditedSince's decision move into pure judgeApproval and
editedSince in approvalHistory.ts, with unit tests; github.ts only reads the history.
- The approval query's page sizes come from HISTORY_PAGE, and the two cut-off checks share isCutOff.
|
Factory gate: passed again (attempt 2, run by the factory in a fresh checkout of the pull request's head fcd513a merged with the base branch tip 9e349c7)
| Command |
Exit |
Time |
factory/scripts/check.sh |
0 |
31.6 s |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|