Skip to content

feat(trust): N2 — mkcert local-CA wrapper + trust CLI (spec 05) - #21

Merged
gustavobertoi merged 1 commit into
mainfrom
nightly/N2
Jun 29, 2026
Merged

feat(trust): N2 — mkcert local-CA wrapper + trust CLI (spec 05)#21
gustavobertoi merged 1 commit into
mainfrom
nightly/N2

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

Chunk N2 (M5)

internal/trust shells out to mkcert (not smallstep/truststore) to install/remove the local root CA and diagnose readiness, behind an injectable Runner so it's fully unit-testable without mkcert present.

  • Available / CARoot / Install (mkcert -install) / Uninstall / Status. Status probes mkcert-on-PATH, the CAROOT rootCA.pem, certutil (Firefox/NSS), and WSL2 — emitting the exact one-line remediation for whatever's missing (clean-Ubuntu certutil hint, WSL2 Windows-store import).
  • CLI trust install|uninstall|status replaces the stub. install/uninstall need sudo (mkcert writes system/NSS stores); status is read-only. Per locked decision feat(config): C3a — healthcheck/dependsOn/hooks schema structs (spec 10/11) #3: logic built + fake-runner tested, sudo flagged, Status is the self-verify probe (also feeds the doctor matrix in X6).

Tests

Fake runner + temp CAROOT: available detection, status across missing-mkcert / CA-not-installed / fully-ready / missing-certutil, install+uninstall call-through, missing-mkcert error, error propagation. CLI: registration + read-only status.

Gate

make ci green (race).

🤖 Generated with Claude Code

internal/trust shells out to mkcert (NOT smallstep/truststore) to install/remove
the local root CA and diagnose readiness, behind an injectable Runner so it is
fully unit-testable without mkcert present:

- Available / CARoot / Install (`mkcert -install`) / Uninstall (`mkcert
  -uninstall`) / Status. Status probes mkcert-on-PATH, the CAROOT rootCA.pem,
  certutil (Firefox/NSS), and WSL2, emitting the exact one-line remediation for
  whatever is missing (clean-Ubuntu certutil hint, WSL2 Windows-store import).
- CLI `trust install|uninstall|status` replaces the stub. install/uninstall need
  sudo (mkcert writes system/NSS stores); status is read-only. Per locked
  decision #3: logic built + fake-runner tested, sudo flagged, Status is the
  self-verify probe (also feeds the doctor matrix in X6).

Unit tests (fake runner + temp CAROOT): available detection, status across
missing-mkcert / CA-not-installed / fully-ready / missing-certutil, install +
uninstall call-through, missing-mkcert error, install error propagation. CLI:
registration + read-only status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavobertoi
gustavobertoi merged commit ba3cb54 into main Jun 29, 2026
2 checks passed
@gustavobertoi
gustavobertoi deleted the nightly/N2 branch June 29, 2026 14:53
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.

1 participant