Skip to content

refactor(config): decouple ResolvedBox.InitConfig → Generator (P3-unit-3) - #27

Merged
atrawog merged 2 commits into
mainfrom
feat/sdk-resolvedbox2
Jul 8, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/sdk-resolvedbox2

Conversation

@atrawog

@atrawog atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

P3-unit-3 — a charly-only, behavior-neutral decouple that unblocks the ResolvedBox → sdk/buildkit move. Removes the transient InitConfig *InitConfig field (json:"-") from ResolvedBox and carries the one project init: vocabulary on the Generator:

  • init-system resolution (ActiveInit/ResolveInitSystem) runs over Candies + candyOrder — a build/deploy-time concern, not per-image config;
  • NewGenerator sets g.InitConfig from the defaultInitCfg it already loads (line 156);
  • 4 consult sites now read g.InitConfig (generate.go ×3) / t.Generator.InitConfig (deploy_target_pod.go).

With the field gone, ResolvedBox's remaining field types are all sdk-resolvable (DistroConfig/BuilderConfig in buildkit; MergeConfig/DistroDef/ResolvedInit in spec) — the next unit moves it.

Change class

charly Go (single-repo, no sdk producer).

How R10-tested

  • Behavior-neutral (same InitConfig, sourced from g not img); golden go test ./... green (41.7s).
  • Cross-cutting (build init-label path + pod-overlay init path) → two beds concurrently:
    • check-builder-local → PASS (4/4): deploy-add/check-live/update/cleanup.
    • check-local → PASS (4/4).
    • Fresh 2026.189.1229 binary, source frozen, golangci-lint 0, zero warnings.

Attribution tier

fully tested and validated

Compliance

  • R5: git grep '\.InitConfig' -- charly/ returns only g.InitConfig/t.Generator.InitConfig/init_config.go defs; no img.InitConfig/Box.InitConfig/ResolvedBox.InitConfig remain. R3: one InitConfig on the Generator (no duplication). Boundary: prerequisite decouple for the ResolvedBox kernel→sdk move. CHANGELOG 2026.189.1230.md.

Assisted-by: Claude (fully tested and validated)

atrawog added 2 commits July 8, 2026 14:43
…t-3)

Removes the transient InitConfig *InitConfig field from ResolvedBox (a json:"-"
resolution helper) and carries the one project init: vocabulary on the Generator.
Init-system resolution (ActiveInit/ResolveInitSystem) runs over Candies + candyOrder
— a build/deploy-time concern, not per-image config. NewGenerator sets it from the
defaultInitCfg it already loads; the four consult sites read g.InitConfig
(generate.go) / t.Generator.InitConfig (deploy_target_pod.go).

Unblocks the ResolvedBox → sdk/buildkit move: ResolvedBox's remaining field types
are now all sdk-resolvable. Behavior-neutral; golden tests + check-builder-local +
check-local beds green (fresh rebuild).

Assisted-by: Claude (fully tested and validated)
…x.InitConfig → Generator decouple)

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅

Change class: charly Go (single-repo, no sdk producer)

Fresh, independent re-validation (new context, not the author). Re-derived every claim from the diff + my own re-run — trusted none of the author's evidence.

