Skip to content

feat(cli): record ordered evidence steps - #81

Merged
ElbertePlinio merged 2 commits into
mainfrom
feat/74-evidence-steps
Sep 4, 2026
Merged

ElbertePlinio merged 2 commits into
mainfrom
feat/74-evidence-steps

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Why

Before/after screenshots cannot show which intermediate state proves each action in a Flutter run. This made click and hot-reload evidence ambiguous.

What

  • Add up to 32 ordered steps between before and after.
  • Give each step a label, summary, observations, and screenshot artifacts with the existing preview, hashing, deduplication, redaction, and safety rules.
  • Let checks optionally reference a unique step label and render that reference in report.md.
  • Apply artifact count and byte budgets across both endpoints and every step.
  • Keep schema v1 and v2 inputs compatible while recording v3 output.
  • Update the bundled Flutter workflow and unreleased notes.

Schema

Schema v3 adds optional ordered steps and optional checks[].step. A recording input can look like this:

{
  "schemaVersion": 3,
  "scenario": "Counter increments and keeps state after hot reload",
  "outcome": "passed",
  "before": {
    "summary": "Counter was zero with the old theme.",
    "observations": [{ "label": "Counter", "value": "0" }],
    "artifacts": []
  },
  "steps": [
    {
      "label": "Clicks complete",
      "summary": "Counter reached two before reload.",
      "observations": [{ "label": "Counter", "value": "2" }],
      "artifacts": [
        {
          "kind": "screenshot",
          "label": "Clicked frame",
          "source": "/absolute/path/clicked.png"
        }
      ]
    }
  ],
  "after": {
    "summary": "The new theme appeared and counter stayed at two.",
    "observations": [{ "label": "Counter", "value": "2" }],
    "artifacts": []
  },
  "sourceChanges": ["lib/main.dart"],
  "checks": [
    {
      "name": "desktop click",
      "status": "passed",
      "summary": "Counter advanced to two.",
      "step": "Clicks complete"
    }
  ],
  "limitations": []
}

The canonical output keeps this order, adds run metadata, and replaces submitted artifact sources with the existing content-addressed artifact and optional preview metadata. Inputs with schema versions 1 through 3 are accepted; output is always version 3. Version 0 and future version 4 are rejected.

How it was verified

  • cargo fmt --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test -p pickforge-cli (85 passed)
  • complexity-gate check --changed

Not verified

  • The manual Flutter end-to-end scenario was not rerun.
  • Windows-native and macOS behavior were not tested locally.

Closes #74

@ElbertePlinio
ElbertePlinio merged commit 6d96366 into main Sep 4, 2026
5 checks passed
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.

evidence record cannot represent intermediate states of a run

1 participant