Skip to content

feat(review): add per-repo review.selftune force-off for the auto-tune cron - #4118

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
feat/selftune-config-4104
Jul 8, 2026
Merged

feat(review): add per-repo review.selftune force-off for the auto-tune cron#4118
loopover-orb[bot] merged 1 commit into
mainfrom
feat/selftune-config-4104

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Scope

Validation

  • git diff --check
  • npm run typecheck — clean.
  • Targeted tests: test/unit/focus-manifest.test.ts, test/unit/config-templates.test.ts, test/unit/signals-coverage.test.ts, test/unit/selftune-wiring.test.ts (3 new tests: force-off regression, unset-stays-default regression, true-override-is-a-no-op), test/unit/selftune-readback.test.ts — all green (652 tests).
  • Scoped coverage check — src/review/selftune-wire.ts at 100% line/branch; packages/gittensory-engine/src/focus-manifest.ts's uncovered lines confirmed unrelated to this diff (pre-existing labelingRules/content-parsing gaps).
  • npm audit --audit-level=moderate — 0 vulnerabilities.

Safety

  • No secrets/wallets/hotkeys/trust-scores exposed.
  • N/A — no auth/session/CORS changes.
  • N/A — no API/OpenAPI/MCP surface touched.
  • N/A — no UI changes.
  • This touches the self-improvement/auto-tune safety contract's REPO SCOPING only — the tightening-only shadow-soak/promotion logic itself (computeTuningRecommendations, runAutoApplyRecommendations) is completely untouched.

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

Branch Preview URL
Jul 08 2026, 02:10 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.65%. Comparing base (e86933f) to head (8d76894).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4118   +/-   ##
=======================================
  Coverage   93.65%   93.65%           
=======================================
  Files         384      384           
  Lines       35860    35865    +5     
  Branches    13158    13160    +2     
=======================================
+ Hits        33583    33589    +6     
  Misses       1618     1618           
+ Partials      659      658    -1     
Files with missing lines Coverage Δ
packages/gittensory-engine/src/focus-manifest.ts 99.15% <100.00%> (+<0.01%) ⬆️
src/review/selftune-wire.ts 100.00% <100.00%> (+3.84%) ⬆️
🚀 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 gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 8, 2026
…e cron

Unlike rag/reputation/grounding, selftune's cron pass (runSelfTune) has
no GITTENSORY_REVIEW_REPOS allowlist to fall back to -- its scoping is
already isAgentConfigured (a separate, broader acting-autonomy consent
boundary), and it never accepted a shared resolver shape.

Adds review.selftune: boolean | null as its own top-level field
(mirroring impactMap/cultureProfile, not the features: block --
CONVERGED_FEATURE_KEYS has no allowlist fallback that fits this
feature). Deliberately FORCE-OFF-ONLY, mirroring the safety feature's
asymmetric precedent (#2269) in the opposite direction: false excludes
an otherwise agent-configured repo from tuning; there is no true
override, since forcing a non-agent-configured repo INTO tuning would
bypass that unrelated consent boundary.

Closes #4104.
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Tip

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

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-08 02:19:41 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Adds `review.selftune: boolean | null` as a top-level FocusManifestReviewConfig field (mirroring the impactMap/cultureProfile plumbing pattern) and wires it into `selfTuneRepos` in src/review/selftune-wire.ts as a force-off-only per-repo exclusion from the auto-tune cron. The asymmetric design (no `true` override) is correctly implemented — `manifest?.review.selftune === false` is the only branch that acts, so a `true` value is genuinely a no-op that cannot bypass the `isAgentConfigured` autonomy boundary, and a manifest-load failure correctly fails open via `.catch(() => null)`. All the mechanical plumbing (parse, overlay, JSON serialization, EMPTY_MANIFEST/emptyManifest defaults, field-exhaustiveness test) is updated consistently with the existing convention, and the three new tests exercise the real force-off, unset-default, and true-no-op paths rather than fabricated states.

Nits — 6 non-blocking
  • src/review/selftune-wire.ts: `loadRepoFocusManifest` failures are swallowed unconditionally via `.catch(() => null)` — this fails open for real manifest-parse bugs too, not just transient blips, with no logging, so a silent regression here would be invisible in production; consider logging on catch even though the fail-open behavior itself is correct.
  • src/review/selftune-wire.ts: the per-repo `loadRepoFocusManifest` await happens sequentially inside the `for` loop for every agent-configured repo, adding one more serial round-trip per repo on top of `resolveRepositorySettings`; fine for a cron job over a bounded repo set today, but worth a comment if the registered-repo count is expected to grow significantly.
  • The doc comments in .gittensory.yml.example/gittensory.full.yml/focus-manifest.ts are quite long/repetitive across four locations for a single boolean field — consider trimming to one canonical explanation and linking to it, though this matches existing repo convention for other review.* toggles.
  • Consider extracting the `manifest?.review.selftune === false` check into a small named predicate (e.g. `isSelfTuneOptedOut(manifest)`) in selftune-wire.ts for readability, since the surrounding comment already carries most of the semantic weight.
  • If `loadRepoFocusManifest` failures are expected to be rare but meaningful, add a debug/warn log on the catch so a systemic manifest-loader issue doesn't silently masquerade as 'every repo passed its selftune check'.
  • 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.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4104
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 ✅ Passing No configured blocker found.
Linked issue satisfaction

Partially addressed
The PR delivers the issue's expected outcome (per-repo control of selftune via .gittensory.yml, with docs and tests) but explicitly rejects the prescribed mechanism: it does not add "selftune" to CONVERGED_FEATURE_KEYS/FEATURE_GLOBAL_FLAG or migrate the call site onto resolveConvergedFeature/convergedFeatureActive, instead introducing a separate top-level, force-off-only review.selftune field with

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

@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

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 02ea67d into main Jul 8, 2026
12 checks passed
@loopover-orb
loopover-orb Bot deleted the feat/selftune-config-4104 branch July 8, 2026 02:19
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 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add config-as-code coverage for the selftune feature

1 participant