Skip to content

chore(cleanup): remove or wire 5 confirmed-dead exports#4047

Merged
JSONbored merged 3 commits into
mainfrom
chore/remove-dead-exports-v2-iso
Jul 7, 2026
Merged

chore(cleanup): remove or wire 5 confirmed-dead exports#4047
JSONbored merged 3 commits into
mainfrom
chore/remove-dead-exports-v2-iso

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Dead-code sweep from chore(cleanup): remove or wire 5 confirmed-dead exports #4012: 5 confirmed-dead exports plus one write-only setting, each given its own disposition.
  • src/settings/settings-drift.ts (computeSettingsDrift/computeSettingsDriftForRepo) — deleted, along with its dedicated test file. Fully unit-tested but never had a production call site (route/CLI/MCP).
  • src/review/issue-rag-wire.ts (buildIssueRagQuery) — kept. It is intentional forward groundwork for the not-yet-built miner-side issue-analysis feature (feat(miner-rag): issue-centric RAG query builder (issue title/body → embeddable query text) #2320); added a one-line comment marking it as intentionally pre-built and currently unreached, matching the existing convention for this kind of groundwork.
  • src/review/labeling-rules.ts (resolveLabelingRules) — deleted, along with its test file. review.labeling_rules config is still parsed by src/signals/focus-manifest.ts, but nothing ever called this function to apply it; wiring it in would be new feature work, not cleanup.
  • src/services/queue-burden-breakdown.ts (explainQueueBurden) — deleted, along with its test file. It names itself a sibling of score-breakdown.ts, miner-dashboard-recommendations.ts, and agent-action-explanation-card.ts (all three ARE wired into api/routes.ts/mcp/server.ts/agent-orchestrator.ts), but each of those three is wired in a different way (a dedicated route, an MCP tool, an orchestrator hook) — there is no single small mechanical addition that would wire this one in the same way, so it was removed rather than inventing a new integration point.
  • src/api/workboard.ts (buildWorkboard) — deleted, along with its test coverage. The oldest of the five, superseded, no route ever called it.
  • settings.privateTrustEnabledremoved (field + DB column), not wired in. It was persisted and exposed via the maintainer settings API but read by zero conditional logic anywhere in src/. Its doc comment described gating "private trust signals in scoring", which this repo's house rules explicitly forbid implementing (no raw trust scores/reward values anywhere), so removal is the only compliant disposition. Removed from the Drizzle schema, the RepositorySettings type, both repository accessors, both API route schemas, the OpenAPI schema, the focus-manifest parser and its mirrored type in the standalone gittensory-engine package, both .yml config examples, the settings docs page, and every test fixture that plumbed the field through. Migration 0122_drop_private_trust_enabled.sql drops the column.

Scope

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally — full unsharded run green (this PR is deletion-only on src/**, so it adds no uncovered lines/branches)
  • 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 — 0 vulnerabilities
  • npm run db:migrations:check and npm run db:schema-drift:check — both clean (new migration 0122_drop_private_trust_enabled.sql)
  • Full npm run test:ci (all CI jobs) run locally end-to-end — green
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries — n/a: this PR only removes unreachable code and a write-only field, no new branches were added.

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. — n/a, no auth/session/CORS surface touched.
  • API/OpenAPI/MCP behavior is updated and tested where needed (the privateTrustEnabled field is removed from the OpenAPI schema and its parity check passes).
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. — n/a, no data-fetching UI changed.
  • Visible UI changes include a UI Evidence section with screenshots. — The only apps/gittensory-ui/** change is a one-sentence prose trim on the /docs/tuning settings-reference page (removing the mention of the now-deleted privateTrustEnabled field); it is a text-accuracy fix with no layout/visual/interaction change, so no screenshot is attached.
  • Public docs/changelogs are updated where needed (both .yml config examples and the tuning docs page); CHANGELOG.md itself is untouched (not a release-prep PR).

Notes

  • Items 1, 2, 3, and 5 (the four dead-export modules) were already committed on this branch prior to this PR's final push; this PR's own new commit covers item 6 (privateTrustEnabled removal) plus the rebase onto current main.
  • Rebased cleanly onto origin/main with no conflicts.

Closes #4012

JSONbored added 3 commits July 7, 2026 06:10
…rkboard, and settings-drift modules

These four modules (resolveLabelingRules, explainQueueBurden, buildWorkboard,
computeSettingsDrift/computeSettingsDriftForRepo) have zero production call sites
anywhere in the repo despite full unit test coverage. Removing them along with
their dedicated test files.
Removed its only test caller (the deleted workboard test) from adapters.test.ts
and left the module and its dedicated test suite untouched -- this is forward
groundwork for a not-yet-built miner-side issue-analysis feature, not dead code.
settings.privateTrustEnabled was persisted and exposed via the maintainer
API but read by zero conditional logic anywhere in src/ -- only ever
assigned and passed through. Its doc comment described gating "private
trust signals in scoring", but this repo's house rules explicitly forbid
wiring in raw trust scores, so removal is the correct disposition rather
than implementing the described behavior.

Removes the field from the Drizzle schema, RepositorySettings type, both
repository accessors, the two API route schemas, the OpenAPI schema, the
focus-manifest parser and its mirrored type in the standalone
gittensory-engine package, the two .yml config examples, the settings
docs page, and every test fixture that plumbed the field through. Adds
migration 0122 to drop the now-unused private_trust_enabled column.
@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 098edbe Commit Preview URL

Branch Preview URL
Jul 07 2026, 01:24 PM

@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-07 13:33:08 UTC

36 files · 1 AI reviewer · no blockers · readiness 100/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
This is a mechanical dead-code cleanup: three fully-dead modules (workboard.ts, labeling-rules.ts, queue-burden-breakdown.ts) are deleted along with their dedicated test files, one module (issue-rag-wire.ts) is kept with a one-line rationale comment marking it as intentional pre-built groundwork, and settings-drift.ts is deleted. The privateTrustEnabled field/column removal is threaded correctly end-to-end: schema.ts, the new contiguous migration 0122, repositories.ts (all four sites — defaults, select, insert-defaults, update), types.ts, both focus-manifest definitions (src/signals and packages/gittensory-engine), openapi.json (regenerated), OpenAPI zod schemas, both .yml examples, docs.tuning.tsx, and every touched test fixture are all updated consistently, with no leftover references visible in the diff. The migration uses a plain ALTER TABLE ... DROP COLUMN, which is D1-remote-safe.

Nits — 7 non-blocking
  • migrations/0122_drop_private_trust_enabled.sql:6 drops a live column — confirm deploy ordering runs the code changes before (or atomically with) the migration, since any old worker instance still running mid-rollout that reads/writes privateTrustEnabled would break against the post-migration schema.
  • I can't fully verify from the diff alone that src/settings/settings-drift.ts, src/review/labeling-rules.ts, and src/services/queue-burden-breakdown.ts have zero remaining callers outside the files shown — worth a final repo-wide grep before merge to be sure the 'confirmed dead' claim holds.
  • The linked-issue coverage for chore(cleanup): remove or wire 5 confirmed-dead exports #4012 is reported as partial by the enrichment brief — worth double-checking that chore(cleanup): remove or wire 5 confirmed-dead exports #4012 (or another open issue) explicitly authorizes the schema/column removal and not just the source-level dead-code deletions.
  • Call out in the PR description (or a follow-up comment) the intended deploy order for the migration relative to the code deploy, given the DROP COLUMN in migrations/0122_drop_private_trust_enabled.sql.
  • If a repo-wide grep for `settings-drift`, `labeling-rules`, and `queue-burden-breakdown` hasn't already been run, run it once more before merge as a final confirmation of the dead-code claim.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4012
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 570 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 570 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 570 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.56%. Comparing base (c899c3c) to head (098edbe).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4047      +/-   ##
==========================================
- Coverage   93.58%   93.56%   -0.02%     
==========================================
  Files         382      378       -4     
  Lines       35534    35444      -90     
  Branches    13028    12998      -30     
==========================================
- Hits        33253    33163      -90     
  Misses       1618     1618              
  Partials      663      663              
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.24% <100.00%> (ø)
src/api/routes.ts 93.93% <ø> (ø)
src/db/repositories.ts 96.62% <ø> (-0.01%) ⬇️
src/db/schema.ts 71.66% <ø> (ø)
src/openapi/schemas.ts 100.00% <ø> (ø)
src/review/issue-rag-wire.ts 100.00% <ø> (ø)
src/types.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 39cc958 into main Jul 7, 2026
13 checks passed
@JSONbored
JSONbored deleted the chore/remove-dead-exports-v2-iso branch July 7, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(cleanup): remove or wire 5 confirmed-dead exports

1 participant