feat(workflows): add automated publish-release workflow - #1344
Conversation
Assistant-model: GPT-5.5
|
Code Review: feat(workflows): add publish release workflow Nice work — this is a well-structured, defensive workflow with a thoughtful RFC. The version validation, the "stop rather than fabricate success" framing, and the separation of the two irreversible doors (merge / tag) are all good. The SDK usage is correct: 1. Status-marker detection is fragile for an irreversible workflow (highest priority). 2. 3. Cross-stage state handoff relies on implicit filesystem git state. Correctness across stages depends on the branch/commit created in stage 1 still being checked out on disk when stages 2/3 run. That works only because no stage sets 4. No automated tests, despite easily testable pure helpers. Minor.
Overall the structure and safety posture are solid; items 1 and 2 are the ones I would want fixed before this drives a real release. |
Assistant-model: GPT-5.5
PR Review:
|
Assistant-model: GPT-5.5
Code Review:
|
Assistant-model: GPT-5.5
|
Review: feat(workflows): add automated publish-release workflow Nice work — this is a well-structured, genuinely additive change. The decomposition into 5 gated stages, the extraction of pure logic into a testable helper module, and the accompanying RFC all reflect real care. A few things I verified and a few suggestions below. What is good
Suggestions / concerns 1. (Medium, practical) Gate brittleness can produce a blocked result AFTER irreversible work already happened. The gates depend on the agent emitting a free-form line exactly like 2. (Low) 3. (Low) 4. (Low) Self-reported verification vs. the RFC adversarial verification claim. Section 4.2 describes adversarial verification, but in practice each gate trusts the same agent that did the work to honestly report its own status — there is no independent re-check by the workflow body. That is inherent to the agentic model and acceptable, but the RFC language slightly oversells it; worth softening or backing with an independent check (see item 1). 5. (Low) Dead/test-only export. 6. (Nit) Test coverage Helpers are well covered (validation incl. leading-v and Overall this is solid and safe-by-default. None of the above is blocking; items 1 and 2 are the two I would most want addressed (or at least documented) before merge. Note: I reviewed statically and against the SDK source; I was not able to execute Generated with Claude Code |
Assistant-model: GPT-5.5
Review:
|
Assistant-model: GPT-5.5
|
Code Review — feat(workflows): add automated publish-release workflow Reviewed Substantive 1. The publish/tag door is LLM-attested, not deterministically verified — inconsistent with the PR thesis. 2. The branch-retention check can wedge a legitimate release. Minor
Things done well
I could not execute bun test / bun run typecheck in the review sandbox; the suite reads as correct and the PR reports both pass locally — worth confirming CI is green. Overall: solid, defensible design. I would want point 1 (symmetric verification of the publish door) and a decision on point 2 (branch-retention coupling) resolved before this drives real releases. |
Assistant-model: GPT-5.5
Review:
|
Assistant-model: GPT-5.5
Review —
|
Assistant-model: GPT-5.5
Code Review —
|
Assistant-model: GPT-5.5
|
PR Review: publish-release workflow Thorough, well-architected piece of work. The "delegate wording to model stages, gate every irreversible step with deterministic TypeScript checks against GitHub API JSON" design is exactly the right shape for release automation, and the discriminated-union return types plus exhaustive failure aggregation make the verification code easy to audit. The pure helpers in lib/publish-release.ts are cleanly factored and the test file covers them well. Findings below, ordered by impact. 🔴 High — branch-retention check can block a release AFTER a successful (irreversible) merge. In 🟠 Medium — publish-run selection assumes headBranch === version for tag-triggered runs. 🟠 Medium — required-check gate treats skipped/neutral checks as failures. 🟡 Low — test coverage stops at the module boundary. The 926-line workflow body holds the highest-stakes deterministic logic — 🟡 Low — nullableStringField is byte-for-byte identical to stringField. In lib/publish-release.ts both return 🟡 Low — PR description and spec drift from the final code. The PR body and specs/...md section 5.1 reference helpers (hasStatusMarker, hasLeadingStatus, firstActionsUrl) and "status parsing" tests that do not exist in the final lib or test file — the status-marker approach was replaced by deterministic gates over the commit history. The spec door names (wait_for_release_ci_and_merge) also differ from the implemented split stages (wait-for-release-ci + merge-verified-release-pr, the better design). Worth reconciling so the RFC matches what shipped. ✅ Things done well
Nice work overall — the High finding is the one I would want addressed before this is trusted to drive a real release unattended. 🤖 Generated with Claude Code |
…ic-release-workflow
PR Review: automated publish-release workflowThorough, well-architected addition. The core design — model stages handle open-ended work (changelog wording, PR body, CI-log reading) while deterministic TypeScript gates verify every irreversible step (PR merge, tag push, publish run) directly against the GitHub API via I verified the integration assumptions against the repo: all companion packages are A few issues worth addressing: Medium1. Branch-retention check can falsely report failure AFTER a successful merge. Low2. PR description references helpers that are not in the diff. 3. 4. "Newest run" selection is positional, not sorted. 5. Publish-run discovery window is ~60s. 6. Informational
TestsHelper coverage is solid (version validation, PR reference/merge/checks, run selection/verification, plus negative cases). The orchestration in Overall: safe-by-construction work with the right verification architecture. Addressing #1 (and tidying #2-#4) would make it production-ready. 🤖 Generated with Claude Code |
Assistant-model: GPT-5.5
Assistant-model: GPT-5.5
|
Review: feat(workflows): add automated publish-release workflow Thorough, well-architected PR. The core design — deterministic, code-enforced gates after each model stage, with irreversible remote effects funneled through named chokepoints — is exactly right for a release pipeline, and the typed result unions + A few issues worth addressing, roughly by severity. —— Medium —— 1. Branch auto-delete will produce a false 2. Skipped required checks are treated as failures. —— Low —— 3. Zero required checks → permanent block. 4. Blocking subprocesses with no timeout. 5. 6. —— Nits ——
—— Checked and fine ——
Nice work overall — the medium items (especially #1) are worth fixing before this is relied on for a real release, since they can halt an otherwise-successful run. Reviewed by Claude (Opus 4.8). |
|
Code Review — feat(workflows): add automated publish-release workflow Reviewed the full diff against CLAUDE.md/AGENTS.md conventions and the actual repo state ( What is done well
Issues 1. (Medium–High) The post-merge branch-retention check can falsely block a successful release. 2. (Low–Medium) 3. (Low) Empty required-checks list is treated as failure. 4. (Low) Performance/responsiveness: synchronous 5. (Low) Publish-run discovery window is short. Nits / cleanups
Test coverage Helper-level coverage is solid (validation, PR-reference/merge/checks/run verification, edge cases). As expected, the Overall: approve-with-changes. Issue 1 is the one I would want addressed before this is relied on for a real release, since it can mask a successful publish path as a blocked one. 🤖 Generated with Claude Code |
* feat(workflows): add publish release workflow Assistant-model: GPT-5.5 * fix(workflows): harden release status gates Assistant-model: GPT-5.5 * fix(workflows): require exact release stage success markers Assistant-model: GPT-5.5 * fix(workflows): accept standalone release status markers Assistant-model: GPT-5.5 * fix(workflows): verify release PR merges deterministically Assistant-model: GPT-5.5 * fix(workflows): capture release PR deterministically Assistant-model: GPT-5.5 * fix(workflows): verify publish action deterministically Assistant-model: GPT-5.5 * feat(workflows): add deterministic release gates Assistant-model: GPT-5.5 * fix(workflows): sanitize release command git environment Assistant-model: GPT-5.5 * fix(workflows): require explicit passing check results Assistant-model: GPT-5.5 * fix(package): add default atomic root export Assistant-model: GPT-5.5 * docs(changelog): remove internal workflow export note Assistant-model: GPT-5.5
Summary
Adds a fully automated, agent-driven release pipeline as a project-local Atomic workflow (
.atomic/workflows/publish-release.ts), with deterministic GitHub API verification at each irreversible step. Also fixes the@bastani/atomicroot export so Jiti-based workflow loading resolves the published entrypoint.Key Changes
Workflow (
.atomic/workflows/publish-release.ts)Inputs:
target_version(no leadingv) andrelease_kind("release"|"prerelease")Five sequential, gated stages:
prepare-release-branch-and-metadatarelease/<version>orprerelease/<version>from HEAD, updatesCHANGELOG.md, bumps version viascripts/bump-version.ts, commitsrun-release-checksbun run typecheckandbun run test:unitbefore opening any PRopen-release-prmainviagh, verifies base/head/SHA from GitHub APIwait-for-release-ci-and-mergetag-and-monitor-publishmain, pushes the version tag, monitors the GitHub Actions publish runVersion validation — enforces
MAJOR.MINOR.PATCHfor releases andMAJOR.MINOR.PATCH-alpha.REVISION(revision ≥ 1) for prereleases; rejects malformed versions before any side effects occur.Helper library (
.atomic/workflows/lib/publish-release.ts)Shared utilities extracted for testability:
validateReleaseRequest— typedValidatedReleaseoutput with format enforcementhasStatusMarker/hasLeadingStatus— last-wins and strict first-line status parsingverifyReleasePullRequestReferenceJson— deterministic PR reference verification (url, number, base/head refs)verifyPullRequestMergedJson— deterministic PR merge verification (state, mergedAt, mergeCommit.oid)verifyPullRequestChecksJson— CI check status verificationselectPublishWorkflowRunJson/verifyPublishWorkflowRunJson— GitHub Actions run selection and verificationreleaseVersionPattern/prereleaseVersionPattern— exported regexesrunCommand— sanitizes the Git environment viacreateGitEnvironment()before spawning subprocessesTests (
test/unit/publish-release-helpers.test.ts)257-line unit test suite covering:
vguardPackage fix (
packages/coding-agent/package.json)Added
"default": "./dist/index.js"to the"."root export condition — fixes Jiti-based workflow loading for user-authored workflows that import from the@bastani/atomicroot package.Spec (
specs/2026-06-10-publish-release-workflow.md)RFC documenting full architecture: Mermaid stage graph, door-set contracts (guarantee/refusal/chokepoint), stage plan with prompt requirements, cross-cutting concerns (security, irreversibility, Bun compliance, evidence requirements).
Notes
ghauth, git state, CI, or publish checks block safe progress, it halts with evidencebun run typecheckandbun run test:unit; pre-commit/pre-push hooks passed