Severity: P2 (API contract clarity)
Source: Phase 1 code review
Problem
crates/prov-cli/src/commands/log.rs:333-464 — prov log <file>:<line> --json returns PointJson ({file, line, status, prompt?, ...}). prov log <file> --json returns WholeFileJson ({file, edits[], history[]}). Two structurally incompatible shapes with no envelope discriminator.
A consumer (planned U12 Skill, U13 GitHub Action) must know in advance which shape to expect. There's no kind: "point" | "file" field to branch on.
Suggested fix
Add an envelope-level discriminator:
{ "kind": "point", "prov_version": "...", "data": { /* point fields */ } }
{ "kind": "file", "prov_version": "...", "data": { /* file fields */ } }
This is a breaking JSON contract change, so it should land with a versioned envelope rather than ad-hoc. Coordinate with U12/U13 work.
Why deferred
Breaking change to a consumer-facing surface; needs a versioned-envelope migration story.
Severity: P2 (API contract clarity)
Source: Phase 1 code review
Problem
crates/prov-cli/src/commands/log.rs:333-464—prov log <file>:<line> --jsonreturnsPointJson({file, line, status, prompt?, ...}).prov log <file> --jsonreturnsWholeFileJson({file, edits[], history[]}). Two structurally incompatible shapes with no envelope discriminator.A consumer (planned U12 Skill, U13 GitHub Action) must know in advance which shape to expect. There's no
kind: "point" | "file"field to branch on.Suggested fix
Add an envelope-level discriminator:
{ "kind": "point", "prov_version": "...", "data": { /* point fields */ } } { "kind": "file", "prov_version": "...", "data": { /* file fields */ } }This is a breaking JSON contract change, so it should land with a versioned envelope rather than ad-hoc. Coordinate with U12/U13 work.
Why deferred
Breaking change to a consumer-facing surface; needs a versioned-envelope migration story.