Skip to content

fix(check): print the GPU-prereq skip reason once, not 3× (P1.7-cosmetic) - #20

Merged
atrawog merged 2 commits into
mainfrom
feat/dedup-gpu-skip-print
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/dedup-gpu-skip-print

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

A requires_shared/requires_exclusive: [nvidia-gpu] bed skipped on a GPU-less host printed its skip reason 3× — the executor (check_bed_run.go:334), the command (check_runner_cmd.go:129), AND main.go's CheckSkippedError handler (via the error Msg). Removes the two redundant inner prints; the reason now lives solely on the returned CheckSkippedError.Msg and prints once at the top level (idiomatic return-error-print-once). Skip semantics unchanged (exit 3 / CheckSkippedExitCode; per-bed summary still written).

Change class

charly Go — a charly check run output/skip path change.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: the bed whose kind exercises the changed path — a [nvidia-gpu] bed on this GPU-less host hits the skip path (fail-fast, zero build) — run on the FRESH binary; assert the reason prints once + exit 3.
  • Disposable target: check-cachyos-jupyter-ml-pod (a disposable: true bed; it SKIPS on the GPU-less host, so nothing deploys).
  • Fresh rebuild (R9): task build:charly → charly version 2026.189.0648 before the run.
  • Did the CHANGED code path execute live? Yes — the skip-print path executed on the fresh binary.
# RDD: verified the bug first (before-fix binary) → 3 skip-reason lines.
# After fix, fresh binary (2026.189.0648):
$ charly -C box/cachyos check run check-cachyos-jupyter-ml-pod ; echo exit=$?
charly check run check-cachyos-jupyter-ml-pod: skipped (no GPU matching vendor 0x10de on this host (bed requires resource "nvidia-gpu"))
exit=3
# skip-reason line count = 1 (was 3)
$ gofmt -l . (touched files) empty ; go vet ./... clean ; go build ./... exit 0

Attribution tier

analysed on a live system — the changed skip verb ran live on the fresh binary and its output is pasted; a skipped bed fail-fasts (nothing deploys to steady state), so the skip path IS the complete affected behavior and it executed + verified (1× print, exit 3).

CLAUDE.md rule compliance

  • R0 skills: /charly-internals:check (the charly check run skip/exit-code surface) + /charly-internals:go-quality.
  • R1 RCA: root-caused to 3 print sites (executor + command + top-level error handler) all emitting the same reason; verified the 3× empirically BEFORE fixing (RDD).
  • R3: collapses 3 redundant prints to one canonical top-level print (the error carries the reason). R5: the removed prints leave no dangling reference; the reason string is unchanged.
  • R7/R10: exercised end-to-end on a disposable bed's skip path on the fresh binary (pasted); exit 3 preserved. R4: no workaround. R6: clean git status before branching.
  • R8/R9: R9 rebuilt + version pasted; R8 N/A (no Containerfile/label change). Boundary-law: N/A (host CLI output path, not a kind). Hard cutover: one atomic commit.
  • CHANGELOG: CHANGELOG/2026.189.0650.md staged.

Assisted-by: Claude (analysed on a live system)

…tic)

A [nvidia-gpu] bed skipped on a GPU-less host printed its skip reason 3× — the
executor (check_bed_run.go), the command (check_runner_cmd.go), and main.go's
CheckSkippedError handler all printed it. Removes the two inner prints; the reason
lives on the returned CheckSkippedError.Msg and prints ONCE at the top level.
Skip semantics unchanged (exit 3, per-bed summary still written). Verified live on
the fresh binary: check-cachyos-jupyter-ml-pod → exit 3, reason printed once.

Assisted-by: Claude (analysed on a live system)
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly/sdk Go — a charly check run skip-path output change.

Independent re-validation (fresh context; the author's claims were re-derived, not trusted):

  • [PASS] 0. Security & anti-tampering (T1–T4): diff is two fmt.Fprintf removals (check_bed_run.go, check_runner_cmd.go) + a new CHANGELOG file. No security machinery touched (pre-push/pre-commit gate, branch protection, validator spec, CLAUDE.md all untouched); no secrets/exfiltration/new deps/@github ref changes; no embedded instructions to the validator; description ↔ code match exactly.
  • [PASS] 1. Description complete: template fully filled — summary accounts for every file, change class, R10 gate + disposable target + fresh-rebuild + "changed path executed live: yes" + pasted output, tier justified, every rule answered HOW.
  • [PASS] 2. Change-class gate matches evidence (R7/R10): re-ran the exact gate myself — the [nvidia-gpu] bed check-cachyos-jupyter-ml-pod on this GPU-less host hits the fail-fast skip (zero build), on the fresh binary. No dry-run/rebuild-alone fraud.
  • [PASS] 3. Attribution tier justified: analysed on a live system — the changed skip verb ran live + pasted; a skipped bed fail-fasts (nothing deploys to steady state), so the skip path is the complete affected behavior. Not inflated to fully tested and validated, not docs.
  • [PASS] 4. R0 skills honored: /charly-check:check (the skip/exit-code convention — exit 3 preserved) + /charly-internals:go. (Body's /charly-internals:check is a harmless citation typo; the skill content is honored.)
  • [PASS] 5. R1 RCA / ZERO warnings: root-caused to 3 print sites; my re-run emitted a single clean line, zero warnings; gofmt/vet/build/test all clean.
  • [PASS] 6. R2 no out-of-scope split: complete fix in one tree; the correct immediate-next cosmetic cutover of P1.7.
  • [PASS] 7. R3 no duplication: the change removes duplication — 3 redundant prints of one reason collapse to a single canonical top-level print.
  • [PASS] 8. R4 no ad-hoc workaround: clean statement removal, no sleep/retry/magic-number.
  • [PASS] 9. R5 hard cutover + grep self-test: no identifier removed; grep -rn 'SKIPPED' charly/*.go hits are comments/test names only — no stale uppercase print-format survives; no transitional/dual-mode path.
  • [PASS] 10. R6/R8/R9: clean tree + no stash before branch (R6); R8 N/A (no Containerfile/label change); R9 rebuilt via task build:charly, charly version 2026.189.0654 matches source, no new runtime dep.
  • [PASS] 11. R10 disposable-only, fresh-rebuild, coverage: disposable bed, fresh task build:charly, zero warnings; the pasted live grep-count=1 + exit 3 IS the coverage that fails without the fix (was 3× before).
  • [PASS] 12. RDD/ADE/SDD: RDD — 3× verified empirically before the fix, 1× after; ADE/SDD N/A (no candy/schema change).
  • [PASS] 13. Concurrency + anti-cheat: no shared-state path (a print removal in a fail-fast skip); no idle/serial/flake framing anywhere.
  • [PASS] 14. Hard cutover: one atomic commit (86a773f); no Phase-2/TODO/deferred work.
  • [PASS] 15. Kernel/plugin boundary law: generic CLI output/exit-code plumbing (main.go CheckSkippedError handler + command orchestration) — no concrete-kind field-read, kind-word switch, or per-kind map introduced.
  • [PASS] 16. Disposable-only autonomy: the bed is disposable: true and it skipped — nothing deployed or destroyed.
  • [PASS] 17. Clean architecture + Go gates: gofmt -l . empty · golangci-lint run ./... (v2.12.2) = 0 issues · go vet ./... clean · go test ./... green.
  • [PASS] 18. CHANGELOG present: CHANGELOG/2026.189.0650.md staged (placeholder; validator finalizes the merge-time CalVer).

My independent re-run (fresh binary 2026.189.0654):

$ CHARLY_REPO_OVERRIDE=…=… charly -C box/cachyos check run check-cachyos-jupyter-ml-pod ; echo exit=$?
charly check run check-cachyos-jupyter-ml-pod: skipped (no GPU matching vendor 0x10de on this host (bed requires resource "nvidia-gpu"))
exit=3
# skip-reason line count = 1 (case-insensitive on the reason text, and on the canonical form) — was 3× before the fix.

Decision: Correctness verified — main.go:811-813 is the SOLE surviving print of the reason (FormatCLIError(err) once, then os.Exit(CheckSkippedExitCode)), and it is always reached because CheckRunCmd.Run (the ONLY caller of runCheckBed) returns the CheckSkippedError up to main. Neither 0× (silent) nor 3× (unfixed) — exactly 1× + exit 3. Merging.

Assisted-by: Claude (analysed on a live system)

…p dedupe)

Validator-finalized the CHANGELOG placeholder (2026.189.0650) to the merge-time
CalVer. Mechanical rename + header restamp only; the runtime change rides in the
code commit (analysed on a live system). Docs-only.

Assisted-by: Claude (documentation reviewed)

Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE
@atrawog
atrawog merged commit a1a8652 into main Jul 8, 2026
@atrawog
atrawog deleted the feat/dedup-gpu-skip-print branch July 8, 2026 07:07
atrawog added a commit that referenced this pull request Jul 9, 2026
…e sweep (76413b5)

Integrates plugins CHANGELOG/2026.190.2206.md (PR #20, squash 76413b5): the five doc
surfaces that asserted /verify-beds runs every bed, and the /verify-status bullet that
described it running check-pod / check-k3s-vm / check-local / check-android-emulator-pod to
completion.

Both workflows now state -- and this repo's code now implements -- that a sub-agent runs
only what it can own. /verify-beds partitions SHORT (run) / LONG (deferred to the persistent
session) / HOST-LOCAL (refused). /verify-status runs zero beds; it plans.

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 9, 2026
…ds, refuse host-local

An R10 roster over 62 disposable beds returned 26 real passes and 26 beds with no
verdict, orphaned 3 libvirt domains + 4 pod containers, recorded a bed that had
actually passed as a failure, and ran a host: local deploy (charly-cachyos) that
installed packages as root on the operator's workstation for 697s.

Root cause: verify-beds.js drove EVERY bed through an agent() sub-agent. A sub-agent
returns synchronously, its background children die with it, and its one foreground
charly check run is Bash-capped at 600s, so it cannot own a bed that outlives its
turn (/charly-internals:agents: "NEVER the sub-agent /verify-beds workflow for >600s
beds"). Long beds were force-terminated before writing summary.yml; their
virtqemud/conmon-owned resources survived the killed orchestrator.

This was a divergence INSIDE CLAUDE.md: its concurrency Key Rule already mandated
"persistent-session run_in_background ownership of every >600s bed" while R10's
change-class matrix said to fan the whole roster through /verify-beds. Reconciled.

The fix -- the workflow runs only what it can own; nothing is silently dropped:
  SHORT       run here in parallel, exactly as before.
  LONG        vm/android substrate, or newest summary.yml total_seconds >= 600 --
              deferred, returned in deferredLongBeds[] for the persistent session to
              own as run_in_background tasks.
  HOST-LOCAL  a local: deploy (or one with a nested local: member) whose host: is
              local -- refused: it applies candies to the operator workstation.
The result carries deferredLongBeds, refusedHostLocalBeds, and gateComplete so a
partial roster can no longer read as a green R10 gate.

verify-status.js carried the identical defect and is now a PLANNER: it runs no beds
and emits, per substrate, the exact command, the summary.yml path, and the
status-shows-* assertion for the persistent session to own. Dead BED_SCHEMA/runBed/
parallel() runner deleted (R5). The bed-safety classifier lives in ONE place,
verify-beds.js (R3).

The R1 claim-keyed sweep reconciles every surface asserting the repudiated premise:
CLAUDE.md (R10 matrix + Agents bullet), both workflow meta.descriptions, README.md
(three sites), and -- via plugins PR #20 (gitlink 1043577 -> 76413b5) -- five plugins
doc surfaces. All now state: SHORT via /verify-beds; LONG owned by the persistent
session; host-local refused; gateComplete:false is a partial roster.

Squash of four commits on feat/verify-beds-ownership; merge-time CalVer stamped by
the pr-validator.

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Aug 20, 2026
# fix(ci): repair the org-wide auto-merge workflow

The `auto-merge` workflow (byte-identical across all opencharly repos) had
**never succeeded once**. Eleven defects in total — four fatal in the original
workflow, then five exposed by the live runs of the first fix, then two more
exposed by the canary's live runs of the second.

## The four original defects

1. **No `actions/checkout`** — the `workflow_run` trigger checks out nothing, but
   `gh pr merge` runs `git status` against a local repo → every merge died with
   `failed to run git: fatal: not a git repository` (observed live, run 3235221669).
2. **Tag from a future SHA** — `git log -1 "$MS"` on the merge commit SHA the clone
   does not have → empty version → tag POST 422.
3. **No wait for pending checks** — an `in_progress` check aborted the run instead
   of waiting.
4. **No CHANGELOG placeholder finalization** — the changelog filename/H1 and the
   release tag could disagree.

## The five live-exposed defects

The first fix was live-proven on the canary repo (2026.232.1246) — every gate
passed — but the live runs then exposed five more defects that the stub-gh
harness could not see:

5. **The revalidation race.** The CHANGELOG-finalization push creates a NEW head,
   and the revalidation ran immediately after the push — before the validator had
   created its check-run on the new head. `wait_all_settled()` saw ZERO check-runs
   (indistinguishable from "all completed") and `verify_all_green()` saw empty →
   green, so the merge proceeded and failed branch protection with `GraphQL: Pull
   Request is not mergeable (mergePullRequest)`. (Observed live in run 32371493249:
   the log shows `revalidation: all status checks have completed` 0.7s after the
   push, then the merge failure.)
6. **The `action_required` validator run.** A finalization push made with
   `GITHUB_TOKEN` does not dispatch jobs — the validator run it triggers ends
   `action_required` with 0 jobs and no check-run. The auto-merge could not re-run
   it (no `actions: write` permission), so the new head could never get a green
   validator check-run.
7. **The re-finalization loop.** Re-running the auto-merge re-finalized the
   changelog to a NEW stamp each time (2026.232.1256 → 2026.232.1304), creating a
   new head each time, and the cycle repeated.
8. **The `merge_commit_sha` tag field.** The already-closed and post-merge paths
   read the merge commit from `.merge_commit.sha`, but GitHub's REST
   `GET /pulls/{n}` exposes it as the FLAT `merge_commit_sha` string (`merge_commit`
   is `null` on the REST object). Every merge therefore left the release tag
   unminted: the post-merge poll never observed a merge commit and died in its
   10-minute timeout, and the already-closed path silently skipped the tag.
   (Observed live on the canary: PR #20 merged at 15:25:35Z in run 32385963824,
   but the tag `v2026.232.1524` was never created — the run's `updated_at` froze
   at 15:24:43 in its poll. The stub-gh harness had mocked the `/pulls/{id}`
   object with a nested `merge_commit` field, so this could not be seen until a
   live run.)
9. **The A1 body↔diff mismatch.** After the finalize renames the PR's CHANGELOG
   placeholder to the merge-time CalVer, the re-run validator re-reviews the
   FINALIZED head against the PR body. A body that still names the author's
   placeholder (e.g. `CHANGELOG/2026.232.0004.md`) reads as a description↔code
   mismatch (A1), the re-validation concludes `failure`, and the run fails
   loudly — the mandatory post-finalize re-validation can never pass on a PR
   whose body pins its placeholder. (Observed live: the first canary live-proof
   PR was BLOCKed on the finalized head — body named `0004.md`, diff carried
   `1553.md` — and stayed unmergeable until its body was reconciled.)

## The two canary defects (the second live-exposed set)

The state-based idempotency + body-reconciliation fix was then live-proven on the
canary, and its own live runs exposed two more defects — the two that motivate
THIS change:

10. **The marker-collision body-append (PR #26, run 32392375687).** The
    body-reconciliation append was guarded by a grep for the `## Auto-merge
    finalization` HEADING — but a PR body that describes the auto-merge workflow
    can legitimately name that heading in prose. The canary's body-append PR did
    exactly that (its step 3 names the note), so the guard's grep matched the
    author's prose and the append was silently SKIPPED — the re-run validator
    then blocked on the body↔diff mismatch exactly as in defect #9. The fix
    guards the append on a marker an author cannot write: the HTML comment
    `<!-- auto-merge-finalization-note: <stamp> -->`. (Proven by harness S17:
    the append executes even when the author's prose names the heading.)
11. **The release-tag mint never fires (PR #27, run 32397140298).** The
    tag-existence guard read
    `gh api "/repos/$REPO/git/refs/tags/$ver" -q '.ref'` — but `gh api` writes an
    HTTP 404's **response body to stdout**, and `-q '.ref'` is applied only to
    successful responses. For a tag that does NOT exist, the captured string is
    the non-empty `{"message":"Not Found",…}` body — the `-z` guard reads
    non-empty, the "already exists" branch fires, and the mint is **structurally
    unreachable**. (Observed live: PR #27 merged at `711a80ab` and logged `Tag
    v2026.232.1721 already exists` — yet `v2026.232.1721` was never created; it
    was backfilled add-only on the merged HEAD.) The fix checks existence against
    the **local git refs** (the checkout fetches `+refs/tags/*:refs/tags/*`) and
    treats the POST as the mint; a failed POST (a concurrent run's 422) reads as
    "already exists (concurrent mint)" and never fails the run. (Proven by
    harness S19/S20.)

## The fix

- `actions/checkout@v7` (`fetch-depth: 0`) so `gh pr merge` has a git repo.
- Tag version from the merge commit's committer date via the GitHub API, never a
  local `git log` on a SHA the clone lacks.
- `wait_all_settled()` polls check-runs + commit statuses until **every** check
  completes; `verify_all_green()` accepts only `success`/`skipped`/`neutral`
  check-run conclusions and rejects any **non-empty** commit-status array whose
  combined state is not `success` (including `error`) — **the auto-merge runs
  only once ALL status checks are green**. The combined commit-status state is
  `"pending"` by default when a commit has NO commit statuses (GitHub's
  documented empty-default); the validator posts a check-run, never a commit
  status, so a green head reads `state=pending, statuses=[]` and is accepted —
  only a non-empty statuses array that is not `success` is rejected.
- Rulebook merge-time CHANGELOG finalization (same-repo PRs, best-effort):
  `git mv` placeholder → merge stamp + H1 rewrite, push, re-validate the new head,
  then merge — so changelog filename/H1 and the release tag always agree. The
  rename is staged as `git add <new>` and committed without a pathspec so the
  deletion side of the `git mv` is not dropped.
- **`actions: write`** permission so the auto-merge can re-run the validator via
  the API.
- **`wait_for_validator()`** replaces the immediate revalidation after a
  finalization push: it waits for the validator run to appear on the new head,
  re-runs it via the API if it ended `action_required`/`startup_failure`, then
  waits for the validator check-run to appear before revalidating — so the merge
  never races ahead of the validator's check-run creation.
- **Idempotent finalization.** If the head's copy of the placeholder file already
  carries the `<!-- auto-merge-finalized: <stamp> -->` marker, the changelog is
  already at a merge stamp — the rename is skipped and that stamp is reused for
  the tag, so the changelog filename/H1 and the release tag still agree and the
  re-finalization loop is broken. The check is a DIRECT blob read (a file-name
  check + marker grep), not a branch-history walk.
- **PR-body reconciliation before the re-run (A1).** The finalize step appends an
  idempotent note to the PR body naming the actual (finalized) file, so the
  re-run validator's review of the finalized head stays body↔diff-consistent. The
  guard matches a unique HTML comment (`<!-- auto-merge-finalization-note:
  <stamp> -->`), not a heading an author's prose can name — so the append fires
  even on a PR that describes the workflow. The marker prevents re-appending
  across re-runs; a body-append failure is non-fatal — if the author's body
  pinned the placeholder, the re-run validator blocks and the run fails loudly,
  leaving the PR open.
- **A mint that can actually mint.** `ensure_tag` checks existence against the
  LOCAL git refs (`git rev-parse -q --verify refs/tags/$ver`) — the checkout
  carries `+refs/tags/*:refs/tags/*` — and the `gh api -X POST /repos/$REPO/git/refs`
  IS the mint. A failed POST (a concurrent run's 422 "Reference already exists")
  reports "already exists (concurrent mint)" and exits 0. Idempotent in both
  paths (already-closed + post-merge) so the two cannot drift.
- **`merge_commit_sha` flat-field read.** Both the already-closed and post-merge
  paths read the merge commit from the FLAT `merge_commit_sha` string — the real
  REST shape of `GET /pulls/{n}` (`merge_commit` is `null`) — so every merge
  mints its release tag.
- A `concurrency:` group keyed on the PR head branch serializes runs for the same
  PR (a new run queues, never cancels), so the CHANGELOG-finalization push
  re-triggering the validator cannot cause overlapping runs to rename the
  CHANGELOG repeatedly or merge a head another run is still re-validating.
- `timeout-minutes: 60` caps the job so a hung wait/merge cannot run forever.
- **No direct-squash fallback**: enabling GitHub auto-merge is the only merge path
  (it atomically re-checks branch protection); a failure fails the run loudly with
  the PR left open for investigation.
- **The merge path requires the repository setting `allow_auto_merge: true`**
  ("Allow auto-merge" in Settings → General → Pull Requests). `gh pr merge
  --auto` fails with `GraphQL: Auto merge is not allowed for this repository`
  when it is off. The setting is enabled per-repo; the workflow itself is
  unchanged.

## How validated

The workflow logic was proven against a stub `gh` + a real local git repo before
landing — the exact run block extracted from this workflow, with the stub `gh`
extended to cover every API call the run makes and the `/pulls/<id>` mock
corrected to the REAL REST shape (`merge_commit_sha` flat, `merge_commit` null) —
the shape live GitHub returned and that had blinded the first stub. Twenty
decision paths, 92 assertions, all passing:

```
PASS: S1 exit 0
PASS: S1 merge --auto called
PASS: S1 tag created
PASS: S1 all-green message
PASS: S2 exit 0
PASS: S2 waited (pending logged)
PASS: S2 merged after wait
PASS: S3 exit 1
PASS: S3 no merge
PASS: S3 failure reported
PASS: S3b exit 1
PASS: S3b no merge
PASS: S3b error state reported
PASS: S4 exit 0
PASS: S4 tag created
PASS: S4 already-closed message
PASS: S4b exit 0
PASS: S4b no tag POST
PASS: S4b already-exists message
PASS: S5 exit 0
PASS: S5 finalize message
PASS: S5 merged after finalize
PASS: S5 placeholder gone from head
PASS: S5 new file present
PASS: S5 H1 rewritten to stamp
PASS: S6 exit 0
PASS: S6 no finalize (M-status excluded)
PASS: S6 no rename commit
PASS: S6 merged
PASS: S6 modified file intact
PASS: S7 exit 0
PASS: S7 already-at-stamp message
PASS: S7 merged
PASS: S8 exit 1
PASS: S8 no direct-squash fallback
PASS: S8 only one merge attempt
PASS: S9 exit 0
PASS: S9 fork skip message
PASS: S9 merged
PASS: S10 exit 0
PASS: S10 empty-default pending accepted
PASS: S10 merged
PASS: S10b exit 1
PASS: S10b no merge
PASS: S10b pending state reported
PASS: S11 exit 0
PASS: S11 finalize message
PASS: S11 action_required reported
PASS: S11 validator re-run called
PASS: S11 merged after revalidation
PASS: S11 tag created
PASS: S12 exit 0
PASS: S12 skip finalization message
PASS: S12 no rename commit
PASS: S12 merged
PASS: S12 tag uses changelog stamp
PASS: S13 exit 0
PASS: S13 no re-run (normal dispatch)
PASS: S13 merged
PASS: S13 tag created
PASS: S14 exit 1
PASS: S14 no validator run reported
PASS: S14 no merge
PASS: S15 exit 0
PASS: S15 finalize message
PASS: S15 body reconciled before re-run
PASS: S15 revalidation green (A1 resolved by the body-append)
PASS: S15 merged
PASS: S15 tag created
PASS: S16 exit 1
PASS: S16 body-append failure reported
PASS: S16 re-validation blocked (A1)
PASS: S16 no merge
PASS: S17 exit 0
PASS: S17 finalize message
PASS: S17 body-append executed despite heading in author prose
PASS: S17 revalidation green (A1 resolved by the body-append)
PASS: S17 merged
PASS: S17 tag created
PASS: S18 exit 0
PASS: S18 skip finalization message
PASS: S18 no rename commit
PASS: S18 merged
PASS: S18 tag uses changelog stamp
PASS: S19 exit 0
PASS: S19 mint POST executed
PASS: S19 Tagged message
PASS: S19 no already-exists echo
PASS: S20 exit 0
PASS: S20 POST failure logged
PASS: S20 no mint recorded
PASS: S20 concurrent-mint message
==============================
TOTAL: 92 passed, 0 failed
```

Scenario map: S1 self-merge+tag · S2 pending-then-green wait · S3 failed check
abort · S3b commit-status `error` state abort · S4 already-closed idempotent
tag · S4b tag-already-exists reported, not re-created · S5 same-repo CHANGELOG
finalize (rename commit, old placeholder deleted, revalidate, merge, tag) · S6
`A`-status narrowing (a modified CHANGELOG file is not renamed) · S7 placeholder
already at the merge stamp (skips finalize) · S8 auto-merge enable failure (exit
1, no direct-squash fallback) · S9 fork PR (skips finalize, merges) · S10 no
commit statuses at all (empty-default `pending`, statuses=[] → accepted as green
→ merge) · S10b a real pending with non-empty statuses → still rejected · S11
finalization → validator run ends `action_required` → re-run via API →
check-run appears → revalidate → merge · S12 idempotent finalization (the head's
file already carries the marker → skip the rename, reuse the changelog stamp for
the tag) · S13 finalization → validator dispatches normally (no re-run) → merge ·
S14 finalization → no validator run appears → fail loudly, no merge · S15
finalize + author-body pins the placeholder → body-append lands → re-run
validator green → merge + tag (the A1 live-proof scenario) · S16 body-append
fails → fail loudly, no merge · S17 **the marker-collision live defect** (PR #26):
the author's prose names the workflow note's heading, yet the body-append still
fires (the HTML-comment marker guard) · S18 idempotency skip WITHOUT a finalize
commit — a head whose file carries the marker (the state-based check) · S19
**the tag-mint fix** (the PR #27 live case): tag ABSENT → mint POST fires →
`Tagged` · S20 POST fails (a concurrent run minted the tag first → 422) →
concurrent-mint message, exit 0.

## Change class

**ci/config** — a workflow file + its CHANGELOG entry. No code, no candies, no
beds. The R10 for a workflow change is the live run of the workflow itself, which
can only happen after this lands on `main`; the stub-gh proof above is the
pre-landing gate.

## Project-rulebook rule-compliance

- **R0** — N/A: no skill-owned surface; the workflow mechanics were validated
  against a stub `gh` (RDD), not a skill lookup.
- **R1** — every defect was RCA'd from its live run: the four original from run
  3235221669 (`not a git repository`); the empty-default `pending` defect from the
  fresh validator's live API observation (`GET /commits/<head>/status` →
  `{"state":"pending","statuses":[]}` on a green head); the revalidation race
  from run 32371493249 (the log shows `revalidation: all status checks have
  completed` 0.7s after the push, then `GraphQL: Pull Request is not mergeable`);
  the `action_required` state from the live validator run on a GITHUB_TOKEN-pushed
  head (0 jobs, 0 check-runs, instant completion); the re-finalization loop from
  the observed 2026.232.1256 → 2026.232.1304 re-finalization across re-runs; the
  `merge_commit_sha` REST shape from the canary's frozen poll; the A1 mismatch
  from the BLOCKed canary PR; the marker collision from PR #26's silent skip; and
  the tag-mint non-fire from run 32397140298's "Tag v2026.232.1721 already
  exists" log on a tag that was never created — no flake framing anywhere.
- **R2** — all eleven defects fixed in the same change; nothing deferred.
- **R3** — no duplication introduced; the wait/verify helpers are defined once,
  and the tag logic is a single `ensure_tag` helper shared by both paths.
- **R4** — the `wait_for_validator` polling is a legitimate check-wait (the
  GitHub API exposes no event/sync primitive for check-run creation), not a race
  workaround.
- **R5** — no legacy path survives; the old immediate-revalidation call is fully
  replaced by `wait_for_validator`, the heading-guard body-append is replaced by
  the marker-guard, and the old `gh api …git/refs/tags` existence guard is
  replaced by the local-ref check.
- **R6** — no force-push, no direct push to `main`; PR-only landing.
- **R7/R8/R9** — N/A: no runtime artifacts, no emitted Containerfiles, no binary.
- **R10** — the live run of the workflow itself is the gate, which can only
  execute after this lands on `main`; the stub-gh proof of all twenty decision
  paths is the pre-landing gate (documented above). The canary repo has already
  run the corrected workflow end-to-end live.
- **RDD** — the highest-risk unknown (the workflow's decision logic) was proven
  against a stub `gh` before landing, not deferred to the live run. The stub's
  blind spots (the revalidation race, the `action_required` state, the
  re-finalization loop, the flat `merge_commit_sha`, the marker collision, the
  tag-mint 404 body) were each caught by the canary's live runs and closed with a
  new scenario before this rollout.
- **ADE/SDD** — N/A: no candies, no CUE schema.

Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
atrawog added a commit that referenced this pull request Sep 5, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 5, 2026
…ate (R10 change-class switch) (#538)

* chore(vendor): re-vendor spec v0.2026247.2009 + plugin-check update_gate (the R10 change-class switch)

* ci: re-trigger validator

* chore(vendor): plugin-check pin → v2026.247.2306 (the #20 update_gate runner tag)

* chore(vendor): plugin-check pin → v0.2026247.2306 (the #20 module CalVer)

* fix(go): drop the committed TEMP-LOCAL-DEV absolute-path replace (plugin-check → /home/atrawog/...) — it breaks the CI go gate on ubuntu-latest; the module resolves from the proxy at the pinned require (go build clean)

* ci: re-trigger the go gate on the fixed head

* chore: go.work.sum — the plugin-check v0.2026247.2306 workspace checksum

* ci: re-trigger validator — body fixes A3 (tier), A1 (pasted go-gate output), A1 (spec claim reconciled to main pin); TEMP-LOCAL-DEV replace disclosed
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