Skip to content

fix(admission): the lane gate keys on the work turn itself — is_work_turn OR a held card - #4062

Merged
joelteply merged 1 commit into
canaryfrom
fix/the-lane-gate-keys-on-the-work-turn-itself
Sep 15, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/the-lane-gate-keys-on-the-work-turn-itself

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

LanePriority::Work is chosen when is_work_turn(ws) (the workspace is deliverable and her hands are offered, the same key that caps act output) or the window names a held card. Before, only the rendered active-work block was the key.

Why

#4060's receipt on build 5333: 0 Work grants in 20 minutes with 14 held cards on the board (6 Directed, 4 Ambient, 4 acts). The rendered block alone is not a reliable key at the gate; the turn shape is, and it is already trusted for the act output cap.

Acceptance

admission.lane.granted with priority=Work > 0 within 30 minutes on the M5; a persona.act.observed act that was preceded by an Ambient grant should no longer occur.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…turn (deliverable workspace + hands offered) OR a held card; #4060's receipt was still 0 Work grants in 20 min with 14 held cards

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 1cf167e into canary Sep 15, 2026
7 of 8 checks passed
@joelteply
joelteply deleted the fix/the-lane-gate-keys-on-the-work-turn-itself branch September 15, 2026 08:02
joelteply added a commit that referenced this pull request Sep 15, 2026
…the runner's tmp_pack red (#4062, #4078) fixed at its cause (#4082)

* fix(test): the citizen-layer test owns its HOME under the env lock — the runner's "tmp_pack … No such file" red (#4062, #4078) was a concurrent test's temp home vanishing mid-clone

citizen_layer_reader_provisions_and_tells_the_real_root provisions a layer under
`$HOME/.continuum/citizens/peers/<peer>` and read whatever HOME a concurrent
`with_test_home` caller had set — a tempdir that dropped while the shared clone was
still writing its pack ("could not open …/objects/pack/tmp_pack_… for reading: No
such file", "fetch-pack: invalid index-pack output"). It also provisioned the
throwaway peer under the developer's REAL home on every local run.

Now the test takes the same ENV_LOCK with a temp home of its own for the whole
clone, asserts the layer landed under it, and lets the tempdir drop it. A flake
fixed at its cause, not re-run (Joel, 2026-09-07).

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

* fix(test): ONE crate-wide home lock — every test that owns HOME/USERPROFILE/HF_HOME/CONTINUUM_HOME takes crate::test_env (Astra's block on #4082)

Astra's review: the model_registry lock excluded only model_registry callers.
Three private ENV_LOCKs (artifacts, commands/memory, training_producer) and three
unlocked CONTINUUM_HOME writers (code_commands, swe_bench, card_staging) still
raced every test that resolves the citizen layer — and citizen_layer_path reads
CONTINUUM_HOME FIRST, which no guard pinned.

Now `test_env` is the one lock and the one guard: `HomeGuard::set` (async) /
`set_blocking` / `with_test_home` pin all four variables to the test's home and
restore them on drop (panic included). artifacts::with_test_home is a shim over
it; the two HomeGuards are `use crate::test_env::HomeGuard`; the three
CONTINUUM_HOME tests take the guard. No `set_var("HOME"|"CONTINUUM_HOME")`
outside the guard remains in the crate.

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

* fix(test): the HF_HOME relocation test takes the one home lock; the guard captures OsString and is proven to restore on unwind (Astra's re-review of #4082)

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[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