Skip to content

refactor(scripts): webvh-e2e harness scaffold and polish#1906

Merged
PatStLouis merged 19 commits intomainfrom
refactor/webvh-e2e-harness-placeholders
Mar 31, 2026
Merged

refactor(scripts): webvh-e2e harness scaffold and polish#1906
PatStLouis merged 19 commits intomainfrom
refactor/webvh-e2e-harness-placeholders

Conversation

@PatStLouis
Copy link
Copy Markdown
Contributor

Summary

Introduces a slimmer webvh-e2e harness focused on structure and smoke checks, with placeholder phases for the full WebVH flow to land in follow-up PRs.

What’s in this PR

  • Runner: Click CLI, load_dotenv() when run from scripts/webvh-e2e, spaced phase banners.
  • Context: Issuer and holder requests.Sessions + TRACTION_ISSUER_TENANT_TOKEN / TRACTION_HOLDER_TENANT_TOKEN (required).
  • Smoke: GET /status/live and GET /tenant/wallet for both tenants.
  • Client: traction_client.py trimmed to routes used by smoke (extend as phases are implemented).
  • Removed: harness_log.py, records.py, helpers.py (restore from git history when implementing phases).
  • Defaults: Tenant proxy base defaults to BC Gov sandbox URL; .env.example and README updated.

How to test

cd scripts/webvh-e2e
poetry install
cp .env.example .env   # set issuer + holder tokens
poetry run python3 run.py --profile all

Made with Cursor

Add scripts/webvh-e2e/run.py with phased checks: smoke, webvh-plugin, webvh-configure, webvh-create; stub phases for issue/verify (DITP#136). Document env vars and link from scripts/README.md.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Add .env.example, .gitignore for .env, python-dotenv, and load .env from run.py without overriding existing env.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Replace requirements.txt with pyproject.toml (package-mode false), add poetry.lock, update README and .gitignore.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
…o-witness)

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Split the tenant-proxy harness into context, traction_client, records,
helpers, and harness_log. Profiles cover new-issuer-webvh and all; OOB
create-invitation uses use_did with the WebVH DID. Add non_revoked
present-proof verify, anoncreds revoke with explicit notify=false to
override agent defaults, and post-revoke verification. Document env vars
and phases in README and .env.example.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Keep optional WEBVH_* overrides undocumented in the example; README notes
profile/harness defaults and where to find override names.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
…ted lockfile

Move phase implementations and PHASES/PROFILES registry to phases.py so
run.py stays a small CLI. Remove poetry.lock from the repo and gitignore it;
document pyproject-only installs in README.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Replace custom ANSI formatter and box drawing with RichHandler, Panel,
and markup helpers. Keeps the same harness_log public API for phases.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Smaller dependency surface for the PR: requests + dotenv only. Replace
Rich panels with short phase/summary rules and minimal TTY prefixes.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Prefer breaks at / and :; default width from terminal. Optional WEBVH_LOG_WRAP.
Avoids splitting hostnames like vonx.io mid-token.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Replace monolithic phases.py with a phases/ package (common, connect,
publish, issue_verify, __init__) while keeping PHASES/PROFILES and phase
names unchanged.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Break phases/issue_verify.py into phases/issue.py and
phases/verify_revoke.py. Keep PHASES names and runtime behavior unchanged.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Rename phases/publish.py to phases/setup.py and update package imports.
Phase IDs and runtime behavior remain unchanged.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Keep the webvh-e2e runner, token wiring, and phase/profile structure while stubbing implementation phases and splitting verify/revoke modules for smaller follow-up PRs.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Replace harness_log with stdlib logging, drop unused records helpers, remove the witness flag until WebVH create is implemented, and slim Context to issuer session essentials.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
Add issuer and holder tenant sessions; extend smoke to /tenant/wallet.
Switch CLI to Click, use load_dotenv from cwd, and trim traction_client
to routes in use. Default proxy base to BC sandbox; remove unused helpers.
Add blank lines between phase banners for readability.

Signed-off-by: Patrick St-Louis <patrick.st-louis@opsecid.ca>
Made-with: Cursor
@PatStLouis PatStLouis requested review from esune, jamshale and loneil March 31, 2026 17:45
Copy link
Copy Markdown
Contributor

@jamshale jamshale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@PatStLouis PatStLouis merged commit 1a449f0 into main Mar 31, 2026
5 checks passed
@PatStLouis PatStLouis deleted the refactor/webvh-e2e-harness-placeholders branch March 31, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

3 participants