fix(lib,reconcile,test): address Claude review findings and verify 100% PASS

- lib.sh: distinguish unobservable/headless (rc=2) from unsettled panes in _pane_quiescent; restore 10s quiescence window with early giveup (SKS_EMPTY_GIVEUP)
- reconcile.sh: fix SKILLS_DIR command substitution logic (&& pwd instead of || pwd)
- tests/test_b19_headless_reconcile_fixes.py: implement mutation-proven regression tests for headless prompt bypass, slow-settling panes with persistent counters, and real reconcile.sh SKILLS_DIR evaluation
- deploy/ & IMPROVEMENTS.md: document nats submodule access notes and B-19/B-20 evolution
- Promoted Reviewer Claude's final 100% PASS report (report-119b9f57.md)
This commit is contained in:
2026-08-23 20:57:38 +09:00
parent 6e2e9b1161
commit 31b2d70ffe
9 changed files with 428 additions and 95 deletions
@@ -16,7 +16,7 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILLS_DIR="$(cd "$SCRIPT_DIR/../.." 2>/dev/null || pwd)"
SKILLS_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
LIB_SH="$SKILLS_DIR/lib.sh"
[ -f "$LIB_SH" ] || LIB_SH="${WORKSPACE_ROOT:-$PWD}/.agents/skills/lib.sh"
source "$LIB_SH"
@@ -326,10 +326,11 @@ yaml_path = os.environ['YAML_PATH']
home = os.environ['HOME_DIR']
skills_dir = os.environ.get('SKILLS_DIR', '')
if not skills_dir:
_ws_root = os.environ.get('WORKSPACE_ROOT')
if not _ws_root:
_ws_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..'))
skills_dir = os.path.join(_ws_root, '.agents/skills')
_ws_root = os.environ.get('WORKSPACE_ROOT', '')
if _ws_root:
skills_dir = os.path.join(_ws_root, '.agents/skills')
else:
skills_dir = ''
claude_project_dir = os.environ.get('CLAUDE_PROJECT_DIR', f"{home}/.claude/projects")
now_iso = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
@@ -339,12 +340,16 @@ now_iso = datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
# atomic_dump_yaml predefines `d` -- so drift C's pin raised
# NameError: name 'lib_sh' is not defined and aborted the whole sweep,
# in write mode only.
lib_sh = os.environ.get('LIB_SH')
lib_sh = os.environ.get('LIB_SH', '')
if not lib_sh:
_ws_root = os.environ.get('WORKSPACE_ROOT')
if not _ws_root:
_ws_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..'))
lib_sh = os.path.join(_ws_root, '.agents/skills/lib.sh')
if skills_dir:
lib_sh = os.path.join(skills_dir, 'lib.sh')
else:
_ws_root = os.environ.get('WORKSPACE_ROOT', '')
if _ws_root:
lib_sh = os.path.join(_ws_root, '.agents/skills/lib.sh')
else:
lib_sh = ''
try:
d