Merged
Conversation
Serde's #[serde(default)] only handles missing fields, not null values. Sending "allowed_time_windows": null fails deserialization into Vec<TimeWindow>, causing 422 responses on grant requests.
The base migration only creates 2025-01 and 2025-02 partitions. Tests running after 2025-02 fail silently on audit inserts because no matching partition exists for the current date.
The Capability enum uses #[serde(tag = "type", rename_all = "snake_case")]
(internally tagged), so the correct JSON is {"type": "read", "resource": "..."}
not {"Read": {"resource": "..."}} (externally tagged). The wrong format caused
422 Unprocessable Entity on grant requests and token issuance.
PostgreSQL does not support IF NOT EXISTS for partition creation. When multiple test processes race to create the same monthly partition, catch the 42P07 (duplicate_table) error and ignore it.
The capability_grants table has a unique index on (agent_id, service_provider_id, md5(capabilities)). Sending identical grant requests produces constraint violations, not the 429 flood rejection being tested. Use a distinct service provider per request and send sequentially so the non-atomic count check is reliable.
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
#[ignore]) for throughput, memory soak, concurrent grants, dependency recovery, and audit hash chain integrityTestAppwith in-process Axum routers,TestSigningBackend, factory functions, and assertion helpers