test: repair QR, legal and billing E2E fixtures #482

Manually merged
anton merged 1 commit from fix/e2e-fixtures-and-status-assertions into main 2026-10-16 05:03:07 +00:00
Owner

Summary

  • Seed QR sessions with the credential's owning user_id, fail on SQL/setup errors, preserve the original exit status, and clean up the seeded session.
  • Expect exactly HTTP 400 for the two noncanonical legal/internal paths. All other exact authentication and route-isolation expectations stay unchanged.
  • Preserve JSON quotes in both billing dashboard fixtures, expose their SQL errors, and report unexpected exits without double-counting assertion failures or losing the original status.

Test-only: three scripts, +29/-10 lines. No production code, schema, networking, or financial assertions changed. Related to #457; this is a separate prerequisite repair targeting main, not a networking change.

Test plan and results

Final signed commit 7aece5929a894b77a628e0841226ccd86aebe784

  • Regular gate, exit 0: 1,128 Rust tests passed, 12 ignored; 10 Python tests passed.
    env -i HOME=/home/tuna USER=tuna LOGNAME=tuna \
      PATH=/home/tuna/.cargo/bin:/usr/local/bin:/usr/bin:/bin LANG=C.UTF-8 \
      CARGO_TARGET_DIR=/tmp/platform-pr457-target RUSTUP_TOOLCHAIN=1.96.1 \
      CARGO_BUILD_JOBS=16 make test
    
  • Individual bash -n checks on test_qr_login.sh, test_legal_tracking.sh, and test_billing.sh: all passed.
  • git diff --check 629b2aed1a1acad973c8c347c9e21e17dce50161...7aece5929a894b77a628e0841226ccd86aebe784 and git verify-commit HEAD: passed.
  • Independent static review: no introduced security or logic blockers. Final commit preserves the reviewed patch exactly; clean merge-tree check against current main passed.

Real-service E2Es on the unchanged candidate scripts

Built API/gateway/email/metering through the existing Make component recipes, using a temporary container-name adapter, a private internal Docker network, synthetic configuration and a fresh disposable PostgreSQL database. No application responses were mocked, no cloud credentials were supplied, and shared services were not replaced.

Executed python3 /tmp/platform-e2e-fixes-hlyi6bxx/run-patched.py fresh, which ran:

  • bash tests/e2e/test_legal_tracking.sh: 22 passed, 0 failed, exit 0.
  • bash tests/e2e/test_qr_login.sh: 8 passed, 0 failed, exit 0.
  • bash tests/e2e/test_billing.sh: 37 passed, 0 failed, exit 0.

The original scripts reproduced the fixture/status failures. Focused QR and billing fixture/error-reporting controls also passed separately; these command-boundary controls are not substitutes for the real-service E2Es.

The E2Es ran before committing on base ececa104af7be22799049c6293fa559e3f002be1 plus this patch. The subsequent base advance changed only two READMEs. All three tested script hashes match the final committed blobs; service runtime/build inputs were unchanged. These are retained E2E results, not a claim of a new post-commit service deployment. The regular gate above was rerun on the final commit.

Owned containers, database volume, network and image tags were removed; pre-existing container IDs/images/start times/statuses matched their baseline.

Limits / follow-ups

  • Live Paddle authorization remains separate and unvalidated; no provider failure was accepted as success and no financial assertion was weakened.
  • Existing fixture-isolation limitations remain: legal uses a fixed email, QR uses fixed IDs/table-rename fault injection, and billing retains seeded rows. An attempted same-database legal rerun failed on that existing email before the final fresh-database pass. Repeatability on retained fixture state is not claimed.
  • No cloud/networking acceptance or production rollout is included in this test-only PR.
## Summary - Seed QR sessions with the credential's owning `user_id`, fail on SQL/setup errors, preserve the original exit status, and clean up the seeded session. - Expect exactly HTTP 400 for the two noncanonical legal/internal paths. All other exact authentication and route-isolation expectations stay unchanged. - Preserve JSON quotes in both billing dashboard fixtures, expose their SQL errors, and report unexpected exits without double-counting assertion failures or losing the original status. Test-only: three scripts, +29/-10 lines. No production code, schema, networking, or financial assertions changed. Related to #457; this is a separate prerequisite repair targeting `main`, not a networking change. ## Test plan and results ### Final signed commit `7aece5929a894b77a628e0841226ccd86aebe784` - Regular gate, exit 0: **1,128 Rust tests passed, 12 ignored; 10 Python tests passed**. ```sh env -i HOME=/home/tuna USER=tuna LOGNAME=tuna \ PATH=/home/tuna/.cargo/bin:/usr/local/bin:/usr/bin:/bin LANG=C.UTF-8 \ CARGO_TARGET_DIR=/tmp/platform-pr457-target RUSTUP_TOOLCHAIN=1.96.1 \ CARGO_BUILD_JOBS=16 make test ``` - Individual `bash -n` checks on `test_qr_login.sh`, `test_legal_tracking.sh`, and `test_billing.sh`: all passed. - `git diff --check 629b2aed1a1acad973c8c347c9e21e17dce50161...7aece5929a894b77a628e0841226ccd86aebe784` and `git verify-commit HEAD`: passed. - Independent static review: no introduced security or logic blockers. Final commit preserves the reviewed patch exactly; clean merge-tree check against current `main` passed. ### Real-service E2Es on the unchanged candidate scripts Built API/gateway/email/metering through the existing Make component recipes, using a temporary container-name adapter, a private internal Docker network, synthetic configuration and a fresh disposable PostgreSQL database. No application responses were mocked, no cloud credentials were supplied, and shared services were not replaced. Executed `python3 /tmp/platform-e2e-fixes-hlyi6bxx/run-patched.py fresh`, which ran: - `bash tests/e2e/test_legal_tracking.sh`: **22 passed, 0 failed**, exit 0. - `bash tests/e2e/test_qr_login.sh`: **8 passed, 0 failed**, exit 0. - `bash tests/e2e/test_billing.sh`: **37 passed, 0 failed**, exit 0. The original scripts reproduced the fixture/status failures. Focused QR and billing fixture/error-reporting controls also passed separately; these command-boundary controls are not substitutes for the real-service E2Es. The E2Es ran before committing on base `ececa104af7be22799049c6293fa559e3f002be1` plus this patch. The subsequent base advance changed only two READMEs. All three tested script hashes match the final committed blobs; service runtime/build inputs were unchanged. These are retained E2E results, not a claim of a new post-commit service deployment. The regular gate above was rerun on the final commit. Owned containers, database volume, network and image tags were removed; pre-existing container IDs/images/start times/statuses matched their baseline. ## Limits / follow-ups - Live Paddle authorization remains separate and unvalidated; no provider failure was accepted as success and no financial assertion was weakened. - Existing fixture-isolation limitations remain: legal uses a fixed email, QR uses fixed IDs/table-rename fault injection, and billing retains seeded rows. An attempted same-database legal rerun failed on that existing email before the final fresh-database pass. Repeatability on retained fixture state is not claimed. - No cloud/networking acceptance or production rollout is included in this test-only PR.
anton force-pushed fix/e2e-fixtures-and-status-assertions from 7aece5929a to 1148a302f5 2026-10-16 05:02:38 +00:00 Compare
anton manually merged commit 1148a302f5 into main 2026-10-16 05:03:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
public/platform!482
No description provided.