# Rule Verdict
0 Security & anti-tampering (T1–T4) PASS — clean charly-only field relocation; no secrets/exfiltration/network/weakened-gate/supply-chain; no injection in body/CHANGELOG; scope matches description exactly (4 files)
1 Description complete (template + pasted evidence) PASS
2 Change-class gate matches evidence (R7/R10; no dry-run/rebuild-alone fraud) PASS — both matching beds re-run LIVE by me on a fresh binary
3 Attribution tier justified by proof PASS — fully tested and validated; changed build-init-label + pod-overlay-init paths executed against fresh rebuild
4 R0 skills honored PASS — /charly-internals:go; no CUE change (InitConfig is package-main runtime, not a wire type)
5 R1 RCA / ZERO warnings / no flake framing PASS — zero warnings across go gates + both beds
6 R2 no pre-existing/out-of-scope split PASS
7 R3 no duplication PASS — one InitConfig on the Generator
8 R4 no ad-hoc workaround PASS
9 R5 hard cutover + grep self-test PASS — img.InitConfig/t.Box.InitConfig/resolved.InitConfig/field-decl all EMPTY; no transitional/dual-mode
10 R6/R8/R9 artifact + binary integrity PASS — init-label emit path verified via check-builder-local build+check-live; binary rebuilt 2026.189.1243, no new runtime deps
11 R10 disposable-only, fresh-rebuild, coverage PASS — both beds disposable: true, fresh update step, golden init/generator tests + beds prove behavior-neutrality
12 RDD / ADE / SDD PASS — no schema-shaped change (task cue:gen no-op preserved); composition proven on beds
13 Concurrency mandate + anti-cheat PASS — both beds run CONCURRENTLY, both PASS; no idle/serial/flake dodge
14 Hard cutover — one atomic commit PASS — ONE commit (adf9319); no Phase-2/TODO
15 Kernel/plugin boundary law PASS — mechanism-internal relocation; removes a package-main-only helper field from ResolvedBox (destined for sdk/buildkit), no per-kind leak
16 Disposable-only autonomy PASS — both beds disposable: true
17 Clean architecture + Go gates PASS — gofmt -l empty, golangci-lint 0 issues, go vet clean, go test ./... green (41.5s)
18 CHANGELOG present PASS

Behavior-neutrality (crux): NewGenerator sets g.InitConfig = defaultInitCfg from LoadDefaultBuildConfig(dir), which is a literal alias for LoadBuildConfigForBox(dir) → uf.ProjectInitConfig() — the identical function on the identical dir that ResolveBox used to set resolved.InitConfig. dir threads identically through ResolveAllBox(tag, dir, opts) → ResolveBox. Every PodDeployTarget in the deploy/overlay path gets its Generator from NewGenerator (build_overlay.go:99), so t.Generator.InitConfig is populated identically to the removed t.Box.InitConfig. ActiveInit/ResolveInitSystem take (layers, candyOrder, …) as arguments — the receiver is purely the init vocabulary, so the resolution is byte-identical modulo the receiver of the same *InitConfig.

R10 evidence (my fresh runs, calver 2026.189.1250, binary 2026.189.1243):

  • check-builder-local → PASS, 4/4 steps ok (deploy-add 24s, check-live 5s, update 31s, cleanup 10s) — build init-label path.
  • check-local → PASS, 4/4 steps ok (deploy-add 16s, check-live 9s, update 25s, cleanup 7s) — pod-overlay init path.

Decision: APPROVED. All 18 items PASS. Finalizing the merge-time CalVer, merging --rebase, and tagging.

Assisted-by: Claude (fully tested and validated)

@atrawog
atrawog merged commit 862c9a1 into main Jul 8, 2026
@atrawog
atrawog deleted the feat/sdk-resolvedbox2 branch July 8, 2026 12:56
atrawog added a commit that referenced this pull request Jul 8, 2026
…ename

The P3-unit-3 finalization (#27) renamed the placeholder changelog to
CHANGELOG/2026.189.1254.md but left its H1 reading the placeholder # 2026.189.1230
(the header edit was not re-staged). Restamps the H1 to # 2026.189.1254 so it matches
the filename + the v2026.189.1254 tag. Docs-only.

Assisted-by: Claude (documentation reviewed)
atrawog added a commit that referenced this pull request Jul 11, 2026
…ext" = DELEGATE (#61)

Close the last stop-excuse loophole in the autonomous-loop doctrine and make
delegation-for-fresh-context crystal clear across the root rulebook and the two
reminder hooks. Paired with opencharly/marketplace#27 (cutover-policy / strict-policy
/ agents skill edits), consumed here via the plugins submodule bump 879422b -> e29bc34.

- CLAUDE.md "Hard Cutover by Default": the forbidden-excuse "Size / budget" bullet
  becomes "Size / budget / context" and absorbs the context framings (out-of/exhausted
  context, "would leave a broken, unbuildable tree" — called out as FABRICATED,
  "needs a fresh session") — low context is NEVER a stop: compact-and-continue OR DELEGATE.
- CLAUDE.md "Agents, Workflows & Teams": new bullet — delegation is how you get FRESH
  CONTEXT without stopping; spawning a teammate/sub-agent IS "a fresh session" on demand.
- .claude/hooks/runtime-verification-reminder.sh (UserPromptSubmit): new terse AUTONOMY
  trigger (pointer-shaped, not a rule-body copy).
- .claude/hooks/end-of-turn-challenge.sh (Stop): new bullet catching the stop-for-context impulse.
- plugins submodule pointer 879422b -> e29bc34 (the paired all-documentation #27 skill edits).

Change class: hook/workflow scripts (docs ride along). Gate: parse + execute both hooks
live (bash -n PASS; exit 0, empty stderr; each emits its new reminder text). No charly bed
exists for a reminder hook.

Assisted-by: Claude (analysed on a live system)
atrawog added a commit that referenced this pull request Jul 15, 2026
…name audit (no divergence)

Thematic docs batch #27 (Documentation-only; documentation reviewed tier).

Fix 1 — status-context name audit: NO divergence found. Verified live branch-protection on charly/sdk/plugins all require charly/pr-validator; a claim-keyed grep found the docs already name charly/pr-validator in every surface. A prior cutover (2026.195.1811) swept the rename. Fix 1 edits no files; recorded for the RCA trail.

Fix 2 — CHANGELOG H1 placeholder/heading sweep (5 files fixed: 4 super + 1 plugins):
- 2026.193.0607.md H1 0142→0607
- 2026.195.1415.md H1 1400→1415
- 2026.195.1432.md H1 0900→1432
- 2026.195.2253.md H1 9999→2253
- plugins/CHANGELOG/2026.195.2150.md H1 9999→2150 (leg 1, plugins PR #65, merged d1b5b2e)

B2 two-leg landing: leg 1 (plugins #65) merged to plugins main as d1b5b2e; leg 2 (this PR) bumps the plugins gitlink 93b3010→d1b5b2e and lands the 4 super H1 fixes + this narrative entry. The plugins H1 fix LANDED as leg 1 — not deferred.

R5 grep self-test: claude-validation outside CHANGELOG = 0 (super+plugins+sdk). Merge-time CalVer 2026.196.0606 finalized by the fresh pr-validator (filename + H1 rewrite of the placeholder 2026.196.9999.md).

Assisted-by: Claude (documentation reviewed)
atrawog added a commit that referenced this pull request Aug 7, 2026
The docs gitlink moved to the merged follow-up commit (b5a4820); the
DOCS_REF clone-cache key and the pinned-commit check's stdout matcher are
updated to match.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
atrawog added a commit that referenced this pull request Aug 7, 2026
…nsus

Remove every hardcoded catalog count from the prose and docs site, and autogenerate the census in the docs plugin:

- Census autogenerated — candy/plugin-docs/gen_plugins.go generateProviderIndex now emits a computed census line at the top of reference/providers.md ("N words across M plugin candies, K compiled into the binary") plus per-class counts in each section header (singular classes read "1 word"), derived from the tree at generation time (never transcribed). A new unit test (gen_plugins_test.go) re-derives the three numbers from the same plugins slice and fails the moment they diverge.
- Counts removed — the README "How many" table becomes "Class | Examples" and the census sentences are rephrased to point at the generated provider index; ~30 candy configs skill: descriptions drop their per-image counts; the docs vocabulary page mirrors the README edits.
- Pre-existing drift surfaced by the drift gate (blocking for R10) — the committed CLAUDE.md/AGENTS.md dispatcher and pre-commit-gate.sh did not match charly marketplace generate output (the fleet cutover hand-edited the dispatcher without re-sorting; the hook entity had drifted to a "candy"-path heuristic that misses the standalone tools/* modules). The hook entity is fixed to restore the correct workspace_member_roots go.work-membership logic, and the three generated files are regenerated.
- Follow-up fixes — the vocabulary page "one entity keyword" statement is reconciled with the kind row (scoped to the candy entity); the DOCS_REF pin is re-pointed to the merged docs commit.

The submodule legs (box/fedora #14, plugins #146, docs #26, docs #27) carry the README/skill/docs projections; this super leg carries the sources + the gitlink re-points to the merged producer commits.

Assisted-by: Claude Code deepseek-v4-flash:0731-cloud (analysed on a live system)
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)
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