[sync] origin/develop <= upstream/develop (a30e4dd9cae8)#5
[sync] origin/develop <= upstream/develop (a30e4dd9cae8)#5svelderrainruiz wants to merge 1 commit into
Conversation
…munity-CI-CD#985) * LabVIEW-Community-CI-CD#978 Skip Copilot gate on throughput fork repos * LabVIEW-Community-CI-CD#978 Fix fork standing-priority workflow context * LabVIEW-Community-CI-CD#978 Fix Copilot gate signal preflight --------- Co-authored-by: GitHub Copilot <copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Syncs origin/develop with upstream/develop by bringing in upstream updates to priority tooling and workflow contracts, including fork-aware gating behavior.
Changes:
- Add canonical-repository detection to
copilot-review-gateand skip the gate for non-canonical (fork) repos. - Prefer reading the Copilot review signal artifact earlier to support signal-driven preflight.
- Add tests and workflow contract checks for standing-priority snapshot upstream resolution and fork-skipping behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/priority/copilot-review-gate.mjs | Introduces canonical repo checks, updates gate applicability/skipping logic, and adjusts signal preflight handling. |
| tools/priority/tests/copilot-review-gate.test.mjs | Adds coverage for throughput-fork skipping and signal-first behavior. |
| tools/priority/tests/standing-priority-workflow-contract.test.mjs | New contract tests ensuring workflows set the canonical upstream slug for snapshot sync. |
| .github/workflows/validate.yml | Sets AGENT_PRIORITY_UPSTREAM_REPOSITORY for the standing-priority snapshot step. |
| .github/workflows/issue-snapshot.yml | Sets AGENT_PRIORITY_UPSTREAM_REPOSITORY for issue-triggered snapshot sync. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function isCanonicalRepository(repo) { | ||
| const normalized = normalizeText(repo)?.toLowerCase(); | ||
| return normalized === CANONICAL_REPOSITORY.toLowerCase(); | ||
| } |
There was a problem hiding this comment.
isCanonicalRepository() treats a missing/blank repository as non-canonical, which then causes evaluateGateOutcome() to skip the gate with reason throughput-fork-skip. Because the Copilot review signal schema allows repository: null, this can make the gate fail open (skipped) for gated base refs when the repository value is unavailable/corrupt. Consider distinguishing “unknown repository” from “fork repository” (e.g., fail with gateState='error' / a dedicated reason when repository is null) so the queue gate doesn’t get bypassed by missing metadata.
| const signalPathExists = options.signalPath && existsSync(path.resolve(process.cwd(), options.signalPath)); | ||
| const signalReport = signalPathExists ? readSignalFn(options.signalPath) : null; | ||
| const preflightPullRequest = buildPullRequest(options, signalReport); |
There was a problem hiding this comment.
runCopilotReviewGate() now reads/parses the signal file before deciding shouldSkipWithoutLookup. This means a malformed/partially-written signal JSON can fail the entire gate run even when it would otherwise be skipped (draft PR, non-gated base ref, merge_group, etc.). To keep the skip path resilient, consider only reading the signal early when it’s actually needed for preflight (e.g., when --repo/PR metadata is missing), or catch JSON parse errors and treat the signal as unavailable when the run is going to be skipped.
|
Superseded by active origin fork PR #3 and older than current upstream develop. Protected-develop sync remains tracked under upstream issue LabVIEW-Community-CI-CD#986, so this stale sync PR should not stay open as a second origin lane. |
Summary
origin/developtoupstream/developata30e4dd9cae8.Testing