-
Notifications
You must be signed in to change notification settings - Fork 0
feat(providers): add GitHub Copilot community provider (@github/copilot-sdk) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 32 commits
6be5c61
9546ea7
f412b83
94b7f47
a198290
d7719bb
8a3504d
31d94d4
bc25dee
d7f36b2
817186d
6fea392
e0b57a8
ae2d936
056707d
d5c1cd9
7000f9b
48c81d3
0de826c
4397ed1
5294fcd
e646cd4
8697508
876abb1
889ffc2
7fc4761
4115ea5
359b6d3
6f86402
e50e649
efd838e
0e9f1c8
b99cee4
f9f8775
5957c6e
46874ca
2c15439
ad13d83
f094f2a
a57d628
9122673
b286ad9
d35b193
3868f89
bf8734b
6c94355
686bec6
4929c54
ef950ff
e2a4427
8cfd598
eec09ff
06c3f9e
454dbcb
a1d6209
f9bad03
ef16bac
e71c496
dcfb9d1
287bb35
6cf9883
2220ffe
0afbeb3
ff90111
784444a
bf1f471
7d06773
d256c71
ff924e8
a0d4884
fccfe42
cbcca8c
4885ee6
7e4ea40
d3fc706
4f666c7
2c65569
8ebacbf
5d0a90d
25531df
db1c005
f51600a
58d4886
fd6d75e
398afe0
8847da8
2945f2e
8295ece
1820a35
4631b8e
69b2c89
34302e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # E2E smoke test — GitHub Copilot community provider | ||
| # Verifies: provider registration, SDK session start, simple prompt response. | ||
| # Auth: run `copilot login`, or provide COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN. | ||
| name: e2e-copilot-smoke | ||
| description: 'Smoke test for the GitHub Copilot community provider.' | ||
| provider: copilot | ||
| model: gpt-5-mini | ||
|
|
||
| nodes: | ||
| - id: simple | ||
| prompt: 'Reply with exactly COPILOT_OK' | ||
| idle_timeout: 30000 | ||
|
|
||
| - id: assert | ||
| bash: | | ||
| # The workflow engine substitutes $simple.output as a literal string | ||
| # before bash runs. Wrap in single quotes so command substitution | ||
| # (`$(...)`, backticks) inside a model response is treated as data, | ||
| # not executed. A literal `'` in the value would cause a syntax | ||
| # error, which fails the test loudly rather than running arbitrary | ||
| # shell — strict improvement over double-quoted interpolation. | ||
| output_raw='$simple.output' | ||
| if [ -z "$output_raw" ]; then | ||
| echo "FAIL: simple node returned empty output" | ||
| exit 1 | ||
| fi | ||
| printf '%s\n' "$output_raw" | grep -F -q -- 'COPILOT_OK' || { | ||
| printf 'FAIL: expected COPILOT_OK, got: %s\n' "$output_raw" | ||
| exit 1 | ||
| } | ||
| printf 'PASS: simple=%s\n' "$output_raw" | ||
| depends_on: [simple] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,8 @@ About to test: | |
| Path: brew (Homebrew tap on macOS) | ||
| Version: 0.3.1 (expected) | ||
| Cleanup: will uninstall after tests (brew uninstall + untap) | ||
| If `archon-stable` symlink is detected in Phase 2, it will be | ||
| restored at the end of Phase 5 by reinstalling the tap formula. | ||
|
|
||
| Proceed? (y/N) | ||
| ``` | ||
|
|
@@ -112,6 +114,18 @@ gh release view v<version> --repo coleam00/Archon --json tagName,assets --jq '{t | |
|
|
||
| If the release does not exist or has no assets, abort with a clear message. Do not proceed to install a non-existent release. | ||
|
|
||
| 4. **Detect persistent `archon-stable` install (brew path only).** If the user has renamed a prior brew install to `archon-stable` (the dual-homebrew pattern — see `~/.config/fish/functions/brew-upgrade-archon.fish`), Phase 5's `brew uninstall` will wipe it. Capture the state so Phase 5b can restore it: | ||
|
|
||
| ```bash | ||
| ARCHON_STABLE_WAS_INSTALLED="" | ||
| if [ -L /opt/homebrew/bin/archon-stable ] || [ -L /usr/local/bin/archon-stable ]; then | ||
| ARCHON_STABLE_WAS_INSTALLED="yes" | ||
| echo "Detected persistent archon-stable — will restore after Phase 5 uninstall." | ||
| fi | ||
| ``` | ||
|
|
||
| Export `ARCHON_STABLE_WAS_INSTALLED` into the environment used by Phase 5b. Only applies to the `brew` path — `curl-mac` and `curl-vps` don't go through brew and don't disturb `archon-stable`. | ||
|
Comment on lines
+117
to
+127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scope Checking both common prefixes can false-positive when the other Homebrew installation has Proposed fix ARCHON_STABLE_WAS_INSTALLED=""
-if [ -L /opt/homebrew/bin/archon-stable ] || [ -L /usr/local/bin/archon-stable ]; then
+BREW_BIN="$(brew --prefix)/bin"
+if [ -L "$BREW_BIN/archon-stable" ]; then
ARCHON_STABLE_WAS_INSTALLED="yes"
- echo "Detected persistent archon-stable — will restore after Phase 5 uninstall."
+ echo "Detected persistent archon-stable at $BREW_BIN/archon-stable — will restore after Phase 5 uninstall."
fi if [ -n "$ARCHON_STABLE_WAS_INSTALLED" ]; then
echo "Restoring archon-stable (detected before test)..."
brew tap coleam00/archon
brew install coleam00/archon/archon
BREW_BIN="$(brew --prefix)/bin"
if [ -e "$BREW_BIN/archon" ]; then
- mv "$BREW_BIN/archon" "$BREW_BIN/archon-stable"
+ mv -f "$BREW_BIN/archon" "$BREW_BIN/archon-stable"
echo "archon-stable restored: $(archon-stable version 2>/dev/null | head -1)"Also applies to: 371-383 🤖 Prompt for AI Agents |
||
|
|
||
| ## Phase 3 — Install | ||
|
|
||
| ### Path: brew | ||
|
|
@@ -352,6 +366,25 @@ archon version | head -1 | |
| # should match the dev version captured in Phase 2 | ||
| ``` | ||
|
|
||
| **Restore `archon-stable` if it existed before the test** (dual-homebrew pattern — see Phase 2 item 4): | ||
|
|
||
| ```bash | ||
| if [ -n "$ARCHON_STABLE_WAS_INSTALLED" ]; then | ||
| echo "Restoring archon-stable (detected before test)..." | ||
| brew tap coleam00/archon | ||
| brew install coleam00/archon/archon | ||
| BREW_BIN="$(brew --prefix)/bin" | ||
| if [ -e "$BREW_BIN/archon" ]; then | ||
| mv "$BREW_BIN/archon" "$BREW_BIN/archon-stable" | ||
| echo "archon-stable restored: $(archon-stable version 2>/dev/null | head -1)" | ||
| else | ||
| echo "WARNING: brew install succeeded but $BREW_BIN/archon missing — check formula" | ||
| fi | ||
| fi | ||
| ``` | ||
|
|
||
| > **Note on the restored version**: this reinstalls from whatever the tap currently ships, which is typically the release you just tested (so `archon-stable` ends up at the newly-tested version). That's usually what the operator wants — you just verified the new release works, and you want `archon-stable` pointed at it. If you were testing an older version for back-version QA, the restored `archon-stable` will be the *current* tap formula, not the pre-test version. For that rare case, the operator should re-run `brew-upgrade-archon` manually after the test. | ||
|
|
||
| ### Path: curl-mac | ||
|
|
||
| ```bash | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow-status detection and rerun logic has a few edge cases worth tightening.
Three issues, all in the same block:
Non-failure terminal states are missed.
[[ "$WORKFLOW_STATUS" == "completed|failure" ]]only short-circuits onfailure. Acancelled,timed_out, orstartup_failureconclusion will keep the loop spinning for the full 15 minutes and then fall through to the rerun path anyway. Consider[[ "$WORKFLOW_STATUS" == completed\|* && "$WORKFLOW_STATUS" != "completed|success" ]].Run lookup isn't pinned to the release tag.
gh run list --workflow release.yml --event push --limit 1returns the newest release.yml run — not necessarily the run triggered byvx.y.z. If any other push event lands on a watched ref between tag-push and this check, you'll read/rerun the wrong workflow. Safer: filter by tag SHA, e.g.--commit "$(git rev-parse vx.y.z)".gh run rerun --failedis a no-op on a still-running or already-succeeded run. The outer condition on line 297 also triggers on a pure loop timeout (WORKFLOW_FAILED=0butASSET_COUNT<7). In that case the rerun does nothing,gh run watchreturns immediately, and we fall straight into the deterministic-failure path even though CI may still be mid-upload. Gate the rerun onWORKFLOW_FAILED=1and handle the timeout case separately (e.g. extend the wait or bail with a distinct message).🔧 Sketch of the tightened block
🤖 Prompt for AI Agents