Spun off from #114 Section E2 ("Global-setup robustness"). E1 (offline-skip branch) shipped on feat/e2e-phase4-negative-iron-listener via OfflineError + isOffline() + SnapshotInfo.offline; E2 stayed deferred so this issue tracks it cleanly.
Context
e2e/global-setup.ts runs installAzureSkills() once per test run, which spawns npx skills@1.5.1 add microsoft/azure-skills against the live npm registry. On a typical macOS dev box this adds ~30s of cold-cache install time per CI run, and any registry / DNS hiccup escalates straight to a failed run (E1 mitigates this by classifying "offline" and writing snapshot.offline=true, but every spec that needs azure-* still skips — so the test value is lost).
Goal
Make global-setup hermetic: an empty npm cache and a cut network must still produce a fully-populated snapshot HOME.
Proposed approaches (pick one in design)
- Checked-in tarball fixture — commit
e2e/.snapshot/azure-skills.tar.zst (the ~/.agents/skills/ tree from a known-good installAzureSkills run, pinned to SKILLS_CLI_VERSION). Global-setup unpacks the tar instead of calling npx. Pro: zero network. Con: ~MB-scale binary in git; requires regeneration script when the CLI version bumps.
- CI cache key only — add an
actions/cache@v4 step keyed on SKILLS_CLI_VERSION + AZURE_SKILLS_REPO that pulls/pushes ~/.npm (or the snapshot HOME directly). Pro: no binary in git. Con: still needs npm reachable on first miss; no help on dev laptops.
- Hybrid — checked-in tarball as the primary path,
installAzureSkills only on tarball-miss + version drift (write a regeneration script triggered by pnpm gen:e2e-snapshot).
Acceptance criteria
Related
Spun off from #114 Section E2 ("Global-setup robustness"). E1 (offline-skip branch) shipped on
feat/e2e-phase4-negative-iron-listenerviaOfflineError+isOffline()+SnapshotInfo.offline; E2 stayed deferred so this issue tracks it cleanly.Context
e2e/global-setup.tsrunsinstallAzureSkills()once per test run, whichspawnsnpx skills@1.5.1 add microsoft/azure-skillsagainst the live npm registry. On a typical macOS dev box this adds ~30s of cold-cache install time per CI run, and any registry / DNS hiccup escalates straight to a failed run (E1 mitigates this by classifying "offline" and writingsnapshot.offline=true, but every spec that needs azure-* still skips — so the test value is lost).Goal
Make global-setup hermetic: an empty npm cache and a cut network must still produce a fully-populated snapshot HOME.
Proposed approaches (pick one in design)
e2e/.snapshot/azure-skills.tar.zst(the~/.agents/skills/tree from a known-goodinstallAzureSkillsrun, pinned toSKILLS_CLI_VERSION). Global-setup unpacks the tar instead of calling npx. Pro: zero network. Con: ~MB-scale binary in git; requires regeneration script when the CLI version bumps.actions/cache@v4step keyed onSKILLS_CLI_VERSION+AZURE_SKILLS_REPOthat pulls/pushes~/.npm(or the snapshot HOME directly). Pro: no binary in git. Con: still needs npm reachable on first miss; no help on dev laptops.installAzureSkillsonly on tarball-miss + version drift (write a regeneration script triggered bypnpm gen:e2e-snapshot).Acceptance criteria
pnpm test:e2esucceeds with--offlinenpm and a clean~/.npm.feat/e2e-phase4-negative-iron-listener.SKILLS_CLI_VERSIONorAZURE_SKILL_NAMESinsrc/shared/constants.tschanges (no silent stale-fixture risk).Related
feat/e2e-phase4-negative-iron-listener(commit345ef8b):e2e/helpers/skills-cli.ts—OfflineError,isOffline(),installAzureSkills()e2e/global-setup.ts—installSnapshotOrClassifyOffline()e2e/fixtures/isolated-home.ts—SnapshotInfo.offline,isSnapshotOffline()