Skip to content

Commit aca256f

Browse files
fix: the example script made the same withdrawn claim as the test
emit_record.py called verify_record on the signed partial record and its docstring advertised that the output was "verifiable with agentrust_trace.verify_record". Both are the claim agentrust-trace 0.10.0 withdrew, so the conformance job failed at "Emit a sample TRACE record" rather than in the tests. The script now signs and stops there, saying why in a comment: asking for a verdict the format cannot honestly give would either fail the example or push someone to invent a model identity. The docstring says what the signed file actually is, a record whose signature checks out and which verify_record refuses, and points at the "Deliberately absent" section for the reason. Level 0 is the claim and the job runs it on the next line. Also fixes a relative path: the capture-core core-tests job runs from packages/agentrust-capture-core, so its lock is ../../requirements/. Verified: the script emits, trace-tests verify --level 0 returns PASS with the expected single UNVERIFIED on the unsigned artifact, and all 28 aeoess-aps tests pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbDBXDWWvMFa7c2jGgyq9t
1 parent 08a31a1 commit aca256f

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/capture-core-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Run core tests
3434
working-directory: packages/agentrust-capture-core
3535
run: |
36-
pip install --require-hashes -r requirements/capture-core.txt
36+
pip install --require-hashes -r ../../requirements/capture-core.txt
3737
python -m pytest tests -q
3838
3939
# The engines import the core as a hard dependency now, so the thing worth

integrations/aeoess-aps/examples/emit_record.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
Two files are written:
1515
1616
<out> Unsigned record, the artifact ``trace-tests verify`` grades
17-
<out>.signed.json Signed record, verifiable with
18-
``agentrust_trace.verify_record(..., allow_embedded_key=True)``
17+
<out>.signed.json The same record, signed. Its signature checks out, but
18+
``agentrust_trace.verify_record`` refuses it: from 0.10.0
19+
that function enforces the full v0.2 schema, and this
20+
record deliberately omits ``model``, ``data_class`` and
21+
``build_provenance`` (see "Deliberately absent" in
22+
aps_trace.py). ``trace-tests verify --level 0`` is the
23+
gate this integration targets, and it passes.
1924
2025
Usage:
2126
python examples/emit_record.py --out trust-record.jwt
@@ -89,7 +94,12 @@ def main() -> int:
8994
record = build_trace_record(decision, trace_jwk=jwk)
9095

9196
signed = agentrust_trace.sign_record(dict(record), key)
92-
agentrust_trace.verify_record(signed, allow_embedded_key=True, max_age_seconds=None)
97+
98+
# Deliberately not calling verify_record here. Since agentrust-trace 0.10.0
99+
# it enforces the full v0.2 schema, and this record is a documented partial:
100+
# asking for a verdict it cannot honestly give would either fail the example
101+
# or push someone to invent a model identity. Level 0 is the claim, and the
102+
# conformance job runs it on the unsigned artifact immediately after this.
93103

94104
out = Path(args.out)
95105
out.write_text(
@@ -106,7 +116,7 @@ def main() -> int:
106116
print(f"appraisal.status: {record['appraisal']['status']}")
107117
print(f"subject: {record['subject']}")
108118
print(f"unsigned (for trace-tests): {out}")
109-
print(f"signed (verify_record OK): {signed_out}")
119+
print(f"signed (signature only, partial record): {signed_out}")
110120
return 0
111121

112122

0 commit comments

Comments
 (0)