feat(mcp): predict the manifest path policy + path-gated pre-merge checks via changedPaths - #1413
Merged
Merged
Conversation
…ecks via changedPaths Part two of the predict_gate parity work (#11-13/#18). The oracle now accepts the PR's changed file PATHS (metadata only — paths, never source content, so the predictor stays metadata-only) and, when supplied, evaluates the path-dependent gates the live gate enforces: - ALL review.pre_merge_checks (path-gated ones now match their whenPaths), not just the path-independent subset. - the focus-manifest path policy (manifest_blocked_path / _linked_issue_required / _missing_tests), threaded through manifestPolicyGateMode so block-mode blocks. The slop score stays disclaimed: it needs the diff CONTENT, which a metadata-only oracle must never receive — so #13 is resolved by design, not by adding a gate. The note is now conditional: with paths it disclaims only slop; without them it also discloses the path-policy/path-gated gap. Wiring: the API route already accepted changedFiles (no schema change); the MCP tool gains an optional changedPaths field. No output-schema change → no OpenAPI regen.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1413 +/- ##
=======================================
Coverage 95.35% 95.36%
=======================================
Files 192 192
Lines 20786 20802 +16
Branches 7519 7524 +5
=======================================
+ Hits 19821 19837 +16
Misses 383 383
Partials 582 582
🚀 New features to boost your workflow:
|
JSONbored
added a commit
that referenced
this pull request
Jun 26, 2026
Revive #1405: rebased onto current main (resolved the predict_gate test against the changedPaths work in #1413 — both tests kept), fixed the #1413 test to store a PUBLIC repo_file manifest now that predict_gate reads public-only config, inlined publicSafeManifestPolicyFinding with a v8-ignore on the unreachable no-action arm, exported it, and added a focused unit test asserting the private blocked-path / test-expectation detail is redacted out of the public advisory.
JSONbored
added a commit
that referenced
this pull request
Jun 26, 2026
* fix(selfhost): protect private policy surfaces * test(selfhost): assert manifest-policy redaction + rebase onto main Revive #1405: rebased onto current main (resolved the predict_gate test against the changedPaths work in #1413 — both tests kept), fixed the #1413 test to store a PUBLIC repo_file manifest now that predict_gate reads public-only config, inlined publicSafeManifestPolicyFinding with a v8-ignore on the unreachable no-action arm, exported it, and added a focused unit test asserting the private blocked-path / test-expectation detail is redacted out of the public advisory.
This was referenced Jun 26, 2026
Closed
12 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
Part two of the
predict_gateparity work (audit #11–13/#18; part one was #1411). The pre-submit oracle now accepts the PR's changed file PATHS — metadata only (paths, never source content), so the predictor stays metadata-only — and, when supplied, evaluates the path-dependent gates the live gate enforces:review.pre_merge_checks(path-gated ones now match theirwhenPaths), not just the path-independent subset.manifest_blocked_path/manifest_linked_issue_required/manifest_missing_tests), threaded throughmanifestPolicyGateModeso block-mode blocks and advisory-mode doesn't — matchingevaluateGateCheckexactly.Slop stays disclaimed — it needs the diff content, which a metadata-only oracle must never receive (the miner/maintainer boundary). So #13 is resolved by design, not by adding a gate. The verdict note is now conditional: with paths it disclaims only slop; without them it also discloses the path-policy / path-gated gap (part one's behavior).
Wiring: the API route's
localBranchAnalysisSchemaalready acceptedchangedFiles(no schema change — just map to paths); the MCPpredict_gatetool gains one optionalchangedPathsfield. ThePredictedGateVerdictoutput shape is unchanged, so no OpenAPI regen (ui:openapi:checkpasses).No GitHub issue — internal review-subsystem audit finding. This closes the predict_gate parity thread.
Scope
src/) only —predicted-gate.ts,mcp/server.ts,api/routes.tswrangler.jsonc, or UI change; no OpenAPI change (output shape unchanged)Validation
npm run test:ci— green (4477 passed | 4 skipped)npm run test:coverage— every changed line and branch covered (one genuinely-unreachable no-action arm markedv8 ignore— the three policy findings always carry an action)npm audit --audit-level=moderate— 0 vulnerabilities;typecheck/ui:typecheck/ui:openapi:checkclean;git diff --checkcleanpredict_gatecall withchangedPathspredicting amanifest_blocked_pathblock.Safety
publicSafeFinding/sanitizePublicComment; only public.gittensory.ymlconfig is readchangedPathsreproduces part-one behavior exactly