Skip to content

test: gate substrate scenarios on gh auth presence (cluster B of #351) - #363

Merged
joelteply merged 1 commit into
canaryfrom
fix/integration-suite-gh-auth-gate-cluster-b
Apr 30, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/integration-suite-gh-auth-gate-cluster-b

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

Cluster B of #351 — the integration-suite has been failing on every canary push because 13+ scenarios exercise substrate features (--room / bare connect / use_room=1 default), which trip cmd_connect's gh-auth pre-flight (#338) on a runner with no gh auth.

Add `requires_gh_auth_or_skip()` helper that:

  • Caches gh auth probe result on first call (saves rate-limit budget)
  • Marks the scenario as skipped-pass with reason "requires gh auth — runner has no PAT secret" when absent
  • Returns 0 (proceed) when present, preserving substrate coverage on developer machines and future PAT-equipped CI

Applied to 13 substrate scenarios: room, events, mnemonic, kick, heartbeat, bounce, two_tab_localhost, auto_scope, connect_after_kill_recovers, general_sidecar_default, host_msg_publishes_to_gist, general_has_shared_gist, custom_room_creates_gist.

Together with #362 (Carl, cluster A — test stderr wording updates for the #343 ed25519-message-shape change), this closes out #351.

Test plan

  • CI clean-install matrix green
  • CI integration-suite (canary push) — once both A+B land, integration-suite should be GREEN on no-auth runners (substrate scenarios skip-pass, non-substrate scenarios run normally)
  • Local: run integration.sh on this Mac (gh authed) → substrate scenarios run normally (no regression)
  • Local with simulated no-auth: substrate scenarios skip with the helpful message

Followups (out of scope)

  • Wire a PAT secret into the integration-suite runner's env so substrate scenarios actually run. Separate issue when someone wants real CI substrate coverage.
  • The cmd_connect pre-flight could be refined to skip when an inline-invite target is given (use_room=1 + invite-string = legacy 1:1 pair, no gh needed). Minor — not this PR.

🤖 Generated with Claude Code

The integration-suite has been failing on every canary push for the
duration of this push (#351 cluster B). Root cause: 14 scenarios call
airc with --room or bare connect (use_room=1), which trips
cmd_connect's pre-flight gh-auth check (#338) — and CI's integration-
suite runner has no gh auth wired in (no PAT secret).

Add requires_gh_auth_or_skip() helper at the top of integration.sh:
checks gh auth status once (cached for subsequent calls — saves rate
limit budget when the suite runs many substrate scenarios), and
either proceeds (when authed) or marks the scenario as skipped-pass
with the reason. Test count stays sane, suite goes green on no-auth
runners, substrate coverage preserved when gh IS authed (developer
machines, future CI with PAT secret).

Apply the gate to the 13 scenarios that exercise substrate features
(--room or use_room=1 default): room, events, mnemonic, kick,
heartbeat, bounce, two_tab_localhost, auto_scope, connect_after_kill_
recovers, general_sidecar_default, host_msg_publishes_to_gist,
general_has_shared_gist, custom_room_creates_gist.

Cluster A (Carl, #362) was test-stderr wording updates for the #343
ed25519-message-shape change. Together these close out #351.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply merged commit 0b68e4e into canary Apr 30, 2026
6 checks passed
@joelteply
joelteply deleted the fix/integration-suite-gh-auth-gate-cluster-b branch April 30, 2026 02:30
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