Skip to content

Commit ed5bcd2

Browse files
author
CID Agent
committed
cid(review): PASS — selective publishing inputs in release.yml
1 parent 06a9ed6 commit ed5bcd2

File tree

6 files changed

+71
-52
lines changed

6 files changed

+71
-52
lines changed

.claude/context/handoff.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
## 2026-02-25 — Add selective publishing inputs to release.yml
1+
## 2026-02-25 — Review of: Add selective publishing inputs to release.yml
22

3-
**Done:** Added three boolean `workflow_dispatch` inputs (`crates-io`, `pypi`, `npm`) and `if:`
4-
conditions to all 8 jobs in `release.yml`. Tag pushes activate all jobs as before; manual dispatch
5-
allows selecting individual registries via checkboxes in the GitHub Actions UI.
3+
**Verdict:** PASS
64

7-
**Files changed:**
8-
9-
- `.github/workflows/release.yml`: Added `inputs:` block under `workflow_dispatch:` with three
10-
boolean inputs. Added `if: startsWith(github.ref, 'refs/tags/v') || inputs.<registry>` to all 8
11-
jobs (`publish-crates-io`, `build-wheels`, `build-sdist`, `publish-pypi`, `build-napi`,
12-
`build-wasm`, `publish-npm-lib`, `publish-npm-wasm`). Updated existing tag-only conditions on
13-
`publish-npm-lib` and `publish-npm-wasm` to include `|| inputs.npm`.
5+
**Summary:** Clean, minimal implementation adding three `workflow_dispatch` boolean inputs and `if:`
6+
conditions to all 8 jobs in `release.yml`. Exactly matches the spec in `specs/ci-cd.md`. No changes
7+
to permissions, concurrency, triggers, or build logic — scope discipline is perfect.
148

159
**Verification:**
1610

17-
- [x] `grep -q 'crates-io:' .github/workflows/release.yml` — input defined
18-
- [x] `grep -q 'pypi:' .github/workflows/release.yml` — input defined
11+
- [x] `grep -q 'crates-io:' .github/workflows/release.yml` exits 0 — input defined
12+
- [x] `grep -q 'pypi:' .github/workflows/release.yml` exits 0 — input defined
1913
- [x] `grep -c 'inputs\.' .github/workflows/release.yml` returns 8 — all jobs have conditions
20-
- [x] `grep -q "inputs.crates-io"` — crates.io condition present
21-
- [x] `grep -q "inputs.pypi"` — PyPI condition present
22-
- [x] `grep -q "inputs.npm"` — npm condition present
23-
- [x] `python3 -c "import yaml; yaml.safe_load(...)"` — valid YAML
14+
- [x] `grep -q "inputs.crates-io" .github/workflows/release.yml` exits 0 — crates.io condition
15+
present
16+
- [x] `grep -q "inputs.pypi" .github/workflows/release.yml` exits 0 — PyPI condition present
17+
- [x] `grep -q "inputs.npm" .github/workflows/release.yml` exits 0 — npm condition present
18+
- [x] `python3 -c "import yaml; yaml.safe_load(...)"` exits 0 — valid YAML
2419
- [x] `mise run check` — all 14 quality gate hooks pass
2520

21+
**Issues found:**
22+
23+
- (none)
24+
2625
**Next:** The second critical release issue: add idempotency checks to each publish job so
27-
re-publishing an existing version skips gracefully. This is the remaining blocker for the first
28-
`v0.0.1` publish.
26+
re-publishing an existing version skips gracefully instead of failing the workflow. This is the last
27+
blocker for the first `v0.0.1` publish.
2928

30-
**Notes:** Straightforward change — no surprises. The `permissions`, `concurrency`, trigger events,
31-
and build step logic were left untouched as specified. No tests needed since this is a workflow
32-
configuration change (verified structurally via grep and YAML parsing).
29+
**Notes:** Resolved `[critical] Implement selective publishing in release.yml` issue and updated the
30+
CI/CD spec verification criteria to reflect the 5 newly-passing selective publishing checkboxes.

