Repository navigation
fix(admission): the lane gate keys on the work turn itself — is_work_turn OR a held card - #4062
Merged
Conversation
…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
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]>
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.
What
LanePriority::Workis chosen whenis_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.grantedwithpriority=Work> 0 within 30 minutes on the M5; apersona.act.observedact that was preceded by an Ambient grant should no longer occur.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo