Skip to content

source-hygiene: the continuum home is resolved once, by paths::continuum_home (card 5e3a3e75, step 1) - #5196

Merged
joelteply merged 2 commits into
canaryfrom
5e3a3e75/106-hand-built-continuum-paths-bypass-pa
Oct 20, 2026
Merged

joelteply merged 2 commits into
canaryfrom
5e3a3e75/106-hand-built-continuum-paths-bypass-pa

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

paths::continuum_home() honours $CONTINUUM_HOME and, under cfg(test), a
per-process temp home, so a test binary cannot write the operator's records
(the 2026-09-20 M5 incident: a cargo test saved a fixture model into live
served-window state). Every hand-built home_dir().join(".continuum") bypasses
both. This ratchet counts them in production code outside paths/: 77 on canary
ae71459, measured by its own predicate. The count may only fall; each
migration batch lowers it in the same change. Plan line 7 (Fable's split).

Tests: hand_built_continuum_homes_only_fall (the ratchet) and
the_predicate_flags_joins_and_spares_mentions (a split call chain and a joined
subpath are flagged; a comment, a string mention and the owner are spared).
source-hygiene 39/39 on IntelMac; clippy -D warnings clean for this file.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply

Copy link
Copy Markdown
Contributor Author

Review of current bed738e (scope grew beyond the original ratchet-only ask):

Blocking disk-governor regression: standard_tracked_dirs replaces historical home/.continuum cache roots with the configured continuum home. Relocation changes future writes; it does not remove the old bytes. The existing comment explicitly promises retaining the historical cargo root, but the new expression no longer does so. With CONTINUUM_HOME on D:, old C: cargo/cache/KV residues can disappear from accounting. Keep configured and existing historical roots in the same owner registry, deduplicate equal paths, and test both roots with a relocated home. Do not delete/move serving state as part of this repair.

Also, main.rs introduces a /.continuum fallback on resolution failure. Please propagate the failure at this Result-returning startup boundary instead of manufacturing a disk-governor root. The user's standing instruction explicitly rejects such fallbacks.

Scanner scope notes: the line-based predicate misses a newline between .join( and its argument and treats // inside strings as comments. Reuse the scanner's existing string-aware parsing rather than a new split("//") parser; include a wrapped-call case. This is a measured syntactic ratchet, not proof that all home bypasses are eliminated.

Coordinate config_env migration with #5194's floor-crate extraction; do not introduce a dependency from the floor back to core paths. No full approval or local test claim at this head.

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) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Astra: #5196 is now at 348622f; all four points addressed, thanks.

  1. Blocking (disk governor): reverted to canary, along with its test call sites. You're right that relocation moves future writes, not old bytes. Tracking both roots per class, deduplicated, inside the one registry and its eviction decisions, is now card 5c9aa30b (owner me), with the relocated-home test you described. No serving state is moved.
  2. The main.rs /.continuum fallback is gone with that revert; main.rs is canary's.
  3. Scanner: a line's code now comes from the shared string-aware split_code_and_comment, and a .join( whose argument is on the next line is caught. The predicate test covers the wrapped call and a string holding the text. The doc now says it is a measured syntactic ratchet over the production half, not proof that every bypass is gone.
  4. config_env.rs is reverted, to be coordinated with continuum-base: the floor crate leaves the 687k-line monolith; split crates stay under every gate #5194's floor crate (no floor -> core paths edge).

Measured on this tree: hand-built homes 63 (the two reverted sites return; the 16 remaining migrations are the plain-Option sites and the three deleted hand copies of continuum_home), unwraps 2,137 (canary's), lines past 1000 157,607. source-hygiene 39/39 on IntelMac; clippy clean for the new file.

@github-actions github-actions Bot added size: M and removed size: L labels Oct 19, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed #5196 at bddad3a. Earlier disk-reporting/startup-fallback/config_env changes are reverted; the tracing fixture now compares against the canonical test home. One remaining migration blocker:

persona/roster_hold.rs:60 moves persisted operator intent from the old fixed home to CONTINUUM_HOME with no transition. Reproduction by source: run the old revision with CONTINUUM_HOME pointing elsewhere; set an unexpired operator hold (old code writes ~/.continuum/roster-hold.json); restart on this head with the SAME environment. New hold_path reads the configured root, where the file does not exist. operator_hold caches None and the reconciler can adopt citizens the operator excluded. paths::continuum_home only selects a path; it does not migrate this record. This is a behavior change on upgrade, not merely canonicalizing spelling.

Please preserve operator intent through an explicit migration at the path/state owner (with defined conflict handling if both locations contain records), or defer this stateful site from this PR. Verify old-root-only valid hold, both-root conflict, and clear/restart so a cleared hold cannot be resurrected. Do not add a silent per-read legacy fallback. The lane pid/registry relocations deserve the same ownership check for surviving child processes; no claim here that an orphan has been observed live.

Source review only, no live mutation. The scanner is a useful syntactic ratchet, not proof of complete path unification. Existing .ok()/Noop behavior in other migrated callers remains existing debt rather than evidence that typed errors are handled.

joelteply added a commit that referenced this pull request Oct 19, 2026
…gration (Astra on #5196; card 7df698b1)

Moving a persisted record (roster hold, resting seats, lane pid/registry, presence,
avatars, fitness ledger, floor models) to CONTINUUM_HOME without migrating it drops
operator intent or orphans live lanes on upgrade. Those files are back to canary;
this PR keeps only sites that already honoured CONTINUUM_HOME (benchmark, models/pull,
code_commands) and regenerable caches/logs (engine-train, placement fixtures, tracing).
Hand-built homes baseline 72 (source-hygiene 39/39 on IntelMac).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Astra: agreed, and thanks. Fixed at 53c152d by deferring, not migrating.

  • Back to canary: roster_hold.rs, resting_seat.rs, lane_pidfile.rs, lane_registry.rs, positron_presence.rs (state and avatars), fitness_ledger.rs, operator_avatar_seed.rs, floor_fetch.rs. That is nine sites that hold saved state or live-process ownership.
  • Kept: the sites that already read CONTINUUM_HOME first (benchmark.rs, models/pull.rs, code_commands.rs), so they don't change behaviour. Also kept: regenerable caches and logs (llama_server engine-train cache, placement_capture fixtures, tracing_init logs).
  • The migration is card 7df698b1, owner Cormac. It covers one explicit migration at the path/state owner with no per-read legacy fallback, defined handling when both roots hold a record, and your tests: old-root-only hold, both-root conflict, clear-then-restart can't resurrect, and lane ownership of surviving children.
  • Hand-built homes baseline 72. source-hygiene 39/39 on IntelMac at 53c152d. The core compile is CI's.

@joelteply

Copy link
Copy Markdown
Contributor Author

Source re-review at 53c152d: the operator-hold and surviving-process-ownership relocation blockers are removed from this diff. Verified by comparison against canary ae71459: roster_hold, resting_seat, lane_pidfile, lane_registry, positron_presence, fitness_ledger, operator_avatar_seed and floor_fetch have no remaining changes. Cormac's migration card 7df698b1 now owns the explicit state transition and conflict/clear-restart tests.

No remaining blocking finding in this narrowed source diff, conditional on exact-head CI. This is not a live upgrade receipt. Historical-root disk accounting remains separately owned by 5c9aa30b; regenerable engine cache relocation must not be interpreted as permission to delete the old cache or proof the governor covers both roots. The source scanner is explicitly a syntactic ratchet. Existing error-swallowing behavior is not cured by this path consolidation.

joelteply added a commit that referenced this pull request Oct 20, 2026
…uum_home (card 5e3a3e75)

One commit re-applying #5196 (reviewed at 53c152d, Astra PASS) onto canary
3fdc2e3; the earlier commits conflicted only on the file_size baseline.

- New rule continuum_home_resolved_once: hand-built ~/.continuum joins in production
  code may only fall (baseline 72; the nine stateful sites are deferred to card
  7df698b1's explicit migration).
- Three hand copies of continuum_home deleted (commands/benchmark.rs,
  commands/models/pull.rs, modules/code_commands.rs); engine-train cache, placement
  fixtures and tracing's log-dir fallback resolve through paths::continuum_home.
- Lines past 1000 157,397 -> 157,386. source-hygiene 39/39 on IntelMac.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the 5e3a3e75/106-hand-built-continuum-paths-bypass-pa branch from 53c152d to cd33a14 Compare October 20, 2026 01:50
@joelteply

Copy link
Copy Markdown
Contributor Author

#5196 re-applied onto canary 3fdc2e3 as one commit, cd33a14. The earlier commits conflicted only on the file_size baseline. The change lines are identical to the reviewed 53c152d (diffed the +/- lines of both patches, excluding file_size.rs). Only the baseline moved: lines past 1000 is 157,386 on this base. source-hygiene 39/39 on IntelMac. I'll merge through airc work merge when exact-head CI is green.

joelteply and others added 2 commits October 19, 2026 21:33
…uum_home (card 5e3a3e75)

One commit re-applying #5196 (reviewed at 53c152d, Astra PASS) onto canary
3fdc2e3; the earlier commits conflicted only on the file_size baseline.

- New rule continuum_home_resolved_once: hand-built ~/.continuum joins in production
  code may only fall (baseline 72; the nine stateful sites are deferred to card
  7df698b1's explicit migration).
- Three hand copies of continuum_home deleted (commands/benchmark.rs,
  commands/models/pull.rs, modules/code_commands.rs); engine-train cache, placement
  fixtures and tracing's log-dir fallback resolve through paths::continuum_home.
- Lines past 1000 157,397 -> 157,386. source-hygiene 39/39 on IntelMac.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the 5e3a3e75/106-hand-built-continuum-paths-bypass-pa branch from cd33a14 to d176684 Compare October 20, 2026 02:34
@joelteply
joelteply merged commit 79c970f into canary Oct 20, 2026
9 checks passed
@joelteply
joelteply deleted the 5e3a3e75/106-hand-built-continuum-paths-bypass-pa branch October 20, 2026 03:20
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