Repository navigation
test(scripts): audit wave A — endpoint-script coverage for every v1.5/v1.6 endpoint + roles-400 contract fix - #328
Merged
Conversation
…/v1.6 endpoint + roles-400 contract fix
Closes the roadmap §7-3 DoD gap from the 2026-11 P0/P1 retro audit: both
endpoint-script suites stopped growing before v1.5.0, leaving nine new
endpoints with zero black-box script coverage.
- test-admin-endpoints.{sh,ps1} +6 (audit CSV export incl. the
audit_exported self-audit row; claim-mapping CRUD red lines; custom
attributes round trip + __proto__ rejection; role-permission
full-replace; email-template list + content policy; org lifecycle with
tombstone 409). 46->52 cases, TOTAL realigned (55->61).
- test-oauth2-endpoints.{sh,ps1} +3 (authorize-context name/404/400;
WebAuthn credential-delete guards; end_session dedicated
post_logout_redirect_uris authority, driving RFC 7591 registration +
admin scope grant first). 44->47 cases, TOTAL realigned (59->62).
bat dialect intentionally untouched (already stale since Test 44).
- fix(rbac): PUT /api/admin/roles/{roleId}/permissions answered 500
DB_QUERY_ERROR for unknown permission names — the documented contract
(openapi: 400) and the P1-8 design ("unknown names fail the whole
replace") both require a validation response; the branch now answers
VALIDATION_INVALID_INPUT with the pristine transaction rolling back.
Found by the new unknown-name script case. Verified against a live
stack: admin suite 61/61 green.
- test(mfa): Integration_P0_MfaBackupCode_LoginFallback_EndToEnd pins
the HTTP tier of the P0-3 backup-code path — both hash-case storage
forms, one-shot CAS replay rejection, the mfa_backup_code_used audit
row, and the mfa_rebind_required flag on the last code;
restoreAdminMfa also clears mfa_backup_codes now.
- docs: testing-guide gains the Level 6 RP interop smoke section
(four drivers, interop.yml triggers, local run) in EN + zh mirror;
CHANGELOG [1.5.0] date aligned to the tag (2026-10-16) and [Unreleased]
entries added for the fix and this coverage batch.
Addresses #327 (the two further observations the new cases surfaced)
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…the relative link breaks the Docusaurus site build The local check-doc-links gate resolves ../../tests/interop/README.md against the repository filesystem and passes, but the website build mirrors docs/ into the Docusaurus tree where the same link resolves to /tests/interop/README.md — a site-internal path that does not exist (build job failure on #328). Point at the repository path as plain text (same treatment as the zh mirror) and regenerate llms.
voidvec
force-pushed
the
test/audit-wave-a-endpoint-coverage
branch
from
November 12, 2026 02:24
ad4df05 to
330ac50
Compare
wangrh0909
approved these changes
Nov 12, 2026
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
Executes Wave A of the 2026-11 P0/P1 retro-audit fix plan: the roadmap §7-3 DoD ("endpoint script suites grow with every release") had been violated for two consecutive releases — both suites stopped growing before v1.5.0, leaving nine new endpoints with zero black-box script coverage. This PR closes that gap and collects what the new cases found.
audit_exportedself-audit row), claim-mapping CRUD red lines (reserved claim 400, openid-trigger 400, create→list→PUT enabled→DELETE), custom-attributes round trip +__proto__rejection, role-permission full-replace (grantusers:read→ read-back → unknown-name fails the whole replace), email-template list +<script>content-policy 400, org lifecycle (create, invalid-color 400, PATCH, members, soft-delete → 404, tombstone re-registration 409)post_logout_redirect_urisauthority (drives RFC 7591 registration + admin scope grant first, then asserts logout-registered URI → 302 and login-only URI → 400)PUT /api/admin/roles/{roleId}/permissionsanswered 500DB_QUERY_ERRORfor unknown permission names — openapi documents 400 and the P1-8 design says "unknown names fail the whole replace". The branch now respondsVALIDATION_INVALID_INPUT; the transaction is pristine at that point (no writes) and rolls back on scope exit. Genuine DB/rollback failures keep the 500 classification.Integration_P0_MfaBackupCode_LoginFallback_EndToEndpins what unit tests could not — the login fall-through at the HTTP layer, one-shot CAS replay rejection, both historical hash-case storage forms, themfa_backup_code_usedaudit row, andmfa_rebind_requiredon the last code.restoreAdminMfaalso clearsmfa_backup_codes.Two further observations the new cases surfaced are filed as #327 (delete of a client with issued token rows answers 500; DCR registration grants no scopes).
Addresses #327
Verification (live dev stack, run-endpoint-tests.ps1 wrapper)
/health/ready503 (local stack has no Redis; unrelated to this PR)bash -nboth sh scripts / PS Parser both ps1 scriptsnaming_validator.sh tests/drogon_macro_bool_check.pyNotes for reviewers: the sh dialect mirrors the ps1 cases 1:1 (the sh leg runs in CI/on Linux); PS 5.1 quirks are handled (
-UseBasicParsing, curl.exe for the 302 Location capture). The new MFA test compiles and links; its suite-level run is blocked locally by a pre-existing startup crash that reproduces identically without this PR's changes (verified by stash-control) — CI is the authoritative runner for it.Out of scope