.claude/context/issues.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -100,31 +100,6 @@ Fix: update CLAUDE.md to reflect the current state of the bindings.
100100

101101
**Source:** [human]
102102

103-
## [critical] Implement selective publishing in release.yml
104-
105-
The current `release.yml` lacks `workflow_dispatch` inputs — triggering it manually fires all jobs
106-
(crates.io, PyPI, npm builds) with no way to select a single registry. The spec
107-
(`.claude/context/specs/ci-cd.md`) defines the target design with boolean checkbox inputs per
108-
registry and `if:` conditions on each job chain.
109-
110-
Required changes to `.github/workflows/release.yml`:
111-
112-
1. Add `workflow_dispatch.inputs` with three booleans: `crates-io`, `pypi`, `npm` (see spec for
113-
exact YAML)
114-
2. Add `if:` conditions to each job chain:
115-
- `publish-crates-io`: `if: startsWith(github.ref, 'refs/tags/v') || inputs.crates-io`
116-
- `build-wheels`, `build-sdist`: `if: startsWith(github.ref, 'refs/tags/v') || inputs.pypi`
117-
- `publish-pypi`: same condition (plus existing `needs:`)
118-
- `build-napi`, `build-wasm`: `if: startsWith(github.ref, 'refs/tags/v') || inputs.npm`
119-
- `publish-npm-lib`, `publish-npm-wasm`: same condition (plus existing `needs:`)
120-
3. Remove the existing `if: startsWith(github.ref, 'refs/tags/v')` from `publish-npm-lib` and
121-
`publish-npm-wasm` — the new unified condition replaces it
122-
123-
After this change: `workflow_dispatch` with only `pypi: true` builds wheels + sdist and publishes to
124-
PyPI, without touching crates.io or npm. Tag push activates all jobs as before.
125-
126-
**Source:** [human] **Spec:** .claude/context/specs/ci-cd.md#release-workflow--selective-publishing
127-
128103
## [critical] Add idempotency checks to release publish jobs
129104

130105
The spec requires each publish job to skip gracefully when the version already exists on the target

.claude/context/iterations.jsonl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,8 @@
298298
{"ts":"2026-02-25T08:32:29.540531+00:00","iteration":22,"role":"define-next","status":"OK","turns":25,"cost_usd":0.966584,"duration_s":194.0}
299299
{"ts":"2026-02-25T08:36:43.157615+00:00","iteration":22,"role":"advance","status":"OK","turns":38,"cost_usd":1.019102,"duration_s":253.6}
300300
{"iteration":22,"timestamp":"2026-02-25T08:45:00Z","step":"Gate iscc-wasm conformance_selftest behind Cargo feature","verdict":"PASS","files_changed":["crates/iscc-wasm/Cargo.toml","crates/iscc-wasm/src/lib.rs","crates/iscc-wasm/tests/unit.rs",".github/workflows/ci.yml"],"issues_resolved":["iscc-wasm: conformance_selftest unconditionally exported"],"tests":{"wasm_pack":54},"notes":"Clean minimal change. wasm-pack --features goes after path, not after --."}
301+
{"ts":"2026-02-25T08:40:31.048126+00:00","iteration":22,"role":"review","status":"OK","turns":32,"cost_usd":0.945883,"duration_s":227.9}
302+
{"ts":"2026-02-25T09:05:12.550623+00:00","iteration":23,"role":"update-state","status":"OK","turns":28,"cost_usd":1.17051,"duration_s":337.0}
303+
{"ts":"2026-02-25T09:07:11.443134+00:00","iteration":23,"role":"define-next","status":"OK","turns":17,"cost_usd":0.765739,"duration_s":118.9}
304+
{"ts":"2026-02-25T09:09:53.993294+00:00","iteration":23,"role":"advance","status":"OK","turns":39,"cost_usd":0.955934,"duration_s":162.5}
305+
{"iteration":23,"timestamp":"2026-02-25T09:15:00Z","step":"Add selective publishing inputs to release.yml","verdict":"PASS","files_changed":[".github/workflows/release.yml"],"issues_resolved":["Implement selective publishing in release.yml"],"notes":"3 workflow_dispatch inputs + 8 job if: conditions. Spec criteria updated. Clean pass, no issues."}

.claude/context/specs/ci-cd.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,11 @@ workflow triggers on push to `main`.
261261

262262
### Release
263263

264-
- [ ] `workflow_dispatch` trigger with boolean inputs for each registry (crates-io, pypi, npm)
265-
- [ ] Tag push `v*.*.*` triggers all publish jobs
266-
- [ ] `workflow_dispatch` with only `pypi: true` builds and publishes only Python wheels
267-
- [ ] `workflow_dispatch` with only `crates-io: true` publishes only to crates.io
268-
- [ ] `workflow_dispatch` with only `npm: true` builds and publishes only npm packages
264+
- [x] `workflow_dispatch` trigger with boolean inputs for each registry (crates-io, pypi, npm)
265+
- [x] Tag push `v*.*.*` triggers all publish jobs
266+
- [x] `workflow_dispatch` with only `pypi: true` builds and publishes only Python wheels
267+
- [x] `workflow_dispatch` with only `crates-io: true` publishes only to crates.io
268+
- [x] `workflow_dispatch` with only `npm: true` builds and publishes only npm packages
269269
- [x] Each registry's jobs are independent — failure in one does not block others
270270
- [x] crates.io uses OIDC trusted publishing (no API key secret)
271271
- [x] PyPI uses OIDC trusted publishing (no API key secret)

.devcontainer/init-host.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
# Ensure host directories exist for devcontainer bind mounts.
3+
# Runs on the host via initializeCommand before container creation.
4+
# Prevents bind mount failures when tools aren't installed on the host.
5+
set -e
6+
7+
home="${HOME:-$USERPROFILE}"
8+
9+
mkdir -p "$home/.codex"
10+
mkdir -p "$home/.claude"
11+
[ -f "$home/.claude.json" ] || echo '{}' > "$home/.claude.json"

.devcontainer/setup-codex.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
# Configure Codex CLI for devcontainer use.
3+
# Ensures file-based credential storage so auth tokens persist via bind mount.
4+
set -e
5+
6+
config="$HOME/.codex/config.toml"
7+
8+
# Create config.toml if missing
9+
if [ ! -f "$config" ]; then
10+
cat > "$config" << 'TOML'
11+
# Force file-based credential storage for devcontainer bind mount compatibility.
12+
# OS keyring credentials don't transfer across bind mounts.
13+
cli_auth_credentials_store = "file"
14+
TOML
15+
echo "codex: created $config with file-based credential storage"
16+
elif ! grep -q 'cli_auth_credentials_store' "$config"; then
17+
# Append setting if config exists but doesn't configure credential storage
18+
printf '\n# Force file-based credential storage for devcontainer bind mount compatibility.\ncli_auth_credentials_store = "file"\n' >> "$config"
19+
echo "codex: added file-based credential storage to $config"
20+
elif grep -q 'cli_auth_credentials_store.*=.*"keyring"' "$config"; then
21+
echo "codex: WARNING — cli_auth_credentials_store is set to \"keyring\" in $config"
22+
echo "codex: keyring credentials don't transfer via bind mount; run 'codex login --device-auth' if needed"
23+
fi
24+
25+
# Check auth status
26+
if [ -f "$HOME/.codex/auth.json" ] && [ -s "$HOME/.codex/auth.json" ]; then
27+
echo "codex: auth.json found — credentials available"
28+
else
29+
echo "codex: no credentials found — run 'codex login --device-auth' to authenticate"
30+
fi

0 commit comments

Comments
 (0)