Skip to content

refactor(traces): remove local fixed analyst stack - #664

Open
drewstone wants to merge 2 commits into
mainfrom
refactor/remove-local-fixed-analysts
Open

refactor(traces): remove local fixed analyst stack#664
drewstone wants to merge 2 commits into
mainfrom
refactor/remove-local-fixed-analysts

Conversation

@drewstone

@drewstone drewstone commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Deletes the unused local five-analyst menu, fixed prompts, parser, router call, tests, and generated API reference: 581 lines removed. Runtime must use the canonical agent-eval registry over captured tool spans instead of maintaining a weaker duplicate.

Checks:

  • lint: 500 files passed
  • typecheck: passed, including examples
  • build: passed
  • docs regeneration/freshness: passed
  • tests: 1,874 passed, 6 skipped across 174 files (GIT_ALLOW_TEST_IDENTITY=1 for fixture repositories)
  • merge-tree with origin/main: clean

@drewstone
drewstone marked this pull request as ready for review July 30, 2026 09:31

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — fd4f3d74

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-30T09:48:02Z

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Value Audit — sound-with-nits

Verdict sound-with-nits
Concerns 2 (2 weak-concern)
Heuristic 0.0s
Duplication 0.0s
Interrogation 111.1s (2 bridge agents)
Total 111.1s

💰 Value — sound-with-nits

Deletes a genuinely-unused, self-admitted weaker duplicate of the canonical agent-eval analyst registry; correct in-grain cleanup, with one stale doc pointer left behind.

  • What it does: Removes src/mcp/tools/checks.ts (a standalone 'lens directory' of 5 fixed analyst kinds + its own LLM router caller, raw-row validator, finding schema prompt, and run/dispatch runner), its test (tests/kernel/checks.test.ts), the public re-exports from src/mcp/index.ts, and the generated API reference for those symbols (docs/api/mcp.md, docs/api/primitive-catalog.md). Net -581 lines, no behavior ch
  • Goals it achieves: Kill an unused parallel analyst implementation so there is one canonical lens path instead of two. The deleted file's own header concedes the goal: it called itself 'a deliberate SUBSET of agent-eval's full TraceAnalystKindSpec' and a kind that 'needs the heavy agentic actor upgrades to createTraceAnalystKind.' Keeping it meant two places to maintain the finding shape, the lens taxonomy, and the L
  • Assessment: Good change, in the grain of the codebase. I confirmed via grep that the deleted symbols (Check, CheckRunnerOptions, defaultChecks, liftFindings, makeCheckRunner, renderTrace, runCheck) have ZERO callers anywhere in src/ or tests/ after this PR — the only references were the deleted re-export and the deleted test. The canonical replacement is real and actively wired: (1) AnalystRegistry in src/mcp
  • Better / existing approach: none — this is the right approach. Searched src/ and tests/ for every deleted symbol and for any import of './tools/checks' / '@tangle-network/agent-runtime/mcp' that pulled these names: no internal consumer exists. The canonical registry the PR names is present and wired, so deletion rather than extension/consolidation is correct. A facade/re-export would just re-add the surface-area debt the PR
  • Model: opencode/zai-coding-plan/glm-5.2
  • Bridge attempts: 2
  • Bridge warning: opencode/kimi-for-coding/k2p7: bridge stream ended without value-audit content

🎯 Usefulness — sound-with-nits

Clean deletion of a weaker duplicate analyst stack; the canonical agent-eval registry path that already feeds the live coordination/analyst-loop surface is untouched and remains the sole lens directory.

  • Integration: Reachable and correct. Grep across src/tests/bench/examples for the removed symbols (defaultChecks, makeCheckRunner, liftFindings, runCheck, renderTrace, Check, CheckRunnerOptions, 'tools/checks') returns zero consumers after removal. The in-process seam (AnalystRegistry at src/mcp/tools/coordination.ts:71, still exported from src/mcp/index.ts:152) and the eval seam (TraceAnalystKindSpec at src/ag
  • Fit with existing patterns: Fits the codebase grain and removes a competing pattern. The deleted module's own header (checks.ts:1-13) stated a Check is 'a deliberate SUBSET of agent-eval's full TraceAnalystKindSpec' and that a kind needing real agentic behavior 'upgrades to createTraceAnalystKind' — i.e., the codebase already had the stronger canonical factory. Keeping both meant two finding-shape validators, two runners (th
  • Real-world viability: Deletion, so nothing new to hold up; the canonical path carries the load. The removed makeCheckRunner returned Promise<AnalystFinding[] | {error}> while the live AnalystRegistry.run returns Promise — they were never interchangeable, confirming the removed one was a parallel, not a backing, implementation. No concurrency/error-path surface is introduced or removed by this change.
  • Model: opencode/zai-coding-plan/glm-5.2
  • Bridge attempts: 1

💰 Value Audit

🟡 Stale pointer to the deleted file left in docs/architecture.md [maintenance] ``

docs/architecture.md:520 still cites 'src/mcp/tools/checks.ts:93 — defaultChecks' as the canonical lens menu and §13.5 describes analysts as inline lenses with 'harness null' reading from that file. This PR regenerated docs/api/mcp.md and docs/api/primitive-catalog.md (the API refs) but did not touch the hand-written architecture doc, so it now points at a deleted file. The PR title says it removes 'the fixed analyst reference' — update docs/architecture.md §13.5 to point at the canonical path (

🎯 Usefulness Audit

🟡 Stale architecture doc still points at the deleted file [integration] ``

docs/architecture.md:520 still cites 'src/mcp/tools/checks.ts:93 — defaultChecks' and claims 'the driver picks lenses via list_analysts/run_analyst', contradicting this PR's body assertion that 'docs regeneration/freshness: passed'. A future integrator following that section lands on a deleted file. Update §13.5 to reference the canonical agent-eval kind directory (or coordination.ts's AnalystRegistry) so the doc matches the post-removal reality. This is a docs-pass item, but it gates the 'docs


What this audit checks

It judges the change on its merits — not whether it was tasked out in an issue. Unticketed, fast-moving work is fine; the question is whether the change is good and whether a better or existing approach should be used instead.

Pass What it asks
Heuristic Vague title? Whitespace-only or cruft-bearing diff? (content signals only)
Duplication Do added function/class names already exist elsewhere in the repo?
Value Audit What does it do? What goal does it achieve? Is it good? Better architecture or already-exists?
Usefulness Audit Does it integrate and fit? Will it hold up in real use and actually get used?

Findings are concerns, not blocks — the human reviewer decides what to do with them.

value-audit · 20260730T095016Z

@tangletools

Copy link
Copy Markdown
Contributor

✅ No Blockers — fd4f3d74

Review health 100/100 · Reviewer score 95/100 · Confidence 70/100 · 0 findings (none)

glm: Correctness 95 · Security 95 · Testing 95 · Architecture 95

Reviewer score is advisory once the run is complete and the verdict has no blockers.

Full multi-shot audit completed 2/2 planned shots over 3 changed files. Global verifier still owns final merge decision.

No findings.


tangletools · 2026-07-30T09:51:12Z · trace

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Clean — fd4f3d74

Full multi-shot audit completed 2/2 planned shots over 3 changed files. Global verifier still owns final merge decision.

Full immutable report for this review: trace

Summary comment for this run: full summary


tangletools · 2026-07-30T09:51:12Z · immutable trace

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.

2 participants