Repository navigation
fork-checks: refuse fork changes to upstream's Orchestrator.ts and agentContextBudget.json (T21) - #97
Conversation
…entContextBudget.json (T21) One more step in the existing "No database schema changes" job (no new workflow): a pull request must leave the listed upstream files exactly as main has them. The list is one config line (UPSTREAM_FILES) in fork-checks.yml. Judged like the schema check: the diff from the merge-base of the PR's base and head, so upstream's own changes, which reach main through fork-follow's rebase, are never the branch's. A listed file main no longer has fails closed. The new script and its tests join the schema check's guarded files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: correctness · reviewer: opus high (t3lens97) · read at: ca2c14f covered: checks:
finding 1 (high, blocks merge): finding 2 (high, blocks merge): Lint is red on this PR ( finding 3 (medium, gate not enforced): finding 4: none (the stale finding 5 (low): finding 6 (low): when upstream removes or moves a listed file, the refusal names only verdict: NOT SAFE (2 high findings that block merge: this PR's own |
…ies, lint fixes Lens t3lens97: the existence test failed in the sparse lint job, 4 lint errors, a listed directory let edits inside it pass, and the comment claimed a ruleset requires the check (none does yet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
fix round 1 · fixer: orchestrator (opus high) · head: d7604a9
🤖 Generated with Claude Code |
What it adds
One more step in the existing No database schema changes job of
fork-checks.yml(no new workflow, job name unchanged because rulesets require it):.github/scripts/fork-upstream-files-check.cjsrefuses a pull request that changes a listed upstream file in any way (edit, delete, rename away, file mode).UPSTREAM_FILES: apps/server/src/orchestration-v2/Orchestrator.ts apps/server/src/provider/agentContextBudget.json. To guard another file, add its path there.pull_request_target, default-branch copy).!cancelled()), so a PR sees both reasons.fork-checks.ymland the schema check): the owner merges past it.State question
--no-renames, so a rename shows as a delete of the listed path and is refused; mode-only changes are refused too.Tests
.github/scripts/fork-upstream-files-check.test.cjs(node--test, same style asfork-schema-check.test.cjs: real git in a scratch repository): 21 tests. A PR touching each listed file goes red (edit, delete, rename), an unrelated PR stays green, an upstream sync stays green (fork-follow's series check and a PR on the new main), base-moved cases, empty diff, mode change, the list read from the workflow line, the fail-closed missing file, and a workflow contract with mutants (dropped step, no list, noif, base/head swapped, tests not run).Red-checks: on the code without the change every test fails; broken variants of the script (always pass, diff from the base instead of the merge-base, no "main's copy" rule, no fail-closed, any-commit-ever, no mode check) are each caught by at least one test.
Also run:
fork-schema-check.test.cjs(61, one count made relative to the guarded list),fork-ci-tests.test.cjs,fork-contracts.test.py(all passed),fork-follow.test.sh(all passed). actionlint was not run locally (needs a download); CI's workflows job runs it. No TypeScript package touched, so no typecheck.General vs project
General: the script takes any list of paths and works for any fork that must leave some upstream files alone. Fork-specific: only the one
UPSTREAM_FILESline in this fork'sfork-checks.yml. Nothing names a project, machine or account.References
Spec: F3
waitfor.md, test T21 / rule R21 (fork add-ons in their own layers, upstream'sOrchestrator.tsandagentContextBudget.jsonuntouched). Check note:waitfor-check-2026-11-14.md, sections 3.4 and 6 (row T21: extendfork-checks.yml, no new workflow).🤖 Generated with Claude Code