feat(review): per-repo opt-in to let a confident AI-judgment blocker gate the merge - #4171
Merged
Merged
Conversation
…gate the merge Content/registry repos (metagraphed today) have no schema/lint/codecov net to catch a semantically-wrong-but-structurally-valid defect -- their own AI reviewer's judgment is the only thing that ever catches it, yet applySurfaceGate's guard #3 lets a decisive deterministic surface merge unconditionally override even a confidently-flagged AI-judgment blocker. Adds gate.aiJudgmentBlockers: "gate" | "advisory" (default "advisory", byte-identical everywhere that doesn't opt in), YML-only config mirroring contentLane's own shape since this only matters for repos already running the registry content lane. When "gate", the AI-judgment-only override is skipped and the finding survives into the deterministic gate's own blockers, demoting the decision away from merge -- reproducing exactly the PR #3910 shape (correct-in-prose, wrong-in-disposition) as structurally impossible once a repo opts in. Setting metagraphed's own .gittensory.yml to gate.aiJudgmentBlockers: "gate" is a separate follow-up PR in that repo, gated on this shipping.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | a80e7ae | Commit Preview URL Branch Preview URL |
Jul 08 2026, 09:19 AM |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (83.33%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4171 +/- ##
==========================================
- Coverage 93.72% 93.72% -0.01%
==========================================
Files 387 387
Lines 36309 36312 +3
Branches 13300 13303 +3
==========================================
+ Hits 34032 34034 +2
Misses 1621 1621
- Partials 656 657 +1
🚀 New features to boost your workflow:
|
This was referenced Jul 8, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
providerslug semantically wrong for its domain —"gittensory"instead of"gittensor"), yet the gate's top-line disposition stayedapprove/merge recommended. Root cause:applySurfaceGate's guard feat(scoring): add situational score projections #3 unconditionally lets a decisive deterministic surface merge override even an AI-judgment-only failure — correct and intentional for gittensory's own code repo (fix(review): decide whether AI-judgment blockers should gate the verdict, not just annotate it #2592: other deterministic nets like codecov/patch/tests/lint/secret-scan make AI judgment supplementary there), but content/registry repos like metagraphed have no equivalent net for "this value is semantically wrong" defects.gate.aiJudgmentBlockers: "gate" | "advisory"(default"advisory", byte-identical everywhere that doesn't opt in) as a YML-only config knob — deliberately mirroringcontentLane's own YML-only shape (no DB column, no dashboard toggle) rather than the heavier DB-backed gate-setting-wiring template, since this only ever has an effect for a repo already running the registry content lane."gate":applySurfaceGate's AI-judgment-only override is skipped, so the finding falls through to the same union+failure path any other blocker takes —decisionis no longermerge.evaluateWithSurfaceLane's companionadvisory.findingscleanup (which strips the AI finding from the public-comment feed when the override fires) is also skipped in"gate"mode, since the finding is now a real blocker and the public comment needs to keep showing it."advisory"(default) behavior byte-identically — confirmed by running all 46 pre-existingcontent-lane-wire.test.tstests unchanged and green, plus a new explicit test provingaiJudgmentBlockersMode: "advisory"produces outputtoEqualthe unset-default case.Scope
CONTRIBUTING.md.Validation
git diff --checknpm run typechecknpm run docs:drift-check— unaffected (this field lives only inFocusManifestGateConfig, notRepositorySettings, so it's outsideGATE_MODE_MANIFEST's scope, which only scanssrc/types.ts).npx vitest run test/unit/content-lane-wire.test.ts test/unit/focus-manifest.test.ts test/unit/config-templates.test.ts— 612/612 passing, including all 46 pre-existingcontent-lane-wire.test.tscases unchanged.applySurfaceGatewithaiJudgmentBlockersMode: "gate"reproducing PR fix(review): preserve gate verdict on auto-review skip #3910's exact shape (a confidentai_consensus_defectprovider-misattribution finding survives a decisive surface merge,decisionbecomesfailure); the explicit-"advisory"-equals-default proof above; and two fullevaluateWithSurfaceLaneend-to-end tests — one opted-in (gate.aiJudgmentBlockers: "gate"via a real parsed manifest, confirmsdecision !== "success"AND the finding stays inadvisory.findings) and one opted-out (zero-config manifest, confirmsdecision === "success"and the finding IS stripped, byte-identical to the pre-existing REGRESSION test).src/review/content-lane-wire.ts100% lines / 98.75% branches (the one remaining branch is inrunRegistrySurfaceGate, a function this PR does not touch — confirmed viagit diff, zero changes in that function).packages/gittensory-engine/src/focus-manifest.ts's uncovered spots are likewise pre-existing and unrelated (verified each one againstgit diff— none fall within theaiJudgmentBlockersModefield I added).npm run test:workers,build:mcp,test:mcp-pack,ui:openapi:check,ui:lint,ui:typecheck,ui:build,npm audit— not re-run locally (no worker/MCP/OpenAPI/UI-component code touched); CI runs them authoritatively.Safety
.gittensory.yml.example+config/examples/gittensory.full.ymldocumentation is the deliverable itself, not a changelog)."gate"mode reintroduces exactly that risk as an explicit, per-repo, documented trade-off — the doc comments on both the manifest field andapplySurfaceGateitself say so plainly, and the default stays"advisory"everywhere.Notes
gate.aiJudgmentBlockers: "gate"inJSONbored/metagraphed's own.gittensory.ymlis a separate follow-up PR in that other repo, gated on this shipping first — not bundled here.isAiJudgmentOnlyFailure/AI_JUDGMENT_BLOCKER_CODESclassification that already gates which findings are "AI-judgment-only" in the first place.