Skip to content

test: scaffold private.pem in synthesized identity dirs (cluster A of #351 CI failures) - #362

Merged
joelteply merged 1 commit into
canaryfrom
fix/test-identity-scaffold-post-343
Apr 30, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/test-identity-scaffold-post-343

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Cluster A of the #351 / #361-CI failures, per the in-mesh split with other-mac (other-mac taking cluster B for the gh-auth-less runner infra).

Problem

Pre-#343 the test scenarios that synthesize a partial host scope (cmd_send liveness probe, away-status, list, quit) used ssh-keygen -t ed25519 to create ssh_key + relied on the airc binary to lazily create private.pem via openssl genpkey. Post-#343 init_identity creates private.pem via the venv cryptography path, but the test scenarios that don't go through airc connect at all skip init_identity entirely — sign_message then dies with:

ed25519 sign failed: [Errno 2] No such file or directory: '.../private.pem'

…before reaching the actual code-under-test (the monitor-liveness diagnostic, away-marker logic, etc).

In #361's canary-push CI, this caused 6 failures in the sdmd scenario alone, plus knock-on failures elsewhere — all the script bailing on the missing private.pem before reaching the assertion being validated.

Change

Adds scaffold_identity() helper next to spawn_host in test/integration.sh. Creates ssh_key (via ssh-keygen, unchanged) AND private.pem (via airc_core.identity bootstrap-ed25519 with PYTHONPATH set to make airc_core importable when invoking python directly).

Used at the 4 manual-scaffold sites:

  • sdmd (scenario_send_dead_monitor_dies)
  • aw (away-status)
  • ls (list)
  • quit (quit)

The 5th ssh-keygen ed25519 call (line 807, key-rotation scenario) replaces an EXISTING ssh_key after the scope was already initialized — private.pem is already there, no scaffold change needed.

Out of scope (cluster B → other-mac)

Failures caused by gh-auth-less CI runner (auto-scope banner / subscribe banner / room-mode tests producing ✗ gh CLI is installed but the GitHub token is invalid instead of expected output) need test infra work to either skip-when-unauthed or mock gh. Tracked in #351 with other-mac.

Test plan

  • bash -n test/integration.sh syntax check
  • Local repro of one sdmd assertion against the new scaffold (would need a Linux env to truly mirror CI; the helper's logic is straightforward and matches what airc init_identity does)
  • CI integration-suite run (will surface on this PR's push to canary; expect cluster A failures gone, cluster B remaining until other-mac's PR lands)

🤖 Generated with Claude Code

Pre-#343 the test scenarios that synthesize a partial host scope (cmd_send
liveness probe, away-status, list, quit) used `ssh-keygen -t ed25519` to
create ssh_key + relied on the airc binary to lazily create private.pem
via `openssl genpkey` if needed. Post-#343 init_identity creates
private.pem via the venv cryptography path, but the test scenarios that
DON'T go through `airc connect` at all skip init_identity entirely —
sign_message then dies with `ed25519 sign failed: [Errno 2] No such file
or directory: .../private.pem` before reaching the actual code-under-
test (the monitor-liveness diagnostic, the away-marker logic, etc).

Symptom in CI: 6 failures in the sdmd scenario alone all caused by the
script bailing on the missing private.pem before reaching the assertion
the test was actually validating.

Adds `scaffold_identity()` helper next to spawn_host. Creates ssh_key
(via ssh-keygen, unchanged) AND private.pem (via airc_core.identity
bootstrap-ed25519 with PYTHONPATH set to make airc_core importable).
Used at the 4 manual-scaffold sites: sdmd (send_dead_monitor_dies), aw
(away-status), ls (list), quit (quit).

The 5th ssh-keygen call (line 807, key-rotation scenario) replaces an
EXISTING ssh_key after the scope was already initialized — private.pem
is already there, no scaffold change needed.

Pairs with other-mac's WIP for cluster B (gh-auth-less runner test
infra). Both fold into #351.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply merged commit 21f2e5d into canary Apr 30, 2026
6 checks passed
@joelteply
joelteply deleted the fix/test-identity-scaffold-post-343 branch April 30, 2026 02:30
joelteply added a commit that referenced this pull request Apr 30, 2026
#363)

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]>
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