issue-112: Add zip-extraction dependency (adm-zip vs yauzl) #124
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!124
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-112/add-zip-extraction-dependency-adm-zip-vs-yauzl"
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?
112: Add zip-extraction dependency (adm-zip vs yauzl)
Implements 112.
Generated in 9m 18s.
Review findings
Now I have a full picture. Let me apply the fixes. First, the Critical finding — add
adm-zipto the root pi-package manifest:adm-zip now resolves for the extension (nested dev copy here; on a fresh clone the rootnode_modulesprovides it since the nested one is gitignored). Now the README install section (High + Medium findings):Now theactions.tscomment — trim the inline rationale (Low 2) and make the{@link ZipGuardLimits}resolve (Low 1) by importing the type:Now move the full rationale into the project decision record (docs/DESIGN.mdTradeoffs) per Low 2's suggested fix:Now re-run the gates. Root test and the forgejo extension's check/build/test:All gates pass. Let me review the final diff:Let me do a lightweight fresh-checkout simulation (copy tree without git/node_modules,npm install, resolve the extension's adm-zip import):All fixes are applied and gates are green. Fresh-checkout simulation confirms the Critical fix: a tree without the gitignored nestednode_modulesresolvesadm-zipfrom the root install.Review Findings — 112
Summary
Gates run and results: root
npm test(node --test, 57/57 pass), forgejo extensionnpm run check(tsc --noEmit, pass),npm run build(tsc emit, pass), andnpm test(jest, 241/241 pass). No lint script exists in either package.json, so no lint gate was available. The change under review is a single commit that adds a 23-line rationale comment toextensions/forgejo/src/actions.ts; it does not add or change any dependency. The adm-zip dependency and theextractRunLogsZip/ZipGuardLimitscode it documents already exist from issue-111 — but only in the nestedextensions/forgejo/package.json, which is not the install path pi/install:localuses, so the pi package's actual dependency manifest is still missing adm-zip and would fail at runtime for consumers.Remediation applied in this pass: added
"adm-zip": "^0.6.0"to the root pi-packagedependenciesand regeneratedpackage-lock.json(verified via a fresh tree copy + rootnpm installthatextensions/forgejo/src/index.tsresolves adm-zip); updated the README install section (pi-package flow + corrected manual flat-copy recipe withadm-zip); trimmed the inline rationale inactions.tsto a pointer with resolvable{@link}s and moved the full adm-zip-vs-yauzl comparison intodocs/DESIGN.mdTradeoffs. Remaining: the commit-message rewrite (Low) is out of scope for this stage, which must not commit/stage/push and only captures the working-tree diff.Critical
package.json:28— The issue's core task ("Add zip-extraction dependency") is not implemented where pi actually installs deps. The root pi-package manifest declares onlydotenv/pg/pgpass/typebox(lines 28–33) and the rootpackage-lock.jsonhas no adm-zip entry; there is noworkspacesfield,scripts/local-install.mjsrunsnpm installonly at the repo root, andextensions/forgejo/node_modules/is gitignored. Butextensions/forgejo/src/index.tseagerly imports./actions→./actionsCache→import AdmZip from "adm-zip"(actionsCache.ts:4), so any machine that installs this package viapi installornpm run install:localwill fail to load the entire forgejo extension (Cannot find package 'adm-zip'). The comment added atactions.ts:18-19("runtime dep of extensions/forgejo") is therefore misleading for package consumers; the dev machine only works because of a manually-installed, gitignored nested node_modules. Suggested fix: add"adm-zip": "^0.6.0"to the rootpackage.jsondependenciesand runnpm installat the repo root to regeneratepackage-lock.json(verify with a fresh clone +install:localthat the extension loads).High
extensions/forgejo/README.md:32— The documented manual-install flow for this extension is now broken by the actions tools: the snippet runscd ~/.pi/agent/extensions/forgejo && npm install typeboxonly, but the actions tools (documented in this same README at lines 83–132) import adm-zip at module load. A user following the documented install path gets a forgejo extension that fails to load. Suggested fix: update the snippet tonpm install typebox adm-zipand add a line notingforgejo_action_run_logsrequires theadm-zipruntime dependency (and that the@types/adm-zipdevDep is for development only).Medium
extensions/forgejo/README.md:25-33— The manual-install section copiessrc/*.tsand hand-writes the extension package.json; the newsrc/actionsCache.ts(and its adm-zip import) was added by issue-111 but this install recipe was never updated, so it is doubly stale (missing file copy and missing dep). Suggested fix: revise the recipe to copy all current sources and to includeadm-zipin the package.json it asks the user to write, or replace the section with a pointer to the pi-package install flow.Low
extensions/forgejo/src/actions.ts:36— The comment references{@link ZipGuardLimits}, but that symbol is not imported intoactions.ts(onlyextractRunLogsZipis, at line 13), so the JSDoc link is dangling and won't resolve in editors/typedoc. Suggested fix: addZipGuardLimitsto the./actionsCacheimport (type-only) or rephrase as plain textZipGuardLimitsinactionsCache.ts.extensions/forgejo/src/actions.ts:17-39— A 23-line dependency-decision rationale is inlined at the top of a hot-path source file; this is design documentation that better fits the issue body or a project decision doc. Suggested fix: keep a 2–3 line pointer in the source ("adm-zip chosen over yauzl; rationale in issue-112; zip-bomb guards in extractRunLogsZip") and move the full comparison into the issue/decision record.dcc1ab5— Message is112: Add zip-extraction dependency (adm-zip vs yauzl), but AGENTS.md requires theissue-<N>: <summary>format (e.g.issue-112: …). Suggested fix: amend the commit message toissue-112: Add zip-extraction dependency (adm-zip vs yauzl)before opening the PR (branch name already follows the convention).Documentation
Updated files: