[ENG-3984] Define the "Report a vulnerability" button at first use, and correct three stale README sections - #275
Merged
Conversation
Four fixes, one of which is the reason the README misleads readers about what this package is. **Say what the "Report a vulnerability" button is, before using the phrase.** The button was named in the install prompt and the quick start, then not defined until "The disclosure widget" nearly 300 lines later. Read top-down — which is how an assistant reads it — the phrase lands next to a package about vulnerability monitoring and reads as either a way to report vulnerable dependencies to Patchstack, or as this package's own security-contact channel. It is neither: it is a button Connect renders on the reader's site for their visitors. The new opening says so at first use. **Describe the whole package.** The opening line covered dependency scanning only, and named `package-lock.json` when five lockfile formats are supported. The runtime guard, the disclosure widget and the attack-surface map all ship in `dist/` and were documented further down, so the summary a reader forms from the first paragraph was narrower than the package. It now lists the four things Connect does and links to each, and says `map` is never run for you. **Correct the release process.** It described bumping `package.json`, committing it, and a tag that must match or the workflow fails. None of that is how this releases: the tag is the source of truth, `Publish` writes the version into `package.json` in CI, and `Release` computes the bump. The section now matches `RELEASING.md` and `publish.yml` and points at the former for the rest. The one-time npm trusted-publishing setup moves to `RELEASING.md`, where a maintainer would look for it. **Fix the development loop order.** It listed `npm test` before `npm run build`. Several tests only run once `dist/` exists and skip without it, so that order reads exactly like passing while testing less. Also moves the local-endpoint manifest recipe to `CONTRIBUTING.md`; it is contributor-only and shipped to every consumer in the tarball. The install prompt is untouched, so all three copies still agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Reorganized README and docs to improve clarity of setup and release processes. 🎯 Quality: 99% Elite · 📦 Size: Small 📈 This month: Your 141st PR — above team average · Averaging Excellent |
Contributor
Author
|
/review |
daniloradovic
approved these changes
Sep 21, 2026
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.
Closes ENG-3984
What changed
The README named a "Report a vulnerability" button in the install prompt and the quick start, then did not say what it was until The disclosure widget, roughly 300 lines later. It is now defined at first use. Three other sections were out of date and are corrected alongside it: the opening summary, the release process, and the development loop.
Why it misled readers
Four separate causes, one per fix.
The button had no antecedent. Read top-down — which is how an assistant reads a README — the phrase lands beside a package about vulnerability monitoring, so it reads as either "report a vulnerable dependency to Patchstack" or "this is where you report a security bug in
@patchstack/connect". It is neither: it is a button Connect renders on the reader's own site, for their visitors. Nothing corrected the second reading, because there is noSECURITY.mdin the repository andCONTRIBUTING.mdpoints at one "if present".The opening described a narrower package than the one that installs. It covered dependency scanning only, and named
package-lock.jsonwhen five lockfile formats are supported. The runtime guard, the disclosure widget and the attack-surface map all ship indist/and were documented further down, so the impression a reader formed from the first paragraph was wrong by omission.The release section described the inverse of the real pipeline. It said to bump
package.json, commit it, merge it, and that a tag not matching it fails the workflow. The tag is the source of truth:Publishreads the version out of the tag and writes it intopackage.jsonin CI (.github/workflows/publish.yml:113), andReleasecomputes the bump. Anyone following the README would have done work the pipeline then undoes.The development loop listed
npm testbeforenpm run build.CONTRIBUTING.md:53is explicit that several tests only run oncedist/exists and skip without it — "reads exactly like passing". The documented order tested less than it appeared to.Fix
setupinstalls the first three and thatmapis never run for you.RELEASING.mdandpublish.yml, and point at the former for the rest.RELEASING.md, where a maintainer would look for it.npm installtonpm ci.CONTRIBUTING.md. It is contributor-only and was shipping to every consumer inside the tarball.The install prompt is byte-untouched, so
README.md,GETTING-STARTED.mdandfield-test/prompt.txtstill agree and no prompt re-gate is triggered.Verified
npm run typecheck,npm run build,npm test— 3194 passed, 7 skipped, across 193 files. That includes the README assertions intests/execution-disclosure.test.ts(theprotect --check --runtimedisclosures, the traversal-only claim, the worker-thread and discovery-window caveats) and the three-way prompt comparison intests/install-prompt.test.ts.npm run capabilities:checkandnpm run rule-contract:checkclean.npm pack --dry-runshows tarball contents unchanged apart from the README itself. All four new anchor links resolve to real headings. The CLI block still lists all 13 commands the binary dispatches, so no capability indist/is left undisclosed.Not verified, and not verifiable before release: the hostile field test.
README.mdships inside the tarball, so it is in the same bucket asAGENT-INSTALL.md— the fixture installs the published package, so a run today would audit 0.5.8's README and say nothing about this diff. PerCLAUDE.mdandMAINTAINING.mdthat run belongs immediately after the release carrying this change, withstandardorlovableadded for document accuracy. The deterministic gates above are what stand behind it until then. There is already an outstanding post-release run from #271; if both land in the same release, onehostile --rounds 3covers the prompt-survival question for both.Out of scope, worth a follow-up
There is no
SECURITY.md.CONTRIBUTING.mdtells a reporter to see it "if present", and it is not. That absence is half of why "Report a vulnerability" was ambiguous in the first place — defining the button removes the confusion, but there is still no documented channel for a vulnerability in the package itself. Someone should decide whether that file should exist.package.json'sdescriptionomits the disclosure widget. It names dependency inventory, attack-surface mapping and the guard. That is the same under-description the old README opening had, and it is the text npm renders above the README — so it reaches more readers than the paragraph fixed here. Left alone because it is package metadata rather than documentation, and worth deciding deliberately.The CLI section is an 85-line preformatted block. A table would scan better for both readers and assistants, but that block carries the load-bearing disclosures (
mapREADS YOUR SOURCE FILES,protect --check --runtimeSTARTS THE APP) and reformatting it risks weakening them. Its own change, with its own review.Docs: this is the docs change.
GETTING-STARTED.mdandAGENT-INSTALL.mdneed nothing — they describe the same button, and the prompt they share with the README did not move.🤖 Generated with Claude Code