fix(e2e): align integration harness with hardened verifier behavior#90
Merged
Conversation
The E2E suite broke after the security hardening (#81/#83) because the test harness predated two now-enforced protections: 1. Destination binding is fail-closed (F-014). An invocation that names a tool_server is now rejected with TOOL_SERVER_MISMATCH unless the verifier claims a matching SERVER_IDENTITY. The compose file set no identity, so every bundle that bound a tool_server failed verification — 6 of 8 failures (happy path, body binding, middleware, replay). Fix: set SERVER_IDENTITY=did:key:z6MkTool and align the one happy-path bundle that still used the old placeholder DID to the same identity. 2. /admin/revoke has its own tight limiter (1 req/s per IP, burst 1) — a deliberate, non-configurable security default. The two back-to-back admin tests tripped it: the second got 429 instead of 200. Fix: wait one refill window between them. Production code is unchanged and correct; only the test harness is updated to match the stricter behavior. Full suite now green: 14/14.
There was a problem hiding this comment.
The changes correctly fix the E2E test suite to align with the security hardening introduced in PRs #81 and #83. All modifications are test-only and properly address the two identified issues:
- Destination binding fix: The
SERVER_IDENTITYconfiguration and correspondingtoolServerDID updates ensure tests pass fail-closed verification - Rate limiting workaround: The
sleep()utility and 1.1s delay prevent 429 errors from the admin endpoint's rate limiter
The implementation is correct and no issues block merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
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
The E2E test suite was broken after the security hardening PRs (#81, #83) because the test harness predated two now-enforced protections:
Destination binding is fail-closed (F-014): An invocation that names a
tool_serveris now rejected withTOOL_SERVER_MISMATCHunless the verifier claims a matchingSERVER_IDENTITY. The compose file set no identity, so every bundle that bound a tool_server failed verification — 6 of 8 test failures across happy path, body binding, middleware, and replay checks.Admin endpoint rate limiting:
/admin/revokehas its own deliberately tight limiter (1 req/s per IP, burst 1) as a non-configurable security default. Back-to-back admin tests tripped it on the second request: 429 instead of 200.Changes
SERVER_IDENTITY=did:key:z6MkToolto match test bundle identitiestoolServerDID from placeholder todid:key:z6MkToolsleephelpersleep(ms)utilityTest plan
run.sh(docker-compose, Redis-backed nonce store) — full cycle workingProduction code is unchanged and correct; the harness is updated to align with the stricter post-hardening behavior.