Skip to content

fix(bootstrap): detect runtime toolchain and auth gaps - #21

Merged
levelupself merged 3 commits into
mainfrom
fm/079-bootstrap-detects-what-firstmate-uses
Aug 6, 2026
Merged

levelupself merged 3 commits into
mainfrom
fm/079-bootstrap-detects-what-firstmate-uses

Conversation

@levelupself

@levelupself levelupself commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Intent

Bring bootstrap detection in line with what Firstmate actually invokes or depends on at runtime: detect pnpm, codeburn, @infisical/cli, Herdr, ripgrep, xz-utils, and the exact pinned ShellCheck 0.11.0 through bin/fm-bootstrap.sh. Detect first, emit an actionable diagnostic, and install only after explicit in-session consent; never add silent installation. Distinguish required dependencies from optional enhancements in each diagnostic so missing feature-only tools do not block an otherwise healthy session. Report codeburn as optional because its absence only disables task-usage snapshots; report Infisical CLI and its environment-local interactive authentication boundary as optional; report inactive Herdr as optional but make it required for a selected Herdr backend, and offer the existing pinned checksum-verifying Herdr installer so absence is discovered during setup rather than dispatch. Treat xz-utils as required only while pinned ShellCheck needs installation or repair and optional when exact ShellCheck is already usable. Detect environment-local GitHub, selected-Claude, and Infisical authentication honestly without automating browser logins or copying credentials across WSL distributions. Declare the NodeSource node_22.x and official GitHub CLI apt repositories while preserving the bootstrap rule against privileged or silent apt-source mutation. Verify executable diagnostics through the public bootstrap interface with each tool absent, using the existing clean Debian evidence as the source of dependency facts. Keep hunkdiff, @openai/codex, and clerk out of scope because Firstmate does not depend on them. Do not run or add Herdr lifecycle commands because Herdr lab authorization is not enabled. Every generated artifact, including risk rationales and fix summaries, must use role-neutral prose with no second person and no captain, user, firstmate, or crewmate role nouns.

What Changed

  • Expand bootstrap detection for pnpm, ripgrep, exact ShellCheck 0.11.0, conditional xz-utils, codeburn, Infisical CLI, and Herdr, with explicit required versus optional diagnostics and consent-gated pinned installers.
  • Add environment-local authentication checks for GitHub, the selected Claude harness, and Infisical without automating interactive login or credential transfer.
  • Document the runtime dependency and package-source boundaries and add public-interface coverage for missing tools, ShellCheck pinning, Herdr installation, and authentication diagnostics.

Risk Assessment

✅ Low: The change is well-bounded and the bootstrap diagnostics, dependency classifications, consent-gated installers, authentication boundaries, documentation, and executable-interface tests consistently implement the stated intent.

Testing

The focused bootstrap suite passed, and detect-only public-interface checks demonstrated required pnpm detection, optional codeburn detection, conditional xz-utils classification around exact ShellCheck 0.11.0, and required Herdr detection only when its backend is selected; the transcript confirms diagnostics were emitted without installation or authentication side effects.

Evidence: Public bootstrap diagnostics transcript

=== Required dependency absent: pnpm ===
MISSING: pnpm (required: project package workflows depend on it; install: npm install -g pnpm)

=== Optional enhancement absent: codeburn ===
MISSING_OPTIONAL: codeburn (optional: task-usage snapshots are unavailable; install: npm install -g codeburn)

=== ShellCheck repair makes xz-utils required ===
MISSING: xz-utils (required: the pinned ShellCheck installer extracts a .tar.xz archive; install: brew install xz  # or apt install xz-utils)
MISSING: shellcheck (required: the validation lint gate pins ShellCheck 0.11.0; install: '/home/fungiman/.no-mistakes/worktrees/6be0eeed9e9c/01KZAFZEG8H7XVMF17HC0CXZMN/bin/fm-install-shellcheck.sh' '/home/fungiman/.local/bin')

=== Exact ShellCheck makes xz-utils optional ===
MISSING_OPTIONAL: xz-utils (optional: pinned ShellCheck reinstallation is unavailable; install: brew install xz  # or apt install xz-utils)

=== Selected Herdr backend makes Herdr required ===
MISSING: herdr (required: the selected runtime backend depends on it; install: '/home/fungiman/.no-mistakes/worktrees/6be0eeed9e9c/01KZAFZEG8H7XVMF17HC0CXZMN/bin/fm-install-herdr.sh' '/home/fungiman/.local/bin')

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Inspected git diff 4535ef4b98fd6411e5ba4cab6c6ae1f36dd6d1be..f5c5e239c682c21698a9baf279826426dbe96401 -- bin/fm-bootstrap.sh tests/fm-bootstrap.test.sh
  • bash tests/fm-bootstrap.test.sh
  • /tmp/no-mistakes-evidence/01KZAFZEG8H7XVMF17HC0CXZMN/capture-bootstrap-evidence.sh "$PWD" > /tmp/no-mistakes-evidence/01KZAFZEG8H7XVMF17HC0CXZMN/bootstrap-diagnostics.txt
  • Verified git status --short remained empty after testing
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ linter found issues (exit code 1)

🔧 Fix: Suppress intentional child-shell fixture expansion warnings
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

Part of PSY-67

@levelupself
levelupself merged commit 4933814 into main Aug 6, 2026
14 checks passed
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.

2 participants