Skip to content

Characterize new-format webhook handling#10

Merged
camdroid merged 1 commit into
mainfrom
test_lambda_new_format
Jun 30, 2026
Merged

Characterize new-format webhook handling#10
camdroid merged 1 commit into
mainfrom
test_lambda_new_format

Conversation

@camdroid

Copy link
Copy Markdown
Owner

Extends the legacy characterization suite (asmbly-makerspace#100) to the new (post 2026-05-09)
Neon webhook format.

Green — current behavior:

  • new editAccount / updateMembership: account id resolved and passed straight to
    OpenPath as a string (id-type divergence from legacy noted inline).
  • new createMembership RENEW / FAILED: correctly skip join handling, like legacy.

xfail(strict) — target behavior for the unification refactor:

  • new createMembership JOIN/REJOIN (SUCCEEDED) should enter handle_joins.
  • a fresh new-format join should add the member to Mailjet.
    Both fail today (flat enrollType/status aren't recognized, so new joins are
    silently dropped) and will XPASS — failing CI — once the refactor routes new
    joins through handle_joins, signaling the markers can be removed.

Note: new createMembership uses an ASSUMED shape (no real sample in the logs),
inferred from the new updateMembership shape.

@camdroid
camdroid marked this pull request as draft June 17, 2026 05:09
@camdroid
camdroid marked this pull request as ready for review June 23, 2026 04:38
@camdroid
camdroid merged commit ad74762 into main Jun 30, 2026
2 checks passed
@camdroid
camdroid deleted the test_lambda_new_format branch June 30, 2026 12:04
camdroid added a commit that referenced this pull request Jul 13, 2026
* test(alta_open): characterize new-format webhook handling (xfail join gaps) (#10)

* fix(alta_open): handle new-format webhook fields (status/enrollType) (#11)

* test(alta_open): characterize new-format webhook handling (xfail join gaps)

* fix(tests): get test suite running locally (no behavior changes)

- Add pythonpath = ["."] to pyproject.toml so project modules are importable
- Fix 4 test files using from tests.neon_mocker to from neon_mocker to match pytest rootdir import behavior
- Skip TestClassFeedbackAutomation (google-auth not installed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(alta_open): handle new-format webhook fields (status/enrollType)

New-format webhooks use 'status' and 'enrollType' instead of
'transactionStatus' and 'enrollmentType'. Branch on the legacy flag
to read the correct fields, and remove xfail from the tests that
now pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(alta_open): align new-format createMembership fixtures with real logs

Captured 306 real createMembership events (2026-06-02..07-02) and
corrected the characterization fixtures to match:

- New-format events arrive with customParameters null today (the new
  webhook was activated without its legacy/webhook_name params), and
  will carry legacy:"false" once those are added. Both take the
  handler's non-legacy branch, so the join tests now run against both
  variants.
- Use the real legacy webhook_name (NewMembershipLegacy) and a
  realistic, PII-scrubbed flat payload (rich membership body + payments
  with card details) instead of the minimal inferred shape.
- Confirmed real enum values: status in {SUCCEEDED, FAILED},
  enrollType in {JOIN, RENEW}.
- Drop the stale ASSUMED-SHAPE comment and dead NEW_JOIN_XFAIL marker.
- gitignore captured *_logs.json (member PII).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove unnecessary line from gitignore

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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