Skip to content

test(config): lock in review.test_generation manifest plumbing#3848

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:test/lock-in-test-generation-config
Jul 6, 2026
Merged

test(config): lock in review.test_generation manifest plumbing#3848
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:test/lock-in-test-generation-config

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

Summary

The review.test_generation kill-switch (#2189, the config slice of the boundary-safe test-generation advisory #1972) shipped and is documented in config/examples/gittensory.full.yml, but the config-templates inventory test — which locks in the plumbing for the sibling review toggles (changed_files_summary, effort_score) — never covered it. A regression that dropped its gittensory.full.yml docs entry or broke its manifest parse/round-trip would slip through here.

This adds a focused case asserting review.test_generation:

  • is documented in gittensory.full.yml (# test_generation:),
  • parses through parseFocusManifest (unset → null, true/false preserved),
  • round-trips through reviewConfigToJson ({ test_generation: true/false }).

test_generation gates the test-generation advisory rather than a review prompt, so — unlike effort_score — it is exercised via the JSON round-trip rather than resolveReviewPromptOverrides (which does not surface it). Verified against the shipped focus-manifest (normalizeOptionalBoolean(r.test_generation, "review.test_generation", …), the testGeneration field, and the reviewConfigToJson test_generation emit).

Closes #2189.

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npx vitest run test/unit/config-templates.test.ts — 10 passed (incl. the new test_generation case).
  • Test-only change (no src/** lines), so codecov/patch has no diff to gate.

Safety

  • No secrets/wallets/hotkeys/trust-scores/reward values. No auth/CORS/DB/API/UI changes (N/A — one inventory test case).

The review.test_generation kill-switch (JSONbored#2189, config slice of the boundary-safe
test-generation advisory JSONbored#1972) shipped and is documented in gittensory.full.yml,
but the config-templates inventory test — which locks in the plumbing for the
sibling review toggles (changed_files_summary, effort_score) — never covered it.

Add a focused case asserting review.test_generation is documented in
gittensory.full.yml and round-trips through parseFocusManifest +
reviewConfigToJson (unset -> null, true/false preserved). test_generation gates
the test-generation advisory rather than a review prompt, so it is exercised via
the JSON round-trip rather than resolveReviewPromptOverrides, which does not
surface it.

Closes JSONbored#2189.
@davion-knight
davion-knight requested a review from JSONbored as a code owner July 6, 2026 16:22
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.47%. Comparing base (ceeb905) to head (28fa76f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3848   +/-   ##
=======================================
  Coverage   93.47%   93.47%           
=======================================
  Files         332      332           
  Lines       33110    33110           
  Branches    12116    12116           
=======================================
  Hits        30948    30948           
  Misses       1530     1530           
  Partials      632      632           
🚀 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 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-06 16:30:16 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a test-only addition to test/unit/config-templates.test.ts that adds one case locking in review.test_generation: it checks the doc comment exists in gittensory.full.yml, verifies parseFocusManifest maps unset/true/false correctly to testGeneration, and confirms reviewConfigToJson round-trips both boolean states. The test mirrors the existing sibling patterns (changed_files_summary, effort_score) in the same file and correctly omits resolveReviewPromptOverrides since that helper doesn't surface test_generation, per the PR description. All assertions are directly checkable against the shown full file content and CI already passed, so the change is low-risk and does what it claims.

Nits — 3 non-blocking
  • The in-test comment explaining why resolveReviewPromptOverrides isn't used is a bit long for an inline comment; could be trimmed or moved to a one-liner.
  • Consider also asserting reviewConfigToJson(parseFocusManifest({}).review) omits test_generation entirely (i.e., unset state produces no key), to fully lock in the round-trip contract for the null case, not just true/false.
  • Add a case for the omitted/null round-trip in reviewConfigToJson to match the thoroughness of the true/false cases already covered.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2189
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: 50 registered-repo PR(s), 31 merged, 1 issue(s).
Contributor context ✅ Confirmed Gittensor contributor davion-knight; Gittensor profile; 50 PR(s), 1 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: davion-knight
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Rust
  • Official Gittensor activity: 50 PR(s), 1 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit bbad5c8 into JSONbored:main Jul 6, 2026
8 checks passed
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.

feat(config): add review.test_generation toggle (default off) for boundary-safe test generation

1 participant