feat(d3): POST /vc/aae/evaluate endpoint — component 2 step 4 - #120
Merged
Conversation
Boundary validation (defense-in-depth to fail-closed core): aae_ref format, action_context schema+8KB size-cap, nonce-missing->422, numeric value finite-check, agent_did==auth-principal (403 else), vc_id<->envelope direct binding (substitution-safe; delegation-chain = follow-up). Calls evaluate_envelope; returns signed verdict. verdict_signature added to _KNOWN_PUBLIC_CREDENTIAL_FIELDS (scrub-allowlist, lesson #101). Per evaluator brief v4 (#115) + core #119.
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.
Evaluator (Komponente 2) Schritt 4 — HTTP-Surface. Verweist Evaluator-Brief v4 (#115) + Core #119.
POST /vc/aae/evaluate(tags: AAE Enforcement)verify_api_key_or_did(X-API-Key/X-MolTrust-DID) → 401.evaluate_envelope(Core feat(d3): evaluator core — per-type handlers + advisory-lock eval-tx (component 2 step 3) #119) → signiertes Verdict; Response{verdict, reason, eval_id, verdict_signature, verdict_kid, evaluations}.verdict_signaturezu_KNOWN_PUBLIC_CREDENTIAL_FIELDShinzugefügt (Ed25519-Sig kann sonst vom 40-char-base64-Pattern teilmaskiert werden — Lehre fix(a2a): exempt JWS protected+signature from scrub_secrets allowlist #101). Per Test verifiziert.Tests (async TestClient, volle Middleware-Kette, 7 grün)
ALLOW-path (+ verdict_signature NICHT maskiert), DENY-path (self_asserted Betrag), nonce-missing→422, auth-missing→401, vc_id-mismatch→422, oversized→422, agent_did≠principal→403.
Defense-in-Depth
nonce-missing & co. werden am Endpoint mit 422 abgewiesen UND der Core lehnt fail-closed mit DENY ab — beide Schichten.
Konformität
§3.1 + §3.2 ✅. NICHT auf Live (Code+Tests; Endpoint-Tests hinterlassen test-markierte append-only Rows). Eine Komponente = ein PR.
Nächster Schritt
🤖 Generated with Claude Code