Repository navigation
feat(agent-readiness): compliance document search, signing bound to the reviewed subject, required rationale (AGB-79) - #739
Closed
nimrodbusany wants to merge 6 commits into
Closed
nimrodbusany wants to merge 6 commits into
nimrodbusany wants to merge 6 commits into
Conversation
…ubstring (AGB-79 B2b)
Adds POST .../compliance-document-refs/agents/{agent_id}/search
(searchComplianceDocumentReferences, x-replay: read) and the closed
DocumentReferenceSearchRequest. The search text is customer content, so it
travels in the body only; the response is the existing list response.
Spine-Trail: st_f6fb29f7a817
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…e reviewed subject (AGB-79 C1) Ingredient gains review_context on A rows (a 64-hex string or null, absent on other kinds): an opaque, server-issued, keyed freshness token. AttestationCreateRequest gains a REQUIRED review_context to echo it; a stale value is refused with 409 stale_review_context and nothing is recorded. The sign operation also declares a 503 for when the server cannot issue or verify the token. Coordinated pre-release break, acknowledged in scripts/breaking_schema_allowlist.json. Spine-Trail: st_f6fb29f7a817 Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…res a rationale (AGB-79 R4) DecisionInput gains an if/then: when decision is not_applicable, rationale is required and must hold a non-whitespace character (cap unchanged); applicable and unresolved keep it optional and a carry item is not re-validated. The write's 400 also admits the closed RationaleRequiredError (rationale_required, fixed message, no obligation id, no client text). Coordinated pre-release break, acknowledged in scripts/breaking_schema_allowlist.json. Spine-Trail: st_f6fb29f7a817 Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…tern (AGB-79 R4) Replace \S with an explicit class excluding Z*, Cc and Cf BMP code points. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Search operation moved to /api/v1/projects/{project_id}/agents/{agent_ref}/compliance-document-refs/search
(project_compliance_document_refs.search_compliance_document_references); AGB-79 allowlist entries regenerated for the new paths.
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
|
Contributor
Author
|
Superseded by #768 (same changes, consolidated into one commit). |
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.



What
Three contract changes for the agent Compliance evidence feature (follow-up to #721 and #728). The feature is behind a server flag that is off in production.
Ticket: AGB-79
Security note: public schema only. Field definitions and operation shapes; no customer data, no secrets. The search text is declared as a request-body field so it never appears in a URL. The signing change tightens an access-controlled operation (a stale review token is refused).
Spine-Trail: st_f6fb29f7a817
POST /api/v1/projects/{project_id}/agents/{agent_ref}/compliance-document-refs/search(project_compliance_document_refs.search_compliance_document_references), with the request bodyDocumentReferenceSearchRequest. The search text travels in the body only, never in the URL.kind: A) of the evidence response carriesreview_context: 64 lowercase hex characters, or null when the caller cannot sign that row.AttestationCreateRequest.review_contextis now required.stale_review_context. A closed 503 is declared for the case where the server cannot issue or check the value.DecisionInput, adecisionofnot_applicablerequires arationalethat contains at least one visible character.rationale_required(RationaleRequiredError).Breaking changes
Items 2 and 3 tighten request contracts. Both are recorded through the repo's own mechanism,
scripts/breaking_schema_allowlist.json; the checker itself is unchanged. No client other than the Traigent portal calls these operations, and the feature is off in production.Related PRs
Merge order: this PR first, then the Backend, then the Frontend.
Production-safety checklist
tests/test_compliance_attestation_contract.py,tests/test_compliance_document_ref_contract.py,tests/test_compliance_evidence_contract.py,tests/test_compliance_applicability_contract.py.Verification
make local-gateon head 9d9be8b: passed (ruff, mypy, pytest 8015 passed / 1 skipped, parity, breaking-change check).scripts/breaking_schema_check.py --check: passes with the allowlist entries above.scripts/refresh_parity.py --check: OK.Review
Each change had an independent second-model review of the code before this PR opened, with one follow-up read of the fixes. The schema pattern for item 3 was checked to be valid in both Python and ECMAScript regular-expression syntax and never stricter than the server rule.
Wording
The feature shows evidence coverage only. It makes no claim that an agent meets, or is approved under, any law.
🤖 Generated with Claude Code