docs(devlog): release 0.1.1 session log; release skill gains the Micro.blog draft step

Session log for the 0.1.1 cut: apex 1.1.59 refreshed first, bump + tag
4a056f9, rail 720/720 with the freshness proof, notarized DMG sha256
e7add45a…, the go (push + Gitea release id 28, token-authenticated
download byte-identical), and the Micro.blog announcement left as a
draft. The gotchas table carries the six post-go traps: silent
tea releases create, Gitea's tag_name, no PyYAML on the system python,
security add-generic-password needing </dev/null, and an account with
no default microblog.

Release skill 0.2.0: new step 11 posts the announcement to Micro.blog as
post-status: draft — token in the login keychain under its own service
(never the app's production micropub slot), mp-destination mandatory
because q=config shows three blogs and none is default, mp-channel
default, q=source read-back before reporting. Intro, Prerequisites,
Quick Reference, Pitfalls and Verification updated to match; root
AGENTS.md Child DOX Index row mentions the draft step.
This commit is contained in:
AlexKucera committed 2026-12-03 08:02:06 +01:00
1 parent 4a056f9c53
commit d5a515091a
4 files changed
+121 -10

No files matched your search

+41 -7
View File
@@ -2,16 +2,16 @@
name: release
description: "Cut a Museion release: bump, notes, rail, DMG, tag, publish."
platforms: [macos]
version: 0.1.1
version: 0.2.0
author: Hermes
metadata:
hermes:
tags: [Release, Museion, Xcode, Notarization, Gitea, apex]
tags: [Release, Museion, Xcode, Notarization, Gitea, apex, Micro.blog]
---
# Cutting a Museion release
Runs a release end to end: refresh the bundled apex renderer, version bump, changelog heading, release notes, the verify rail, sliced commits, an annotated tag, the notarized DMG from `scripts/release.sh`, then push and the Gitea release. The skill decides nothing about signing — `release.sh` and the Account Holder's keychain do that — and it bumps no version on its own. Push and the forge release wait for Alexander's explicit go (root `AGENTS.md`, User Preferences).
Runs a release end to end: refresh the bundled apex renderer, version bump, changelog heading, release notes, the verify rail, sliced commits, an annotated tag, the notarized DMG from `scripts/release.sh`, then push and the Gitea release, and a Micro.blog announcement left as a **draft** for Alexander to publish. The skill decides nothing about signing — `release.sh` and the Account Holder's keychain do that — and it bumps no version on its own. Push and the forge release wait for Alexander's explicit go (root `AGENTS.md`, User Preferences); the Micro.blog post is never published by the agent.
## When to Use
@@ -25,6 +25,7 @@ Runs a release end to end: refresh the bundled apex renderer, version bump, chan
- A valid **Developer ID Application** identity: `security find-identity -v -p codesigning`. When it is missing, the fix is Alexander's (developer.apple.com + a Keychain Access CSR — the `scripts/release.sh` header has the route); the agent imports nothing.
- Notary profile `museion-notary`, registered once by the Account Holder. The agent never runs `notarytool store-credentials`.
- `tea` logged in to `git.babylondreams.de` (the default login).
- Micro.blog announcement token in the login keychain: `security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -w` prints it (step 11 has the one-time `add-generic-password`). When missing, Alexander generates an App Token (Micro.blog → Account → App Tokens) and the agent stores it — never the other way around.
- Budget: ~2 min for `release.sh`, ~7 min for the rail.
## Procedure
@@ -89,7 +90,35 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
```
Done when the API shows `draft: false`, one asset at the local byte size, and a token-authenticated download of the asset sha256-matches the local file.
11. **Session log + DOX.** `write-log` for the release; the devlog commit follows the tag (the log is the record about the release, not part of it). DOX pass: root `AGENTS.md` (commands block, scripts index, session-log window) and `docs/AGENTS.md`. The log commit rides the next go.
11. **Micro.blog announcement — a DRAFT, never a publish.** The post goes to Micro.blog as `post-status: draft` so Alexander reviews and publishes it himself (the `preview` link lands in the report). Token: a Micro.blog **App Token** (Account → App Tokens) stored ONCE in the login keychain under its own service — never the app's production slot (`com.babylondreams.Museion.micropub`, account `micro.blog` — that is the app's live credential, see MuseionTests/AGENTS.md), never a file in the repo:
```bash
security add-generic-password -U -a micro.blog -s com.babylondreams.Museion.release-announce -w '<app token>' </dev/null
```
(The `</dev/null` is load-bearing: without it `security` prompts for a retype.) Then:
```bash
TOK=$(security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -w)
curl -sS -H "Authorization: Bearer $TOK" 'https://micro.blog/micropub?q=config' # read destinations + channels
```
**`mp-destination` is mandatory on this account**: `q=config` lists three microblogs and `microblog-default` is `false` on every one, so a post without it is ambiguous. The main blog is `https://AlexKucera.micro.blog/` (name `alexanderkucera.com`); the other two are a tweets cross-post and a test blog. Article posts take `mp-channel: default` (the `channels` list: `default` = Posts, `pages` = Pages). Post:
```bash
python3 - "$TOK" <<'PY'
import json, sys, urllib.request
tok = sys.argv[1]
payload = {"type": ["h-entry"], "properties": {
"name": ["Museion X.Y.Z"],
"content": ["<the announcement, markdown>"],
"post-status": ["draft"],
"mp-destination": ["https://AlexKucera.micro.blog/"],
"mp-channel": ["default"]}}
req = urllib.request.Request("https://micro.blog/micropub", data=json.dumps(payload).encode(),
headers={"Authorization": f"Bearer {tok}", "Content-Type": "application/json"}, method="POST")
with urllib.request.urlopen(req, timeout=30) as r:
print(r.status, r.headers.get("Location"), r.read().decode())
PY
```
Body: `docs/releases/X.Y.Z.md` is too long for a microblog post — distill it to a short announcement (what was fixed in plain words, the download link, the release-page link, "Developer ID signed and notarized"). A draft does NOT syndicate, so the `syndicate-to` targets in `q=config` (Mastodon/Bluesky/Threads) are not touched until Alexander publishes. Read back before reporting: `GET '/micropub?q=source&url=<Location>'` must show `post-status: draft` and the content intact — a 2xx alone is not a result. Done when the read-back says draft and the report carries the `url` (the post's final address) and the `preview` link. `preview` is display-only — never the publish/update target. A token pasted into chat is in the transcript: recommend rotation after the run.
12. **Session log + DOX.** `write-log` for the release; the devlog commit follows the tag (the log is the record about the release, not part of it). DOX pass: root `AGENTS.md` (commands block, scripts index, session-log window) and `docs/AGENTS.md`. The log commit rides the next go.
## Quick Reference
@@ -102,7 +131,8 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
- Gatekeeper: `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg`
- Push: `git push origin main vX.Y.Z`
- Release: `tea releases create --tag vX.Y.Z --target <sha> -t "Museion X.Y.Z" -f <notes> -a ./dist/Museion-X.Y.Z.dmg`
- Read back: `tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'`
- Read back: `tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` (Gitea spells it `tag_name`, not `tag`)
- Micro.blog: `POST https://micro.blog/micropub` JSON `h-entry` + `post-status: draft` + `mp-destination` (mandatory — no default blog) + `mp-channel: default` → `202` + `Location`; read back `q=source&url=…` → `post-status: draft`. Token: Keychain service `com.babylondreams.Museion.release-announce`. Never publish.
## Pitfalls
@@ -114,10 +144,14 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
- A DMG built before the last binary or script change is stale: rebuild, re-notarize, and the sha256 in the report is the one that ships.
- The tag moves only while local; after the push a fix is a new version.
- `tea releases create` takes the tag via `--tag` OR the positional — both is "ambiguous arguments". `@file` bodies work only on `tea api`; releases take `-f <file>`.
- The release asset download 404s without a token (private repo). Read the token from `~/Library/Application Support/tea/config.yml` into a shell variable for the `curl` — never print it.
- The release asset download 404s without a token (private repo). Read the token from `~/Library/Application Support/tea/config.yml` into a shell variable for the `curl` — never print it. `grep -E '^\s*token:'` + `sed` is enough; PyYAML is not installed on the system python.
- `tea releases create` prints NOTHING on success (exit 0, empty output). The `tea api` read-back is the only proof — and Gitea's release JSON has `tag_name`, not GitHub's `tag`.
- `security add-generic-password -w <value>` without `</dev/null` prompts for a retype and fails with "passwords don't match" when stdin is not a tty; the item is NOT stored and the next read returns 0 chars. Always `</dev/null`, always read the length back.
- A Micro.blog post without `mp-destination` is a gamble on this account — `q=config` shows three microblogs and none is `microblog-default`. Read `q=config` before every announcement; the destination set can change.
- `q=source&url=…` read-back does not echo `mp-destination` or `mp-channel`; the post's `Location` host (`alexanderkucera.com`) is the evidence the destination took.
- `core.hooksPath=scripts/hooks`: the pre-push hook is the lint gate; the rail is yours to run before tagging.
- A dylib dropped into a synced Resources folder gets linked into the app by Xcode's classifier; vendored libraries ride a `.bundle` folder (ADR-0011).
## Verification
`tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` → `draft: false`, one asset whose downloaded sha256 equals `shasum -a 256 dist/Museion-X.Y.Z.dmg`; `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg` → `accepted, source=Notarized Developer ID`.
`tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` → `draft: false`, one asset whose downloaded sha256 equals `shasum -a 256 dist/Museion-X.Y.Z.dmg`; `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg` → `accepted, source=Notarized Developer ID`. Micro.blog: `GET https://micro.blog/micropub?q=source&url=<Location>` → `post-status: draft`, content intact — and the draft sits in Alexander's posts awaiting his publish.