Skip to content

Audit remediation: fix all e2e-audit findings + 8 review-caught regressions#96

Merged
RNT56 merged 1 commit into
mainfrom
claude/strange-kalam-44103d
Jul 5, 2026
Merged

Audit remediation: fix all e2e-audit findings + 8 review-caught regressions#96
RNT56 merged 1 commit into
mainfrom
claude/strange-kalam-44103d

Conversation

@RNT56

@RNT56 RNT56 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Full end-to-end remediation of the 17-subsystem adversarial audit. It found 26 confirmed findings (2 HIGH, 0 CRITICAL); all are fixed here, each with a discriminating test. Then a 12-slice adversarial review of the assembled diff caught 8 second-order regressions the tests missed — all fixed. 134 files, ~8k insertions.

Both HIGH findings

  • OpenAI/OpenRouter SSE error-swallow — an in-band data:{"error":…} frame (and an EOF-without-[DONE] with no content) was returned as a nil-error empty/partial success, defeating retry/failover. Now surfaces a typed, retryable-vs-terminal *model.APIError like the Anthropic path.
  • Skill-name → API tool name — an unvalidated SKILL.md frontmatter name became skill_<name>, so one malformed installed skill 400'd every model call. Now sanitized/validated at load + a Defs() boundary guard + an install-time check.

Confirmed clusters (all fixed w/ tests)

  • Silent-failure bugs: scheduler.Submit >1024-task deadlock; swallowed wt.Commit stranding a verified green shard as false-green; resilience.Stream double-paint across a retry; MCP Manager single-flight ctx-poisoning a concurrent peer.
  • Dead-as-advertised closed-loop features: trusted-preset Deploy unreachable; chat /apply trust scope mismatch; exp_config_standing never written; experience -class filter; selfimprove.Scope advisory-only → fail-closed execution screen; super MaxFanout cumulative-not-concurrent; -blast-radius wall fence unenforced on the default Linux namespace backend.
  • Invariant edges: read-path final-component symlink TOCTOU (→ worktreefs.ReadConfined O_NOFOLLOW); maint.RotateLog overwriting a hash-chained generation (→ lossless, I5); macOS keychain Set leaking the secret on argv; MCP Headers promising secret resolution no code performed (→ {{secret:}}/{{env:}}).
  • Perf: vcache O(n²) → memoized side-effect-free hits; graapprove trust rebuild → incremental.
  • Code-intel: graph bare-name node collision → full qualified-id migration (NodeID/SplitID/DisplayName + name→qualified resolution); embedder base-URL; model-keyed semantic cache.

8 second-order regressions caught by the assembled-diff review

worktreefs mkdirAllNoFollow I4 escape (attacker-swapped in-worktree symlink — reproduced then closed); graded auto-approval denying everything under default -blast-radius off; repomap PageRank dropping all edges; macOS ConfigDir move orphaning the secrets vault on upgrade; route.Race loser-cancel nondeterminism; chat stdin os.ErrClosedfatal() on Ctrl-C. (A 9th — hex redaction — was applied then reverted when it proved to mask the log's own hashes and break the verify cache.)

Contract / infra / docs

  • make verify now runs golangci-lint (dogfooded gate == CI == CLAUDE.md §4)
  • Container-sandbox I4 CI job (NILCORE_SANDBOX_MUST_RUN) — the primary boundary now has regression protection
  • -race lane +6 packages; tui-verify widened
  • Release checksums + installer verification (fail-closed)
  • Hermetic model-free native-loop convergence smoke test
  • Doc drift: non-existent nilcore run, vestigial nullclaw gitignore

Verification

make verify (119 pkgs, lint-inclusive) + Linux cross-build + expanded -race lane + a fully-uncached go test -count=1 ./... — all green.

🤖 Generated with Claude Code

…t regressions

A 17-subsystem adversarially-verified audit found 26 confirmed findings (2 HIGH,
0 CRITICAL); all are fixed here, each with a discriminating test.

Both HIGH resolved: the OpenAI/OpenRouter SSE assembler swallowing an in-band
error frame as nil-error success (now a typed, retryable-vs-terminal APIError),
and an unvalidated SKILL.md frontmatter name 400-ing every model call (validated
at load + a Defs() boundary guard + an install-time check).

Confirmed clusters fixed: scheduler.Submit >1024-task deadlock, swarm
stranded-green false-green, resilience.Stream double-paint, MCP single-flight
ctx-poisoning; the dead closed-loop features (trust scope, config standings,
-class filter, selfimprove execution-time enforcement, MaxFanout semantics,
namespace blast wall-fence); invariant edges (read-path O_NOFOLLOW hardening,
lossless log rotation, off-argv macOS keychain, MCP {{secret:}}/{{env:}}
placeholders); vcache O(n^2) + trust-rebuild perf; and the code-graph
qualified-id migration.

A 12-slice adversarial review of the ASSEMBLED diff then caught 8 second-order
regressions the tests missed (all fixed): worktreefs mkdirAllNoFollow I4 escape
(attacker-swapped in-worktree symlink), graded auto-approval denying everything
under default -blast-radius off, repomap PageRank dropping all call edges,
macOS ConfigDir move orphaning the secrets vault on upgrade, route.Race
loser-cancel nondeterminism, chat stdin os.ErrClosed -> fatal() on Ctrl-C.

Infra: lint folded into `make verify`, a container-sandbox I4 CI job, the -race
lane +6 packages, release checksums + installer verification, a hermetic
model-free native-loop smoke test, and doc drift.

Verified: make verify (119 pkgs, lint-inclusive) + Linux cross-build + the
expanded -race lane + a fully-uncached `go test -count=1 ./...` all green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RNT56 RNT56 merged commit 8750060 into main Jul 5, 2026
7 checks passed
@RNT56 RNT56 deleted the claude/strange-kalam-44103d branch July 6, 2026 06:03
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