Resolve all defect-hunt findings: wire dead features, fix bugs, prune dead code#98
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
typedSecrets/scrubObservationtodesktopsession.BrowseToolbuilt with a nilApprover) → wired the console approver.desktopwire.Actcontract (button/count/drag/mouse up-down) + both drivers; unsupported variants fail closed.claude-codebackend emitted--output-format stream-jsonwithout--verbose(current CLIs reject it) → fixed.importgraphpath-boundary +inspect.Replay1MB line cap → fixed.Features wired (built + tested, never reached from production)
Response.ServedModel, now resolving vendor-namespaced OpenRouter ids (anthropic/claude-opus-4-8) to their real tier instead of the floor.response_format/tool_choiceviaTuning(env-driven, I3-safe, JSON-validated); exported the previously-uncallable option types.wireMultiBackendsupplies aPricerCostfunc.MarkSuccess/MarkAttempt;LastSuccess/RetryPeriodpersist (+ the migration is now called fromStore.migrate— a review-caught HIGH: it broke existing DBs).schema_versionvalidation; swarmClassifyCeiling/ProjectTrustedwired; interactivetrace --tuiexplorer.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,autosrcadapters,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-racelane + a fully-uncachedgo test -count=1 ./...— all green.🤖 Generated with Claude Code