Skip to content

ci: upstream merges must keep every signalbox hook line - #693

Merged
JustYannicc merged 1 commit into
mainfrom
ci/upstream-sync-hooks
Oct 16, 2026
Merged

JustYannicc merged 1 commit into
mainfrom
ci/upstream-sync-hooks

Conversation

@JustYannicc

Copy link
Copy Markdown
Owner

Problem

"Hooks intact" on an upstream sync PR is checked by eye. #5 moves the sync into a Signalbox automation that merges through the signalbox folder's Merge gate with every client closed, so the gate needs machine evidence that a PR is a real upstream merge that kept every signalbox: hook line. A branch name or title isn't evidence.

Fix

  • scripts/upstream-sync/check-hooks.ts runs in the Upstream Merge job on PRs. When the head brings in upstream commits the base lacks, it diffs base...head and fails when a removed hook line isn't added back anywhere. Matching is by hook text, so a hook that moved with upstream's refactor counts as kept, and hooks main gained after the branch left don't count. A hook in a file upstream deleted (not renamed) is a notice, not a failure: it went with the code it hooked.
  • A new Upstream Sync job runs only when the head merges upstream, and needs Upstream Merge to pass. It's skipped on every other PR, so it stays out of Check's needs (which fails on skipped jobs).
  • The runbook says what the check does.

The diff approach matters in CI's blob:none checkout. Grepping both full trees fetched blobs one by one (75–90s) and hit a promisor fetch error. The diff prefetches in one batch: 2–3s.

Verification

Closes #692. Part of #5, map #384.

🤖 Generated with Claude Code

The Upstream Merge job fails a PR that merges upstream T3 Code and drops a
signalbox: hook line, unless upstream deleted the hook's file. A new Upstream
Sync check passes only on such a PR, as evidence a folder's Merge gate can
trust (#692, for #5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JustYannicc
JustYannicc merged commit f284ba4 into main Oct 16, 2026
18 checks passed
@JustYannicc
JustYannicc deleted the ci/upstream-sync-hooks branch October 16, 2026 19:33
@JustYannicc

Copy link
Copy Markdown
Owner Author

Merged by the coordinator. CI was green on the head, with no bot findings. The builder's live proof is in this PR. A scratch merge of current main with #665, #706, #688, #693 and #651 passed: contracts 676 tests, automations 24, the api parity check 21, cloud GitHub and automations 38, mobile 17, plus server layer, compiler and upstream-sync hook tests. Typecheck was clean for contracts, cloud, server, web and mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI proves an upstream merge kept every fork hook

1 participant