Validate asset creation, atomicity and write safety against the live instance #197
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills#197
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Validate the whole write pipeline against the live Penpot instance: stage a small asset set, commit it as a single revision, confirm a human sees it in the UI, confirm a refused target writes nothing, and confirm a rejected batch is atomic. Record the findings.
Background
Depends on: #196
This gate covers the highest-risk area of the feature — the write path. Everything downstream (screens, component instances, imported libraries) inherits whatever is proven here, and several of the semantics are counter-intuitive enough that they must be demonstrated, not assumed:
revnis accepted and applied (so the extension tracks the revision itself),revnis the pre-write revision andlaggedis not an acknowledgement,Required environment:
PENPOT_URL,PENPOT_TOKEN, and the scratch project (pi-penpot-scratch -- safe to delete). Never run against a project with real designs.Documentation Required
A separate process downloads these into the listed folders before this issue is implemented. Check the folders for the actual reference material before starting.
docs/reference/penpot-api/<PENPOT_URL>/api/main/doc/openapi.json— the ground truth forupdate-file's parameters and error types on the running version.curlif a failure needs isolating below the extension.docs/reference/pi-coding-agent//reloadand tool-call output, for capturing the evidence below.Implementation Details
Run each check, capture the evidence (tool output plus the observed
revnbefore/after), and write the results toextensions/penpot/findings.mdunder a "Write path" heading.penpot_authorize_target.revn(viapenpot_get_file).penpot_create_color×3,penpot_create_typography×2).penpot_commit— expect oneupdate-filecall.revnadvanced exactly once.penpot_commit→ expect a refusal namingpenpot_authorize_target.revnis unchanged and no asset was added.add-objwith an invalid shape if easier to trigger at this stage).revnbefore, commit, and confirm: the call fails with the server'sexplainsurfaced verbatim,revnis unchanged, and nothing was created.revn, then commit.revnis accepted / conflict-refresh path works as implemented) and that the file advanced by exactly one revision from the observed pre-write value.Record in
extensions/penpot/findings.md: for each check, the exact calls, the observedrevnvalues before and after, the outcome, and any surprise (in particular any case where the revision advanced by more than one, or where a write landed after a refusal). Any behaviour that contradicts the implementation must be fixed in code, not just noted.Acceptance Criteria
update-filecall, verified by the file'srevnadvancing exactly once.revnis provably unchanged.explainsurfaced verbatim, leavesrevnunchanged, and leaves the changeset staged.revncommit succeeds and advances the file by exactly one revision.extensions/penpot/findings.mdcontains the evidence (calls, revisions before/after, outcomes) and the Penpot version validated (2.17).Test Plan
Manual, against the live instance:
Then open the scratch file in the Penpot UI, reload, and confirm the assets are present.
pi-loop opened and merged a pull request for this issue: #230