Conversation
VERIFIED AUDIT FINDING: daemons/run-watchdog.sh hardcoded the halt sentinel path and never consulted AESOP_STATE_ROOT env var or aesop.config.json state_root override. When state_root was relocated (a tested deployment mode), halt.py reported HALTED but the daemon kept running—the abort silently failed. FIX: Change check_halt() to call `python tools/halt.py --status` as the single source of truth, respecting all resolution precedence (AESOP_STATE_ROOT env > aesop.config.json state_root > default). Bash never re-derives the sentinel path, eliminating drift from configuration overrides. TESTS: Add behavioral proof test (test-daemon-halt-config-path.sh) verifying: 1. AESOP_STATE_ROOT env var override (halt set/detected/cleared) 2. aesop.config.json state_root override (halt set/detected/cleared) Both test paths confirm daemon respects halt.py for all deployment modes. Also update existing halt test to use halt.py (not manual .HALT creation) and pass AESOP_STATE_ROOT when running daemon to ensure consistency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Document wave-27 halt detection refactor - Note behavioral proof test coverage for config overrides - Clarify resolution chain (AESOP_STATE_ROOT > config > default) - List test-daemon-halt-config-path.sh in test suite Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Added test-daemon-halt-config-path.sh for behavioral proof of halt.py config override handling (AESOP_STATE_ROOT and aesop.config.json). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Complete wave-27 safety fix by updating run-merge-queue.sh to use the same halt.py single-source-of-truth pattern as run-watchdog.sh. Removes hardcoded sentinel path logic (check_halt_any) and delegates to halt.py --status, respecting full resolution precedence (AESOP_STATE_ROOT > config > default). Eliminates the possibility of configuration-override drift where halt.py would report HALTED but run-merge-queue.sh kept merging unattended. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
matt82198
enabled auto-merge
August 4, 2026 01:37
Replace hardcoded Windows path (/c/Users/matt8/AppData/Local/Temp) with platform-portable TMPDIR environment variable or /tmp fallback. Enables test to run on Linux CI systems. Wave-27 kill-switch safety fix now runs on all platforms.
…OP_ROOT Critical fix: halt.py must be found from the repository root (parent of daemons/), not from AESOP_ROOT which may be a different project root in tests. Use same pattern as run-watchdog.sh: resolve from dirname SCRIPT_DIR. This fixes test-daemon-halt-sentinel.sh which was failing because halt.py could not be found when AESOP_ROOT was set to a temp directory lacking tools/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Test 4 now validates that the daemon trusts halt.py resolution completely and does NOT re-derive the sentinel path when AESOP_STATE_ROOT changes. This aligns with the fix requirement: 'bash never re-derives the sentinel path, eliminating drift from configuration overrides.' Wave-27 kill-switch now has halt.py as the SOLE source of truth across all daemon modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Fixes daemon halt detection drift when state_root is overridden via environment variable or aesop.config.json.
Problem: Both run-watchdog.sh and run-merge-queue.sh hardcoded the halt sentinel path and never consulted AESOP_STATE_ROOT env var or aesop.config.json state_root override. When state_root was relocated (a tested deployment mode), halt.py reported HALTED but the daemons kept running — the abort silently failed.
Solution: Both scripts now call
python tools/halt.py --statusas the single source of truth, respecting halt.py's full resolution precedence (AESOP_STATE_ROOT env > aesop.config.json state_root > default). Bash never re-derives the sentinel path, eliminating all drift from configuration overrides.Test plan
Files Changed
🤖 Generated with Claude Code