test: verify composed action appears in audit event#40
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a focused regression test for the gateway action-composition audit path.
The previous action-composition PR added support for adapter-normalized requests such as:
which the gateway composes into:
before invoking
basis-core.This follow-up test verifies that the emitted decision audit event records the composed action rather than the original bare action. It does not change runtime behavior.
Checklist
Step 1 — Identify affected surfaces
Check every surface this PR touches:
src/basis_gateway/auth/)src/basis_gateway/auth/subject_mapper.py)src/basis_gateway/audit/)src/basis_gateway/readiness.py)src/basis_gateway/api/schemas.py)src/basis_gateway/config.py)src/basis_gateway/middleware/)README.md,docs/)Step 2 — Classify the change
If the change affects authentication or audit behavior
SECURITY.mdanddocs/release-readiness.mdstill holdNote: this PR does not change audit emission behavior. It only adds regression coverage proving that the decision audit event records the composed action sent to
basis-core.If the change modifies
basis-coreintegrationbasis-core/docs/public-api.md)basis_coreinternalsTests
This PR adds a regression test verifying that an adapter-normalized request:
is composed by the gateway and emitted in the decision audit event as:
rather than the original bare action.
Validation:
pytestpasses locallyruff checkpassesruff format --checkpassesmypy srcpasses