feat(trust): N2 — mkcert local-CA wrapper + trust CLI (spec 05) - #21
Merged
Conversation
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>
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.
Chunk N2 (M5)
internal/trustshells 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 CAROOTrootCA.pem,certutil(Firefox/NSS), and WSL2 — emitting the exact one-line remediation for whatever's missing (clean-Ubuntucertutilhint, WSL2 Windows-store import).trust install|uninstall|statusreplaces 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,Statusis 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 cigreen (race).🤖 Generated with Claude Code