Update documentation with 11 changed files (#4558) - #4567
Conversation
Automatic checkpoint to preserve work in progress. Tests and implementation saved before refactoring phase.
… consumer paths (SEC-D2) The #4558 unit-test-gate detail enlargement (200B stderr head -> 4096B combined stdout+stderr capture) widened what a failing gate's detail can carry. Two consumers of that detail printed/propagated it via raw Display: * operator_cli::dispatch_handover_command -> eprintln! to the operator terminal * self_relaunch_semaphore::handoff::coordinated_handoff -> error reason propagated into the daemon restart-error log Apply redact_credentials at emission on both paths, matching the existing overseer::deploy redact-at-emission pattern, so an enlarged detail that happens to contain a token-bearing remote URL never surfaces a live token. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
`scaler_current_max_can_override_config` in tests/adaptive_scaling.rs built its OodaConfig with `..OodaConfig::default()`, which consults the process env (`SIMARD_SCALING`). On a host with `SIMARD_SCALING=auto` (the live simard-ooda daemon's environment), `default()` seeds an AIMD scaler at the env ceiling that overrides the explicit `max_concurrent_actions` under test, so `decide` capped by live system pressure (5 actions) instead of the configured limit (2) — an exit-101 false failure whenever the suite runs under the daemon env. Pin `scaler: None` so the scaler's `current_max` is the sole cap under test, matching the hermeticity fix issue #2732 already applied to the sibling `decide_respects_max_concurrent_actions`. This is the same class of environment-leak false failure that issue #4558 hardens the deploy gate against via env scrubbing; the test is now deterministic under either env. Verified: all 22 tests/adaptive_scaling tests pass under SIMARD_SCALING=auto. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
Step 17b — Comprehensive Code Review (#4558 hermetic unit-test gate)Verdict: APPROVE. The change is correct, well-scoped, thoroughly tested, and documented. No blocking issues. Scope reviewed
Checklist
Security (SEC-D2 / SEC-D3)
Constraints honoredAdditive/non-breaking; Validation (fresh this pass)
No changes requested. Merge-ready. Co-authored-by: Copilot |
Step 17c — Security Review (#4558 hermetic unit-test gate)Verdict: APPROVE with two non-blocking, defense-in-depth follow-ups. No currently-exploitable vulnerability. All findings verified against actual code (not the PR description). Checklist
Finding 1 — SEC-D3 hijack deny-list omits cargo/rustc RCE env vars — MEDIUM / defense-in-depthLocation: The deny-list covers loader (
Exploitability today: NONE — Remediation (follow-up issue, not blocking): add Finding 2 — Gate
|
Step 17d — Philosophy Guardian Review (#4558 hermetic unit-test gate)Verdict: COMPLIANT — all philosophy criteria pass. No changes requested. Compliance checklist
Evidence
Philosophy-compliant and merge-ready from the guardian's perspective. |
Summary
Concise workflow-generated PR for documentation.
Issue
Closes #4558
Changed files
Diff stat
Behavior
Implemented behavior through these branch commits:
e61a53e test(ooda): make scaler_current_max_can_override_config hermetic
2d26ae6 fix(self-relaunch): redact credentials in gate-failure detail on both consumer paths (SEC-D2)
24ce6d3 wip: checkpoint after implementation (steps 7-8)
Validation
ℹ NODE_OPTIONS=--max-old-space-size=32768 (saved preference). To change: /home/azureuser/.amplihack/config
I'll start by understanding the current state of the changes and the affected toolchains.
● Get branch, status, diff stat, and recent commits (shell)
│ cd /home/azureuser/src/Simard-deploy-4049/worktrees/feat/issue-4558-fix-the-systemic-self-deploy
│ -unit-test-gate-crash && git branch --show-current && echo "---STATUS---" && git --no-pager
│ status && echo "---DIFF STAT---" && git --no-pager diff --stat HEAD && echo "---LOG---" && git
│ --no-pager log --oneline -10
└ 20 lines…
Working tree is clean with 3 commits ahead. Let me examine the changes made in these commits.
Risk
No high-risk subsystem pattern detected from changed paths.
Checklist
This PR was created as a draft for review before merging.
Step 16b: Outside-In Testing Results
Detected toolchain: Rust CLI (
Cargo.tomlat repo root,cargo 1.95.0/rustc 1.95.0). Per the qa-team skill's repo-type table,cargo testis the outside-in consumer boundary for this repo — the gate itself shells out tocargo test, so the user boundary is native Rust tests, not gadugi/uvx. Changed files:src/self_relaunch/gates.rs,src/operator_cli/mod.rs,src/self_relaunch_semaphore/handoff.rs,tests/adaptive_scaling.rs, new fixture cratetests/fixtures/unit_test_gate_fixture/, new integration testtests/self_relaunch_hermetic_unit_test_gate.rs.Chosen strategy: Drive the real public gate API (
verify_canary+RelaunchGate::UnitTest) and the pureextract_failure_detailextractor exactly as the daemon does — one simple always-run scenario (the deterministic, subprocess-free diagnosability contract) and one edge/integration scenario (end-to-end nested-cargo testgate under a simulated live daemon, including the#[ignore]d lane). Host env matched the #4558 field condition:CARGO_HOME/RUSTUP_HOMEunset,HOME=/home/azureuser.Scenario 1 — simple, always-run: failing test NAME survives into
failing_detailcargo test --lib 'self_relaunch::gates::tests::extract_failure_detail' -- --test-threads=4failures:>panicked at>FAILEDprecedence, and clamps UTF-8-safely at 4096B (up from the 200B stderr head that surfaced theDrop t…spinner fragment).Scenario 2 — edge/integration: hermetic gate under a simulated live daemon (incl. nested cargo)
cargo test --test self_relaunch_hermetic_unit_test_gate -- --include-ignored --test-threads=1unit-testgate even while a simulated live daemon holds the sharedSIMARD_STATE_ROOT— proving the per-run temp state root (SIMARD_STATE_ROOT/SIMARD_HOME/HOME/TMPDIRoverridden after scrub) wins, so the daemon's WAL/cognitive-store/socket can no longer red-canary a passing tree (the Fix the systemic self-deploy unit-test-gate crash-loop that has blocked EVERY self-deploy for 6+ hours (20-21 consecutive red-canary refusals; journal signature: overseer::deploy 'self-deploy refused #4558 exit-101 abort).CARGO_HOME/RUSTUP_HOMEunset in the daemon env — proving the gate pins the toolchain from the real pre-overrideHOMEso the hermeticHOMEredirect can't strandcargo/rustupunder an empty temp$HOME/.cargo.failing_detailnamesfixture_panics_when_toggledwith a structured marker, asserted not to be the truncatedDrop t…fragment.Fix count during outside-in testing: 0. Both the simple and the edge/integration scenarios passed on the first run against the current branch head (
e61a53ec7); no diagnose-fix-commit-push iterations were required. Working tree clean, local HEAD in sync with origin.