Repository navigation
feat: self-sufficient, vendor-neutral CLI for k8s/Jenkins - #7
Merged
Merged
Conversation
Move CI git-prep + loop guard out of entrypoint.sh into the CLI so docpulse works correctly via sidecar/install (no Docker daemon), and emit findings as a portable --comment-out artifact (gh posting stays default, other vendors opt out). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 TDD tasks: ci.py self-prep (safe.directory, base fetch, loop guard), bot-identity resolver, --comment-out/--comment-via destination routing, bot-authored commit via inline git -c, slimmed entrypoint, k8s sidecar docs. Reconcile spec to inline-identity commit approach. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…match Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nt options Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e bot constants Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…est, doc clarity Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Makes the
docpulseCLI work correctly when invoked outside its Docker entrypoint (k8s sidecar /uv/pipx-installed) and vendor-neutral for findings output — so DocPulse runs on any CI/SCM without a Docker daemon or per-vendor comment-API lock-in. The GitHub Action's behavior is unchanged.src/docpulse/ci.py(new) — CI self-prep the entrypoint used to do, now in the CLI:ensure_safe_directory(trust the checkout under a container uid mismatch),resolve_base_ref(fetch the base on shallow checkouts),loop_guard(skip a re-triggered run on a bot-authored HEAD). All guarded againstTimeoutExpired/FileNotFoundError.cli.py—_bot_identityenv resolver;check/repairgain--comment-out PATHand--comment-via {gh,none}(defaultgh); both call the self-prep in order (safe.directory → push-only loop guard → base-ref fetch) before diffing.destinations/repo_markdown.py— writes the flag comment to a portable artifact for any CI to post;gh pr commentis gated on--comment-via gh+ live + a PR number; the doc-sync commit is bot-authored via inlinegit -c user.*(so the loop guard recognizes it). Push stays plaingit push origin HEAD— host-agnostic.entrypoint.sh— slimmed to a thin env→CLI wrapper (git-prep/loop-guard removed; the CLI owns them now).Vendor-neutrality is a producer/consumer split: DocPulse detects, fixes, and reports; posting to a specific PR/MR UI is the CI platform's job (GitHub stays the built-in default via
gh).Spec & plan:
docs/superpowers/specs/2026-06-14-k8s-vendor-neutral-cli-design.md,docs/superpowers/plans/2026-06-14-k8s-vendor-neutral-cli.md.Test Plan
uv run pytest -q→ 219 passeduv run ruff check src tests→ cleandocpulse check --help/repair --helpexpose--comment-outand--comment-via [gh|none]--comment-via bogusrejected with a clean Typer errordocker buildsucceeds with the slimmed entrypointdocpulse index+docpulse check --comment-via none --comment-out flag.md)🤖 Generated with Claude Code