Skip to content

refactor(research)!: remove the unused web research drivers and TCloud - #240

Merged
drewstone merged 1 commit into
mainfrom
refactor/remove-research-drivers-20261006
Oct 6, 2026
Merged

drewstone merged 1 commit into
mainfrom
refactor/remove-research-drivers-20261006

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Problem

The package says it "does not browse, call models, or run agents", but it shipped a web research stack that does: runVerifiedResearchLoop, the TCloud-backed web worker and router client, and the adaptive, collection, and driving drivers. It also shipped the claim-grounding verifier and decorator, and an investment-thesis task with a 900-line answer set compiled into src/. Nothing outside this repository imports any of it. The stack is the only user of @tangle-network/tcloud, so every Knowledge release also had to fit the TCloud and Sandbox dependency cohort.

Change

  • Delete verified-research-loop, web-research-worker, adaptive-driver, collection-research-driver, research-driving-driver, investment-thesis-set, investment-thesis-task, and material-facts-metric, with their tests (tests/loops/, tests/eval/, and the driver cases in claim-persistence.test.ts).
  • Trim claim-grounding.ts to groundClaimInText, which RAG answer scoring uses.
  • Drop @tangle-network/tcloud from dependencies. The lockfile loses 190 lines.
  • Delete scripts/prove-research-live.mjs and scripts/prove-research-transport.mjs, one-off proofs for that transport (refactor(research): published TCloud transport with compatible APIs and cancellation #222).
  • verify-package.mjs no longer requires runVerifiedResearchLoop. Its obsolete two-agent "forbidden export" guards are gone because api-surface.json already records the exact export set.
  • Keep the verified-research paper, docs/results/*, and the investment answer key as a historical record. Each is marked historical, and its code links now point at bc2abe0, the last commit that contains the code.
  • Bump to 20.0.0 (69 exports removed; manifest dependency change) and add a changelog entry.

Kept: claim ledgers, TrackedClaim, and the KbStore claim-ledger methods. Agent Runtime's knowledge-improvement-job test calls store.putClaimLedger.

Consumer evidence

I extracted every identifier imported from @tangle-network/agent-knowledge (named, type, namespace, import(), and createRequire forms) in:

  • the Mac ~/webb and ~/company checkouts and worktrees (939 code files);
  • ~/code on beelink1 (4,125 files) and drew-gtr-pro (5,711 files);
  • fresh default-branch clones of every repository that GitHub code search lists as depending on the package (tangle-network: agent-runtime, agent-app, agent-builder, agent-dev-container, blueprint-agent, creative-agent, discovery-lab, gtm-agent, insurance-agent, legal-agent, ph0ny, physim, redteam, relationships-agent, supervisor-lab, tangle-tools, tax-agent, tuner-agent, ai-trading-blueprint; drewstone: law-lead-agent, legal-underwriting-agent, skeletal-os), plus discovery, agent-eval, agent-sdk, and braid.

None of the 69 removed exports is imported anywhere. The only textual matches are discovery docs that describe the API, and frozen bundles in discovery-lab preregistrations. Those bundles contain their own copy and do not resolve the package.

Why this is the right long-term shape

Knowledge owns knowledge state. Model calls and browsing belong to callbacks or Agent Runtime, as the README and AGENTS.md already state. Removing TCloud takes the package out of the TCloud and Sandbox cohort.

Cost

39 files, 52 insertions, 9,277 deletions (source 4,162 lines, tests 4,688, scripts 137, lockfile 190). Major version bump: consumers on ^19 are unaffected until they move to 20. Risk: an unlisted private consumer of the research drivers. Rollback: revert this PR, or stay on 19.x.

Verification (beelink1, merged with origin/main)

  • pnpm install --frozen-lockfile, pnpm lint (one existing warning in proposals.ts), pnpm typecheck, pnpm build, and pnpm run api:surface (950 exports) all pass.
  • node scripts/check-version-bump.mjs passes: 19.1.5 -> 20.0.0 pays for the 69 export removals.
  • pnpm test with network tests: 872 passed, 2 skipped, 1 failed. The failure was an unhandled transaction error in tests/kb-improvement/activation.test.ts under full-suite load on the busy host. That file passes alone (9/9) and does not touch the removed code.
  • Every relative markdown link resolves, and no live file references a deleted module.
  • pnpm run verify:package fails the same way on main and on this branch: agent-core dependency on agent-interface declares ^3.0.0, which does not admit installed 2.16.0. Agent Core 0.10.3, published 2026-10-06 07:00Z, requires Interface 3 inside Eval 0.208.2's ^0.10.2 range. That is an upstream cohort break, not this change.

No consumer imports runVerifiedResearchLoop, the web research worker, the
adaptive, collection, or driving drivers, the claim-grounding verifier, or
the investment-thesis task. They were the only code that browsed or called
models, which the package boundary says Knowledge does not do, and the only
users of the TCloud dependency. groundClaimInText stays for RAG answer
scoring; claim ledgers and TrackedClaim stay for KbStore consumers.

BREAKING CHANGE: the research driver, router, and investment-thesis exports
are removed and @tangle-network/tcloud is no longer a dependency.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@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 PR — 89d7b468

Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-06T07:06:46Z

@drewstone
drewstone merged commit 70d5a7b into main Oct 6, 2026
@drewstone
drewstone deleted the refactor/remove-research-drivers-20261006 branch October 6, 2026 07:07
drewstone added a commit that referenced this pull request Oct 6, 2026
…ge detection, and freshness stores (#242)

refactor(sources)!: remove the unused authority source adapters, change detection, and freshness stores

The `/sources` entry point (also re-exported from the root) shipped three authority adapters from #7 (2026-05-14): Cornell LII, IRS publications, and state Secretary of State. They came with a polite HTTP fetcher with an on-disk cache, HTML extraction, `detectChanges`, and filesystem and D1-stub freshness stores. Nothing outside this repository imports any of it. Its only in-repo user, the web research worker, was removed in #240. That leaves 1,471 source lines and 984 test lines, including a live-network test that CI enabled through `AGENT_KNOWLEDGE_RUN_NETWORK_TESTS`.
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