Commit Graph
315 Commits
Author SHA1 Message Date
zpearce-2814andGitHub 1ac07903ec fix(hooks): keep hooks.json within Claude Code's schema
Move stable hook metadata to a validated sidecar while preserving hook commands and installer identity. Reject moved fingerprints and duplicate IDs, and validate before updating metadata. Independent local review passed at c315271624a1fd055b992f2bff889ad2a0ff8a6b; CI run 34678210149 passed. Rollback: revert this squash commit.
2026-09-12 02:59:02 -04:00
ZaalandGitHub 4f37387420 fix(hooks): block-no-verify handles stuck optional values and long-option prefixes (#3073)
Two cases the word-level rewrite still got wrong. Short options that take an optional stuck value (-u[mode], -S[keyid]) end the cluster scan, so git commit -uno and -Sn are allowed while -nu stays blocked. Git accepts any unambiguous long-option prefix, so --no-veri and --no-verif on commit, push, merge and rebase are now blocked; --no-verbose stays allowed. Quoted data such as -m "--no-verify" is still treated as data. Independent exact-head review probed 34 commands in-process and against real git with no bypass and no false positive; hook test 35/35, eslint clean, CI 44/44 at the head.
2026-09-12 03:07:29 +01:00
DanteandGitHub 2083c9839a fix(hooks): support Windows linter paths and ESLint 9 (#3076)
pre-bash-commit-quality spawned Windows .cmd/.bat linters unquoted, so a spaced path failed, and passed --format compact, which ESLint 9 removed (#3075). Batch executables now run through cmd.exe with each argument carried in an env token and quoted, with quote, NUL, CR and LF rejected before spawn; non-batch Windows and POSIX paths keep direct argv spawn with shell false. ESLint uses its bundled default formatter, present on 8, 9 and 10. Regression tests cover the batch, non-batch and POSIX branches and the formatter change. Independent exact-head review passed with no P0/P1; CI 44/44 at the head.
2026-09-12 01:46:38 +01:00
Affaan MustafaandGitHub c7d62c0c6a Distinguish declared goals, open sessions and overlap risk in coordination inventory (#3028)
* feat: add read-only coordination inventory and overlap evaluation

* test: make coordination process fixtures platform explicit

* test: report bounded Stop wrapper failure diagnostics

* test: clean up failed memory MCP sessions deterministically

* fix: update js-yaml to patched 4.3.2

* feat(coordination): distinguish declared goals from open sessions
2026-09-10 14:11:51 +03:00
haelyra 14e731c6d5 fix: close release review gaps and expose failing CI suites 2026-09-07 17:57:26 -04:00
haelyra 17b70f56fc Merge reviewed PowerShell enforcement fixes for 2.2.1
# Conflicts:
#	tests/hooks/gateguard-fact-force.test.js
2026-09-07 16:38:41 -04:00
haelyra 743cc6983c Merge verified observer failure retention into 2.2.1 patch 2026-09-07 16:34:57 -04:00
haelyra e0252df02f fix: scope GateGuard exemptions to the project
Address #2921 and complete the segment-anchoring direction in #2979. Preserve explicit absolute exemptions while denying accidental matches in unrelated projects.
2026-09-07 16:27:01 -04:00
haelyraandjackie-cqz 20b1ba423e fix(hooks): preserve complete bounded passthrough payloads
Forward-port #2925 for #2924 and verify ASCII and multibyte over-limit input suppression. Supersedes the overlapping direct-entrypoint fix in #2978.

Co-authored-by: jackie-cqz <2557911191@qq.com>
2026-09-07 16:26:10 -04:00
haelyra bf0ac4e4b3 fix: reject late PowerShell scalar resolution 2026-09-07 16:23:30 -04:00
haelyra 99668f0ef5 fix: resolve nested PowerShell command tokens 2026-09-05 17:38:20 -04:00
haelyra cb5311222d fix: scan inline PowerShell command parameters 2026-09-05 17:29:02 -04:00
haelyra f43195a255 fix: expand nested PowerShell command scalars 2026-09-05 16:57:10 -04:00
haelyra 8eeac94af3 fix: preserve PowerShell expansion semantics 2026-09-05 16:32:15 -04:00
haelyra 3ad828db47 fix: address PowerShell review bypasses 2026-09-05 16:12:58 -04:00
wellkilo 63dea9c925 fix: harden observer completion handling 2026-09-06 00:01:49 +08:00
wellkilo 3a384ca698 fix: require observer analysis completion sentinel 2026-09-05 23:42:46 +08:00
haelyra d9f6091ee8 fix: close PowerShell destructive command gate bypass 2026-09-04 15:02:57 -04:00
haelyraandGitHub d3652039ac test(hooks): drain bootstrap children asynchronously (#2941)
* test(hooks): drain bootstrap children asynchronously

* test(hooks): harden async supervisor lifecycle

* test(hooks): accept Windows child stdin closure
2026-09-02 19:55:26 -04:00
haelyraandGitHub 11813f968c test(hooks): avoid repeated giant wrapper payloads (#2940)
* test(hooks): avoid repeated giant wrapper payloads

* test(hooks): assert callback-governed wrapper exits
2026-09-02 17:47:04 -04:00
haelyraandGitHub 90430ab3a7 test(ci): tolerate loaded macOS hook runners (#2939) 2026-09-02 16:37:08 -04:00
haelyra 224da03d01 fix(gateguard): match heredoc tab-strip order 2026-08-29 14:55:14 -04:00
haelyra fab534f924 test(hooks): keep matcher mirrors in sync 2026-08-29 14:55:14 -04:00
a4d72b2271 fix(gateguard): surface graduated recovery hints
Change-Id: I6ade0a2a54a26bd5721c62edf7efa462e8043a08
Co-authored-by: TRAE CLI <traecli@bytedance.com>
2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra c40d0e4f7c fix: normalize heredoc line continuations 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra e72191ba74 fix: harden heredoc command filtering 2026-08-29 14:55:14 -04:00
dajiaohuangandhaelyra 962380c452 fix: ignore heredoc prose in GateGuard 2026-08-29 14:55:14 -04:00
Suliman Abdulrazzaqandhaelyra 6fa3efeef7 fix(hooks): use valid wildcard matchers 2026-08-29 14:55:14 -04:00
haelyra 30c41a9bde fix: close truth and portability review gaps 2026-08-29 14:55:14 -04:00
haelyra 2f8a5a271d test: cover inferred-window hook output 2026-08-29 14:55:13 -04:00
haelyraandGitHub 656d4b5746 Merge pull request #2869 from actus7/consolidate/mcp-health-v3
fix(hooks): consolidate MCP health-check fixes (3 PRs)
2026-08-29 00:22:27 -04:00
haelyra 303f50c57e test(hooks): construct mismatch prefix immutably 2026-08-28 22:43:28 -04:00
haelyra b2ab65d0fb fix(hooks): classify platform-dependent raw prefixes 2026-08-28 22:35:23 -04:00
haelyraandGitHub d5ebac49b1 Merge pull request #2380 from chs0813/fix/plugin-hook-bootstrap-no-echo
fix(hooks): do not echo raw input from plugin-hook-bootstrap.js
2026-08-28 22:24:24 -04:00
haelyra 13c476965f fix(hooks): keep MCP reachability probes bounded
Remove the redundant JSON-RPC initialize fallback from the consolidated MCP health-check batch. A routed 404 already proves the endpoint is reachable, and the real authenticated MCP call remains authoritative. Avoiding the fallback also prevents a stalled GET plus stalled POST from consuming twice the configured hook timeout.
2026-08-28 21:09:35 -04:00
haelyra 3702a617db Merge remote-tracking branch 'origin/main' into maint/pr-2866-current 2026-08-28 18:29:35 -04:00
haelyra 1d19789c75 fix(hooks): preserve metadata-marked human prompts 2026-08-28 16:28:12 -04:00
haelyra 77c358dd3f fix(costs): retain dated Opus 4 legacy pricing 2026-08-28 16:26:13 -04:00
Santhi Prakashandhaelyra 64f0acf60e test: split Sonnet model pricing cases 2026-08-28 16:23:25 -04:00
Santhi Prakashandhaelyra ab8cbf6505 test: cover Sonnet 5 cache rate splits 2026-08-28 16:23:25 -04:00
Santhi Prakashandhaelyra 616716f370 test: isolate cost tracker cache fixtures 2026-08-28 16:23:25 -04:00
5ee14cb2af test(hooks): use unique session IDs in Sonnet 5 pricing tests
Prevent stale /tmp/harness-cost cache files from affecting Sonnet 5, dated,
near-miss, and cache-rate pricing tests by using Date.now() in each session ID.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-28 16:23:25 -04:00
f5d0b295cb test(hooks): expand Sonnet 5 cost-tracker coverage for cache and model matching
- Add cache write/read token pricing test for Sonnet 5.
- Add dated Sonnet 5 ID and claude-sonnet-50 near-miss regression tests.
- Keep Sonnet 4.6 standard rate distinction intact.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-08-28 16:23:25 -04:00
haelyra 950caaaae1 fix(hooks): preserve short sessions and quote evolved metadata 2026-08-28 16:08:19 -04:00
bengio777andAlex Schmitt 06ac5b8a49 fix(hooks): treat HTTP 404 MCP probes as reachable
The mcp-health-check preflight probes HTTP MCP servers with a bare GET.
Some Streamable HTTP servers route only POST /mcp and answer a bare GET
with 404 (Paper Desktop 0.5.3 is one). The probe scored that as down and
blocked every tool call for the server indefinitely, since the 30s
backoff just re-probes and re-fails.

A routed HTTP response of any status proves the endpoint is reachable,
which is all this preflight claims to check -- 400/401/403/405/406 are
already treated this way for the same reason. Add 404 to the set and let
the real MCP client validate the endpoint.

Adds a regression test that stands up a POST-only server (404 on GET,
200 on POST /mcp); it fails on the current code and passes with the fix.
2026-08-24 22:27:30 -03:00
66b1aad3f2 fix: probe POST-only Streamable HTTP MCP servers before marking them dead
The preflight probe in mcp-health-check only ever sent a bare GET to the
server URL. Some Streamable HTTP MCP servers route POST exclusively and
answer any GET with 404 — api.telnyx.com/v2/mcp is one — so the probe
failed permanently against a perfectly healthy server.

404 is not in HEALTHY_HTTP_CODES, so every probe failed, the backoff
compounded to the 10-minute ceiling, and the hook blocked every tool call
for that server before it left the machine while `claude mcp list` still
reported it Connected.

Replay a failed GET as a real JSON-RPC initialize POST and accept that as
proof of life. Whitelisting 404 was the alternative, but it would mask
genuine outages on every other server.

Adds a regression test with a POST-only server that 404s all GETs and
validates the initialize body; it fails without this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 22:27:29 -03:00
Suliman AbdulrazzaqandAlex Schmitt b7faf3d70e fix: pass observer analysis path explicitly 2026-08-24 22:26:24 -03:00
Matt Van HornandAlex Schmitt 40c8235d48 fix: address self-review findings 2026-08-24 22:26:22 -03:00
Your Name e568d696c5 test(hooks): report unavailable Windows runtimes 2026-08-14 23:40:56 +08:00
Your Name 74afefb553 fix(hooks): compare passthrough output as bytes 2026-08-14 23:39:13 +08:00