Skip to content

feat: PR delivery, plan mode, sticky PR comments, gate annotation, self-tests#2

Merged
asgeirf merged 1 commit into
mainfrom
feat/parity-pr-plan-comment
Jul 16, 2026
Merged

feat: PR delivery, plan mode, sticky PR comments, gate annotation, self-tests#2
asgeirf merged 1 commit into
mainfrom
feat/parity-pr-plan-comment

Conversation

@asgeirf

@asgeirf asgeirf commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

CI strategy WS3a: brings kapi-action to parity with the GitLab kapi-components, on the contract already proven there.

New surface

Input What it does
create-pull-request Branch + PR delivery (report in description, best-effort labels, pull-request-url output) — the branch-protection-friendly path
plan kapi up --plan dry run: pending work, TM leverage, token estimate → outputs + job summary. Needs no keys
pr-comment One sticky comment on PR events (plan / convergence / gate result), updated in place on re-runs
token For gh PR/comment calls (defaults to github.token)

Plus: command: check now surfaces exit 3 as a distinct "gate unmet" annotation with a gate output (|| rc=$? so outputs publish under errexit — the GitLab lesson), and the convergence report always writes to GITHUB_STEP_SUMMARY. README documents the .kapi/cache caching recipe and the check/plan PR pairings.

Verification

The new keyless self-test workflow runs on this PR against the deliberately untranslated fixture (test/fixture, same one as the GitLab components):

  • up --plan produces non-zero pending/token outputs
  • check --ship fails with the gate contract (step failure + gate=fail, not a silent pass or an early death)
  • file-mode check passes; pseudo-translate exercises the no-changes path
  • daily schedule keeps it canarying

PR-creation and sticky-comment paths reuse the exact API patterns proven live on GitLab today; the comment path additionally gets exercised the first time a consumer (or our dogfood repo) enables it.

After merge

Tag v1.3.0 — release.yml (new) moves the floating v1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NBoxTTZe69Nyssa6QSMxFK

…lf-tests

Parity with the GitLab kapi-components (and beyond kapi-action's old
commit-only surface):

- create-pull-request: deliver as branch + PR (convergence report in the
  description; labels best-effort so a missing label never fails a run).
- plan: dry-run `kapi up --plan` — pending work, TM leverage, token
  estimate as outputs + job summary; needs no provider keys.
- pr-comment: one sticky comment on pull-request events (plan, outcome,
  or gate result) that re-runs update in place.
- command: check gets a distinct exit-3 "gate unmet" annotation and a
  `gate` output — a failing quality gate reads as "not on-spec yet",
  never as a generic crash; `|| rc=$?` keeps outputs publishing under
  errexit.
- Convergence report always lands in GITHUB_STEP_SUMMARY.
- Marketplace branding; release.yml moves the floating major tag.
- Keyless self-test workflow (plan outputs, exit-3 contract, file-mode
  pass, no-changes path) against the untranslated fixture in
  test/fixture, plus a daily schedule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBoxTTZe69Nyssa6QSMxFK
@asgeirf
asgeirf merged commit 2679250 into main Jul 16, 2026
4 checks passed
@asgeirf
asgeirf deleted the feat/parity-pr-plan-comment branch July 16, 2026 14:39
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