Skip to content

chore(review): remove never-wired test-generation dead slice - #4126

Merged
JSONbored merged 1 commit into
mainfrom
chore/remove-testgeneration-dead-slice-4108
Jul 8, 2026
Merged

chore(review): remove never-wired test-generation dead slice#4126
JSONbored merged 1 commit into
mainfrom
chore/remove-testgeneration-dead-slice-4108

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • GITTENSORY_REVIEW_TEST_GENERATION (src/env.d.ts / wrangler.jsonc), the review.testGeneration manifest field (packages/gittensory-engine/src/focus-manifest.ts), and their resolver/gate functions (resolveTestGenerationManifestToggle, isTestGenerationEnabled, shouldOfferTestGenerationSpec in src/review/test-generation.ts) had zero real callers anywhere in src/ — the "separate slice" that was supposed to wire a generated test spec onto a missing-test-evidence finding in the live review pipeline was never built.
  • Removes the whole orphaned slice end-to-end: the env var declaration (+ regenerated worker-configuration.d.ts), the manifest field's full round-trip (type/parse/present-check/overlay/serialize) in packages/gittensory-engine/src/focus-manifest.ts, src/review/test-generation.ts and its dedicated test file, and the now-dangling references in test/unit/focus-manifest.test.ts, test/unit/config-templates.test.ts, and test/unit/signals-coverage.test.ts.
  • Updates the stale doc mentions describing the never-shipped behavior as if live: .gittensory.yml.example, config/examples/gittensory.full.yml, and the two apps/gittensory-ui/src/routes/docs.privacy-security.tsx / docs.tuning.tsx pages.
  • Does not touch the live, ungated MCP test-generation tools (gittensory_generate_tests, the boundary-test-generation tool in src/mcp/server.ts / src/mcp/local-write-tools.ts / src/signals/boundary-test-generation.ts) — confirmed via grep that they use entirely separate functions/finding codes before removing anything.

Closes #4108

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 (via npm run test:ci)
  • 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 (via npm run test:ci)
  • npm run build:mcp (via npm run test:ci)
  • npm run test:mcp-pack (via npm run test:ci)
  • npm run ui:openapi:check (via npm run test:ci)
  • npm run ui:lint (via npm run test:ci)
  • npm run ui:typecheck (via npm run test:ci)
  • npm run ui:build (via npm run test:ci)
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries — N/A: this PR only removes dead code that had zero live callers; no behavior changes, so the diff is pure deletion plus a few single-line default-object edits already exercised by the existing broad manifest test suite.

Ran the full local gate: npm run test:ci (exit 0 — 580 test files / 11728 tests passed, 2 pre-existing skips, ui:build succeeded) and npm audit --audit-level=moderate (0 vulnerabilities). Every hunk in the diff is a pure deletion (git diff --stat: 9 insertions / 173 deletions across 14 files), so there are no newly-added lines needing fresh coverage; confirmed via git diff hunk headers that no changed line falls in any pre-existing partially-covered branch range reported by test:coverage.

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 changes.
  • API/OpenAPI/MCP behavior is updated and tested where needed. — N/A, no API/OpenAPI/MCP surface changed (the two live MCP test-generation tools are untouched).
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. — N/A, no UI logic changed.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots — skipped: the only apps/gittensory-ui changes are removing one stale bullet/line each from two static docs pages describing an env var that was never actually wired into the review pipeline; no new visual state, layout, or component behavior is introduced.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • Grep confirms zero remaining references anywhere in the repo to GITTENSORY_REVIEW_TEST_GENERATION, review.testGeneration/test_generation, resolveTestGenerationManifestToggle, isTestGenerationEnabled, or shouldOfferTestGenerationSpec.

GITTENSORY_REVIEW_TEST_GENERATION, the review.testGeneration manifest
field, and their resolver/gate functions (resolveTestGenerationManifestToggle,
isTestGenerationEnabled, shouldOfferTestGenerationSpec) had zero callers
anywhere in the review pipeline -- the spec-attachment slice that was
supposed to consume them was never built. Removes the whole orphaned
surface plus its test file and the stale doc mentions in the example
configs and docs pages. The live, ungated MCP test-generation tools
(gittensory_generate_tests, boundary-test-generation) are untouched.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 8a284a5 Commit Preview URL

Branch Preview URL
Jul 08 2026, 03:14 AM

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.66%. Comparing base (6cbd0e8) to head (8a284a5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4126      +/-   ##
==========================================
- Coverage   93.66%   93.66%   -0.01%     
==========================================
  Files         385      384       -1     
  Lines       35930    35925       -5     
  Branches    13185    13182       -3     
==========================================
- Hits        33654    33649       -5     
  Misses       1618     1618              
  Partials      658      658              
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.15% <100.00%> (-0.01%) ⬇️
src/signals/focus-manifest.ts 99.62% <ø> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-08 03:25:56 UTC

14 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): wrangler.jsonc (matched wrangler.jsonc), wrangler.jsonc (matched **/wrangler.jsonc).

Review summary
This is a clean, mechanical removal of a fully dead code slice: the `GITTENSORY_REVIEW_TEST_GENERATION` env var, the `review.testGeneration` manifest field and its full parse/present/overlay/serialize round-trip in focus-manifest.ts, the `src/review/test-generation.ts` module and its resolver functions, and all associated tests and doc mentions. The diff is internally consistent — every site that referenced `testGeneration`/`test_generation` in the shown files was updated in lockstep (type, EMPTY_MANIFEST, emptyManifest, parseReviewConfig, computeReviewConfigPresent, overlayReviewConfig, reviewConfigToJson, and the corresponding test literals), and CI (including typecheck/validate) is green, which corroborates no dangling references remain in the compiled surface. The PR explicitly confirms via grep that the live, ungated MCP test-generation tools are untouched and use separate functions, which is the right scope boundary for a dead-code removal like this.

Nits — 6 non-blocking
  • Worth a final grep across the repo (README, CLAUDE.md, OpenAPI spec, any changelog) for stray `GITTENSORY_REVIEW_TEST_GENERATION`/`test_generation` mentions outside the files shown in this diff, since only a subset of docs were touched here.
  • The linked issue chore: remove vestigial GITTENSORY_REVIEW_TEST_GENERATION env var declaration #4108 per the external brief describes only removing the vestigial env var declaration, while this PR also removes the manifest field, resolver functions, and doc mentions — the broader scope is justified in the description as finishing the same orphaned slice, but it's worth confirming that's the intended issue scope rather than an assumption.
  • Consider a follow-up comment on chore: remove vestigial GITTENSORY_REVIEW_TEST_GENERATION env var declaration #4108 noting the removal went beyond the literal env-var declaration to the whole orphaned slice, so the issue history stays accurate for anyone auditing later.
  • 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.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4108
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, 505 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 505 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Linked issue satisfaction

Addressed
The diff removes GITTENSORY_REVIEW_TEST_GENERATION from src/env.d.ts and regenerates worker-configuration.d.ts, deletes the review.testGeneration manifest field's full round-trip (type/parse/present-check/overlay/serialize) and resolveTestGenerationManifestToggle in focus-manifest.ts, removes src/review/test-generation.ts and its dedicated test file, and updates both .gittensory.yml example files,

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), 505 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

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 8, 2026
@JSONbored
JSONbored merged commit f087b77 into main Jul 8, 2026
12 checks passed
@JSONbored
JSONbored deleted the chore/remove-testgeneration-dead-slice-4108 branch July 8, 2026 03:26
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: remove vestigial GITTENSORY_REVIEW_TEST_GENERATION env var declaration

1 participant