Skip to content

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

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

drewstone merged 1 commit into
mainfrom
refactor/remove-source-adapters-20261006

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Problem

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.

Change

  • Delete src/sources/, src/changes.ts, src/freshness.ts, and their tests (sources-types, sources-mocked, sources-live, http-cache, changes, freshness).
  • Remove the ./sources export, its tsdown entry, its packed-import check, and its README rows.
  • Stop setting AGENT_KNOWLEDGE_RUN_NETWORK_TESTS in CI. Only the deleted live test read it.
  • Add to the unpublished 20.0.0 changelog entry (64 exports removed).

Kept: the source registry (addSourceText, addSourcePath, loadSourceRegistry, src/sources.ts), SourceAdapter and textSourceAdapter (Agent App imports them), and source freshness in readiness and inspection.

Consumer evidence

The same scan as #240 and #241 found no import of @tangle-network/agent-knowledge/sources, and no root import of any removed name (createCornellLiiSource, createIrsPublicationsSource, createStateSosSource, politeFetch, htmlToText, extractLinks, looksLikeBlockPage, detectChanges, createFileSystemFreshnessStore, createD1FreshnessStoreStub, KnowledgeSource, and the rest). The only textual matches are Supervisor Lab's archive/bench/memory/integrations.ts, which names the adapters in prose strings, and a delivery copy of a ph0ny file, which defines its own KnowledgeSource.

Why this is the right long-term shape

Domain authority connectors belong to the products that need them. Knowledge keeps the registry they write into.

Cost

23 files, 2 insertions, 2,532 deletions. This rides the unpublished 20.0.0 major. Rollback: revert, or stay on 19.x.

Verification (beelink1, merged with origin/main)

  • pnpm install --frozen-lockfile, pnpm lint (only the existing proposals.ts warning), pnpm typecheck, pnpm build, and pnpm run api:surface (676 exports across 5 entry points) all pass.
  • pnpm test: 66 files, 695 passed, 2 skipped, 0 failed.
  • node scripts/check-version-bump.mjs passes: 1 manifest change and 64 export changes are paid for by 19.1.5 -> 20.0.0.
  • Every relative markdown link resolves, and git merge-tree --write-tree origin/main HEAD is clean.

…ge detection, and freshness stores

No consumer imports the /sources entry point, its Cornell LII, IRS, and state
Secretary of State adapters, politeFetch, htmlToText, detectChanges, or the
freshness stores. The source registry and readiness freshness scoring stay.
CI no longer sets AGENT_KNOWLEDGE_RUN_NETWORK_TESTS, which only the deleted
live source test read.

BREAKING CHANGE: the ./sources entry point and the change-detection and
freshness-store exports are removed.
@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 — bd405db1

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:13:46Z

@drewstone
drewstone merged commit 91dff1b into main Oct 6, 2026
@drewstone
drewstone deleted the refactor/remove-source-adapters-20261006 branch October 6, 2026 07:14
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