feat(gate): focus-manifest policy as enforceable gate input (#555) - #827
Conversation
Add an opt-in per-repo manifestPolicyGateMode (off|advisory|block, default off). When block, the focus manifest's declared policy becomes hard gate blockers via the existing Gittensory Gate check: the three enforceable findings the guidance builder already emits — manifest_blocked_path, manifest_linked_issue_required, manifest_missing_tests — gate a confirmed contributor's PR. Gate-path integration mirrors the slop block: a single shared changed-file load (slop + manifest-policy no longer double-fetch; lazy so disabled repos pay nothing), the cached manifest is reloaded via loadRepoFocusManifest, buildFocusManifestGuidance recomputes over the changed files, and ONLY the three enforceable codes are pushed into the advisory. isConfiguredGateBlocker gates them on manifestPolicy: block. An INDEPENDENT dimension — deliberately not folded into the merge-readiness composite (a test asserts mergeReadiness:block does not promote a manifest-policy finding). Setting wired through types / schema / migration 0040 / repositories / openapi / settings-preview, plus .gittensory.yml parity in the same change (gate.manifestPolicy) so it ships without a config-as-code gap. isTestPath is exported from rules/advisory for the testFileCount.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | e234c8f | Commit Preview URL Branch Preview URL |
Jun 17 2026, 11:01 AM |
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 21 changed file(s) — two independent AI reviewers. Changed files (21)
Suggested action: 🔍 Manual review. The changed route's preview could not be captured — review the rendered page manually before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
Warning Could not capture a preview of the changed route(s) — review the rendered page manually before merging. Before = production · After = this PR's preview deploy.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #827 +/- ##
==========================================
- Coverage 96.64% 96.55% -0.09%
==========================================
Files 97 97
Lines 14072 14091 +19
Branches 5130 5141 +11
==========================================
+ Hits 13600 13606 +6
- Misses 95 105 +10
- Partials 377 380 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|


Closes #555.
What
A repo's focus manifest can declare policy (blocked paths, required-linked-issue, test expectations) but today it's advisory only — CI doesn't enforce it. This adds an opt-in per-repo
manifestPolicyGateMode(off|advisory|block, defaultoff). When block, the manifest's declared policy becomes hard blockers through the existingGittensory Gatecheck.Acceptance criterion met: a PR touching a manifest
blockedPath(or missing a required linked issue / test evidence) fails the gate when enabled.How
The guidance builder
buildFocusManifestGuidancealready emits the three enforceable findings (manifest_blocked_path,manifest_linked_issue_required,manifest_missing_tests) — no new finding logic. The change:manifestPolicy: block. An independent dimension — deliberately NOT folded into the merge-readiness composite (a test assertsmergeReadiness:blockdoes not promote a manifest-policy finding).loadRepoFocusManifest, recompute guidance over the changed files, and push only the three enforceable codes into the advisory. A repo with the gate on but no manifest present pushes nothing.rules/advisoryfortestFileCount.Config-as-code parity (same PR — no deferred gap)
Wired
manifestPolicyGateModethrough types / schema / migration 0040 / repositories / openapi / settings-preview (mirroringmergeReadinessGateMode), and.gittensory.ymlgate.manifestPolicyin the same change — so it ships complete, not as another #822-style follow-up.Tests
gate-check-policy.test.ts: each of the three codes × {block→failure, off→success, advisory→success, non-confirmed+block→neutral}, the independent-dimension assertion, the gateCheckPolicy threading, and the end-to-endgate.manifestPolicy: block+manifest_blocked_pathacceptance case.focus-manifest.test.ts:gate.manifestPolicyparse / round-trip / bad-value-warn + updated gate-object fixtures.Verification
migration guard (0001..0040, no dup) · typecheck clean · full suite 1981 passed, 1 skipped (only the pre-existing pngjs visual-agent skip) · openapi regenerated + drift-clean · UI lint clean.
Relates #525/#528 (Phase 1), #551/#552/#822 (gate settings + config-as-code parity).