Skip to content

chore(cleanup): remove 12 confirmed-dead exports (#4619)#4666

Merged
JSONbored merged 1 commit into
mainfrom
fix/remove-dead-exports-4619
Jul 10, 2026
Merged

chore(cleanup): remove 12 confirmed-dead exports (#4619)#4666
JSONbored merged 1 commit into
mainfrom
fix/remove-dead-exports-4619

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Part of Remove verified-dead exports and orphaned DB tables #4619 (review-stack architecture audit, dead-code dimension) — removes the 12 non-DB-table
    confirmed-dead exports
    from the issue's list. Each item was re-verified fresh against current main
    (grep + read the surrounding module) rather than trusting the issue's original audit, since time had
    passed since it was filed.
  • Removed: countRecentSubmissionsByAuthor (src/db/repositories.ts), ANALYZER_REGISTRY
    (review-enrichment/src/analyzers/registry.ts, a redundant alias of ANALYZERS), scanDependencies
    (review-enrichment/src/analyzers/dependency-scan.ts, superseded by the descriptor-based
    scanDependencyChanges), ISSUE_SUBMISSION_LABELS + AI_REVIEW_VERDICTS
    (src/review/content-lane/registry-logic.ts), REPO_DOC_TEMPLATE_VERSION
    (src/review/repo-doc-render.ts), githubRateLimitAdmissionRemainingFloor
    (src/selfhost/queue-common.ts), __linkedIssueSatisfactionRunInternals
    (src/services/linked-issue-satisfaction-run.ts), ALL_TYPE_LABELS (both the server and
    gittensory-engine copies of settings/pr-type-label.ts), WorkerEntrypoint
    (src/selfhost/cf-workers-shim.ts), and detectTestConvention/TestConvention
    (gittensory-engine's signals/test-evidence.ts — its sibling exports isTestPath/classifyTestCoverage
    stay untouched, they are live via src/signals/test-evidence.ts's re-export shim).
  • Also removed scanDependencies's two now-orphaned tests from review-enrichment/test/enrichment.test.ts
    (the underlying behavior stays covered by extractDependencyChanges's and scanDependencyChanges's own
    direct tests) and detectTestConvention's describe block from test/unit/test-evidence.test.ts.
  • One item resolved differently than the issue described: RpcTarget in
    src/selfhost/cf-workers-shim.ts is removed (same shim-parity reasoning as WorkerEntrypoint — the
    self-host esbuild build stubs out agents/mcp before anything would need it from this shim), but its
    copy in test/stubs/cloudflare-workers.ts is kept. vitest.config.ts aliases the cloudflare:workers
    specifier to that file for every module resolved under Node, including node_modules — and the agents
    package (a dependency of src/mcp/server.ts's agents/mcp import) does
    import { RpcTarget } from "cloudflare:workers" and extends it. A grep over this repo's own source
    found no caller (matching the issue's claim), but npm run test:changed caught the real one, since it
    lives in a third-party package, not first-party source. Left a comment on the kept class explaining why.
  • Deliberately out of scope: the issue_quality_reports/registry_drift_events tables and their
    upsertIssueQualityReport/persistRegistryDriftEvents functions are untouched — dropping those needs
    explicit confirmation of zero production data before a DROP TABLE migration ships, which cannot be
    established from the codebase alone. Left for a follow-up once a maintainer has checked production.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None skipped. This PR is a pure dead-code deletion (no new lines needing coverage beyond two
    non-executable comment edits), so no new tests were added; ran the full local gate anyway
    (npm run test:coverage unsharded — 684 files / 13,494 tests green; npm run rees:test — 1,218
    tests green; npm run test:engine-parity, npm run test:driver-parity, npm run engine-parity:drift-check, npm --workspace @jsonbored/gittensory-engine run test,
    npm run build:miner, npm run test:miner-pack, npm run db:schema-drift:check,
    npm run db:migrations:check, npm run selfhost:env-reference:check,
    npm run selfhost:validate-observability, npm run cf-typegen:check, npm run docs:drift-check,
    npm run manifest:drift-check, npm run command-reference:check, npm run ui:test all also green)
    plus rebased onto fresh main immediately before pushing and re-ran typecheck + the affected suites.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable — no UI/frontend/docs-visible changes; this PR only removes unreachable backend/package exports and their now-orphaned test coverage.

Notes

  • Maintainer-authored cleanup PR (repo owner). Referenced as "Part of Remove verified-dead exports and orphaned DB tables #4619" rather than a closing
    keyword, since the DB-table portion of that issue is intentionally deferred pending a maintainer's
    production-data check — this PR should not auto-close it.

Dead-code sweep from the review-stack architecture audit (#4619): each item
was grep/git-blame-verified as having zero real call sites outside its own
declaration and test files, re-verified fresh against main before deletion.

Removed: countRecentSubmissionsByAuthor (db/repositories.ts), ANALYZER_REGISTRY
(review-enrichment registry.ts, a redundant alias of ANALYZERS), scanDependencies
(review-enrichment dependency-scan.ts, superseded by the descriptor-based
scanDependencyChanges), ISSUE_SUBMISSION_LABELS + AI_REVIEW_VERDICTS
(review/content-lane/registry-logic.ts), REPO_DOC_TEMPLATE_VERSION
(review/repo-doc-render.ts), githubRateLimitAdmissionRemainingFloor
(selfhost/queue-common.ts), __linkedIssueSatisfactionRunInternals
(services/linked-issue-satisfaction-run.ts), ALL_TYPE_LABELS (both the server
and gittensory-engine copies of settings/pr-type-label.ts), WorkerEntrypoint
(selfhost/cf-workers-shim.ts), and detectTestConvention/TestConvention
(gittensory-engine signals/test-evidence.ts, plus the two internal marker
tables that only ever fed it).

Also removes scanDependencies's two now-orphaned tests from
review-enrichment/test/enrichment.test.ts -- the equivalent behavior stays
covered by extractDependencyChanges's and scanDependencyChanges's own direct
tests -- and detectTestConvention's describe block from test-evidence.test.ts.

RpcTarget in src/selfhost/cf-workers-shim.ts is removed too (same shim-parity
reasoning as WorkerEntrypoint), but its copy in test/stubs/cloudflare-workers.ts
is kept: vitest aliases the cloudflare:workers specifier to that file for
every module resolved under Node, and the agents package (a dependency of
src/mcp/server.ts's agents/mcp import) extends RpcTarget from it -- a
grep-only pass over this repo's own source would have missed that, since the
only real caller lives in node_modules.

The issue_quality_reports/registry_drift_events tables and their
upsertIssueQualityReport/persistRegistryDriftEvents functions are deliberately
left untouched pending explicit sign-off on production data before a DROP
TABLE migration ships.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 645f991 Commit Preview URL

Branch Preview URL
Jul 10 2026, 10:53 AM

@JSONbored JSONbored self-assigned this Jul 10, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored merged commit 6dcd997 into main Jul 10, 2026
11 checks passed
@JSONbored JSONbored deleted the fix/remove-dead-exports-4619 branch July 10, 2026 11:05
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (eecc228) to head (645f991).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4666   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files         434      434           
  Lines       38554    38536   -18     
  Branches    14053    14052    -1     
=======================================
- Hits        36291    36276   -15     
+ Misses       1604     1601    -3     
  Partials      659      659           
Files with missing lines Coverage Δ
...es/gittensory-engine/src/settings/pr-type-label.ts 100.00% <ø> (ø)
...ges/gittensory-engine/src/signals/test-evidence.ts 100.00% <ø> (ø)
src/db/repositories.ts 96.73% <ø> (+0.10%) ⬆️
src/review/content-lane/registry-logic.ts 100.00% <ø> (ø)
src/review/repo-doc-render.ts 100.00% <ø> (ø)
src/selfhost/queue-common.ts 95.69% <ø> (+0.25%) ⬆️
src/services/linked-issue-satisfaction-run.ts 100.00% <ø> (ø)
src/settings/pr-type-label.ts 98.11% <ø> (-0.04%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

JSONbored added a commit that referenced this pull request Jul 10, 2026
…4676)

issue_quality_reports and registry_drift_events were scaffolded in
0004_scoring_intelligence.sql alongside 6 sibling tables that all got wired
with real read+write paths -- these two alone never did. The "issue
quality report" concept now lives entirely in the generic signal_snapshots
cache via src/services/issue-quality.ts instead.

Confirmed zero rows in both tables on the live production database before
writing this migration. Completes #4619's remaining scope (PR #4666
already shipped the other 12 verified-dead-export removals; this piece was
deliberately deferred pending that confirmation).

Fixes #4619
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.

1 participant