Skip to content

fix(content-lane): reject multi-entry registry submissions - #1319

Merged
JSONbored merged 3 commits into
mainfrom
codex/fix-surface-lane-multi-entry-pr-validation
Jun 26, 2026
Merged

fix(content-lane): reject multi-entry registry submissions#1319
JSONbored merged 3 commits into
mainfrom
codex/fix-surface-lane-multi-entry-pr-validation

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Prevent a latent validation-bypass where multi-entry registry PRs were classified as not-direct-submission and thus caused runSurfaceReview to return null, letting the generic gate (which may auto-merge) handle malformed registry submissions.
  • Ensure registry-looking PRs that touch multiple entry/provider files remain in the surface lane so they receive decisive closure instead of an unrelated gate fallback.
  • Keep the surface-lane behavior decisive (merge/close, rarely manual) for malformed or bundled submissions to protect registry integrity.

Description

  • Change classifyRegistryPrScope to treat registry-looking PRs with multiple direct entry files, or multiple standalone provider files, as mixed-files by returning { scope: "mixed-files", directFile: null, isProvider: false } early.
  • Preserve previous semantics for true non-submission PRs so README-only and unrelated changes still return not-direct-submission.
  • Add a regression unit test to test/unit/content-lane-orchestrator.test.ts that asserts a multi-entry registry submission receives a close verdict and does not attempt to load registry files.
  • Update test/unit/content-lane-registry-logic.test.ts expectations for multi-entry cases to assert mixed-files for both metagraphed and minimal/bare specs.

Testing

  • Ran the targeted unit tests with npx vitest run test/unit/content-lane-orchestrator.test.ts test/unit/content-lane-registry-logic.test.ts, and those tests passed.
  • Verified git diff --check (no whitespace/conflict issues) locally.
  • Attempted full gate with npm run test:ci, but the run in this environment encountered long-running unrelated test timings and network/setup issues before completion; npm audit --audit-level=moderate returned 403 Forbidden against the npm registry in this environment, which prevented a full clean test:ci validation here.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

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.37%. Comparing base (314ad9d) to head (a3ffee5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1319   +/-   ##
=======================================
  Coverage   95.37%   95.37%           
=======================================
  Files         192      192           
  Lines       20852    20854    +2     
  Branches     7540     7541    +1     
=======================================
+ Hits        19887    19889    +2     
  Misses        383      383           
  Partials      582      582           
Files with missing lines Coverage Δ
src/review/content-lane/registry-logic.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jun 25, 2026
@JSONbored JSONbored added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 25, 2026
@dosubot dosubot Bot added the size:XS label Jun 25, 2026
@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 11dbad8 Commit Preview URL

Branch Preview URL
Jun 25 2026, 11:05 PM

@JSONbored
JSONbored merged commit 2b9df12 into main Jun 26, 2026
18 checks passed
@JSONbored
JSONbored deleted the codex/fix-surface-lane-multi-entry-pr-validation branch June 26, 2026 05:11
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 — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant