Skip to content

fix(review): enforce surface lane gate verdicts#1398

Closed
JSONbored wants to merge 3 commits into
mainfrom
codex/fix-surface-lane-verdict-enforcement
Closed

fix(review): enforce surface lane gate verdicts#1398
JSONbored wants to merge 3 commits into
mainfrom
codex/fix-surface-lane-verdict-enforcement

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The deterministic content/registry surface lane computed an authoritative GateCheckEvaluation but the published GitHub Gate check was being recomputed from advisory + policy, which could drop the surface-lane override and display a green Gate despite a surface failure/action_required verdict.
  • applySurfaceGate treated a generic evaluation with an empty blockers array as permissive, which could convert deliberate generic neutral/hold states (e.g. first-time-contributor grace) into success when a surface lane returned merge.

Description

  • Allow createOrUpdateGateCheckRun to accept an optional gateEvaluation and prefer it over recomputing the gate from advisory/policy so the finalized surface-lane verdict is published intact (src/github/app.ts).
  • Thread the finalized gateEvaluation from the processor into the Gate completion call so the published check run matches the already-overridden evaluation (src/queue/processors.ts).
  • Adjust applySurfaceGate so generic neutral/action_required holds are preserved when the surface lane returns success, while still preserving generic hard blockers and allowing surface failure to enforce a blocking conclusion (src/review/content-lane-wire.ts).
  • Add unit tests that assert (1) a supplied gateEvaluation is published instead of being recomputed and (2) a generic neutral hold is preserved over a surface merge, and that surface rejections still override neutral holds (test/unit/github-app.test.ts, test/unit/content-lane-wire.test.ts).
  • Add the required type import and small test/fixture adjustments to cover the new paths.

Testing

  • Ran targeted unit tests: npx vitest run test/unit/content-lane-wire.test.ts test/unit/github-app.test.ts, all tests in those files passed.
  • Type-check succeeded with tsc --noEmit.
  • Attempted full CI/local coverage with npm run test:coverage / npm run test:ci, but coverage finalization in this environment failed due to an unrelated tooling/runtime issue (TypeError: jsTokens is not a function) during coverage remapping; this is an environment/tooling failure and not a regression in the changes here.
  • npm audit --audit-level=moderate could not complete in this environment due to the registry audit endpoint returning 403 Forbidden (external to the code changes).

Codex Task

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 25, 2026
@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.38%. Comparing base (9e1c351) to head (9a5e2ba).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1398   +/-   ##
=======================================
  Coverage   95.38%   95.38%           
=======================================
  Files         201      201           
  Lines       21598    21599    +1     
  Branches     7807     7808    +1     
=======================================
+ Hits        20601    20602    +1     
  Misses        416      416           
  Partials      581      581           
Files with missing lines Coverage Δ
src/review/content-lane-wire.ts 97.56% <100.00%> (+0.06%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui bed232c Commit Preview URL

Branch Preview URL
Jun 25 2026, 11:03 PM

@JSONbored JSONbored self-assigned this Jun 26, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix - worth 0.5x multiplier. label Jun 26, 2026
@JSONbored JSONbored force-pushed the codex/fix-surface-lane-verdict-enforcement branch from bed232c to dfbe598 Compare June 26, 2026 20:51
@gittensory-orb

gittensory-orb Bot commented Jun 27, 2026

Copy link
Copy Markdown

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review — safe to merge

2 files · 1 AI reviewers · no blockers · readiness 48/100 · CI green · blocked

✅ Approved — safe to merge

Signal Result Evidence
Code review ✅ No blockers 1 reviewers, synthesized
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:S.
Validation evidence ❌ 5/25 Cached preflight status is hold.
Open PR queue ❌ 3/10 48 open PR(s), 9 likely reviewable, 39 unlinked.
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 81 PR(s), 261 issue(s).
Gate result ✅ Passing No configured blocker found.
Nits — 2 non-blocking
  • Repository config was not parsed
  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 81 PR(s), 261 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (PR #1391)
  • Related work: Titles/paths share 6 meaningful terms. (PR #1427)
  • Related work: Titles/paths share 7 meaningful terms. (PR #1441)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Review top overlaps.
  • Add scope summary.
  • Fix blocker.
  • Expect slower review.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 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.

  • Re-run Gittensory review

@JSONbored

Copy link
Copy Markdown
Owner Author

Closing. The PR body describes app.ts/processors.ts gate-threading work that already landed (#1340 / #1410), so the description doesn't match the diff. The only real change — applySurfaceGate preserving a generic neutral hold over a surface merge — directly reverses the intentional #1340 decision (3d8ad8da, content-lane-wire.ts:75: "gate off, or generic was clean → surface stands"). That's a judgment reversal of recent deliberate work on a narrow neutral-hold-vs-surface-merge collision, not a demonstrated bug. If we do want surface-merge to not override first-contribution grace, that's a separate explicit decision against #1340 — not this.

@JSONbored JSONbored closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix - worth 0.5x multiplier. gittensor Gittensor contributor context size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant