Summary
reusable-sync-ai-rules.yml fails at runtime when called from a consumer repo. The workflow assumes laurigates/.github has a rules/ directory at the root and that the consumer repo has a .rulesync/ config, but neither exists.
Reproduction
Run Sync AI Rules in any consumer repo, e.g. mcu-tinkering-lab run 24399454041.
Observed failure
Step 3 (npx rulesync@latest fetch laurigates/.github --features rules,ignore --conflict overwrite):
GET /repos/laurigates/.github/contents/rules?ref=main - 404
No files found matching enabled features: rules, ignore
No files were fetched.
Summary: no files
Step 4 (npx rulesync@latest generate):
.rulesync directory not found. Run 'rulesync init' first.
##[error]Process completed with exit code 1.
Root cause
- The workflow fetches
rules/ from laurigates/.github@main, but that directory does not exist in the repo.
rulesync generate requires a .rulesync/ directory in the consumer repo; the workflow never runs rulesync init to create one.
Suggested fix
Pick whichever matches the intent of the workflow:
- Source of truth is in
laurigates/.github: add a rules/ directory to this repo containing the canonical rule files, so rulesync fetch has something to pull.
- Source of truth is elsewhere: update the
fetch call to point at the correct repo/path.
- Add a bootstrap step: run
npx rulesync@latest init in the consumer repo before generate so a missing .rulesync/ doesn't hard-fail (and fetch has somewhere to write).
Option 3 alone won't help if fetch still returns zero files — the root cause is that the upstream rules/ directory is missing.
Related
- Port of workflow came from ForumViriumHelsinki/.github — the FVH version likely has a
rules/ dir that wasn't copied over.
- Consumer workflows affected:
mcu-tinkering-lab at minimum; likely others that adopted this reusable.
Summary
reusable-sync-ai-rules.ymlfails at runtime when called from a consumer repo. The workflow assumeslaurigates/.githubhas arules/directory at the root and that the consumer repo has a.rulesync/config, but neither exists.Reproduction
Run
Sync AI Rulesin any consumer repo, e.g. mcu-tinkering-lab run 24399454041.Observed failure
Step 3 (
npx rulesync@latest fetch laurigates/.github --features rules,ignore --conflict overwrite):Step 4 (
npx rulesync@latest generate):Root cause
rules/fromlaurigates/.github@main, but that directory does not exist in the repo.rulesync generaterequires a.rulesync/directory in the consumer repo; the workflow never runsrulesync initto create one.Suggested fix
Pick whichever matches the intent of the workflow:
laurigates/.github: add arules/directory to this repo containing the canonical rule files, sorulesync fetchhas something to pull.fetchcall to point at the correct repo/path.npx rulesync@latest initin the consumer repo beforegenerateso a missing.rulesync/doesn't hard-fail (andfetchhas somewhere to write).Option 3 alone won't help if
fetchstill returns zero files — the root cause is that the upstreamrules/directory is missing.Related
rules/dir that wasn't copied over.mcu-tinkering-labat minimum; likely others that adopted this reusable.