issue-193: Validate read primitives against the live Penpot instance #226
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!226
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-193/validate-read-primitives-against-the-live-penpot-i"
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?
193: Validate read primitives against the live Penpot instance
Closes #193 — 193.
Generated in 12m 27s.
Review findings
All gates re-run: the Penpot suite is 131/131 green (was 130, plus the new id-less profile test). The full
npm testremains 257/258, the only failure being the pre-existing, out-of-scopescripts/local-install.test.mjsmongodb manifest assertion (unchanged frommain; not caused by this diff). No build/lint scripts exist in this repo; onlynpm testis discoverable.Review Findings — 193
Summary
Resolved 7 of 9 findings. Medium: re-ran every evidence command with the
Accept: application/jsonheader and re-quoted the actualHTTP/1.1status lines and JSON bodies (drift #1/#2); added a### ChangedCHANGELOG bullet; rewrote the "Not verified" section to cross-reference §17 (which already confirmed the server-side shapes) instead of contradicting it; committed a reproducible harnessextensions/penpot/scripts/live-read-check.mjsin place of the/tmpthrowaway. Low: moved the token remediation text into an exported, sharedTOKEN_INVALID_MESSAGEused by both the 401 and anonymous-profile paths; the guard now also rejects a missing/emptyid(with a regression test);.gitignoreun-ignoresextensions/**/findings.mdrepo-wide. Unresolved: the High finding (noPENPOT_URL/PENPOT_TOKENcredentials exist in this environment, so token-authenticated payloads still could not be observed) and the pre-existing, unrelatedpackage.json/mongodb manifest failure — that is a repo-owner scope/intent decision outside issue #193.Critical
High
PENPOT_URL/PENPOT_TOKENwere absent, so no token-authenticated payload was ever observed. Only the unauthenticated/401 error paths were exercised, and the one code change fixes the auth path only —penpot_list_projects,penpot_get_fileandpenpot_list_librarypayload shapes remain unverified on the live server. Suggested fix: obtain credentials and complete the documented run (whoami → list_projects → get_file → list_library againstpi-penpot-scratch) before the PR claims to close #193; if the environment cannot supply a token, split the payload validation into a follow-up issue and narrow this PR's scope so #193 is not closed on a partially-met objective.Medium
findings.md:37,curl -s -i "$B/get-profile") returnsHTTP/1.1 200with a Transit body (["^ ","~:id","~u00000000-…","~:fullname","Anonymous User"]), notHTTP/2 200+ the JSON object shown here; the JSON body only appears whenAccept: application/jsonis sent (which the client does, so the conclusion holds — the paste does not). The same applies to the "all return a JSON401" claim atfindings.md:122(without the header the 401 body isapplication/transit+json). Suggested fix: add-H 'Accept: application/json'to each evidence command and re-quote the actual output, including the real status line andcontent-typeheader.docs/PENPOT_SKILL_DESIGN.md§17 (2026-09-14) already states that the fresh-file structure (data.pages/data.pagesIndex), library assets, asset-linked fills, auto-layout, batched atomic commits andrevnbehaviour were all confirmed against this same instance. Claiming here that these payloads "were never observed" and that revision tracking is "still unproven" leaves two mutually inconsistent documents in the repo. Suggested fix: cross-reference §17 and state precisely what this pass re-verified through the extension tools versus what §17 already established (or, if §17 is being retracted, say so explicitly there).penpot_whoaminow fails on Penpot's anonymous200profile instead of reporting it as the token owner). Every comparable Penpot milestone commit (9aaa52a,82c0519,978041c) added a CHANGELOG bullet, and the file's own preamble says all notable changes are documented there. Suggested fix: add a### Changedbullet under[Unreleased]describing the whoami auth-failure behaviour and the reason (get-profile is::rpc/auth falseand answers a bad token with200+ the zero-uuid profile).npm testis red on this branch and onmain:scripts/local-install.test.mjs:1875assertsentries.includes("extensions/mongodb/index.ts")andObject.hasOwn(pkg.dependencies, "mongodb"), but the manifest entry was deliberately removed by commit4394492("chore: remove mongodb extension from package.json manifest (#174)") whileextensions/mongodb/index.tsstill exists on disk and the root README still advertises the extension. Pre-existing and not caused by this diff, but it means the only gate this pipeline can run does not pass. Suggested fix: decide the intent — either restore"extensions/mongodb/index.ts"topi.extensions(README + code say it ships) or update the test to assert the post-#174 state — sonpm testis green again.Low
TOKEN_INVALID_MESSAGEinsrc/errors.ts(the 401 guidance) with different wording, sopenpot_whoaminow emits two divergent token-fix messages depending on how auth failed. Suggested fix: export a shared token-guidance constant (or a smalltokenGuidance(reason)helper) fromerrors.tsand use it for both the 401 path and the anonymous-profile path.id) still returns success withId: (not set), letting whoami pass as a connection preflight without confirming the token. Suggested fix: for defence in depth, also treat a missing/emptyidas an auth/server anomaly (or narrow it deliberately and document that only the zero-uuid sentinel is recognised)./tmp/penpot-live-check.tsthat is not committed, so those four results cannot be reproduced or re-run by anyone else. Suggested fix: commit the harness (e.g.extensions/penpot/scripts/live-read-check.mjs) or replace the reference with the invocable unit-test/node --testcommand that covers the same path.!extensions/penpot/findings.md) whileextensions/forgejo/findings.md,extensions/grillme/findings.mdandextensions/postgres/findings.mdare already tracked; a futurefindings.mdadded under another extension (or a refreshed one) will be silently ignored by the globalfindings.mdrule at line 5. Suggested fix: un-ignore the established convention repo-wide, e.g.!extensions/**/findings.md, and keep the comment explaining that root-levelfindings.mdremains local scratch.