Skip to content

Resolve all defect-hunt findings: wire dead features, fix bugs, prune dead code#98

Merged
RNT56 merged 1 commit into
mainfrom
claude/defect-fixes
Jul 6, 2026
Merged

Resolve all defect-hunt findings: wire dead features, fix bugs, prune dead code#98
RNT56 merged 1 commit into
mainfrom
claude/defect-fixes

Conversation

@RNT56

@RNT56 RNT56 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

A full-project defect hunt (15 scopes, adversarially verified) found 0 CRITICAL, 1 HIGH, 10 MEDIUM, 35 LOW on the post-remediation tree. All are resolved here, each with a test. An adversarial review of the assembled diff then caught 5 regressions (2 confirmed + 3 from a focused provider verifier) — all fixed. 103 files, +2949/−991 (the deletions are dead-code pruning).

Bugs fixed

  • HIGH — desktop I3 secret-reflow leak: desktop sessions never scrubbed typed secrets from observations (the browser tier does). Ported typedSecrets/scrubObservation to desktopsession.
  • Browser irreversible actions were dead-blocked (BrowseTool built with a nil Approver) → wired the console approver.
  • Native computer-use collapsed right/double/drag/middle into one left click → extended the desktopwire.Act contract (button/count/drag/mouse up-down) + both drivers; unsupported variants fail closed.
  • Desktop had no in-code irreversible gate → added a per-action classifier + Approver, symmetric with the browser, word-boundary matched (so "information"/"sender" aren't mis-gated).
  • claude-code backend emitted --output-format stream-json without --verbose (current CLIs reject it) → fixed.
  • importgraph path-boundary + inspect.Replay 1MB line cap → fixed.

Features wired (built + tested, never reached from production)

  • External SecretStore (the 4th I3 backend) into the read chain.
  • Served-model pricing — the meter prices Response.ServedModel, now resolving vendor-namespaced OpenRouter ids (anthropic/claude-opus-4-8) to their real tier instead of the floor.
  • OpenRouter routing extras + response_format/tool_choice via Tuning (env-driven, I3-safe, JSON-validated); exported the previously-uncallable option types.
  • Cost-aware routing (RTE-T06)wireMultiBackend supplies a PricerCost func.
  • Objective success-tracking — the autonomy handler calls MarkSuccess/MarkAttempt; LastSuccess/RetryPeriod persist (+ the migration is now called from Store.migrate — a review-caught HIGH: it broke existing DBs).
  • Live code-graph deletion hook on delete/rename; egress schema_version validation; swarm ClassifyCeiling/ProjectTrusted wired; interactive trace --tui explorer.

Dead code pruned (verified zero non-test callers)

route.SingleRouter (dup), agenticflows.Node.Agent, mcp.Spawn/Manager.Servers, verify.ContentHashFiles, eventlog.Log.Flush, emit.NopEmitter, termui.Style.Magenta, report.runReport, objective.MarkRun, skills.Plugin, autosrc adapters, impact.Localize (SBFL), policy.Gate/EgressWith. Deploy auto-approval kept as an honestly-labeled roadmap seam.

Verification

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

🤖 Generated with Claude Code

… prune dead code

A full-project defect hunt (15 scopes, adversarially verified) found 0 CRITICAL,
1 HIGH, 10 MEDIUM, 35 LOW on the post-remediation tree. All are resolved here, each
with a test; then an adversarial review of the assembled diff caught and fixed 5
regressions (2 review-confirmed HIGH/MEDIUM + 3 from a focused provider verifier).

BUGS FIXED:
- HIGH: desktop sessions never scrubbed typed secrets from observations (I3 reflow
  leak) — ported the browser tier's typedSecrets/scrubObservation to desktopsession.
- browse: BrowseTool built without an Approver dead-blocked every irreversible action
  — wired the console approver.
- desktop: native computer-use collapsed right/double/drag/middle into one left click
  — extended the desktopwire Act contract (button/count/drag/mouse-up-down) and
  implemented it in both drivers; unsupported variants fail closed.
- desktop: no in-code irreversible gate — added a per-action classifier + Approver
  symmetric with the browser (word-boundary matched, so benign labels are not gated).
- claude-code backend emitted --output-format stream-json without --verbose (rejected
  by current CLIs) — added --verbose.
- importgraph layer match lacked a path-segment boundary; inspect.Replay's 1MB line
  cap rejected valid long lines — both fixed.

FEATURES WIRED (were built + tested but never reached from production):
- external SecretStore (the 4th I3 backend) into the read chain (NILCORE_SECRET_EXTERNAL_CMD).
- served-model pricing: the meter now prices Response.ServedModel, resolving
  vendor-namespaced OpenRouter ids (anthropic/claude-opus-4-8) to their real tier.
- OpenRouter routing extras + response_format/tool_choice via Tuning (env-driven, I3-safe,
  validated JSON), exported the previously-unexported option param types.
- cost-aware routing (RTE-T06): wireMultiBackend now supplies a PricerCost func.
- objective success-tracking: the autonomy handler calls MarkSuccess/MarkAttempt; the
  LastSuccess/RetryPeriod columns persist (+ the migration is now called from Store.migrate).
- live code-graph deletion: the live hook now prunes on delete/rename tool paths.
- egress allowlist schema_version is validated; swarm ClassifyCeiling/ProjectTrusted are
  now the wired mechanism; the interactive trace explorer is reachable via `trace --tui`.

DEAD CODE PRUNED (verified zero non-test callers): route.SingleRouter (dup),
agenticflows.Node.Agent, mcp.Spawn/Manager.Servers, verify.ContentHashFiles,
eventlog.Log.Flush, emit.NopEmitter, termui.Style.Magenta, report.runReport,
objective.MarkRun, skills.Plugin, autosrc adapters, impact.Localize (SBFL),
policy.Gate/EgressWith. Deploy auto-approval kept as an honestly-labeled roadmap seam.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RNT56 RNT56 merged commit 2a323fd into main Jul 6, 2026
7 checks passed
@RNT56 RNT56 deleted the claude/defect-fixes branch July 6, 2026 11:31
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