refactor(api): release current-only Knowledge 6.0 - #86
Conversation
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 41a9073f
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-26T03:09:28Z
tangletools
left a comment
There was a problem hiding this comment.
🟢 Value Audit — sound
| Verdict | sound |
| Concerns | 0 (none) |
| Heuristic | 0.0s |
| Duplication | 0.0s |
| Interrogation | 223.5s (2 bridge agents) |
| Total | 223.5s |
💰 Value — sound
Major-version cut of long-deprecated two-agent API names plus a forced upstream contract migration (agent-eval 0.129.0) — coherent, mechanical, and guards against regressions.
- What it does: Three things bundled under a 5.0.4 → 6.0.0 bump: (1) renames src/two-agent-research-loop.ts → src/verified-research-loop.ts and removes the runTwoAgentResearchLoop / TwoAgentResearchLoop{Options,Result,Round} aliases that were marked @deprecated three weeks earlier in #45 (commit dba9ea9, 2026-07-04); (2) bumps @tangle-network/agent-eval 0.128.2 → 0.129.0 and agent-interface 0.33.0 → 0.34.0, migra
- Goals it achieves: (a) Ship a clean major-version surface where every public name describes value (verified research) rather than mechanism (two agents) — the rename was started in #45 with non-breaking aliases, this PR is the cut. (b) Track the agent-eval 0.129.0 contract changes: CampaignAggregates now nests cost under a CostLedgerSummary (verified at node_modules/@tangle-network/agent-eval/dist/index.d.ts:9076-90
- Assessment: Sound and in the grain of the codebase. The deprecation window was real (3 weeks, with @deprecated JSDoc on every alias before removal — standard deprecate-then-cut for a major bump). The contract migrations are forced by upstream and applied at exactly the right call sites: only one consumer of aggregates.totalCostUsd (src/benchmarks/metrics.ts:34) and only one producer of qHat trajectories (src/
- Better / existing approach: none — this is the right approach. I checked for duplication: runKnowledgeResearchLoop (src/research-loop.ts:212) is the single-agent variant (no verifier/driver role) and is a genuinely different capability, not an equivalent. I checked the rename scope: grep for TwoAgent|runTwoAgentResearchLoop across src/, tests/, scripts/, docs/ returns only accurate architectural descriptions of the worker+dr
- 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
A clean major-version cut: removes the deprecated two-agent aliases, renames the entry point to match what it does, and tracks the agent-eval 0.129 / interface 0.34 contract reshapes (nested cost object, paired qHat/vHat for doubly-robust) — every change is reachable and consumed.
- Integration: Fully wired.
runVerifiedResearchLoopis exported from src/index.ts:53 and called by the production entry pointrunInvestmentThesisTask(src/investment-thesis-task.ts:216, itself exported at src/index.ts:20 and exercised by tests/eval/investment-thesis-task.test.ts:93 and investment-thesis-ab.test.ts:137). The four driver factories (adaptive-driver, claim-grounding, research-driving-driver, col - Fit with existing patterns: Tracks the codebase grain precisely. (1) The rename + alias removal is the textbook major-version move; deprecated aliases had been carried under @deprecated and this PR cuts them, with verify-package.mjs:41-46,102-113 enforcing the removal at the published tarball level. (2) The off-policy change brings the package into line with the canonical doubly-robust formula DR = v̂(π) + (1/n)Σw·(r − q̂(ch
- Real-world viability: Holds past the happy path. The paired-field guard throws a named error before any trajectory is built, so partial callers can't silently get unweighted DR. Trajectories are built with conditional spreads (src/memory/holdout.ts:506-507) so the shape handed to agent-eval's
doublyRobustmatches what 0.129 expects regardless of whether reward-model callbacks were supplied. The abort message in the l - Model: opencode/zai-coding-plan/glm-5.2
- Bridge attempts: 1
No concerns — sound change, no better or existing approach found. ✅
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.
What changed
runVerifiedResearchLoopand remove the old two-agent names and declaration module@tangle-network/agent-eval@0.129.0and@tangle-network/agent-interface@0.34.0Checks
pnpm typecheckpnpm lint(185 files)pnpm test(467 passed, 12 skipped)pnpm buildpnpm verify:packagepnpm verify:official-optimizersgit diff --check