Harden public package docs release contents - #3
Merged
Conversation
andrei-hasna
force-pushed
the
fix/public-package-docs-safety
branch
from
July 24, 2026 15:06
9de8c44 to
fb80239
Compare
Replace broad docs/scripts entries in package.json files with an explicit allowlist so the internal secrets-bootstrap runbook (docs/canonical-secrets-bootstrap-2026-06-08.md) never ships in the public npm tarball. Add a fail-closed release:pack:check validator (wired into prepublishOnly) plus a package-release test, and document the policy in README and SECURITY. Bump to 0.2.88.
spawnSync('npm', ...) only resolves the npm.cmd launcher through a shell on
Windows; add shell:true on win32 and surface spawn errors so the release
validator and its test run on the windows-latest CI matrix.
andrei-hasna
force-pushed
the
fix/public-package-docs-safety
branch
from
July 24, 2026 15:15
344a7e9 to
7e182e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docsandscriptsfile entries with explicit public allowlists.scripts/validate-public-package.mjsto validatenpm pack --dry-run --jsonoutput before publish..hasna/project knowledge state to avoid accidental commits.Investigation
package.jsonpreviously shipped the wholedocsdirectory, andnpm pack --dry-run --jsonincludeddocs/canonical-secrets-bootstrap-2026-06-08.md. The fix avoids opening or changing that evidence document and enforces package contents through pack metadata only.Validation
npm run release:pack:checkpassed: 6 public docs, 3 public smoke scripts.npm run test:packagepassed: 2 tests, 25 assertions.bun testpassed: 120 tests, 1476 assertions.bun run buildpassed.bun src/cli.ts storage validate --scope project --jsonpassed. The requested--strictflag is not supported by this branch's CLI parser.Adversarial Review
Kant reviewed the original staged diff and found two blockers: broad
scriptspackaging shipped the validator path literal, and the new validator/test files needed to be staged. Reconciled by allowlisting public scripts, making the validator itself a forbidden pack path, staging the new files, and adding.hasna/to.gitignore. Re-review found no blockers and approved PR readiness.