| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: distinguish claude-mem from legacy harness-mem home | 8 天前 | |
test(integrate): capture who is still writing when teardown races TestIntegrate_RereReplay_SharedFileConflict has now flaked twice in CI: testing.go: TempDir RemoveAll cleanup: unlinkat .../.git: directory not empty #385 removed two known background writers in the fixture — detached `gc --auto` and scheduled auto-maintenance — and made it independent of host git configuration. It flaked again anyway, on a different branch in the same batch, so that diagnosis was incomplete and the real writer is still unidentified. The failure has never reproduced on a developer machine: 50 consecutive runs pass, before and after the #385 change. Under those conditions another configuration guess is a coin flip. This change makes the next occurrence self-diagnosing instead. `initRepo` registers a cleanup after `t.TempDir()`, so it runs before the directory is removed (cleanups are last-in-first-out). It waits up to two seconds for processes whose command line mentions the repository, and if any are left it logs them. The wait alone is enough for a writer that is about to exit; the log is for the one that is not. No assertion is touched. Detection verified locally by holding a process whose arguments contain the directory and confirming `ps -eo pid=,args=` finds it. | 7 天前 | |
fix(shellscan): treat &> as redirect, not a job separator Write-only cat skipped the whole secret-read scan when bash &> split on '&', hiding a later .env operand. Tokenize &> / &>> / >& as redirects and keep secret operands attached to cat. | 1 个月前 | |
fix(runtimefloor): require a registered TLD before calling a token a host A dotted token after the word curl was read as a schemeless hostname, so commands that open no socket were refused as external egress (#362): echo curl late.txt -> refused, naming late.txt echo curl config.json -> refused, naming config.json The token shape alone cannot separate these from a real host; late.txt and evil.sh look the same to a regex. The final label can: txt, json and server are not top-level domains, while sh is a real ccTLD. So the schemeless-host check now requires the final label to be in the IANA root zone. Nothing about how curl/wget invocations are found changes, which matters: an earlier attempt to fix this by analysing invocations opened holes through launcher prefixes, heredocs, function redefinition and printf -v, because any exception keyed on a command name can be evaded by spelling that name differently. Narrowing the host test has no such surface. Hosts on registered TLDs stay denied, including the ones a file suffix would suggest are harmless: evil.sh, evil.md and evil.zip are all real TLDs and all stay refused. The list is generated from https://data.iana.org/TLD/tlds-alpha-by-domain.txt by go/scripts/gen-tlds.sh and committed, so nothing is fetched at runtime and a TLD delegation is a data update rather than a code change. | 7 天前 | |
fix: drop unsupported "if" key from PermissionRequest Bash hook Claude Code's hook schema has no "if" key. On startup it logs: hooks.json: unknown key "if" in hooks.PermissionRequest[1] ignored The key is redundant: the same safe-command allowlist is already enforced in Go by policy.isSafeCommand (safeGitPattern, safePkgPattern, safePytest, safeGoRustTests), and more strictly -- it additionally rejects shell metacharacters, backslash escapes, multiline commands and unknown env-var prefixes. With "if" ignored, the hook is simply invoked for every Bash PermissionRequest and the binary decides, so auto-approval behaviour is unchanged. Removed from hooks/hooks.json, its synced copy in .claude-plugin/, and the snippet in go/DESIGN.md. The integration test that asserted the "if" guard now asserts the Bash entry routes to `harness hook permission`, plus a regression check that no hook group reintroduces an "if" key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | 15 天前 | |
feat: 35.7.1 — cross-compile for darwin-arm64/amd64 + linux-amd64 - go/scripts/build-all.sh: CGO_ENABLED=0 cross-compilation - go/Makefile: added build-all target, clean includes cross binaries - All 3 binaries ~6.6-6.8MB (under 10MB target) - bin/.gitignore updated to exclude platform binaries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> | 6 个月前 | |
fix(guardrail): enforce operator-only deferred approval + lock queue writes (140.2 review follow-up) Review findings (independent reviewer, REQUEST_CHANGES → both fixed): 1. critical: agent could self-approve — added R16:no-self-approve-deferred (deny Bash 'harness deferred approve'; 'deferred list' stays allowed) and put deferred-ops.jsonl / destructive-delete.jsonl on the R02/R03 protected-path deny set; approve now stamps approved_by. Interpreter-write residual documented (same class as R05 symlink residual). 2. major: recordDeferredOp check-then-append race — now one critical section under the same file lock as approve/consume flips. Deny-surface baseline regenerated (+R05 defer deny, +R16; additive only), rule-coverage pins 15→16 / selfaudit 10→12, R01-R15 prose → R01-R16. Probe 26/26, full go test green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129e5EWM3frY6V4Gk5x2qko | 1 个月前 | |
chore(go): merge main, bump x/sys 0.49.0 and modernc.org/sqlite 1.60.1, rebuild binaries main をマージし、#376(golang.org/x/sys 0.47.0 → 0.49.0)と #369(modernc.org/sqlite 1.56.0 → 1.60.1、libc 1.77.1 / memory 1.12.1 を随伴)を この PR に畳み込む。両 PR は go directive を 1.26.0 に上げるため go.work の 整合(本 PR)なしには CI でビルドできず、単独ではマージできない。 4 プラットフォームのバイナリは go/scripts/build-all.sh(GOTOOLCHAIN=go1.26.0)で 再生成し、binary/source drift gate と一致させる。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> | 7 天前 | |
chore(go): merge main, bump x/sys 0.49.0 and modernc.org/sqlite 1.60.1, rebuild binaries main をマージし、#376(golang.org/x/sys 0.47.0 → 0.49.0)と #369(modernc.org/sqlite 1.56.0 → 1.60.1、libc 1.77.1 / memory 1.12.1 を随伴)を この PR に畳み込む。両 PR は go directive を 1.26.0 に上げるため go.work の 整合(本 PR)なしには CI でビルドできず、単独ではマージできない。 4 プラットフォームのバイナリは go/scripts/build-all.sh(GOTOOLCHAIN=go1.26.0)で 再生成し、binary/source drift gate と一致させる。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> | 7 天前 | |
feat: Phase 35.0 — Go guardrail engine + SPEC.md specification Harness v4 Go rewrite Phase 0 complete: - Go binary `bin/harness` (2.3MB, 5ms p99) replacing Node.js hook chain - R01-R13 all 13 guard rules ported 1:1 from TypeScript - Official hookSpecificOutput protocol compliance (defer, updatedInput, additionalContext) - PreToolUse/PostToolUse/PermissionRequest handlers - 58 unit tests + 8 E2E scenarios all passing - Hook shims updated to Go binary direct call (no Node.js fallback) - SPEC.md: 12-section specification (Protocol Truth Table, Hook Ownership Matrix, settings.json schema, SQLite driver selection, state machine, etc.) - Plans.md: Phase 35 roadmap (27 tasks, 8 mandatory completion criteria) - Codex review APPROVE after 2 rounds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> | 6 个月前 |