Skip to content

Reduce Copilot propagation API pressure - #58

Merged
woksin merged 1 commit into
mainfrom
fix/copilot-propagation-api-pressure
Jun 17, 2026
Merged

Reduce Copilot propagation API pressure#58
woksin merged 1 commit into
mainfrom
fix/copilot-propagation-api-pressure

Conversation

@woksin

@woksin woksin commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • limit Copilot propagation matrix concurrency with max-parallel: 3
  • fetch source Copilot files once into a workflow artifact and reuse it per target repo
  • add a shared gh api retry helper and route propagation API calls through it
  • update propagation docs to describe the fetch-once artifact flow

Verification

  • bash -n .github/scripts/github-api-retry.sh
  • bash -n .github/scripts/prepare-copilot-source-artifact.sh
  • bash -n .github/scripts/propagate-copilot-instructions.sh
  • bash -n .github/scripts/copilot-sync-ignore-filter.sh
  • git diff --check
  • ruby -e "require 'yaml'; YAML.load_file('.github/workflows/propagate-copilot-instructions.yml')"
  • empty prepared-artifact smoke test exits before target API calls

Note: actionlint is not installed in this workspace, so I could not run it locally.

@woksin
woksin marked this pull request as ready for review June 17, 2026 10:00
@woksin

woksin commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Additional validation after PR creation:

  • Mocked retry helper test confirms a POST using --input - preserves its payload across a rate-limit retry.
  • Mocked propagation artifact-mode test confirms an already-up-to-date target exits before any write API calls.
  • Live read-only source artifact preparation against Cratis/AI succeeded and produced: files=251, blobs=218.

The live check only read from GitHub and wrote the prepared artifact to a temporary local directory.

@woksin
woksin force-pushed the fix/copilot-propagation-api-pressure branch from 57b04d2 to c84ece6 Compare June 17, 2026 10:26
@woksin

woksin commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up after inspecting local /Volumes/sourcecode/repos/cratis/AI:

Found that the first PR version handled the canonical .ai/ corpus and most .claude/ files, but it was not complete for the full AI adapter layout. It missed:

  • AGENTS.md and .agents/skills for Codex
  • directory adapter symlinks .github/skills and .github/prompts
  • materializing file adapters such as .github/copilot-instructions.md, .github/instructions/*, .claude/rules/*, and AGENTS.md from their canonical .ai/ targets

Pushed an update that:

  • expands the selected source set to include AGENTS.md, .agents/, and directory adapter symlink entries
  • materializes file adapters to real content while preserving directory symlinks to the synchronized .ai/ tree
  • excludes .claude/settings.local.json
  • reuses the same prepared source artifact for propagation, single-repo sync, and bootstrap seeding
  • updates the bootstrapped wrapper paths and README docs

Additional validation:

  • live read-only artifact preparation against Cratis/AI now finds 255 files and 164 unique blobs
  • verified .agents/skills, .github/skills, and .github/prompts remain mode 120000 symlinks
  • verified .github/copilot-instructions.md and AGENTS.md are materialized as mode 100644 content from .ai/rules/general.md
  • reran shell syntax checks, YAML parse, diff check, retry helper smoke test, artifact-mode no-write propagation smoke test, and bootstrap wrapper decode check

@woksin
woksin merged commit c306886 into main Jun 17, 2026
@woksin
woksin deleted the fix/copilot-propagation-api-pressure branch June 17, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant