Skip to content

fix(release): self-consistent prepare plan + v0.44.0-beta.2 dev-state repair (#1288) - #1316

Merged
SisyphusZheng merged 2 commits into
devfrom
kimi/v044-beta2-prepare-consistency
Sep 4, 2026
Merged

fix(release): self-consistent prepare plan + v0.44.0-beta.2 dev-state repair (#1288)#1316
SisyphusZheng merged 2 commits into
devfrom
kimi/v044-beta2-prepare-consistency

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Problem

deno task autoflow:release-prepare --to 0.44.0-beta.2 --approved-plan ADR-0151 produced bump commit 10744cc3, which passed the fast prepare gates but failed dev CI (run 33885147030) and the promotion PR #1315 (run 33885139920) identically. Beta.2 added derived-truth gates whose regeneration/consistency steps the prepare plan never performed:

Refs #1288. The Beta.2 rehearsal could not reach this far (evidence guard), so the gap surfaced on the real prepare — this PR closes it permanently.

Owner

Implementer role, dispatch packet "Beta.2 release-lane repair: self-consistent prepare plan + dev state repair" under .agents/v044-kimi-implementer.md (main-agent dispatch explicitly authorizing branch/PR creation).

Before

Prepare plan steps: bump → constants → anchors → ui-manifest → fmt → stage → commit → fast gates. No content-graph regeneration, no release-state planning update, no staging of either artifact. Dev CI red at 10744cc on the gates listed above; release-state.json planning anchors on the beta.1 window; VERSION_PLAN head pair on beta.1; zh roadmap CURRENT entry on beta.1; NEXT_PUBLIC_PRERELEASE = v0.44.0-beta.2.

After

Tooling (commit c2695e23):

  • createReleasePlan/createPreparePlan gain two steps after update current version anchors and inside the bump commit: update release-state planning anchors (new updatePrepareReleaseState/advancePrepareReleaseStateText in version-anchors.ts — advances activeTarget/nextPlannedTrain only; sourceVersion/publishedVersion/latestLandedTrain/maturity stay finalize-owned per the prepare-window semantics fix(release): make check-release-truth prerelease- and prepare-window-aware #1284 encoded in the checker) and regenerate content graph (deno task generate:content-graph). Both artifacts are staged in stage release bump.
  • buildVersionAnchorReplacements adds the VERSION_PLAN Repository package line and bare npm registry line (current + lag forms) rules — ordered after the Current npm registry line rules so the substring rule cannot eat them first — and prerelease-only rules advancing the Next planned public train / Next public prerelease doc anchors from NEXT_PUBLIC_PRERELEASE to the prerelease successor.
  • bumpProjectConstantsText advances NEXT_PUBLIC_PRERELEASE with the prerelease successor (stable cuts leave it human-owned, same rule as NEXT_EXECUTION_VERSION).
  • The roadmap version: '…' anchor now rewrites all occurrences (both CURRENT-stamped entries, en + zh; historical entries never use that form).
  • Regression tests: prepare/release plan-shape test asserting the regeneration + anchor steps land inside the bump commit with their staging, plus unit tests for advancePrepareReleaseStateText, the new anchor rules, and the constants advancement.

Repair (commit 1d904c1b, append-only follow-up to 10744cc — the bump commit is not rewritten, and prepare was NOT re-run since the source line is already 0.44.0-beta.2):

  • Regenerated _generated-content-graph.json; release-state.json planning anchors via the new tooling function; VERSION_PLAN/STATUS/ROADMAP/head anchors advanced; NEXT_PUBLIC_PRERELEASE = v0.44.0-beta.3.
  • Human release prose the gates deliberately reserve for a human: Beta.2 theme + copy for both roadmap CURRENT entries (productization + governance offload, ADR-0151) — the superseded-theme gate is designed to block until a human writes it — and the README/README.zh/VERSION_PLAN head-zone narrative.

release:state-machine:check views the repair commit as neutral: it touches no docs/release/autoflow3/** evidence, so the in-flight beta.2 line still replays the completed beta.1 line; the durable prepare record folded into 10744cc needs no amendment (verifyPrepareRecord checks kind/status/target/gates-step, all unchanged).

Why-not-second-owner

One owner per surface: the plan builder (tools/autoflow/release.ts), the anchor/state generator (tools/autoflow/version-anchors.ts), their existing test file, and in-place repair of the governed docs/artifacts the bump already owns. No new checker, package, or abstraction.

Evidence

Base 10744cc3 (dev HEAD), branch kimi/v044-beta2-prepare-consistency, commits c2695e23 + 1d904c1b.

RED first: new tests failed against the pre-fix implementation (TS2724 advancePrepareReleaseStateText missing; then assertion failures on plan shape and anchor rules).

  • deno test -A tools/autoflow/__tests__/ — 142 passed / 0 failed
  • deno task content-graph:check — byte-identical, exit 0
  • deno task release:truth:check / docs:check-version-anchors / www:check-truth / www:check-current-truth — exit 0
  • deno task docs:truth / release:state-machine:check / release:evidence:check / api-reference:check / content:examples-check / text-integrity:check / docs:check-current / docs:check-strategy / docs:check-claims / docs:check-public / docs:check-role-neutral — exit 0
  • deno task build — exit 0 (incl. www:check-artifact-truth + www:check-links, pagefind 150 pages)
  • deno task test — exit 0 (root suite + starter suite)
  • deno task pack:dry-run + deno task package-artifacts:check — exit 0, 5 tarballs
  • deno task fmt:check (1618 files) / deno task lint (938 files) — exit 0
  • deno task autoflow:release-prepare --to 0.44.0-beta.3 --approved-plan ADR-0151 --dry-run — plan now includes both new steps and stages both artifacts (dry-run only; no re-prepare, no double bump)

Scope

Tools: tools/autoflow/release.ts, tools/autoflow/version-anchors.ts, tools/autoflow/__tests__/release.test.ts. Repair: README.md, README.zh.md, docs/current/VERSION_PLAN.md, docs/release/release-state.json, docs/roadmap/ROADMAP.md, docs/status/STATUS.md, tools/project-constants.ts, www/app/data/_generated-content-graph.json, www/app/routes/roadmap.tsx. No ADR-0122 frozen paths, no product code, no prepare record edits, no force-push; #1315 untouched (superseded — a new promotion PR follows once dev is green).

Risk

  • The next prepare (beta.3) exercises the new path for the first time; the plan-shape test pins it, and a dry-run shows the intended step order.
  • Still human by design at each prepare: the new-release theme/copy (the superseded-theme gate exists to force this) and the head-zone narrative prose in README/VERSION_PLAN — everything mechanically derivable is now prepare-produced.
  • docs:check-version-anchors head-zone enforcement means any future bump-time prose naming the superseded line still fails loudly — intended fail-closed behavior.

DevBot added 2 commits September 4, 2026 23:28
…hors (#1288)

The v0.44.0-beta.2 bump commit passed the fast prepare gates but failed dev
CI (run 33885147030) and promotion PR #1315 (run 33885139920) on every
derived-truth gate the prepare plan did not re-run: content-graph:check
(bump rewrites graph sources), release:truth:check (release-state planning
anchors), docs:check-version-anchors (VERSION_PLAN STATUS-form head pair)
and www:check-truth (zh roadmap CURRENT entry).

The prepare/release plan now advances the release-state planning anchors
(activeTarget/nextPlannedTrain; published fields stay finalize-owned),
regenerates the content graph, and stages both artifacts in the bump
commit. buildVersionAnchorReplacements covers the VERSION_PLAN
repository/registry head pair and the next-public-prerelease anchors, and
bumpProjectConstantsText advances NEXT_PUBLIC_PRERELEASE with the
prerelease successor (the #813 binding #1283 fixed by hand). The roadmap
version anchor now rewrites both CURRENT-stamped entries (en + zh).
Follow-up to the 10744cc bump commit, which failed dev CI (run
33885147030) and promotion PR #1315 (run 33885139920) on the
derived-truth gates the prepare plan did not re-run. Applies exactly the
steps the fixed prepare plan now performs, plus the human release prose
the gates deliberately reserve for a human:

- regenerate www/app/data/_generated-content-graph.json (bump rewrote
  graph sources version.ts/roadmap.tsx)
- release-state.json planning anchors: activeTarget v0.44.0-beta.2,
  nextPlannedTrain v0.44.0-beta.3 (published fields stay on the beta.1
  prepare-window lag; finalize owns them)
- VERSION_PLAN.md STATUS-form head pair (Repository package line / npm
  registry line) advanced to v0.44.0-beta.2 with the prerelease dist-tag
  annotation release:truth:check requires
- NEXT_PUBLIC_PRERELEASE and the next-public-prerelease doc anchors
  advance to v0.44.0-beta.3 (the #813 in-flight binding #1283 fixed by
  hand for Beta.1)
- www roadmap CURRENT entries (en + zh): zh version advanced, and the
  Beta.2 theme/copy written (productization + governance offload,
  ADR-0151) — the superseded-theme gate is human by design
- README/README.zh/VERSION_PLAN/STATUS/ROADMAP head-zone prose updated to
  the Beta.2 line

Gates now green locally: content-graph:check, release:truth:check,
docs:check-version-anchors, www:check-truth, www:check-current-truth,
docs:truth, release:state-machine:check, release:evidence:check,
api-reference:check, content:examples-check, text-integrity:check, build
(incl. www:check-artifact-truth + www:check-links).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1d904c1
Status: ✅  Deploy successful!
Preview URL: https://80df800f.lessjs.pages.dev
Branch Preview URL: https://kimi-v044-beta2-prepare-cons.lessjs.pages.dev

View logs

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng
SisyphusZheng merged commit 9bb6877 into dev Sep 4, 2026
11 checks passed
@SisyphusZheng
SisyphusZheng deleted the kimi/v044-beta2-prepare-consistency branch September 4, 2026 15:52
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