Skip to content

Commit d0cbd50

Browse files
author
nachiket
committed
fix(release): pass HOMEBREW_TAP_GITHUB_TOKEN explicitly to tap/bucket publishers
1 parent 4f30722 commit d0cbd50

5 files changed

Lines changed: 110 additions & 9 deletions

File tree

.goreleaser.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ brews:
6666
repository:
6767
owner: logicwind
6868
name: homebrew-tap
69+
# Cross-repo push: must explicitly reference the PAT; goreleaser does
70+
# NOT auto-fall-back to HOMEBREW_TAP_GITHUB_TOKEN without this line.
71+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
6972
description: "Typed project-state substrate for LLM-first software development"
7073
homepage: "https://github.com/logicwind/DocOps"
7174
license: MIT
@@ -82,6 +85,9 @@ scoops:
8285
repository:
8386
owner: logicwind
8487
name: scoop-bucket
88+
# Same cross-repo-push requirement as brew. Same PAT, aliased as
89+
# SCOOP_TAP_GITHUB_TOKEN in .github/workflows/release.yml.
90+
token: "{{ .Env.SCOOP_TAP_GITHUB_TOKEN }}"
8591
description: "Typed project-state substrate for LLM-first software development"
8692
homepage: "https://github.com/logicwind/DocOps"
8793
license: MIT

docs/.docops/counters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"next": {
44
"ADR": 26,
55
"CTX": 5,
6-
"TP": 28
6+
"TP": 29
77
}
88
}

docs/.index.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generated_at": "2026-04-23T08:33:23Z",
2+
"generated_at": "2026-04-23T08:41:52Z",
33
"version": 1,
44
"docs": [
55
{
@@ -860,7 +860,7 @@
860860
],
861861
"summary": "\u003c!-- AMENDMENTS (body-only until ADR-0025 / TP-026 land the frontmatter schema): - 2026-04-23 editorial — tap/bucket repo names migrated from per-tool (homebrew-docops, scoop-docops) to org-wide…",
862862
"word_count": 1095,
863-
"last_touched": "2026-04-22T12:30:23Z",
863+
"last_touched": "2026-04-23T08:37:39Z",
864864
"age_days": 0,
865865
"referenced_by": [
866866
{
@@ -886,6 +886,10 @@
886886
{
887887
"id": "TP-024",
888888
"edge": "requires"
889+
},
890+
{
891+
"id": "TP-028",
892+
"edge": "requires"
889893
}
890894
],
891895
"active_tasks": [
@@ -1100,7 +1104,7 @@
11001104
],
11011105
"summary": "ADRs are immutable by convention. This is the right default — decision history must not be silently rewritten. But the convention creates a dead zone for the most common kind of post-acceptance change…",
11021106
"word_count": 1188,
1103-
"last_touched": "2026-04-23T04:56:04Z",
1107+
"last_touched": "2026-04-23T08:37:39Z",
11041108
"age_days": 0,
11051109
"referenced_by": [
11061110
{
@@ -1902,7 +1906,7 @@
19021906
],
19031907
"summary": "\u003e **2026-04-23 progress note.** Phase 1 (new repos created) ✅. \u003e Phase 3 (legacy repos archived) ✅. `.goreleaser.yml` has \u003e `skip_upload: false`; `.github/workflows/release.yml` passes \u003e `HOMEBREW_TAP…",
19041908
"word_count": 619,
1905-
"last_touched": "2026-04-23T08:33:14Z",
1909+
"last_touched": "2026-04-23T08:37:39Z",
19061910
"age_days": 0,
19071911
"referenced_by": [
19081912
{
@@ -1950,7 +1954,7 @@
19501954
],
19511955
"summary": "Ship the machine layer behind ADR-0025: the `amendments:` frontmatter field, the `docops amend` CLI, validator + audit + index + state integration, and the JSON Schema extension.",
19521956
"word_count": 602,
1953-
"last_touched": "2026-04-23T04:56:54Z",
1957+
"last_touched": "2026-04-23T08:37:39Z",
19541958
"age_days": 0,
19551959
"referenced_by": [
19561960
{
@@ -1975,7 +1979,25 @@
19751979
],
19761980
"summary": "Once TP-026 ships the `amendments:` schema and `docops amend` CLI, convert ADR-0019's HTML-comment amendment stub into a proper frontmatter entry using the new machinery. ADR-0019 is the live motivati…",
19771981
"word_count": 354,
1978-
"last_touched": "2026-04-23T05:14:55Z",
1982+
"last_touched": "2026-04-23T08:37:39Z",
1983+
"age_days": 0,
1984+
"stale": false
1985+
},
1986+
{
1987+
"id": "TP-028",
1988+
"kind": "TP",
1989+
"folder": "docs/tasks",
1990+
"path": "docs/tasks/TP-028-fix-makefile-release-dry-run-guard-escapes-real-co.md",
1991+
"title": "Fix Makefile release DRY_RUN — guard escapes, real commit/tag/push runs",
1992+
"task_status": "backlog",
1993+
"priority": "p2",
1994+
"assignee": "unassigned",
1995+
"requires": [
1996+
"ADR-0019"
1997+
],
1998+
"summary": "Make `make release VERSION=X.Y.Z DRY_RUN=1` actually be a dry run. Today it prints the \"would do\" lines and then runs the real `echo \u003e VERSION` / `git commit` / `git tag` / `git push` commands anyway.",
1999+
"word_count": 425,
2000+
"last_touched": "2026-04-23T08:41:43Z",
19792001
"age_days": 0,
19802002
"stale": false
19812003
}

docs/STATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- Context: 4 active · 0 superseded
88
- ADRs: 22 accepted · 3 draft · 0 superseded (24 `coverage: required`, 1 `coverage: not-needed`)
9-
- Tasks: 5 backlog · 1 active · 0 blocked · 21 done
9+
- Tasks: 6 backlog · 1 active · 0 blocked · 21 done
1010

1111
## Needs attention
1212

@@ -19,6 +19,7 @@
1919
## Recent activity
2020

2121
- 2026-04-23 c038a01 chore: mark TP-018/020/021/022 done; ignore /docops smoke binary
22+
- 2026-04-23 aeb53b3 chore: enable tap/bucket auto-publish for v0.2.1
2223
- 2026-04-23 a131d95 planning: ADR-0024 + TP-022 — ship CLAUDE.md alongside AGENTS.md
2324
- 2026-04-23 7656d08 planning: ADR-0023 + TP-020/TP-021 — split TP-018 into refactor + upgrader + update-check
2425
- 2026-04-23 6f41758 TP-012: docops get/list/graph/next — focused read commands
@@ -37,5 +38,4 @@
3738
- 2026-04-22 84fb540 planning: ADR-0020 + TP-015/TP-016/TP-017 for v0.1.1 ergonomics
3839
- 2026-04-22 73cd5db TP-010/TP-013: finalize skill-pack scope — --no-skills + skills lint
3940
- 2026-04-22 6b41ceb TP-008: docops new — scaffold CTX/ADR/Task with atomic ID allocation
40-
- 2026-04-22 56f6d7c TP-003: docops validate — schema + graph invariants over docs/
4141

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Fix Makefile release DRY_RUN — guard escapes, real commit/tag/push runs
3+
status: backlog
4+
priority: p2
5+
assignee: unassigned
6+
requires: [ADR-0019]
7+
depends_on: []
8+
---
9+
10+
## Goal
11+
12+
Make `make release VERSION=X.Y.Z DRY_RUN=1` actually be a dry run.
13+
Today it prints the "would do" lines and then runs the real
14+
`echo > VERSION` / `git commit` / `git tag` / `git push` commands
15+
anyway.
16+
17+
## What happened (incident trace — 2026-04-23)
18+
19+
- Operator ran `make release VERSION=0.2.1 DRY_RUN=1` expecting a
20+
preview. The command printed the dry-run lines AND executed the
21+
real sequence: wrote VERSION, committed, tagged `v0.2.1`, pushed
22+
both main and the tag to origin.
23+
- The tag push triggered the release workflow. It half-succeeded
24+
(GitHub Release published, tap/bucket push failed with a 403 —
25+
separate bug, fixed in the same session).
26+
- When the operator followed up with the non-dry-run
27+
`make release VERSION=0.2.1`, the Makefile correctly refused with
28+
`tag v0.2.1 already exists locally` — which *confirmed* the dry
29+
run had really tagged and pushed.
30+
31+
## Root cause
32+
33+
Make runs **each recipe line in its own shell** unless `.ONESHELL:`
34+
is set or all lines are joined with `\`. The current target has the
35+
DRY_RUN guard as one if-block ending with `exit 0`. `exit 0` exits
36+
that subshell with success — it does NOT tell Make to skip the
37+
remaining recipe lines. The next lines then run in their own fresh
38+
shells and execute the real commit/tag/push.
39+
40+
## Fix options
41+
42+
- **A. `.ONESHELL:` directive** — one shell per recipe globally.
43+
Fixes this cleanly but changes the behaviour of every other
44+
target; audit them first.
45+
- **B. Collapse `release` into one shell block** (`@bash -c
46+
'...'` or `&&`-chained). Scoped to this target; recommended.
47+
- **C. Guard each side-effect line individually** with
48+
`@[ -z "$(DRY_RUN)" ] && <cmd>`. Noisy but surgical.
49+
50+
**Recommended:** Option B.
51+
52+
## Acceptance
53+
54+
- `make release VERSION=9.9.9 DRY_RUN=1` on a clean tree prints
55+
the "would do" lines and makes **zero** changes:
56+
- `git status` is clean after.
57+
- `git log -1 --format=%H` is unchanged.
58+
- `git tag | grep v9.9.9` is empty.
59+
- `git ls-remote origin refs/tags/v9.9.9` is empty.
60+
- `make release VERSION=X.Y.Z` (no DRY_RUN) continues to work
61+
exactly as before.
62+
- Regression test: a shell test under `scripts/` (or a new
63+
`make test-release` target) runs the dry-run against a temp
64+
git repo fixture and asserts the four "zero change" conditions.
65+
66+
## Notes
67+
68+
- This bug sent a real tag to production. Fixing it is p1 even
69+
though the damage this time was self-limiting.
70+
- While fixing, also consider:
71+
- A final "(no changes made)" footer on dry runs.
72+
- A confirm prompt on the real path — `make release` has no
73+
confirmation today, which is the pair of this bug.

0 commit comments

Comments
 (0)