Skip to content

feat(review): add review.visual.enabled config-as-code toggle#4093

Merged
JSONbored merged 3 commits into
mainfrom
feat/visual-review-config-enabled-4083
Jul 8, 2026
Merged

feat(review): add review.visual.enabled config-as-code toggle#4093
JSONbored merged 3 commits into
mainfrom
feat/visual-review-config-enabled-4083

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Adds review.visual.enabled (boolean, default unset/null) to the existing VisualConfig type, resolved through the standard 3-layer config-as-code precedence (per-repo file > global-default file > _shared file) already used by review.visual.preview/routes/themes/gif.
  • Semantics: unset at every layer defers entirely to today's GITTENSORY_REVIEW_SCREENSHOTS + GITTENSORY_REVIEW_REPOS gate (byte-identical to today); explicit false (global default, or overridden per-repo) forces visual capture off for that repo even when the env-var gate would otherwise allow it; explicit true opts a repo back in at a layer where a broader default disabled it.
  • This lets an operator turn visual capture on/off per-repo purely through .gittensory.yml on their own VPS — no redeploy needed — closing part of Epic: config-as-code should fully control every review feature, not just restrict it #4092 (config-as-code should fully control every review feature).

Closes #4083. Part of #4092.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • 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 an issue.

Validation

  • git diff --check
  • npm run test:ci — full local gate, green: 580 test files / 11670 tests passed, 0 failures.
  • npm run typecheck — clean.
  • npm audit --audit-level=moderate

Safety

  • No secrets, wallets, hotkeys, trust scores, or reward values exposed.
  • Public GitHub text stays sanitized.
  • N/A — no auth/session/CORS changes.
  • N/A — no API/OpenAPI/MCP surface touched.
  • N/A — no UI changes.
  • Docs updated (.gittensory.yml.example + config/examples/gittensory.full.yml, kept in sync).

@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 8, 2026

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 c9f4fcc Commit Preview URL

Branch Preview URL
Jul 08 2026, 12:49 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.64%. Comparing base (ef3257a) to head (c9f4fcc).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4093   +/-   ##
=======================================
  Coverage   93.64%   93.64%           
=======================================
  Files         384      384           
  Lines       35853    35856    +3     
  Branches    13157    13159    +2     
=======================================
+ Hits        33574    33579    +5     
  Misses       1618     1618           
+ Partials      661      659    -2     
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.15% <100.00%> (+<0.01%) ⬆️
src/queue/processors.ts 95.15% <100.00%> (+0.06%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gittensory-orb gittensory-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. label Jul 8, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-08 01:03:46 UTC

8 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): src/queue/processors.ts (matched src/queue/**).

Review summary
This PR adds a null-default `review.visual.enabled` boolean to `VisualConfig`, threading it consistently through parsing (`parseVisualConfig`), presence detection (`visualConfigPresent`), overlay precedence (`overlayVisualConfig` via `pickOverlayNullable`), and serialization (`reviewConfigToJson`) in focus-manifest.ts, then wires the enforcement point in processors.ts by short-circuiting `buildCapture` with a no-routes sentinel when `enabled === false`. The semantics described (unset/true defers to the existing env-var gate, explicit false forces capture off) match what the code actually does — `true` never bypasses the env gate since the diff doesn't special-case it, it just proceeds to the unchanged `buildCapture` call. Both docs example files and multiple test files (queue, focus-manifest, visual-config-wiring, signals-coverage) were updated in lockstep with the new field, and the change closes the linked issue (#4083) as claimed.

Nits — 6 non-blocking
  • codecov/patch reports only 57–71% hit despite the new branch-precedence tests (true/false/null, overlay win/fallback, warn-on-non-boolean); given the .gittensory.yml.example/full.yml comment-only additions likely count toward 'changed lines' in the patch metric, worth confirming the coverage tool excludes non-src files rather than there being an actually-untested branch in processors.ts or focus-manifest.ts.
  • The 8-line doc block is duplicated verbatim between `.gittensory.yml.example` and `config/examples/gittensory.full.yml` — same manual-sync burden as the rest of that section, not introduced by this PR, but a candidate for a future generation step given both files are already flagged as long.
  • Double check codecov's patch-coverage config actually scopes to `src/**`/`packages/*/src/**` per the stated repo convention, since docs-only diffs shouldn't be able to drag patch coverage down if it's configured correctly.
  • Consider a short round-trip test asserting `enabled: true` does NOT suppress capture even when `GITTENSORY_REVIEW_SCREENSHOTS` is off, to make the 'true never bypasses the env gate' claim from the doc comments explicit in test form rather than only inferable from the processors.ts logic.
  • 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.
  • 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 #4083
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, 509 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 509 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Linked issue satisfaction

Addressed
The diff adds the nullable `enabled` field to `VisualConfig` and wires it through `EMPTY_VISUAL_CONFIG`, `parseVisualConfig`, `overlayVisualConfig`, `visualConfigPresent`, and `reviewConfigToJson`, gates the capture call in `processors.ts` on `enabled === false` (equivalent to the requested `!== false` check), documents the key in `.gittensory.yml.example`, and adds tests covering parse (true/fals

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

JSONbored added 3 commits July 7, 2026 17:45
Lets an operator turn visual-capture on/off per-repo (or set a global
default) purely through .gittensory.yml, without touching the shared
GITTENSORY_REVIEW_SCREENSHOTS / GITTENSORY_REVIEW_REPOS env-var gate
used by every other converged feature.
…alse path

Use a sentinel no-routes/non-pending capture result instead of wrapping
the existing buildCapture + self-poll block in a new if, so the diff
only touches the actual gating line -- codecov/patch was counting the
purely-reindented, already-covered lines as new patch surface.
The reindentation from the enabled:false ternary dragged these
pre-existing optional spreads into the diff; codecov/patch correctly
flagged them as needing fresh branch coverage even though the logic
itself is unchanged.
@JSONbored JSONbored force-pushed the feat/visual-review-config-enabled-4083 branch from 9e5c5ec to c9f4fcc Compare July 8, 2026 00:47
@JSONbored JSONbored merged commit 92dfae1 into main Jul 8, 2026
12 checks passed
@JSONbored JSONbored deleted the feat/visual-review-config-enabled-4083 branch July 8, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 1.25x multiplier. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

feat(review): config-as-code enable/disable for review.visual capture

1 participant