-
Notifications
You must be signed in to change notification settings - Fork 56
chore(dx): add local dev doctor and setup commands #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b120301
chore(dx): add one-command local dev bootstrap
ndycode 5d0da22
chore(dx): unify verify gates and add release/local runbooks
ndycode ccf3e66
test(dx): cover bootstrap scripts and harden Windows setup retries
ndycode 19758dc
fix(dx): harden dev doctor checks and align onboarding docs
ndycode c576813
fix(dx): address remaining CodeRabbit bootstrap comments
ndycode 8d61b31
test(dx): stub doctor version checks in linux negative-path tests
ndycode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # Local Development Runbook | ||
|
|
||
| Canonical contributor workflow for setting up and validating this repository. | ||
|
|
||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.js `>=18` | ||
| - npm available in `PATH` | ||
| - git available in `PATH` | ||
|
|
||
| Verify environment: | ||
|
|
||
| ```bash | ||
| npm run doctor:dev | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## First Clone | ||
|
|
||
| From repo root: | ||
|
|
||
| ```bash | ||
| npm run setup:dev | ||
| ``` | ||
|
|
||
| `setup:dev` runs: | ||
|
|
||
| 1. environment checks (`doctor:dev`) | ||
| 2. dependency install (`npm ci`) | ||
| 3. validation gate (`npm run verify`) | ||
| 4. docs integrity smoke (`npm test -- test/documentation.test.ts`) | ||
|
|
||
|
ndycode marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| ## Daily Development | ||
|
|
||
| ```bash | ||
| npm run verify | ||
| ``` | ||
|
|
||
| Use component commands when debugging failures: | ||
|
|
||
| ```bash | ||
| npm run lint | ||
| npm run typecheck | ||
| npm test | ||
| npm run build | ||
| ``` | ||
|
|
||
| Format repo config files (JSON/JSONC/YAML): | ||
|
|
||
| ```bash | ||
| npm run format | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Common Failure Modes | ||
|
|
||
| - `doctor:dev` fails on missing npm/git: | ||
| - ensure shell `PATH` includes Node.js and git executables | ||
| - `verify` fails on audit policy: | ||
| - run `npm run audit:ci` to inspect blocking advisory output | ||
| - `setup:dev`/`doctor:dev` on Windows fails with transient `EBUSY`/`EPERM` lock errors: | ||
| - retry `npm ci` first (transient antivirus/file contention is common) | ||
| - if it persists, pause antivirus or exclude the repository, then re-run in an elevated PowerShell/CMD session | ||
| - if state looks corrupted, run `git clean -fdx` then run `npm ci` again | ||
| - if lock contention still stalls installs, try `npm ci --no-audit` or run setup from WSL2 | ||
| - `test/documentation.test.ts` fails with missing `dist/lib/*.js`: | ||
| - run `npm run build` and re-run the docs test | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| --- | ||
|
|
||
| ## CI Parity | ||
|
|
||
| CI uses `npm run verify:ci` for the matrix test gate. | ||
|
|
||
| Local equivalent: | ||
|
|
||
| ```bash | ||
| npm run verify:ci | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Release Runbook | ||
|
|
||
| Maintainer checklist for preparing a reliable release from `main`. | ||
|
|
||
| --- | ||
|
|
||
| ## Preconditions | ||
|
|
||
| 1. Release PR merged to `main` | ||
| 2. CI checks green on latest `main` | ||
| 3. Working tree clean | ||
|
|
||
| --- | ||
|
|
||
| ## Validation Gate | ||
|
|
||
| Run from repository root: | ||
|
|
||
| ```bash | ||
| npm run release:check | ||
| ``` | ||
|
|
||
| This command runs: | ||
|
|
||
| 1. `npm run verify` | ||
| 2. `npm run test -- test/documentation.test.ts` | ||
| 3. `npm pack --dry-run` | ||
|
|
||
| --- | ||
|
|
||
| ## Documentation Gate | ||
|
|
||
| Before publishing/tagging: | ||
|
|
||
| 1. update `CHANGELOG.md` | ||
| 2. add or update matching release note in `docs/releases/` | ||
| 3. verify docs links in `README.md` and `docs/README.md` point to the latest stable release note | ||
|
|
||
| --- | ||
|
|
||
| ## Publish/Tag Flow | ||
|
|
||
| 1. bump version in `package.json` and lockfile as needed | ||
| 2. commit release metadata | ||
| 3. create signed/annotated git tag | ||
| 4. push commit and tag | ||
| 5. verify package metadata and release notes in GitHub | ||
|
|
||
| --- | ||
|
|
||
| ## Rollback | ||
|
|
||
| If release validation fails after version bump: | ||
|
|
||
| 1. revert release commit on branch | ||
| 2. re-run `npm run release:check` | ||
| 3. open a corrective PR with failure evidence |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.