Skip to content

test(sentinel): isolate checkpoint tests via CONTINUUM_CHECKPOINT_DIR (#205) - #1544

Merged
joelteply merged 1 commit into
canaryfrom
fix/sentinel-checkpoint-test-isolation
Jun 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/sentinel-checkpoint-test-isolation

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

Reapplies the fix from closed PR #971 against current canary. Three modules::sentinel::checkpoint::tests were writing to the developer's real ~/.continuum/sentinel/checkpoints/ — visible as residual test-list-*.json files surviving across runs (Jun 3 + Jun 5 timestamps on this machine).

Fix (32-line diff)

  • 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 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.

Why two failure modes matter

  1. Root-owned home directory pollution — on machines where docker compose bind-mounted $HOME and chmod'd subdirs under root, the tests fail to write → prepush flake.
  2. Cross-test interference — test_list_checkpoints asserts the freshly-written handle appears in the listing, but pre-existing test-*.json files from prior runs leak into that listing and could mask real regressions.

Validation

  • 3/3 modules::sentinel::checkpoint::tests pass with isolation active
  • Confirmed post-fix that no new files appear under ~/.continuum/sentinel/
  • Old pollution (test-list-1b048c92.json from Jun 3, etc.) still visible — fix prevents future pollution, doesn't clean historical state

Provenance

Carried forward from PR #971 (closed today as too stale to rebase). Substrate task #205 marks the work.

🤖 Generated with Claude Code

…#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
joelteply merged commit 352b884 into canary Jun 7, 2026
3 checks passed
@joelteply
joelteply deleted the fix/sentinel-checkpoint-test-isolation branch June 7, 2026 16:34
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]>
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