Skip to content

graph, verification: attest a clean verify pass (#32) - #150

Merged
alpibrupa merged 1 commit into
mainfrom
feat/verify-attestation
Sep 8, 2026
Merged

graph, verification: attest a clean verify pass (#32)#150
alpibrupa merged 1 commit into
mainfrom
feat/verify-attestation

Conversation

@alpibrupa

Copy link
Copy Markdown
Contributor

Summary

  • verified.type_check/.spec_check/.test are written automatically by lex-llm's dispatcher whenever lex_check/lex_spec_check/lex_test reports a pass. lex_run isn't in that list, and shouldn't be added there generically — an ordinary build-mode lex_run passing proves nothing, only a VERIFY-mode one that found no FAIL does, and the dispatcher has no notion of agent mode. So a clean verify pass — the strongest evidence in the system, an independent re-derivation that never trusted the implementation — left no durable trace: a review agent or task_spec.lex criterion in a later session had no way to check "was this independently verified," only "did it type-check."
  • Added a fourth kind, verified.independent_check, written directly by the fix-loop's verify gate (attest_verify_pass_if_clean, called from run_agent_with_events/run_agent_persistent_with_events right after verify_found_failure comes back false) via trail_log.append, then promoted into .lex/verified.jsonl the same way harvest/append_all already promotes the other three.
  • A task spec can now require it: verified = ["verified.independent_check"].

Test plan

  • lex check / lex fmt --check / lex doc-sync --check — clean
  • lex test tests — 4/4 existing tests still pass
  • Deterministic unit-level check (hand-built trail events, both branches): a clean pass writes the event and it's promoted into .lex/verified.jsonl with the right shape; a FAIL present writes nothing
  • Live end-to-end run isolating the gate against a genuinely correct src/abi.lex — confirmed the tool-call/event shape works (found and fixed two more real bugs in the fixture along the way: u_word never zero-padded to 32 bytes, and ABool's encoding wrongly concatenated an extra byte), though the run was slow/error-prone enough on the local model that the deterministic check is what actually pins the behavior

🤖 Generated with Claude Code

verified.type_check/.spec_check/.test are written automatically by
lex-llm's dispatcher whenever lex_check/lex_spec_check/lex_test
reports a pass. lex_run isn't in that list, and shouldn't be added
there generically -- an ordinary build-mode lex_run passing proves
nothing, only a VERIFY-mode one that found no FAIL does, and the
dispatcher has no notion of agent mode. So a clean verify pass --
the strongest evidence in the system, an independent re-derivation
that never trusted the implementation -- left no durable trace: a
review agent or task_spec.lex criterion in a later session had no way
to check "was this independently verified," only "did it type-check."

Added a fourth kind, verified.independent_check, written directly by
the fix-loop's verify gate (attest_verify_pass_if_clean, called from
run_agent_with_events/run_agent_persistent_with_events right after
verify_found_failure comes back false) via trail_log.append, then
promoted into .lex/verified.jsonl the same way harvest/append_all
already promotes the other three -- since the turn's own harvest
already ran before this code gets a chance to write anything, this
harvests+appends just the one new event rather than waiting for a
later turn to pick it up.

Validated two ways: a live end-to-end run isolating the gate (empty
setup, a genuinely correct src/abi.lex this time -- which needed two
MORE real bugs fixed beyond the accumulator overwrite this session
already knew about: u_word never zero-padded to 32 bytes at all, and
ABool's encoding wrongly concatenated an extra byte) confirmed the
tool-call/event shape works, though the run itself was slow and
error-prone enough on this local model that it wasn't worth waiting
out to completion; a fast deterministic unit-level check (hand-built
event lists, both branches) confirmed the write-on-clean-pass and
no-write-on-FAIL paths precisely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alpibrupa
alpibrupa merged commit 083b45f into main Sep 8, 2026
1 check passed
@alpibrupa
alpibrupa deleted the feat/verify-attestation branch September 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant