Add bootstrap command contract#326
Conversation
|
Warning Review limit reached
More reviews will be available in 4 minutes and 53 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdea284395
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case 'bootstrap': { | ||
| const bootstrapFlags = parseFlags(args.slice(1)); | ||
| await bootstrap(cwd, { | ||
| dryRun: bootstrapFlags['dry-run'] === true, | ||
| json: bootstrapFlags.json === true, | ||
| }); |
There was a problem hiding this comment.
Reject unknown bootstrap flags before running
In the new bootstrap dispatch, parseFlags accepts any unrecognized --... and this handler only reads dry-run/json, so a typo like git mind bootstrap --dryrun --json silently consumes --json as the unknown flag's value and runs in non-dry-run, non-JSON mode instead of failing. Because --dry-run is the command's no-write safety switch, validate the allowed bootstrap flags/positionals before calling bootstrap.
Useful? React with 👍 / 👎.
Summary
git mind bootstrapCLI contract.bootstrap.schema.jsonand validates dry-run JSON output through contract canaries.bootstrap --dry-runso it still fails outside a Git worktree without writing graph state.Problem Statement
--dry-run --jsonoutput with no graph writes.bootstrapcommand, so the design docs were ahead of executable reality.ADR Compliance (Required)
Relevant ADR(s)
Compliance Declaration
Exception Request (Required if deviating)
Architecture Laws Checklist (Hard Gates)
Canonical Truth & Context
--at,--observer,--trust) or deterministically defaulted.Determinism & Provenance
Artifact Hygiene
Contracts & Compatibility
Extension/Effects Safety (if applicable)
Scope Control
Backward Compatibility
git mind bootstrapcommand andbootstrap.schema.json; no existing command shape changes.git mind bootstrapnow exists and emits a zero-count contract skeleton until scanner/inference slices land.Test Plan (Required)
Unit
Integration
npx vitest run test/contracts.integration.test.js -t 'bootstrap --dry-run --json' npx vitest run test/contracts.test.js test/contracts.integration.test.jsDeterminism
bootstrap --dry-run --jsoncaptures graph status before/after and asserts no graph state change.npx vitest run test/contracts.integration.test.js -t 'bootstrap --dry-run --json'Contract/Schema
Policy Gates
npm run lint git diff --check npm testSecurity / Trust Impact
bootstrap --dry-runnow fails outside a Git worktree with an actionable error.Performance Impact
Observability / Debuggability
Operational Notes
fdea284.Linked Issues / Milestones
Reviewer Quick Verdict Block (for maintainers)
MUST (Hard Gates)
SHOULD (Quality)
Verdict