Skip to content
C.W.K.
Stream
Lesson 05 of 05 · published

Verify Reads the Contract

~12 min · verification, required-stages, gates, landing

Level 0Cold Vessel
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Verify Reads the Contract

Verification is the point where recorded work meets pipeline policy. It checks that every required stage is present, the claim belongs to the landing session, review obligations are satisfied, and the landing summary exists. It should derive those requirements from canonical row data rather than from whatever the author remembers.

Order matters when stages express sequence. A plan gate logged after compose is not equivalent to one logged before mutation. The verifier needs timestamps or event order and a contract that names the allowed sequence, otherwise a complete set can still represent a broken workflow.

Verification also distinguishes structural gates from domain acceptance. It can prove the workshop trail is complete. The task's own evidence proves the deliverable. The landing decision joins them and reports failures by owner instead of reducing both to one green badge.

A current-row verifier can intentionally tighten in-flight work. If that is the product choice, output must show the effective row version and missing stages clearly. Surprising a session with “verification failed” and no policy identity makes live policy operationally hostile.

Explain Every Refusal

For each gate, return the missing or misordered stage, the policy version that required it, and the next valid action. A verifier is a product surface, not an assertion dump.

Test a complete-but-misordered trail, a stale brief under tightened live policy, a wrong-session landing, and a non-code task with no commit. Those cases prove the contract rather than the happy path.

Verification recomputes permission to land. It reads the frozen work order, required stages, current artifact, and review disposition, then refuses when their relationship is inconsistent. A green unit test or polished source file is useful evidence, but neither can substitute for the run's declared contract.

Code

Verify stage membership and order·python
required = ["plan-gate", "work", "review"]
events = ["plan-gate", "work", "review"]

def verify(required: list[str], events: list[str]) -> None:
    positions = {name: events.index(name) for name in required if name in events}
    missing = [name for name in required if name not in positions]
    if missing:
        raise RuntimeError(f"missing stages: {missing}")
    if [positions[name] for name in required] != sorted(positions.values()):
        raise RuntimeError("stages are out of order")

verify(required, events)
print("workflow contract satisfied")

External links

Exercise

Build a verifier table with four failures: missing stage, wrong order, wrong session, and missing task acceptance. Assign each failure to workshop or task ownership.
Hint
The repair message should name the next valid action.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.