Repository navigation
test(sentinel): isolate checkpoint tests via CONTINUUM_CHECKPOINT_DIR (#205) - #1544
Merged
Merged
Conversation
…#205) The three `modules::sentinel::checkpoint::tests` were writing JSON under the developer's real `~/.continuum/sentinel/checkpoints/` — visible as residual `test-list-*.json` files surviving across test runs on this machine (Jun 3, Jun 5 timestamps). Two real failure modes from this pollution: 1. On dev machines whose `~/.continuum/sentinel/` is root-owned (left over from any docker compose run that bind-mounted `$HOME` and chmod'd dirs under root), the writes fail → prepush flake. 2. Cross-test interference: `test_list_checkpoints` asserts the freshly-written handle appears, but pre-existing `test-*.json` files from other test invocations leak into that listing and could mask real regressions. Fix is two-part and minimal: - `checkpoints_dir()` reads `CONTINUUM_CHECKPOINT_DIR` first; falls back to the production `~/.continuum/sentinel/checkpoints/` path unchanged when the env var is unset. Production code path is unaffected. - `tests::ensure_checkpoint_dir_isolated()` installs a per-process `tempfile::TempDir` into the env var (held alive by `OnceLock` so Drop fires at process exit). Every test calls it at entry. The TempDir's path is `set_var`'d per test rather than once, because cargo runs tests in parallel and another test in the same binary could legitimately clear the env var (e.g. a future test that validates the fallback path). Carried forward from PR #971 (closed as too stale to rebase against current canary). Reapplied fresh against current module path (`src/workers/continuum-core/src/modules/sentinel/checkpoint.rs`). Tests: 3/3 `modules::sentinel::checkpoint::tests` pass, and confirmed post-fix that no new files appear under `~/.continuum/sentinel/`. Co-Authored-By: Claude Opus 4.7 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Oct 6, 2026
…held card lands airc #1544: a claim on a card someone else holds, live or lapsed, releases their claim in the taker's name (typed taken_over_from) and then claims. With it, this PR's claimable = "not settled" is exactly what work/claim accepts. work/list's help is rewritten shorter, so the agentic surface stays under its token ceiling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
joelteply
added a commit
that referenced
this pull request
Oct 6, 2026
…s who holds it and how long they've been silent (#4826) * fix(work): any card not settled is claimable by anyone; the board says who holds it and how long they've been silent Joel, 2026-10-06, on a dormant persona's lapsed hold that kept Kimi idle for a day: "allow anyone to take it at any time ... Last thing we want is stopped flywheel. Give the ais more power then only pull it back when its really a problem." And: "let ais make smart judgement calls like any engineer, always." - CardHolder::claimable is now "not settled": open, lapsed, or held live. A held card is taken over (airc releases the holder's claim in the taker's name, then claims). It is the predicate work/get and work/list report, so they can no longer say claimable while the gate refuses. - The board line names the holder and how long they've been silent ("owner Solomon, silent 23h — you can take it over"), as an AGE, never a timestamp ("just say how old"). The judgement is hers: no advice about whether to take it. - humanize_age moves to utils::age (recall and the board share one formatter), and humanize_span gives the "23h" form. - The automatic pull (claimable_by) is unchanged: it never hands anyone a live hold, so no scheduler yanks a turn in flight. A deliberate claim can take anything. - work/list's help states the takeover rule. Ships with the airc pin that carries the takeover (CambrianTech/airc card 667b7e0c). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc * fix(work): pin airc 841b5a099 (#1544, the takeover), so a claim on a held card lands airc #1544: a claim on a card someone else holds, live or lapsed, releases their claim in the taker's name (typed taken_over_from) and then claims. With it, this PR's claimable = "not settled" is exactly what work/claim accepts. work/list's help is rewritten shorter, so the agentic surface stays under its token ceiling. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reapplies the fix from closed PR #971 against current canary. Three
modules::sentinel::checkpoint::testswere writing to the developer's real~/.continuum/sentinel/checkpoints/— visible as residualtest-list-*.jsonfiles surviving across runs (Jun 3 + Jun 5 timestamps on this machine).Fix (32-line diff)
checkpoints_dir()readsCONTINUUM_CHECKPOINT_DIRfirst; falls back to the production~/.continuum/sentinel/checkpoints/path unchanged when the env var is unset. Production code path unaffected.tests::ensure_checkpoint_dir_isolated()installs a per-processtempfile::TempDirinto the env var (held alive byOnceLockso Drop fires at process exit). Every test calls it at entry.Why two failure modes matter
$HOMEand chmod'd subdirs under root, the tests fail to write → prepush flake.test_list_checkpointsasserts the freshly-written handle appears in the listing, but pre-existingtest-*.jsonfiles from prior runs leak into that listing and could mask real regressions.Validation
modules::sentinel::checkpoint::testspass with isolation active~/.continuum/sentinel/Provenance
Carried forward from PR #971 (closed today as too stale to rebase). Substrate task #205 marks the work.
🤖 Generated with Claude Code