You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check-risk-paths: the workflow sync check fails with ENOENT in a repository that vendors the library but has no pr-triage.yml #257
scripts/check-risk-paths.mjs runs the workflow sync check when the library exists under --root (existsSync(resolve(root, LIBRARY_PATH)), lines 89 to 99 at 17ea42d). The comment says "The sync check applies where the library lives (core)". But a repository that vendors scripts/lib/risk-paths.mjs (as the risk-paths spec allows, with a sha256 pin) also has that file, and it usually has no .github/workflows/pr-triage.yml. Then checkSync (scripts/sync-risk-paths-workflow.mjs, line 78) reads a missing file, and the gate fails with ENOENT, on a list that is valid.
FAIL risk-paths: ENOENT: no such file or directory, open '/tmp/tmp.…/repo/.github/workflows/pr-triage.yml'
FAIL risk_paths: 1 problem(s)
Exit code 1. Control: the same fixture without scripts/lib/risk-paths.mjs prints ok risk_paths: 2 entries, 2 at L1 or L2 name a category or boundary and exits 0.
Expected
The sync check applies only where the reusable workflow lives. When .github/workflows/pr-triage.yml does not exist under --root, skip the sync check (no failure, no "workflow in sync" in the ok line), as the gate does now when the library is missing.
Acceptance
check-risk-paths with a vendored scripts/lib/risk-paths.mjs and no .github/workflows/pr-triage.yml passes on a valid list, and its ok line does not say "workflow in sync".
Core itself still fails when the embedded copy drifts (the existing tests check-risk-paths fails when the pr-triage copy drifts and check-risk-paths passes on a fixture whose copies are in sync stay green).
1 new test in test/risk-paths.test.mjs for the vendored case; it fails without the fix.
Other read errors (for example a pr-triage.yml that exists but has no embedded block) still fail.
Activity