Repository navigation
Conversation
This branch has not been deployed
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.
Summary
Adds
proofline doctor(--json,--offline,--remote <NAME>) to diagnose the local environment, TLS configuration, credentials, server reachability, Git repository/remote resolution, Git hooks, and coding-agent MCP registrations in a single structured pass.Who this helps
--ca-cert/PROOFLINE_CA_CERT), headless Linux environments (D-Bus user session vsPROOFLINE_TOKEN), or custom Git remotes (--remote).--json) pre-check with actionable remediation steps and zero secret exposure before running reviews, hooks, or MCP tools.What was decided
Command::Doctoris handled inlib::runbeforetls::trustandOrigin::parseso an unreadable--ca-certor invalid--base-urlis reported as a structuredfailcheck (including valid--jsonoutput) rather than aborting before diagnostics run.PROOFLINE_TOKENand OS keychain secrets stay wrapped insecrecy::SecretStringand are never serialized into text or JSON output; only credential source, organization UUID, scopes, and expiration status are reported.agent::inspect_clientswith a 1 MiB file-size guard andhooks::inspect_hooks) and reusedOrigin::parse,tls::read,credentials::load,git::config,git::full_name, andtext::one_linesanitization.0when all checks pass/warn/skip (ok: true), and exits1(Verdict::Blocked) when any check fails (ok: false).Checks included
origin— Validates--base-url/PROOFLINE_BASE_URLviaOrigin::parse.tls_ca_cert— Validates bundled roots or--ca-cert/PROOFLINE_CA_CERTPEM bundle.credentials— InspectsPROOFLINE_TOKEN(+--org/PROOFLINE_ORGANIZATION_ID) or OS keychain credential & expiration.server_auth— Probes/api/v1/...with the loaded token (skipped under--offlineor failed prerequisites).git_repository— Checksgitavailability and whether--remoteresolves to a GitHubowner/name.git_hooks— Checkspre-commitandpre-pushfor Proofline hook markers.mcp_clients— InspectsClaude Code,Codex,Cursor,Gemini CLI, andKirouser configs for a Proofline MCP entry.How it was tested
cargo fmt --check— passed.cargo clippy --locked --all-targets -- -D warnings— passed with 0 warnings.cargo test --locked doctor— passed:src/doctor.rs(origin,tls_ca_cert,credentialssecret redaction & org warning,mcp_clientsdetection,git_hooksdetection,DoctorReportcounts/okinvariant).tests/doctor.rs(--offline --jsonend-to-end binary execution with secret redaction assertion, and nonzero exit on invalid--base-url+ missing--ca-cert).cargo test --locked --lib— 73/73 unit tests passed.