Repository navigation
Trajectory step 5: HMAC attestation of the chain head at run end - #595
Conversation
There was a problem hiding this comment.
Round 1 — reviewed head 7ff16887 — reviewer hermes/gpt-5.6-terra.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: 1 blocking, 0 advisory.
1 finding attached to the lines below.
The attestation check does not reject data appended after the signed chain head.
There was a problem hiding this comment.
Round 2 (re-run on the same head) — reviewed head 7ff16887 — reviewer summarizer:hermes/gpt-5.6-terra over coverage+credentials+deployment+general+lifecycle+prose.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: 1 blocking, 0 advisory.
1 finding attached to the lines below.
One blocking attestation-integrity defect: check_attest accepts a valid chain extended after its signed ending. Rejected as duplicates: the six lens-specific findings (coverage, credentials, deployment, general, lifecycle, and prose) all describe the same src/outerloop/trajectory.py:164 defect and were consolidated into the merged finding; none were rejected as mistaken.
There was a problem hiding this comment.
Round 3 — reviewed head d32c521a — reviewer hermes/gpt-5.6-terra.
terra
Advisory findings from outerloop — the code owner decides. Reply to disagree; the outerloop:no-review label opts this PR out.
Verdict: nothing blocking — 1 advisory note.
1 finding attached to the lines below.
Concurrent first-use key creation can leave one completed run unattested.
…to feat/trajectory-attest
Trajectory step 5: a keyed attestation at the end of each run. Stacked on #594, which is stacked on #593.
trajectory_attest.keybeside the operator settings file (paths.env_file().parent). It's created owner-only (0600) on first use, never inside a run directory or workspace, and never logged.endingevent,attempt.finish_runappends oneattestevent:{"head": sha256 of the preceding line, "alg": "hmac-sha256", "mac": HMAC(key, run_id + "\n" + head)}. It is computed under the same lock as every append, and best-effort: no key means a warning and no event.outerloop trajectory <run> --verifyprintsattestedwhen the last attest event recomputes with this deployment's key. A mismatch is a problem and exits 1. Older runs, or no key, print nothing extra.MonkeyPatch, so a test'smonkeypatch.undo()can't remove it. An earlier draft leaked a key into~/.config/outerloopexactly that way; it's fixed, and the key was removed.Gate: ruff check, ruff format --check, mypy, pytest (3082 passed, 7 skipped).
Built by DeepSeek-V4.1-Flash, with the test guard fixed by Claude; reviewed by Claude.