feat(review): wire the deterministic surface lane into the gate (flag-gated) - #1340
Merged
Conversation
…-gated) The content/registry SURFACE LANE (runSurfaceReview) — a pure, AI-FREE, structured-data adjudicator for metagraphed registry-submission PRs — is now wired into the gate behind GITTENSORY_REVIEW_CONTENT_LANE (default OFF) + the per-repo GITTENSORY_REVIEW_REPOS allowlist. When off, the processor takes no new branch, resolves no files, and the gate disposition is byte-identical. Because the verdict never depends on an AI model, this is independent of the AI-reviewer accuracy work (the lane emits none of the AI_JUDGMENT_BLOCKER_CODES). New src/review/content-lane-wire.ts maps the deterministic verdict → gate disposition (merge→success, close→failure with a critical surface_lane_reject blocker, manual→action_required) and overrides the generic gate for a registry submission, with two safety guards: - applySurfaceGate PRESERVES the generic gate's hard blockers, so a surface "merge" can never clear a real critical (e.g. a committed secret) the generic gate already raised. - A fetch blip defers instead of auto-closing: an unreadable head, or a null base on a file GitHub marks "modified" (whose base must exist, so null is transient — distinguished from an ADDED file's expected absent base via the PR file status), routes to the generic gate rather than one-shot-closing a valid append. The close code is deliberately NOT an AI-judgment code, so green-CI refutation can never flip a deterministic surface close. The processor seam is a single call (evaluateWithSurfaceLane); the nullable-ref + override logic lives in the unit-tested helper. Advances #1255.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1340 +/- ##
=======================================
Coverage 95.26% 95.26%
=======================================
Files 186 187 +1
Lines 20318 20359 +41
Branches 7324 7339 +15
=======================================
+ Hits 19355 19395 +40
Misses 378 378
- Partials 585 586 +1
🚀 New features to boost your workflow:
|
4 tasks
JSONbored
added a commit
that referenced
this pull request
Jun 25, 2026
The metagraphed candidate-file model is fully superseded by the live surface model (#1340) and has zero src callers — only tests referenced it. Remove it: - the legacy scope classifier: classifyPrScope, isDirectSubmissionScope, PrScope, ScopeResult (superseded by classifyRegistryPrScope / RegistryPrScope / RegistryScopeResult); - the legacy validator assessCandidateDocument; - the now-dead patterns CANDIDATE_PATTERN, PROVIDER_PATTERN, PROVIDER_ANY_PATTERN; - the dead candidate dedup helpers candidateRegistryKey, registryDedupKeys, registryUrls; - their index.ts re-exports and 34 now-orphaned tests. KEPT (shared with the live surface validators): CandidateLike, Assessment, fail, ARTIFACT_PATTERN (used by METAGRAPHED_LANE_SPEC), and the secret/kind/url/observed-state checks. Verified no orphaned internal helpers and zero remaining references repo-wide. ~430 lines of dead code removed; no behaviour change. Follows #1340.
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
Wires the content/registry surface lane (
runSurfaceReview— a pure, AI-free, structured-data adjudicator for metagraphed registry-submission PRs) into the gate, behindGITTENSORY_REVIEW_CONTENT_LANE(default OFF) + the per-repoGITTENSORY_REVIEW_REPOSallowlist. When off, the processor takes no new branch, resolves no files, and the gate disposition is byte-identical. The verdict never depends on an AI model, so this is independent of the AI-reviewer accuracy work (the lane emits none of theAI_JUDGMENT_BLOCKER_CODES).New
src/review/content-lane-wire.tsmaps the deterministic verdict → gate disposition (merge→success, close→failure with a criticalsurface_lane_rejectblocker, manual→action_required) and overrides the generic gate for a registry submission, with two safety guards:applySurfaceGatepreserves the generic gate's hard blockers — a surface "merge" can never clear a real critical (e.g. a committed secret) the generic gate already raised."modified"(whose base must exist, so null is transient — distinguished from an added file's expected absent base via the PR filestatus), routes to the generic gate rather than one-shot-closing a valid append.The close code is deliberately not an AI-judgment code, so green-CI refutation can never flip a deterministic surface close. The processor seam is a single call; the nullable-ref + override logic lives in the unit-tested helper.
Validation
npm run test:cigreen;cf-typegenregenerated.Safety
Advances #1255.