Skip to content

fix(harness): make wire-demo 4.2b hooks-doctor advisory when 4.2 passes#174

Merged
hanwencheng merged 1 commit into
mainfrom
claude/harness-4.2b-advisory
Jun 2, 2026
Merged

fix(harness): make wire-demo 4.2b hooks-doctor advisory when 4.2 passes#174
hanwencheng merged 1 commit into
mainfrom
claude/harness-4.2b-advisory

Conversation

@hanwencheng
Copy link
Copy Markdown
Member

Summary

Follow-up to #164 / #171 (merged). The wire-demo step 4.2b hooks doctor hard-failed even when the hooks were healthy, because hermes hooks doctor:

  • exits non-zero and prints ⚠ script modified since approval after every agentkeys wire run (Hermes pins each hook script's hash at first-use consent; hooks_auto_accept: true does not refresh an already-allowlisted-but-modified hook), and
  • the harness rewrites the three hook scripts on every run → the warning recurs perpetually.

The hooks themselves were always ✓ allowed and ✓ produced valid JSON. 4.2 (the deterministic hermes hooks test pre_llm_call memory-injection check) is the authoritative pass/fail — 4.2b is a secondary structural check.

Change

harness/phase1-wire-demo.sh4.2b:

  • Now advisory: hard-fail only if 4.2 also failed; otherwise downgrade to a skip/warning with the re-consent hint.
  • Capture hermes hooks doctor 2>&1 || true so its non-zero exit doesn't truncate the grep.

No behavior change to the contracts or the authoritative 4.2 check.

Note: this commit was made after #171 was squash-merged, so it lands as its own PR rather than in #171.

🤖 Generated with Claude Code

…passes

hermes hooks doctor exits non-zero + flags 'modified since approval' after every
agentkeys wire rewrite (Hermes pins the hook hash at first-use consent; auto-accept
doesn't refresh a modified-but-allowlisted hook), so a healthy demo tripped 4.2b.
Now: hard-fail only if 4.2 ALSO failed; otherwise skip/warn. Capture with || true.
@hanwencheng hanwencheng merged commit f64ac8c into main Jun 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant