feat(mcp): agent-native pre-submission self-check as a general product (#693) - #712
Conversation
#693) Lets any AI coding agent on ANY repo run "will this PR pass the gate?" from the repo's PUBLIC .gittensory.yml — no Gittensor account needed. - `buildPredictedGateVerdict` is now pack-aware (#692): under the `oss-anti-slop` pack it drops the confirmed-contributor gate (blocks any author, mirroring gateCheckPolicy); under `gittensor` it keeps it. The verdict surfaces `pack`. Backward-compatible — default pack is gittensor, so existing behavior is unchanged. - New MCP tool `gittensory_predict_gate` (the agent-native surface): given a planned PR, loads the public manifest + cached repo/issues/PRs and returns the predicted verdict. Self-scoped via requireContributorAccess. Works on an app-installed-but-unregistered (non-Gittensor) repo under `oss-anti-slop`. Acceptance: a non-Gittensor repo + agent run the self-check via MCP and the verdict matches what the maintainer's gate would compute (oss-anti-slop blocks any author; gittensor stays neutral for a non-confirmed contributor). Tests: pack-aware prediction (oss-anti-slop blocks a non-confirmed author; gittensor stays neutral; unregistered-repo-record path), MCP tool (verdict from public config on an unregistered repo; minimal-args path; self-scope rejection). 97% coverage gate green; workers tests pass.
|
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 4 changed file(s) — two independent AI reviewers. Suggested action: 🛠️ Request changes. (reviewers split: request changes / merge) Address the suggestions below before merging. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
|
What
Lets any AI coding agent on any repo run "will this PR pass the gate?" from the repo's public
.gittensory.yml— no Gittensor account needed (#693, Pillar 6).buildPredictedGateVerdictis now pack-aware (policy-pack-pluggable gate (gittensor + oss-anti-slop packs) #692): under theoss-anti-sloppack it drops the confirmed-contributor gate (blocks any author, mirroringgateCheckPolicy); undergittensorit keeps it. The verdict surfacespack. Backward-compatible — default pack isgittensor, so existing behavior is unchanged (the existing feat(miner): pre-submission gate prediction on the local branch (self-gate) #688 neutral-for-non-confirmed test still holds).gittensory_predict_gate— the agent-native surface: given a planned PR ({login, owner, repo, title, body?, labels?, linkedIssues?}), it loads the public manifest + cached repo/issues/PRs and returns the predicted verdict. Self-scoped viarequireContributorAccess(a session can only predict for its own login). Works on an app-installed-but-unregistered (non-Gittensor) repo undeross-anti-slop.Acceptance (#693)
✅ Under
oss-anti-slop, the verdict blocks any author (matches the real oss-anti-slop gate); undergittensor, a non-confirmed contributor stays neutral (matches the real gittensor gate). Both via MCP, computed from public config only.Why
The two-sided general product from Pillar 6: the maintainer installs the gate (#692), the agent calls the MCP self-check here. Output is public-safe (sanitized, basis
public_config). Builds entirely on the #688 predicted-gate engine + the #692 pack — no new gate logic.Tests
predicted-gate.test.ts: pack-aware prediction — oss-anti-slop blocks a self-declared non-confirmed contributor; gittensor keeps it neutral; runs on an app-installed-but-unregistered repo record;packsurfaced + defaults to gittensor.mcp-predict-gate.test.ts: tool returns a verdict from public config on an unregistered repo (oss-anti-slop → failure), minimal-args path, and self-scope rejection ("authenticated GitHub login").git diff --check+ui:openapi:checkpass.Advances Pillar 6 (#704). Closes #693. Remaining: #694 (funnel non-gittensor adopters → gittensor miners).