Skip to content

chore(npm): pin the framework files map to its governed surface#174

Merged
doodlewind merged 1 commit into
mainfrom
chore/npm-files-governance
Jul 24, 2026
Merged

chore(npm): pin the framework files map to its governed surface#174
doodlewind merged 1 commit into
mainfrom
chore/npm-files-governance

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

Summary

Governance pass over the @pocketjs/framework npm surface, prompted by #160 adding engine/backends/esp32p4-ppa/* to the files map.

  • Drop the ESP32-P4 PPA crate from the tarball. The files principle is "ship what the framework runtime, compiler, shipped tools, or a pocket CLI target consumes from the tarball". ESP32-P4 has no CLI target and no entry in contracts/spec/platforms.ts, nothing in the shipped surface references the crate, and its other half — the hosts/esp32p4/components/pocketjs_ppa ESP-IDF C component — cannot meaningfully ship in npm. The integration is a git-checkout workflow per its own README; shipping half of it only signals support that isn't there.
  • Drop the redundant tools/cli/psp-toolchain.json entry — the wholesale tools entry already ships it (verified: the tarball diff for this PR is exactly the five esp32p4 files, 213 → 208).
  • Encode the rule as a closed-form test. tests/npm-package.test.ts now asserts the files array exactly, with the principle documented inline, plus negative tarball checks for engine/backends/** and hosts/esp32p4/**. New surface entries now require deliberately editing the governed list in the same PR.

Audit notes (checked, deliberately kept)

  • pocket3d-vita + pocket3d-bsp: explicitly test-pinned standalone crate pair for out-of-tree Vita 3D apps; self-contained in the tarball ([[example]] target requires shipping examples/). Vita is a first-class CLI target.
  • Root pocket.json: load-bearing — tools/demo-identity.ts reads it as the fallback manifest template; also the shipped v2 manifest example.
  • pocket.config.ts, tsconfig.json, assets/*, hosts/web, engine/core|wasm, hosts/psp|vita: all traced to shipped consumers.
  • Observation (not addressed here): hosts/web/pocketjs.wasm is packed from local disk state and tools/release-check.ts has no freshness guard for it — worth a follow-up tripwire.

Validation

  • npm pack --dry-run before/after diff: exactly the 5 esp32p4 files removed.
  • bun test tests/npm-package.test.ts tests/release-check.test.ts tests/cli.test.ts tests/psp-toolchain.test.ts: 22 pass.
  • Full bun run test chain: green.

🤖 Generated with Claude Code

Drop the ESP32-P4 PPA crate from the npm tarball: it has no pocket CLI
target, nothing in the shipped surface consumes it, and its ESP-IDF C
component half cannot ship in npm — the integration is git-only by
design. Also drop the tools/cli/psp-toolchain.json entry, which the
wholesale tools entry already covers (tarball diff is exactly the five
esp32p4 files).

Encode the rule in tests/npm-package.test.ts: a closed-form assertion of
the files array plus negative tarball checks, so a files entry can only
land by deliberately updating the governed list in the same PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@doodlewind
doodlewind marked this pull request as ready for review July 24, 2026 09:16
@doodlewind
doodlewind merged commit 391f144 into main Jul 24, 2026
@doodlewind
doodlewind deleted the chore/npm-files-governance branch July 24, 2026 09:16
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.

1 participant