Skip to content

fix(gates): canary push gates pass on a clean tree — un-bypassed push proven (card 837e78fc, absorbs #1607)#1609

Merged
joelteply merged 6 commits into
canaryfrom
fix/canary-push-gates
Jun 11, 2026
Merged

fix(gates): canary push gates pass on a clean tree — un-bypassed push proven (card 837e78fc, absorbs #1607)#1609
joelteply merged 6 commits into
canaryfrom
fix/canary-push-gates

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The broken gate that forced every contributor to --no-verify is fixed, proven by this branch's own pre-push hook passing un-bypassed (the full CUDA test suite ran and the push landed at c999ada — the acceptance condition for card 837e78fc).

Stacks on / absorbs #1607 (widget→daemon import seam, already sentinel-APPROVED) — that PR was blocked ONLY on this gate. This branch = #1607's content + the gate repair:

  • build:ts: ts-rs bindings that required a full CUDA build to regenerate are now committed to their tracked location (868330a) — a clean clone no longer dies on missing bindings.
  • codegen path: entity_schemas output repointed to its tracked location (c999ada) — the src/scriptstools/scripts move (2cb63e0) had it writing to a stale path, the source of the src/workers/ untracked-junk and the TS6059 wave.
  • eslint ratchet held (4973), TS6059 rootDir resolved.

Validation: predecessor agent reported Phases 1/1b/2 green (TS 15s, ESLint ratchet 24s, cargo check 16s); the un-bypassed git push then carried the full pre-push suite and SUCCEEDED — branch is on origin. DOMInterestRegistry test (the #1607 content) stays 9/9.

Supersedes #1607 — close it on merge of this.

🤖 Generated with Claude Code

joelteply and others added 6 commits June 10, 2026 22:01
… 5ce8f820)

The browser widget bundle is now zero daemon-aware. Two seams removed:

1. CommandResponse types: BaseWidget imported CommandResponse /
   CommandSuccessResponse / CommandErrorResponse straight from
   daemons/command-daemon. They are now re-exported (type-only, single
   source of truth) from system/core/shared/Commands.ts, which BaseWidget
   already imports for Commands.

2. DOM interest registration: BaseWidget, BaseContentWidget, and
   WidgetEventServiceBrowser imported EventsDaemonBrowser solely for its
   static registerDOMInterest(). That state now lives in a daemon-free,
   reference-counted singleton (widgets/shared/services/DOMInterestRegistry)
   that the widgets populate and EventsDaemonBrowser consults in
   hasDOMInterest() - dispatch filtering behavior is unchanged, including
   prefix matching and the Events.domInterest check. registerDOMInterest
   and its static Set are removed (no callers remain).

Reference counting also fixes a latent bug: with the old Set, one widget
service unregistering an event name killed DOM dispatch for every other
widget still listening to it. Interest now persists until all
registrations are released.

New vitest unit test covers register/unregister/interest-count semantics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… move

Three stale-path/contract bugs that made the pre-commit hook unrunnable
in a fresh canary checkout (all fallout from moving src/scripts ->
tools/scripts and src/generator -> tools/generator in 2cb63e0):

1. tools/generator/generate-entity-schemas.ts still imported
   ../daemons/... and ../system/... as if it lived under src/ — module
   resolution failed before the build even started. Now imports via
   ../../src/.

2. tools/scripts/precommit-config.sh documented
   ENABLE_TYPESCRIPT_CHECK=false git commit as the local gate override,
   but then unconditionally exported the defaults, clobbering the env
   var. All gate flags now use default so the documented
   override actually works.

3. tools/scripts/git-precommit.sh looked for eslint-baseline.txt one
   dir up from the script (tools/), but the baseline lives in src/.
   The ESLint ratchet therefore always fell back to the strict
   per-file gate and blocked any commit touching a file with
   pre-existing debt. Path now resolves to <repo>/src/eslint-baseline.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same fallout family as the previous commit (src/scripts -> tools/scripts
move in 2cb63e0): SRC_DIR resolved to tools/ instead of src/, so
Phase 1 ran npm run build:ts against the wrong package.json (instant
missing-script failure), the ESLint baseline was sought at
tools/eslint-baseline.txt, and RUST_DIR pointed at the pre-substrate
src/workers/continuum-core crate location. Paths now anchor on the repo
root: SRC_DIR=<repo>/src, RUST_DIR=<repo>/core/continuum-core (matching
the hook's own error-message hints).

Note: even with these fixes the Phase 1 build:ts gate currently fails
on canary for everyone — src/tsconfig.json produces 612 pre-existing
TS6059 rootDir errors (plus missing generated ts-rs bindings on fresh
checkouts). That is a separate, larger repair.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three card failures fixed, plus the hook breakage found en route:

1. Missing ts-rs bindings (build:ts died on clean clones): restore the
   committed TypeScript bindings that the substrate-first layout move
   (2cb63e0) deleted from src/workers/continuum-core/bindings without
   re-adding at the new core/continuum-core/bindings location. The repo
   convention is committed generated TS (protocol/typescript is tracked),
   so the bindings are restored from 2cb63e0^ with their stale
   src-relative imports repointed (shared/generated -> protocol/typescript,
   shared/config -> src/shared/config). No Rust/CUDA build is needed on a
   clean clone.

2. tsc rootDir errors (612x TS6059 + downstream TS2307/7006/2531): since
   the layout move the TS program legitimately spans src/, protocol/
   typescript/, tools/, and core/, so rootDir "./" (src) cannot hold. Set
   rootDir "../" and update dist consumers for the nested dist/src layout
   (package.json main/browser/types/bin/exports, build:cli input, the
   models.json asset copy). Also repoint stale relative imports left by
   the src/scripts -> tools/scripts move (seed-in-process,
   SystemOrchestrator, DaemonConcurrency, shared/generated/ai, signaling)
   and fix tools/scripts own imports of src code. npx tsc --noEmit
   --project src now reports zero errors.

3. eslint ratchet "baseline can be lowered": locked in via the official
   regen path (scripts/ratchets/check-eslint-baseline.sh
   --update-baseline): eslint-baseline.linux.txt 5365 -> 4973. The
   darwin/default baseline (src/eslint-baseline.txt) can only be
   regenerated on a Mac; the first Mac push will be asked to lock its
   own win.

Hook repairs (the actual --no-verify forcing functions for Rust pushes):

- rustc 1.94 annotate-snippets renderer ICE (rust-lang/rust#157460,
  rust-lang/rust#157148) crashed cargo check/test/clippy with "compiler
  unexpectedly panicked" while RENDERING pre-existing warnings. The
  pre-push and pre-commit cargo invocations now use
  --message-format=short, which bypasses the broken renderer (the hooks
  discard or count diagnostics; exit-code semantics unchanged). The
  warnings that crashed the renderer en route are also genuinely fixed
  (unused imports/mut/bindings in bevy_renderer/commands.rs and
  live/transport/bridge_client.rs, cfg-safe for non-livekit builds).

- pre-commit clippy phase still used pre-substrate paths: it sourced
  scripts/shared/cargo-features.sh (gone; lives next to the hook) and
  cd-ed into workers/continuum-core (gone; core/continuum-core). The
  bad source aborted EVERY commit staging .rs files under set -e.
  Paths fixed, compile failures now fail loudly instead of "|| true",
  and the warning count regex matches short format (": warning:").
  src/clippy-baseline.txt regenerated with the documented command on
  the real feature set (cuda): 168 -> 217 (old count was human-format
  lines, also truncated by the renderer ICE).

- routing::uri_layer::no_subscriber_returns_empty_chain was order-
  dependent: any test that triggers tracing_init try_init installs a
  GLOBAL UriCaptureLayer, which captured this test's span and failed
  the full --lib suite (pre-push Phase 3). The test now pins
  NoSubscriber, which is its premise. cargo test --lib --features
  cuda,load-dynamic-ort: 4311 passed, 0 failed.

- protocol/typescript/orm/BaseEntity.ts: ts-rs regen output caught up
  with a doc-comment path fix in the Rust source (stale committed copy).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rd 837e78fc)

DiskPathReport/DiskPressureLevel/DiskPressureSnapshot are deterministic
ts-rs exports of tracked Rust (core/continuum-core/src/system_resources/
disk_pressure.rs, explicit export_to into protocol/typescript/system/).
Repo convention is committed generated TS; leaving them untracked makes
every cargo test run dirty the tree. Barrel entries match the generator
output format (sorted, export type) since generate-rust-bindings.ts
cannot currently be run end-to-end here (it still points at the
pre-substrate workers/ + shared/generated paths).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…card 837e78fc)

generate-entity-schemas.ts resolved its output as __dirname/../shared/
generated/ -- correct from the old src/scripts home, but after the tools/
move it silently dumped entity_schemas.json into untracked tools/shared/
generated/ on every build:ts while the tracked copy (protocol/typescript/
entity_schemas.json -- the path the file header documents and Rust
include_str!s in modules/entity_schemas.rs) went stale: it still carried
the social_credentials entity deleted with the social subsystem
(58e42af).

Output now resolves to protocol/typescript/entity_schemas.json, and the
regenerated file is committed (56 entities, social_credentials gone).
The generator-side sha-match skip keeps subsequent clean-clone builds
from dirtying the tree. Misdirected tools/shared/ output deleted, along
with the dead pre-substrate src/workers/ tree (stale cargo target/ +
unreferenced whisper.cpp vendor checkout at the old layout path, 89G).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joelteply

Copy link
Copy Markdown
Contributor Author

VERDICT: APPROVE

Gate-repair delta (d2852a3, 868330a, c999ada beyond #1607) verified adversarially in a fresh worktree — gates pass because the tree is genuinely clean, not because anything was weakened.

  1. Clean-tree pass PROVEN: npm run build:ts EXIT 0 (no missing-bindings error, no CUDA needed); tsc --noEmit --project src zero errors (the 612 TS6059 gone); eslint ratchet PASS at 4973 (exact, no slack). CI now green (validate + ratchet + label-pr).
  2. Committed bindings (protocol/typescript/system/Disk*.ts + barrel): tracked, not gitignored, faithful ts-rs renderings of disk_pressure.rs, matching the Rust export annotations — committed-generated-TS is established repo convention.
  3. Codegen repoint (generate-entity-schemas.ts:119): path-only to the tracked location matching the Rust include_str!; after build:ts the tree stays clean — src/workers/ and tools/shared/generated/ do NOT reappear.
  4. No gate weakened: path edits are stale-layout repairs; --message-format=short is a renderer-ICE bypass with exit semantics unchanged (precommit clippy actually STRENGTHENED from || true to loud fail); precommit-config defaults byte-identical; eslint baseline ratcheted DOWN 5365→4973.
  5. DOMInterestRegistry 9/9.
  6. MERGEABLE, canary is an ancestor.

The un-bypassed push that landed this branch already ran the full pre-push hook — this review confirms why it passed. Merging per CI-green + sentinel-APPROVE doctrine; closes #1607.

— adversarial sentinel (spawned by continuum-8e97 per AGENTS.md sentinel doctrine)

@joelteply joelteply merged commit 46832b4 into canary Jun 11, 2026
6 checks passed
@joelteply joelteply deleted the fix/canary-push-gates branch June 11, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant