Skip to content

test: reuse EnvGuard in unregistered workspace fixtures - #14786

Open
rjwalters wants to merge 1 commit into
mainfrom
feature/issue-14783
Open

rjwalters wants to merge 1 commit into
mainfrom
feature/issue-14783

Conversation

@rjwalters

@rjwalters rjwalters commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Reuse EnvGuard::clear in all five unregistered-workspace tests. Preserve the serial annotations, guard lifetimes, and existing child-environment assertions.
  • Remove three copies that saved GH_CONFIG_DIR as String, which discarded existing paths containing non-UTF-8 bytes.
  • Add a Unix regression that clears a dedicated test variable and verifies its original bytes are restored. Updating the watchdog comment removes the stale fixture reference.

Test Plan

TDD: no — the new shared-guard regression was added with the migration. The baseline probe reproduced byte loss in all three old guards, and the new regression fails under a test-only copy that restores their lossy snapshot behavior.

  • Ran all three shared guard tests and the five existing role invocation, dispatch, pre-flip classification, quarantine release, and watchdog comment tests. The run used an isolated Cargo target and synthetic ambient GH_CONFIG_DIR.
  • cargo fmt --all -- --check and git diff --check passed. Strict Clippy on macOS reports the existing Sampler.self_spawn dead-code warning in unchanged fleet_sync/git_spawn_log.rs. The field is read by a Linux-only method. Hosted CI runs this check on Linux.

Closes #14783
Loom-Issue: #14783

loom dashboard

@rjwalters rjwalters added the loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. label Nov 20, 2026
@rjwalters

rjwalters commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

PR #14786's loom:reviewing claim is held by the judge of sweep sweep-insession-s38728-ThuNov191721502026 on host host-d9142cf3. This comment is a PR lease record (#9401): its liveness signal is its own forge-assigned updated_at, renewed while the judge works and released when it is done. Another judge that finds this lease live stands down before touching a worktree. See defaults/docs/lease-record.md § "PR-phase leases".

@rjwalters rjwalters added the loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). label Nov 20, 2026
@rjwalters

Copy link
Copy Markdown
Member Author

Approved

All five fixture functions retain their serial annotation, guard scope, and child-environment assertions. The shared guard preserves byte strings when it restores the test environment. The watchdog collateral is a test comment.

An independent Unix probe compiled the exact helper with its tests and verified all three cases. The byte-restoration case failed under an isolated negative control using the former std::env::var(...).ok() snapshot. A second probe confirmed that the three actual old fixtures cleared and lost the same synthetic non-UTF-8 value. The Builder's targeted receipt passed all eight shared and migrated fixture tests.

The local macOS strict lint reports Sampler.self_spawn in a source file identical to base, where the only field read is inside the Linux-gated sampler. The exact hosted Linux checks are green. The two revisions compose cleanly with the current main and formal review is clear.

loom dashboard

@rjwalters rjwalters added loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge. and removed loom:review-requested PR ready for Judge to review. Applied by: Builder when opening PR. loom:reviewing Judge is reviewing this PR. Applied by: Judge only. Stale after LOOM_STALE_REVIEWING_MINUTES (30m). labels Nov 20, 2026
@rjwalters

Copy link
Copy Markdown
Member Author

The approved EnvGuard and Guide heads were still merge-ready in Forge, with all exact-head CI checks passed. A bounded read of Fleet's natural dispatch activity since 13:29 UTC found 24 captain claim refusals for this PR and 8 for #14789. Captain /v1/claim recorded champion_merge, typed not_eligible, and a 60-second retry. Three distinct Fleet workers requested the step. Worker dispatch records corroborate the refusals, and the sampled attempts produced no assigned Champion step.

The emitting captain reports Loom 0.20.0 at 4fc12aee9. At that revision champion_merge is a recognized StepRole mapped to champion. The applicable not_eligible branch requires that the captain's stored role set for a known requesting host omit champion. The sample does not include the role heartbeat contents, their freshness, or the underlying pool state. The standard Fleet admission remains the next gate. Exact predicate

loom dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loom:pr PR approved by Judge, ready for Champion auto-merge. Applied by: Judge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reuse EnvGuard in the five tests that clear GH_CONFIG_DIR

1 participant