Skip to content

fix: resolve 25 E2E test gaps — 10 pass → 31 pass#30

Merged
bordumb merged 2 commits intomainfrom
fix/e2e-test-gaps
Mar 5, 2026
Merged

fix: resolve 25 E2E test gaps — 10 pass → 31 pass#30
bordumb merged 2 commits intomainfrom
fix/e2e-test-gaps

Conversation

@bordumb
Copy link
Contributor

@bordumb bordumb commented Mar 5, 2026

Summary

  • Fix 25 skipping E2E tests by correcting CLI arguments, adding missing setup steps, and fixing data formats
  • Fix policy lint to return non-zero exit code on invalid JSON
  • Fix id export-bundle clap panic caused by field-name collision with global --output arg
  • Add get_identity_did(), get_device_did(), and export_attestation() test helpers

Results

Before After
Pass 10 31
Skip 23 5
Fail 3 0

Remaining 5 skips are OIDC bridge tests (tracked in #29).

Test plan

  • uv run pytest -v — 31 passed, 5 skipped, 0 failed
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo fmt --check --all — clean
  • Pre-push hooks pass (unit tests, wasm, cross-compile)

🤖 Generated with Claude Code

bordumb and others added 2 commits March 5, 2026 16:58
Audit and fix naming inconsistencies across ~25 CLI subcommands:

- Duration/Expiry: --expiry → --timeout (pair), --days → --expires-in-days
  (extend), add --days alias everywhere --expires-in-days appears
- Key aliases: --alias → --key-alias (key commands), --key → --agent-key-alias
  (agent unlock), add --ika/--dka shorthand aliases
- DID flags: --subject → --subject-did, --member → --member-did, add --device/
  --issuer/--witness aliases to existing *-did flags
- Output flags: --file → --output (emergency report)
- Verb consistency: witness serve → start, org init → create
- All renames preserve old names as visible aliases for discoverability
Tests were skipping due to wrong arguments, missing setup steps, and
incorrect data formats. The CLI commands all existed — the tests just
called them incorrectly.

Test fixes:
- device attestation: add --device-did (from status --json), use "main"
  alias, rewrite attest tests to use device link, implement device verify
  with exported attestation file + --issuer-pk
- git signing: generate allowed-signers with --repo before verify,
  fix --repo to point at AUTHS_HOME, use auths:main alias
- identity lifecycle: add --alias main and --max-age-secs to export-bundle
- key rotation: add --yes to freeze/unfreeze, add allowed-signers for
  verify, rewrite attest to device link
- policy engine: rewrite policy JSON to tagged enum format (op/args),
  fix context/test-case JSON to use issuer/subject/capabilities/expires_at,
  check stderr for explain output

CLI fixes:
- policy lint: bail on invalid JSON so exit code is non-zero
- id export-bundle: rename output → output_file to avoid clap panic from
  field-name collision with global --output (OutputFormat) arg

Helpers added:
- get_identity_did(): controller DID from id show --json
- get_device_did(): device DID from status --json
- export_attestation(): extract attestation JSON from auths git repo

Remaining 5 skips are OIDC bridge tests (tracked in #29).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Mar 5, 2026 6:49pm

@bordumb bordumb merged commit 38558a1 into main Mar 5, 2026
7 of 8 checks passed
@bordumb bordumb deleted the fix/e2e-test-gaps branch March 5, 2026 18:49
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