Skip to content

test(e2e): self-provision throwaway repo + secret/variable#48

Merged
lex00 merged 1 commit into
mainfrom
feat/e2e-self-provision
Jun 19, 2026
Merged

test(e2e): self-provision throwaway repo + secret/variable#48
lex00 merged 1 commit into
mainfrom
feat/e2e-self-provision

Conversation

@lex00

@lex00 lex00 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #47 — makes the e2e harness hermetic instead of relying on pre-existing org repos/secrets.

Change

beforeAll now provisions its own resources, afterAll tears them down:

  • creates a throwaway repo warden-e2e-<run> (auto-init → has main)
  • creates one Actions variable + one sealed-box-encrypted secret (new libsodium-wrappers dev dep — GitHub requires libsodium encryption for secret values)
  • runs Phase 1 against it
  • deletes the repo in teardown (which removes its secrets/variables)

Phase 2 (opt-in) now applies a topic through repoSettingsCycle.apply and verifies by re-fetch — cleaned up by the repo deletion.

App permissions it needs (documented in README)

Repository administration (create/delete repos) + Actions secrets & variables read+write, plus the read scopes the cycles touch.

Verification

  • npx tsc --noEmit clean (incl. e2e + libsodium types)
  • npm test still 468 (e2e excluded)
  • npm run test:e2e with no creds → 14 skipped, exit 0
  • no action-bundle drift

Activate by adding the WARDEN_E2E_* repo secrets; then nightly / gh workflow run e2e.yml.

🤖 Generated with Claude Code

Make the e2e hermetic: create a throwaway repo (auto-init), seed one
Actions variable and one sealed-box-encrypted secret (libsodium dev dep),
run the cycles, then delete the repo (removes its secrets/variables) in
teardown. No pre-existing org resources required. Phase 2 now applies a
topic through repoSettingsCycle and verifies by re-fetch. README documents
the required App permissions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lex00 lex00 merged commit 7afbe4e into main Jun 19, 2026
2 checks passed
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