Skip to content

evidence record cannot represent intermediate states of a run #74

Closed

Description

@ElbertePlinio

Problem

pickforge evidence record models a run as exactly two states, before and after. A run
whose whole point is a sequence — interact, observe, change source, reload, observe again —
can only record its endpoints. The steps that produced the change are dropped.

That is a hole in a feature whose stated job is reproducible evidence: the report asserts an
outcome it cannot show the working for.

Concrete case

In the end-to-end run of the #64 stack, the
recorded report says:

- **desktop click** (Passed): Counter advanced 0 to 2.
- **hot reload** (Passed): Reloaded 1 of 748 libraries in 183ms.

Two claims, one artifact pair. The before shot shows the counter at 0 with the purple
theme; the after shot shows the counter at 2 with the teal theme. The intermediate
state — counter at 2, theme still purple, which is the only frame that separates "the clicks
worked" from "the hot reload worked" — was captured during the run but had nowhere to go in
the document.

The independent visual reviewer flagged exactly this: the click claim is corroborated only
by images living outside the evidence record.

Why it is worth fixing rather than working around

Collapsing a sequence into before/after is not just missing data, it is ambiguous data. From
the two recorded frames alone you cannot tell whether the counter reached 2 by clicks or by
the reload re-running main(). Preserved widget state across a hot reload is a real,
checkable property, and the current schema cannot express the observation that proves it.

The rest of the design is already right — external run directory, content-hashed artifacts,
redaction, Markdown escaping that leaves canonical JSON untouched. This is a shape problem
in the document, not a defect in the machinery.

Agent plan

Goal: an evidence run can record the ordered steps that produced its outcome, not only its
endpoints.

Checklist:

  • Design the schema change: ordered steps[] (label, summary, observations, artifacts)
    with before/after kept as the first and last step, or as a compatible projection
  • Bump the evidence schema version and define how a v1 document is read
  • Preserve every current invariant per step: redaction, artifact hashing/dedupe,
    Markdown escaping, external run directory, receipt ownership
  • Render steps in report.md in run order, each with its own artifacts
  • Tests: multi-step document round-trips byte-exactly, aliased artifacts still dedupe
    across steps, v1 documents still record

Validation:

  • cargo test --workspace --locked
  • Re-run the manual end-to-end and confirm the intermediate clicked frame is in the report

Current status: Planned
Next action: settle the steps[] vs before/after compatibility shape

Context

Found during the same end-to-end run that produced
#73. Not a blocker for
#70 — the recorded document is accurate as
far as it goes, and the redaction and isolation behaviour were verified. Deferred here
because changing the document shape is a schema decision, not a review fix.

Refs #64

Activity

  1. added
    enhancement
    on Sep 1, 2026
  2. ElbertePlinio commented on Sep 1, 2026

    @ElbertePlinio
    MemberAuthor

    Tracked under the pivot epic: pickforge-platform#91 (workstream 2).

    Recording the dependency explicitly: this is blocked on #70 merging. The Rust crate does not exist on main yet — there is no crates/ directory there at all — so evidence.rs cannot be changed until the stack lands. Not deferred by preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions