Skip to content

continuum-base: the floor crate leaves the 687k-line monolith; split crates stay under every gate - #5194

Closed
joelteply wants to merge 4 commits into
canaryfrom
fable/continuum-base
Closed

joelteply wants to merge 4 commits into
canaryfrom
fable/continuum-base

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

First cut of card a31492cb (Joel: the slow build/check/test loop is the biggest bottleneck; 'Monolithic garbage is how').

What moves

core/continuum-base: time, config_env, secrets, id_resolve, fs_portable, shell_portable, audio_constants (~1,760 lines, zero Continuum dependencies; 451 references in 257 files) and the pure-tracing macros probe!, time_sync!, time_probe! (1,327 call sites). Moved with git mv; every reference rewritten to the owner; no re-exports; the root glob pub use audio_constants::* deleted.

Defects the cut surfaced, fixed here

  • config_env's test temp paths collided across runs (a per-process counter under the shared temp dir); now unique temp dirs.
  • continuum-core's spill test reached into fs_portable's private test module for its fence hook; now fs_portable::fault_injection behind a test-fixtures feature that continuum-core's own test-fixtures enables.
  • source-hygiene audited only continuum-core/src, so split code silently left every ratchet (the scanner's own extraction already opened that gap). It now audits each split crate with its name as a path prefix; totals stay continuous (158,103 / 2,140, identical to canary); wall_clock follows time to continuum-base.

Measured (M5, 2026-10-19)

Next cuts on the card: the logging unification (b22ed589) frees clog_*; rag wire types; governor/paging after Codex's interface crates.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits October 19, 2026 13:56
…he probe macros leave the 687k-line monolith

First cut of card a31492cb. Moved with git mv, every reference rewritten to the owner,
no re-exports: time, config_env, secrets, id_resolve, fs_portable, shell_portable,
audio_constants (~1,760 lines, zero Continuum dependencies; 451 references in 257 files)
and the pure-tracing macros probe!, time_sync!, time_probe! (1,327 call sites). The root
glob `pub use audio_constants::*` is deleted; users name the owner.

The cut surfaced two defects, fixed here: config_env's test temp paths collided across
runs (a per-process counter under the shared temp dir; now unique temp dirs), and
continuum-core's spill test reached into fs_portable's private test module for its fence
hook; it is now fs_portable::fault_injection behind a test-fixtures feature that
continuum-core's own test-fixtures enables.

Measured on the M5: continuum-base tests 27/27 in 4.84 s in its own target dir;
cargo check -p continuum-core --tests against it: 0 errors (21.5 min, the monolith tax).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…time to continuum-base

source-hygiene audited only continuum-core/src, so code split into a crate silently
left every ratchet (unwraps, file size, wall clock, layer discipline); the scanner's own
extraction already opened that gap. audited_files() now covers continuum-core plus each
SPLIT_CRATES entry with the crate name as a path prefix, so totals stay continuous across
a cut (158,103 lines past 1000 and 2,140 unwraps, identical to canary) and per-path rules
stay unambiguous; a listed crate with no src fails loudly. wall_clock's owner and bare
wrapper spellings follow time to continuum-base. The remaining red is canary's own
(#5015, reverted in #5192).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply force-pushed the fable/continuum-base branch from 5da25d1 to 8d69153 Compare October 19, 2026 18:57
joelteply added a commit that referenced this pull request Oct 19, 2026
…canner reads code the way the others do

- Blocking: standard_tracked_dirs is reverted to canary. Relocating the
  continuum home moves future writes, not old bytes; tracking only the
  configured root would hide historical C: residues (and break the comment's
  promise to keep the historical cargo root). Tracking both roots per class,
  deduplicated, is its own design with the eviction-decision registry: card
  to follow, owner Cormac. main.rs is reverted with it, which also removes the
  manufactured /.continuum fallback she flagged.
- config_env.rs is reverted: #5194 extracts the floor crate, which must not
  depend back on core paths; that migration is coordinated with it.
- The scanner now reads a line's code through the shared string-aware
  split_code_and_comment (a // inside a string is not a comment), and catches
  a .join( whose argument starts on the next line. The predicate test covers
  the wrapped call and a string holding the text. Its doc now says it is a
  measured syntactic ratchet over the production half, not proof that every
  bypass is gone.

BASELINE_HAND_BUILT_HOMES 63 on this tree (the two reverted sites return);
unwraps back to canary's 2,137; lines past 1000 157,607. source-hygiene 39/39;
clippy clean for continuum_home.rs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…nings back to the 75 baseline)

The moved macros are called by full path in these tests, so the import added with the
move was unused: CI's warning ratchet read 76 vs 75.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

PASS source review of the assigned claim at 95d80c4, conditional current-canary integration and exact-head CI.

Verified: continuum-core/lib.rs removes the moved module declarations and audio_constants glob; repository grep found no public re-export of the moved owners in continuum-core/src. continuum-base's manifest has no Continuum dependency. Both per-file scan and crate-wide scan now consume audited_files(); that enumerates continuum-core plus continuum-base with a crate prefix and fails if the named split src directory is missing. Wall-clock exemption follows the moved owner. Thus this extraction does not make moved code disappear from those scans. Test fixture feature is explicitly forwarded and enabled for core dev-dependencies.

Numeric qualification: this branch's merge base with ae714 is 719eed. Its 157645/2139 baselines are the pre-#5189 values, whereas current ae714 has 157618/2137. That is branch ancestry, not evidence this PR deliberately raised a gate. Integrate current canary and recompute rather than restoring old constants during conflict resolution. I verified scanner coverage structurally, not a fresh local measured count on this head; do not quote this review as an executed hygiene run. Please refresh the PR body, which still describes obsolete #5015/#5192 failures.

This cut enables independent leaf-crate checks; it does not by itself establish a faster core rebuild or live performance improvement. Windows native linkage and deployed consumer receipts remain separate from this source approval.

…r the moved doc path

continuum-base's fs_portable calls MoveFileExW on Windows, which continuum-core declared
and the new crate did not (CI windows-msvc: E0433 windows_sys). Declared with only the
two features it uses. KeysSetResult.ts regenerates because its doc comment now names the
moved path (ts-rs copies doc comments).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

PASS delta review 95d80c4 -> 5a88d8d: exactly three files, +6/-1. continuum-base adds cfg(windows) windows-sys 0.60 with Win32_Storage_FileSystem and Win32_Foundation, Cargo.lock adds that dependency edge, and KeysSetResult.ts changes only the secrets documentation path. No behavior or wire-field change beyond supplying the moved Windows implementation's required dependency. Prior source review stands at this head, conditional exact-head CI; no local Windows execution claimed for this head.

joelteply added a commit that referenced this pull request Oct 20, 2026
…5216)

* fix(deploy): a core built locally above the build key verifies as the key's core (card 98c0ae23)

build.rs stamps the HEAD a core was built at; `reboot --prebuilt` expected the checkout's
build key (CI publishes at key commits). A local build at a docs- or baseline-only commit
above the key is the same core (same build inputs) but refused as DEPLOY MISMATCH: #5210 on
the M5, 10-19, stamped 29a474d against key 9f97bc7.

One owner decides the expectation: prebuilt_artifact::prebuilt_expectation, beside
build_key_log_args. It accepts the stamp only when the stamp's own build key IS the
checkout's key; a stamp with different build inputs still refuses. checkout_build_key (was
continuum.rs::prebuilt_checkout_build_key) moved with it; continuum.rs is 25 lines shorter.

Test: a_local_build_above_the_key_is_the_keys_core_but_a_source_change_is_not (CI artifact at
the key accepted; local build at a docs-only HEAD accepted; a newer source change refused).
Mutation: with the stamp-key branch disabled the test fails; restored, it passes. The
continuum-cli-lifecycle tests run in 8.5 s. The 5 prebuilt bin tests: 4 pass; the fifth
(prebuilt_reboot_options_are_explicit_and_strict) fails identically on canary on macOS
(card de9ae95f), unrelated.

Hygiene: lines past 1000 156,825 -> 156,800 and spawn sites 123 -> 122 fell because this code
LEFT continuum-core/src for continuum-cli-lifecycle, which canary's hygiene does not audit yet
(#5194 adds split-crate auditing; cli-lifecycle should join it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(deploy): a typed key resolution decides, never the receipt wording (Codex on #5216)

checkout_build_key returns KeyResolution { BuildKey | NoKey | Unreadable }; prebuilt_expectation
admits a non-key stamp only on KeyResolution::BuildKey whose key matches the checkout's.
source() renders the receipt and is never consulted for a decision. The orphaned three-line
build-key doc above has_git_checkout is gone.

Tests: continuum-cli-lifecycle prebuilt 12/12; the bin's prebuilt tests 4/5, the fifth is the
macOS-only failure canary already has (card de9ae95f); source-hygiene 39/39.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
joelteply added a commit that referenced this pull request Oct 21, 2026
…e the monolith (redo of #5194 on post-split canary) (#5249)

* refactor(core): create continuum-base, the floor crate, and git mv the leaf modules into it

Card a31492cb, redone on post-split canary (supersedes #5194, whose branch cannot rebase
over the many files canary has since split). New crate core/continuum-base joins the
workspace and continuum-core depends on it. Moved with git mv, whole module trees:
time (mod + age), config_env, secrets, id_resolve, fs_portable (mod + replace),
shell_portable, audio_constants. They have zero Continuum dependencies, so none of their
crate:: paths needed repair. The probe!, time_sync! and time_probe! macros (pure tracing)
move out of routing/macros.rs into continuum-base/src/probe.rs, carrying canary's
probe!(target: ..., class = ...) arm; stack! stays because it needs continuum-core's
routing. The root `pub use audio_constants::*` is deleted: users name the owner.

fs_portable's publication-fence fault hook moves to fs_portable::fault_injection behind a
test-fixtures feature that continuum-core's test-fixtures enables, so continuum-core's
spill test no longer reaches into a private test module. config_env keeps canary's own
temp-dir fix (#5242).

References are rewritten in the next commit; this one is the move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(core): rewrite every reference to the moved modules and probe macros to name continuum-base

Mechanical rewrite by script, no re-exports left behind: crate::/continuum_core::/$crate::
time, config_env, secrets, id_resolve, fs_portable, shell_portable, audio_constants and
the probe!, time_sync!, time_probe! macros become continuum_base::... in continuum-core's
src, tests, benches and examples (1,779 substitutions across 538 files: ~451 module
references and ~1,327 macro call sites, matching #5194's count). The macros.rs doc example
now imports probe from its owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(hygiene): split crates stay under every gate; wall_clock follows time to continuum-base

source-hygiene audited only continuum-core/src, so code split into a crate would silently
leave every ratchet (unwraps, file size, wall clock, layer discipline). audited_files() now
covers continuum-core plus each SPLIT_CRATES entry, with the crate name as a path prefix so
totals stay continuous across the cut and per-path rules stay unambiguous; a listed crate
with no src fails loudly instead of auditing nothing. wall_clock's owner path and bare
wrapper spellings follow time to continuum-base. Same change as #5194's 8d69153, applied
cleanly onto canary's current scanner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(base): Windows dependency for fs_portable; binding doc path follows the moved module

continuum-base's fs_portable calls MoveFileExW on Windows, which continuum-core declares
and the new crate did not (windows-msvc would fail with E0433 windows_sys, as #5194's CI
did). Declared with only the two features it uses. KeysSetResult.ts changes because its
Rust doc comment now names continuum_base::secrets (ts-rs copies doc comments).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@joelteply

Copy link
Copy Markdown
Contributor Author

Superseded by #5249 (merged).

@joelteply joelteply closed this Oct 21, 2026
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