10 Commits
Author SHA1 Message Date
AlexKucera 4a056f9c53 chore(release): 0.1.1
Bug-fix release. MARKETING_VERSION 0.1.0 → 0.1.1 on all six
target/configuration pairs (CURRENT_PROJECT_VERSION stays at 1);
CHANGELOG gains the [0.1.1] - 2026-12-03 heading over the external-watch
normalizer fix that sat under [Unreleased], a Changed entry for the
apex 1.1.59 refresh, a fresh empty [Unreleased] above, and a pointer to
docs/releases/0.1.1.md. Rail at this tree: 720/720.
2026-12-03 07:47:43 +01:00
AlexKucera 570abb32c0 fix(reading): bump bundled apex to 1.1.59
The reading-mode renderer moves from 1.1.58 to the current upstream
release, packaged exactly as the 0.1.0 bundling (ADR-0011): the arm64
slice of the official universal release tarball, .sha256 verified against
the published checksum, the three CI/Homebrew rpaths stripped and
replaced by the single @executable_path/../Resources/libyaml.bundle,
Developer ID-signed with the hardened runtime. 1.1.59 still links
libyaml dynamically, so the vendored libyaml.bundle stays beside it;
--no-mixed-lists (ADR-0011's load-bearing flag) is still present. Proven
in a scratch Resources/ layout before the copy: --version reports
1.1.59 and a mixed bullet/ordered list renders as two lists.
2026-12-03 07:47:35 +01:00
AlexKucera bba4688dcb build(release): add the release skill and 0.1.1 release notes
.agents/skills/release/SKILL.md is the end-to-end runbook: refresh the
bundled apex renderer, bump, changelog heading, notes, the verify rail,
sliced commits, annotated tag, release.sh DMG, then a go-gated push and
Gitea release. Step one is now an unconditional apex refresh with the
full recipe inline (GitHub releases/latest → .sha256 → lipo arm64 →
strip every rpath → add the libyaml.bundle rpath → Developer ID sign
with the hardened runtime → prove it in a scratch Resources/ layout
before it touches the tree) instead of a "compare --version" check that
read as optional. Homebrew is a fallback only: its formula trailed the
GitHub release by a version on the 0.1.1 cut day. The skill bumps its
own version to 0.1.1.

docs/releases/0.1.1.md distills the CHANGELOG section for humans — the
false #67 conflict on BOM/CRLF guest files and the apex 1.1.59 refresh
— and becomes the Gitea release body. Root AGENTS.md gains the
.agents/skills/ Child DOX Index row.
2026-12-03 07:47:29 +01:00
AlexKucera 2d5073e421 Merge pull request 'museion/external-watch-compares-unnormalized-text: guest watch reads through the ONE shared external normalizer — false #67 conflict gone' (#203) from fix/external-watch-compares-unnormalized-text into main
CI / ci (push) Waiting to run
2026-12-03 07:36:51 +01:00
AlexKucera 07da076f41 merge main (3197b927) into fix/external-watch-compares-unnormalized-text (0.1.0 release wave)
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s
Conflict resolution (keep-both, nothing from either side lost):
- CHANGELOG.md: the branch external-watch entry stays under [Unreleased]
  (unreleased fix, PR #203); the owner 0.1.0 release entries stay in [0.1.0].
- docs/devlog/INDEX.md: union of rows, newest-first — the 2026-12-01 release
  row above the 2026-11-30 external-watch row.

Purity: code dirs carry trunk 3197b927 hunks verbatim (diff-of-diffs cmp clean);
fix code and the branch devlog are byte-identical to reviewed 822b1b5.
2026-12-01 20:19:29 +01:00
AlexKucera 3197b9276e docs: add fonts section to readme
CI / ci (push) Canceled after 0s
Explain that Museion's typography uses commercial
Butterick typefaces that must be installed manually,
list the three faces with links, and note the system
fallbacks so users know the app works without them.
2026-12-01 15:23:20 +01:00
AlexKucera 23afcdf3b6 docs(devlog): notarization and apex bundling
CI / ci (push) Canceled after 0s
The release 0.1.0 log gains the chapter the first draft could not have:
the Developer ID creation workaround, the five script fixes the real
runs forced, the apex/libyaml bundling (1.1.58), and the gotchas table
rows for each. Open items now only the authorization-gated ones: tag
move, push, Gitea release, re-sign on certificate rotation.
2026-12-01 15:12:25 +01:00
AlexKucera 822b1b562e docs: brief-32 session log, INDEX row, changelog entry
CI / ci (pull_request) Canceled after 0s
CI / ci (push) Canceled after 0s
Devlog records the class-site re-derivation (post-side rescan
disclosed as representation-consistent with evidence), the helper
location decision (EditorSession.swift beside readDocument — no
ceiling pressure, no new file), and the RED/GREEN evidence chain.
2026-11-30 22:19:19 +01:00
AlexKucera 70dd47ed8c fix(editor): normalize the guest watch's disk read
The external guest's watch read disk raw while the session's text and
lastFlushedText came through readDocument's normalizing external
branch, so diskTextChanged saw a difference on every BOM/CRLF file and
raised conflictAlert on unchanged content — re-arming after each
sibling directory event and after either alert answer, blocking
departures and quit until the user's own flush rewrote the file
normalized (finding museion/external-watch-compares-unnormalized-text,
argus cycle-6; unticketed, brief-32).

Extract the external branch (BOM strip + CRLF->LF) into
EditorSession.readExternalDocument(at:) — one shared normalizer, two
callers: the open read (readDocument) and the watch's onEvent. The #67
compare is now normalized-to-normalized; what readDocument loads is
unchanged.
2026-11-30 22:17:13 +01:00
AlexKucera b69ddd3963 test(editor): pin the external watch's false 67 conflict
CI / ci (push) Canceled after 0s
The external guest's watch (PostsModelImports.startExternalWatch)
reads disk raw while the session's text/lastFlushedText came through
readDocument's normalizing external branch (BOM strip + CRLF->LF), so
diskTextChanged raised conflictAlert on unchanged BOM/CRLF files —
re-arming after every sibling directory event and after either alert
answer, blocking departures and quit (brief-32, argus cycle-6).

Three RED pins over the real watch closure
(externalWatcher.onEvent): no conflict on an unchanged BOM/CRLF
guest, no re-arm after yes-reload or keep-local, and the load-bearing
negative — a real foreign write still raises. Targeted rail at base:
11 executed / 8 passed / 3 failed (all three new pins), 164
SwiftCompile lines.
2026-11-30 22:15:58 +01:00
14 changed files with 471 additions and 29 deletions

No files matched your search

+123
View File
@@ -0,0 +1,123 @@
---
name: release
description: "Cut a Museion release: bump, notes, rail, DMG, tag, publish."
platforms: [macos]
version: 0.1.1
author: Hermes
metadata:
hermes:
tags: [Release, Museion, Xcode, Notarization, Gitea, apex]
---
# 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).
## When to Use
- "cut / ship / tag / bump a release", "make a DMG", "X.Y.Z is ready"
- notarization came back `Invalid`, or a bundled binary changed (`Museion/Resources/apex`) — rerun steps 6–9 and move the still-local tag
- release notes or the README have to match what shipped
## Prerequisites
- Clean tree on `main`. `MARKETING_VERSION` is the only version source; read it from build settings, never from the pbxproj text.
- 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).
- Budget: ~2 min for `release.sh`, ~7 min for the rail.
## Procedure
Run through the `terminal` tool. Each step ends on a check; the next starts when it passes.
1. **Refresh apex FIRST — every release, no "is it current?" gate.** The bundled renderer is stale by definition between releases; the upgrade is the first step, never a comparison that can be skipped. Both sources are the same official binary; pick one:
**GitHub release (canonical):**
```bash
W=$(mktemp -d) && cd "$W"
curl -fsSL https://api.github.com/repos/ApexMarkdown/apex/releases/latest -o rel.json
TAG=$(python3 -c 'import json;print(json.load(open("rel.json"))["tag_name"])') # v1.1.NN
V=${TAG#v}
curl -fsSLO "https://github.com/ApexMarkdown/apex/releases/download/$TAG/apex-$V-macos-universal.tar.gz"{,.sha256}
awk '{print $1}' apex-$V-macos-universal.tar.gz.sha256 | shasum -a 256 -c - # must print OK — stop otherwise
tar xzf apex-$V-macos-universal.tar.gz
SRC=apex-$V-macos-universal/apex
```
**Homebrew (fallback only — the formula lags GitHub by days; on 0.1.1's cut day it still carried 1.1.58):**
```bash
brew update && brew upgrade apex
SRC=$(brew --prefix)/bin/apex # a symlink; lipo reads through it
```
Either way `lipo -info "$SRC"` must list `arm64` (GitHub ships x86_64+arm64; Homebrew on Apple Silicon is arm64-only — `lipo -thin` still works on a thin file).
**Then the one recipe (ADR-0011 — 1.1.59 still links libyaml dynamically; the vendored `libyaml.bundle` stays):**
```bash
cd <repo root>
SIGNER="Developer ID Application: Alexander Kucera (3M7APDAAC5)"
lipo "$SRC" -thin arm64 -output "$W/apex-arm64"
# strip EVERY rpath the binary carries — list them first and delete each one; a Homebrew build carries $(brew --prefix)/lib instead of the CI paths
otool -l "$W/apex-arm64" | grep -A2 LC_RPATH | grep path
for r in /Users/runner/work/apex/apex/deps/libyaml-universal/lib /usr/local/lib /opt/homebrew/lib "$(brew --prefix)/lib"; do
install_name_tool -delete_rpath "$r" "$W/apex-arm64" 2>/dev/null || true # absent paths are fine to skip; the Done-check catches a survivor
done
install_name_tool -add_rpath '@executable_path/../Resources/libyaml.bundle' "$W/apex-arm64"
codesign -f -s "$SIGNER" --options runtime --timestamp "$W/apex-arm64"
# PROVE it in the shipped layout before it touches the tree
mkdir -p "$W/proof/Resources/libyaml.bundle" && cp "$W/apex-arm64" "$W/proof/Resources/apex" \
&& cp Museion/Resources/libyaml.bundle/libyaml-0.2.dylib "$W/proof/Resources/libyaml.bundle/"
"$W/proof/Resources/apex" --version
printf -- '- a\n\n1. one\n' | "$W/proof/Resources/apex" --no-mixed-lists # two lists, <ul> then <ol> — never one merged <ul>
cp "$W/apex-arm64" Museion/Resources/apex
```
Bump `## apex X.Y.Z` + the `vX.Y.Z` prose in `Museion/Resources/THIRD-PARTY-NOTICES.md`; add a `### Changed` → `- **reading:**` line under the release heading in `CHANGELOG.md`. Done when `otool -l Museion/Resources/apex | grep -A2 LC_RPATH | grep path` prints exactly `@executable_path/../Resources/libyaml.bundle`, `codesign -dvv` shows `flags=0x10000(runtime)` + the Developer ID authority, `Museion/Resources/apex --version` prints the new version, and `--no-mixed-lists` appears in `--help` (ADR-0011's load-bearing flag). If a future apex links libyaml statically (asked upstream), drop the rpath/codesign dylib steps and the `.bundle`, and update this skill. An upgrade found after tagging costs a second rail run and a second notarization.
2. **Bump.** `MARKETING_VERSION` on every target and configuration in `Museion.xcodeproj/project.pbxproj`; `CURRENT_PROJECT_VERSION` stays. Read back: `xcodebuild -project Museion.xcodeproj -scheme Museion -configuration Release -destination 'platform=macOS,arch=arm64' -showBuildSettings | awk -F'= ' '/MARKETING_VERSION = /'`. Done when it prints the new version.
3. **Changelog heading.** `## [X.Y.Z] - YYYY-MM-DD` over the former `[Unreleased]` entries, a fresh empty `[Unreleased]` above, one pointer line to the notes (`CHANGELOG.md` follows Common Changelog). Done when every entry since the last tag sits under the heading.
4. **Release notes** — `docs/releases/X.Y.Z.md`, the CHANGELOG section distilled for humans: what is in it (grouped highlights), the milestones it closes, install, known limits, numbers. Shape precedent: `docs/releases/0.1.0.md`. Written from the shipped surface — every claim traces to a CHANGELOG entry or to source.
5. **README matches what shipped:** install copy, requirements, license pointer; the minimum macOS from `MACOSX_DEPLOYMENT_TARGET`, never from prose.
6. **Verify rail on the tree you will tag.** `./scripts/full-test.sh start`, poll `./scripts/full-test.sh status` (exit 3 = live), counts from `./scripts/full-test.sh summary`. Done when executed == passed == the baseline and the run directory is newer than the last edit. Then `swiftformat . && swiftlint .` clean, and `shellcheck scripts/release.sh` when the script changed.
7. **Commit in slices, then tag.** `docs(readme)` · `build(release)` (tooling + notes + DOX) · `chore(release)` (bump + changelog heading) · later fixes as `fix(scope)`. Plain prose bodies, no trailers. Tag: `git tag -a vX.Y.Z -m "Museion X.Y.Z — <one line>"` on the commit whose tree the DMG is built from. A fix found after tagging: commit it, then `git tag -f vX.Y.Z <fix commit>` while the tag is still local. Done when `git describe --tags --exact-match HEAD` prints the tag and the tree is clean.
8. **Build and prove the DMG.** `./scripts/release.sh` — refuses without the identity, reads the version from build settings, writes `dist/Museion-X.Y.Z.dmg`, and ends with `spctl` → `accepted, source=Notarized Developer ID`. Then mount the image and run `Contents/Resources/apex --version` from it, `xcrun stapler validate dist/Museion-X.Y.Z.dmg`, and record `shasum -a 256 dist/Museion-X.Y.Z.dmg`. Done when all four pass and the sha256 is in the report.
9. **Handoff gate.** Report the tag commit, the sha256, and what changed. Push and the forge release happen on Alexander's go.
10. **On go — push, release, verify.**
```bash
git push origin main vX.Y.Z
{ cat docs/releases/X.Y.Z.md; printf '\n\n[Generated by AI]\n'; } > "$TMPDIR/notes.md" # house rule: the AI marker closes every tea body
tea releases create --tag vX.Y.Z --target <tag-commit-sha> -t "Museion X.Y.Z" -f "$TMPDIR/notes.md" -a ./dist/Museion-X.Y.Z.dmg
tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'
```
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.
## Quick Reference
- apex: GitHub `releases/latest` → `.sha256` → `lipo -thin arm64 -output` → strip ALL rpaths → add `@executable_path/../Resources/libyaml.bundle` → `codesign --options runtime` → prove in a scratch `Resources/` layout → copy into `Museion/Resources/apex` + bump `THIRD-PARTY-NOTICES.md`. Every release, first. (Homebrew lags GitHub — fallback only.)
- Version: `xcodebuild -showBuildSettings … | awk '/MARKETING_VERSION = /'`
- Rail: `./scripts/full-test.sh start` · `status` · `summary`
- Lint: `swiftformat . && swiftlint .`
- Tag: `git tag -a vX.Y.Z -m "Museion X.Y.Z — <one line>"` · move while local: `git tag -f vX.Y.Z <sha>`
- DMG: `./scripts/release.sh` → `dist/Museion-X.Y.Z.dmg` (`NOTARIZE=0` skips notarize + staple)
- 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'`
## Pitfalls
- `release.sh` packages whatever `MARKETING_VERSION` says, from the current tree — it bumps and tags nothing.
- The old "compare `--version`, upgrade if stale" step read as optional and got skipped by habit — the refresh is unconditional. A `brew upgrade apex` that prints "already up-to-date" proves nothing: the formula can trail the GitHub release by days (it did on the 0.1.1 cut). GitHub `releases/latest` is the version of record.
- `install_name_tool -delete_rpath` fails loudly on a path the binary does not carry — list the rpaths with `otool -l` first and delete exactly those; the Homebrew build carries `$(brew --prefix)/lib`, the GitHub build the three CI/Homebrew paths. The Done-check (exactly ONE rpath left) catches a survivor before the rail, where `release.sh` would only catch a missing dylib.
- A `cp` over the signed `Resources/apex` must happen AFTER the scratch-layout proof — a binary that fails `--no-mixed-lists` in scratch has already touched nothing.
- A green `full-test.sh status` read right after a resource-only edit can be the PREVIOUS run's summary. Compare run-directory timestamps; zero `SwiftCompile` lines is normal then, and freshness is the `CpResource` line for the changed file plus running it from the test host's built bundle.
- 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.
- `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`.
+1
View File
@@ -115,6 +115,7 @@ When the user requests a durable behavior change, record it here or in the relev
| `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) | | `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) |
| `MuseionUITests/` | XCUITest smoke test — single file, no child doc yet | | `MuseionUITests/` | XCUITest smoke test — single file, no child doc yet |
| `scripts/` | Verify rail + hooks + build/deploy/release-packaging scripts — contracts live in each script's header; full-test.sh is the sanctioned verify rail (#190), release.sh cuts the DMG from an already-bumped commit, no child doc | | `scripts/` | Verify rail + hooks + build/deploy/release-packaging scripts — contracts live in each script's header; full-test.sh is the sanctioned verify rail (#190), release.sh cuts the DMG from an already-bumped commit, no child doc |
| `.agents/skills/` | Project-local agent skills (cross-tool convention, committed) — `release/`: the end-to-end release runbook (bump → notes → rail → tag → DMG → go-gated push + Gitea release); no child doc |
| `docs/AGENTS.md` | Durable documentation — ADRs and their conventions | | `docs/AGENTS.md` | Durable documentation — ADRs and their conventions |
| `ref/writing skills/AGENTS.md` | Bundled writing-skill set — the G3a payload seeded into the museion profile | | `ref/writing skills/AGENTS.md` | Bundled writing-skill set — the G3a payload seeded into the museion profile |
| `GLOSSARY.md` | Binding project glossary — shared vocabulary for app, mentor, and docs | | `GLOSSARY.md` | Binding project glossary — shared vocabulary for app, mentor, and docs |
+12
View File
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format
## [Unreleased] ## [Unreleased]
## [0.1.1] - 2026-12-03
Human-readable notes: [docs/releases/0.1.1.md](docs/releases/0.1.1.md).
### Fixed
- **editor:** The external guest's file watch compares normalized text (finding `museion/external-watch-compares-unnormalized-text`, argus cycle-6; unticketed fix, brief-32) — `startExternalWatch`'s onEvent read the disk RAW while the session's `text`/`lastFlushedText` came through `readDocument`'s normalizing external branch (BOM strip + CRLF→LF), so `diskDidChange` raised the #67 conflict whenever the raw bytes differed from BOTH normalized snapshots — which they ALWAYS did for a BOM- or CRLF-carrying file, even with content unchanged. The false alarm blocked departures (select/newPost/newOutline/openExternal) and quit (the #200 gate), and re-armed after every sibling directory event (the watch observes the containing folder) and after either alert answer, until the writer's own flush rewrote the file normalized. The external branch is now the ONE shared read — `EditorSession.readExternalDocument(at:)` (raw UTF-8 → BOM strip → CRLF→LF) — called by both the open read (`readDocument`) and the watch's onEvent, so the #67 compare is normalized-to-normalized; what `readDocument` loads is unchanged (no second normalizer at the compare site, and `diskDidChange` itself is untouched). A real foreign write still raises the alert — the departure gate is not blinded. +3 tests over the real watch closure (`externalWatcher.onEvent`): no conflict on an unchanged BOM/CRLF guest (initially and across sibling events), a real write still conflicts, and no re-arm after either alert answer (yes-reload and keep-local); RED-first 3/3 at the pin (11 executed / 8 passed / 3 failed — the three new pins). Suite 720
### Changed
- **reading:** The bundled apex renderer is 1.1.59 (was 1.1.58) — the arm64 slice of the official universal release tarball, `.sha256` verified, the same single `@executable_path/../Resources/libyaml.bundle` rpath and Developer ID + hardened-runtime signature as the 0.1.0 bundling (ADR-0011 recipe unchanged; 1.1.59 still links libyaml dynamically). `--no-mixed-lists` still present.
## [0.1.0] - 2026-12-01 ## [0.1.0] - 2026-12-01
First release. Human-readable notes: [docs/releases/0.1.0.md](docs/releases/0.1.0.md). First release. Human-readable notes: [docs/releases/0.1.0.md](docs/releases/0.1.0.md).
+6 -6
View File
@@ -424,7 +424,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 27.0; MACOSX_DEPLOYMENT_TARGET = 27.0;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES; REGISTER_APP_GROUPS = YES;
@@ -461,7 +461,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 27.0; MACOSX_DEPLOYMENT_TARGET = 27.0;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES; REGISTER_APP_GROUPS = YES;
@@ -484,7 +484,7 @@
DEVELOPMENT_TEAM = 3M7APDAAC5; DEVELOPMENT_TEAM = 3M7APDAAC5;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 27.0; MACOSX_DEPLOYMENT_TARGET = 27.0;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO; STRING_CATALOG_GENERATE_SYMBOLS = NO;
@@ -506,7 +506,7 @@
DEVELOPMENT_TEAM = 3M7APDAAC5; DEVELOPMENT_TEAM = 3M7APDAAC5;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 27.0; MACOSX_DEPLOYMENT_TARGET = 27.0;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO; STRING_CATALOG_GENERATE_SYMBOLS = NO;
@@ -526,7 +526,7 @@
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 3M7APDAAC5; DEVELOPMENT_TEAM = 3M7APDAAC5;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO; STRING_CATALOG_GENERATE_SYMBOLS = NO;
@@ -546,7 +546,7 @@
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 3M7APDAAC5; DEVELOPMENT_TEAM = 3M7APDAAC5;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 0.1.0; MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests; PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
STRING_CATALOG_GENERATE_SYMBOLS = NO; STRING_CATALOG_GENERATE_SYMBOLS = NO;
+17 -6
View File
@@ -157,16 +157,27 @@ final class EditorSession {
private static func readDocument(_ target: SessionTarget) -> String? { private static func readDocument(_ target: SessionTarget) -> String? {
switch target { switch target {
case let .post(id, home): case let .post(id, home):
return PostStore.readBody(id: id, home: home) PostStore.readBody(id: id, home: home)
case let .externalFile(url): case let .externalFile(url):
guard var text = try? String(contentsOf: url, encoding: .utf8) else { return nil } readExternalDocument(at: url)
if text.hasPrefix("\u{FEFF}") {
text.removeFirst()
}
return text.replacingOccurrences(of: "\r\n", with: "\n")
} }
} }
/// #67/brief-32: the ONE external-target disk read — raw UTF-8, BOM
/// stripped, CRLF normalized to LF. Every reader of an external file's
/// bytes goes through here (the open read above, the guest watch in
/// PostsModelImports, Yes-reload, keep-local), so the #67 compare is
/// always normalized-to-normalized: the watch used to read raw and
/// raised a false conflict on every directory event over an unchanged
/// BOM/CRLF file.
static func readExternalDocument(at url: URL) -> String? {
guard var text = try? String(contentsOf: url, encoding: .utf8) else { return nil }
if text.hasPrefix("\u{FEFF}") {
text.removeFirst()
}
return text.replacingOccurrences(of: "\r\n", with: "\n")
}
/// Target-aware write: posts → `PostStore.overwrite` (+ sidecar); /// Target-aware write: posts → `PostStore.overwrite` (+ sidecar);
/// external → the whole text, in place, no sidecar (#93). /// external → the whole text, in place, no sidecar (#93).
private func writeDocument() throws { private func writeDocument() throws {
+6 -3
View File
@@ -62,11 +62,14 @@ extension PostsModel {
} }
/// #93: watch the open external file — its rescan is the #67 disk-change /// #93: watch the open external file — its rescan is the #67 disk-change
/// check, reused verbatim for foreign files. PostsWatcher fires on the /// check, reused verbatim for foreign files. The disk read goes through
/// main actor already; no re-hop needed. /// the shared external normalizer (brief-32): the session's text is
/// normalized on open, so a raw read raised a false conflict on every
/// directory event over an unchanged BOM/CRLF file. PostsWatcher fires
/// on the main actor already; no re-hop needed.
private func startExternalWatch(url: URL) { private func startExternalWatch(url: URL) {
externalWatcher.onEvent = { [weak self] in externalWatcher.onEvent = { [weak self] in
guard let self, let session = externalSession, let disk = try? String(contentsOf: url, encoding: .utf8) else { return } guard let self, let session = externalSession, let disk = EditorSession.readExternalDocument(at: url) else { return }
session.diskDidChange(diskText: disk) session.diskDidChange(diskText: disk)
} }
externalWatcher.start(urls: [url.deletingLastPathComponent()]) externalWatcher.start(urls: [url.deletingLastPathComponent()])
+2 -2
View File
@@ -3,11 +3,11 @@
Museion is GPL-3.0-or-later. It bundles the two components below, both under Museion is GPL-3.0-or-later. It bundles the two components below, both under
the MIT License; the full license text follows. the MIT License; the full license text follows.
## apex 1.1.58 (`apex`) ## apex 1.1.59 (`apex`)
Markdown → HTML converter, used for reading mode. Markdown → HTML converter, used for reading mode.
Copyright (c) 2026 Brett Terpstra — https://github.com/ApexMarkdown/apex Copyright (c) 2026 Brett Terpstra — https://github.com/ApexMarkdown/apex
Redistributed as the arm64 slice of the v1.1.58 release binary (checksum Redistributed as the arm64 slice of the v1.1.59 release binary (checksum
verified against the published `.sha256`), re-signed for Developer ID verified against the published `.sha256`), re-signed for Developer ID
distribution; rpath rewritten to load the libyaml beside it. distribution; rpath rewritten to load the libyaml beside it.
Binary file not shown.
+86
View File
@@ -25,6 +25,16 @@ private func writeExternal(_ name: String, _ body: String) throws -> URL {
return url return url
} }
/// brief-32: the guest-watch pins' own temp dir — `startExternalWatch`
/// observes the file's CONTAINING folder, so their guest must live where
/// no sibling test ever writes.
private func watchedDir() throws -> URL {
let dir = FileManager.default.temporaryDirectory
.appendingPathComponent("museion-watch-\(UUID().uuidString)", isDirectory: true)
try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)
return dir
}
@Suite(.serialized) @Suite(.serialized)
@MainActor @MainActor
struct ImportExternalTests { struct ImportExternalTests {
@@ -190,4 +200,80 @@ struct ImportExternalTests {
#expect(!session.conflictAlert) #expect(!session.conflictAlert)
#expect(session.text == "# C\n\nForeign edit.") #expect(session.text == "# C\n\nForeign edit.")
} }
// MARK: - The guest watch (brief-32: the #67 compare's disk read)
@Test func `external watch raises no 67 conflict on an unchanged BOM and CRLF file`() throws {
let model = PostsModel()
let dir = try watchedDir()
let ext = dir.appendingPathComponent("watched.md")
// Windows-authored file: BOM + CRLF. The open read normalizes
// (readDocument's external branch); the watch must read in the
// SAME representation or every directory event reads as #67.
try "\u{FEFF}# Title\r\n\r\nBody line.\r\n".write(to: ext, atomically: true, encoding: .utf8)
defer { try? FileManager.default.removeItem(at: dir) }
model.openExternal(ext)
let session = try #require(model.externalSession)
#expect(session.text == "# Title\n\nBody line.\n")
// Sibling directory events re-fire the compare (the watch observes
// the containing folder): representation alone must never raise.
model.externalWatcher.onEvent?()
#expect(!session.conflictAlert)
model.externalWatcher.onEvent?()
#expect(!session.conflictAlert)
}
@Test func `external watch still conflicts on a real write and never re-arms after yes-reload`() throws {
let model = PostsModel()
let dir = try watchedDir()
let ext = dir.appendingPathComponent("foreign.md")
try "\u{FEFF}# Title\r\n\r\nBody line.\r\n".write(to: ext, atomically: true, encoding: .utf8)
defer { try? FileManager.default.removeItem(at: dir) }
model.openExternal(ext)
let session = try #require(model.externalSession)
// A REAL external modification (different content, same BOM/CRLF
// representation): the departure gate must still see it.
try "\u{FEFF}# Title\r\n\r\nRewritten underneath.\r\n".write(to: ext, atomically: true, encoding: .utf8)
model.externalWatcher.onEvent?()
#expect(session.conflictAlert)
// Yes-reload takes the foreign content, normalized:
session.reloadFromDisk()
#expect(!session.conflictAlert)
#expect(session.text == "# Title\n\nRewritten underneath.\n")
// The next directory event reads the same unchanged bytes — the
// false conflict must not re-arm.
model.externalWatcher.onEvent?()
#expect(!session.conflictAlert)
}
@Test func `external watch never re-arms after keep-local on a BOM and CRLF file`() throws {
let model = PostsModel()
let dir = try watchedDir()
let ext = dir.appendingPathComponent("kept.md")
try "\u{FEFF}# Title\r\n\r\nBody line.\r\n".write(to: ext, atomically: true, encoding: .utf8)
defer { try? FileManager.default.removeItem(at: dir) }
model.openExternal(ext)
let session = try #require(model.externalSession)
try "\u{FEFF}# Title\r\n\r\nForeign body.\r\n".write(to: ext, atomically: true, encoding: .utf8)
model.externalWatcher.onEvent?()
#expect(session.conflictAlert)
// No: keep local — the disk state is seen, the local buffer stays
// and stays pending.
session.keepLocal()
#expect(!session.conflictAlert)
#expect(session.text == "# Title\n\nBody line.\n")
#expect(session.saveState == .changed)
model.externalWatcher.onEvent?()
#expect(!session.conflictAlert)
}
} }
+10
View File
@@ -64,6 +64,16 @@ Running a pass on an unaided first draft captures four style metrics — burstin
- A provider API key for the model the mentor should run on (Settings ▸ Provider Keys). - A provider API key for the model the mentor should run on (Settings ▸ Provider Keys).
- A [Micro.blog](https://micro.blog) account — only if you publish. - A [Micro.blog](https://micro.blog) account — only if you publish.
### Fonts
Museion's typography is set in Matthew Butterick's typefaces. They are commercial, so the app does not ship them — install them yourself (open each `.otf` in Font Book):
- **[Valkyrie OT](https://practicaltypography.com/valkyrie.html)**, the B cut — body text, document titles, the mentor's prose.
- **[Concourse OT](https://practicaltypography.com/concourse.html)** — headings and your side of the conversation.
- **[Ubuntu Mono Nerd Font](https://www.nerdfonts.com/font-downloads)** — code and syntax dimming (free).
Without them Museion still works: the editor falls back to the system font (SF Pro), Reading mode to Georgia. The spacing is calibrated on the real faces, so install them for the intended look.
## Install ## Install
Download `Museion-<version>.dmg` from [Releases](https://git.babylondreams.de/AlexKucera/museion/releases), open it, drag Museion to **Applications**. Download `Museion-<version>.dmg` from [Releases](https://git.babylondreams.de/AlexKucera/museion/releases), open it, drag Museion to **Applications**.
@@ -0,0 +1,135 @@
# brief-32 — the external guest's watch compares normalized text
> **Date:** 2026-11-30
> **Type:** fix (unticketed)
> **Reference:** finding `museion/external-watch-compares-unnormalized-text` (argus cycle-6 bugs pass, `museion-bugs.md` finding 1; MEDIUM, certain) — branch `fix/external-watch-compares-unnormalized-text` off `main` at `5341c4ee53291ad74b30e812ca84fc5cbdbf990b`
## Goal
`startExternalWatch`'s onEvent read the open external guest's disk text RAW
(`String(contentsOf: url, encoding: .utf8)`, PostsModelImports.swift:69) and
handed it straight to `session.diskDidChange(diskText:)` — no BOM strip, no
CRLF→LF. But the session's `text` and `lastFlushedText` came through
`readDocument`'s external branch (EditorSession.swift:162-166), which strips a
`\u{FEFF}` prefix and maps `\r\n`→`\n`. `diskDidChange` raises the #67
`conflictAlert` when the handed text differs from BOTH `lastFlushedText` and
`text` — which it ALWAYS did for a file whose bytes carry a BOM or CRLF, even
with content unchanged.
Blocking surface: the alert makes `sessionMayDepart` refuse → `select`,
`newPost`, `newOutline`, `openExternal` (via `departOpenDocuments`) and quit
(via `documentsMayDepart` riding `WritingLockAppDelegate`) all block. Both
alert answers clear the state for the moment, but the watcher observes the
containing DIRECTORY (PostsModelImports.swift:72), so the next sibling-file
event re-fires the raw compare and re-arms the false conflict — until the
user's own flush rewrites the file normalized. A quit-blocking false alarm
that keeps coming back.
## Class-site re-derivation (pattern-exhaustive, from root cause)
Re-derived from the pin myself (basis: `grep -rn 'diskDidChange|readDocument|
readBody|String(contentsOf' Museion/*.swift` plus a full read of the seam):
every site that feeds `diskDidChange` or seeds session text —
| # | Site | Read path | Verdict |
|---|------|-----------|---------|
| 1 | PostsModelImports.swift:69 — the external watch's onEvent | raw `String(contentsOf:)` | **the defect** (fixed) |
| 2 | PostsModelWatcher.swift:157/197 — the post-side rescan's #67 read | `PostStore.readBody` | representation-consistent: `readDocument`'s POST branch reads through the same `readBody` (EditorSession.swift:160), so both sides of that compare are byte-identical reads of the same file |
| 3 | EditorSession.swift:136 (init seed), :269 (reloadFromDisk), :316 (keepLocal) | `readDocument` | the normalized baseline itself — all three stay on it |
| 4 | Sites seeding session text otherwise: `edit(_:)` (the editor surface), `adoptText(_:)` (Fix Card apply, caller-computed) | — | not disk reads; not in the class |
No sites beyond the scanner's seed table were found; the one seeded site
believed unexposed (the post-side rescan, #2) is disclosed above with its
consistency evidence. The other `String(contentsOf:)` reads in
`PostsModelOutline`/`Micropub`/`FixCardStore`/`PostStore` internals feed other
consumers, never the #67 compare.
## What Was Done
**ONE shared normalization for the external read path — two callers, no
second normalizer at the compare site:**
- `EditorSession.readExternalDocument(at:) -> String?` (EditorSession.swift,
internal static, extracted byte-identically from `readDocument`'s external
branch): raw UTF-8 read → BOM prefix strip → CRLF→LF. This is now the ONE
external-target disk read — `readDocument`'s external case calls it, and
the guest watch calls it. `reloadFromDisk`/`keepLocal` already read through
`readDocument`, so all four external readers (open, watch, yes-reload,
keep-local) funnel through the same helper: the #67 compare is
normalized-to-normalized by construction.
- `PostsModelImports.startExternalWatch`'s onEvent now reads
`EditorSession.readExternalDocument(at: url)` instead of the raw
`String(contentsOf:)`. Nothing else in the closure changes.
- `readDocument` itself only re-dispatches (both switch cases are now single
expressions; swiftformat's `redundantReturn` rewrites it to the implicit
switch-expression form — syntax-only, semantics identical). **What
`readDocument` loads is unchanged**: the fix adds a caller, not a second
normalizer. `diskDidChange`'s compare is untouched — deliberately: a
normalize-at-compare site would be a parallel second normalizer, exactly
what the fix direction rules out.
**Helper location decision** (called by the brief): it lives in
EditorSession.swift beside `readDocument`/`writeDocument`. The session owns
document reading (the `readDocument`/`writeDocument` pair is the existing
contract), no new file was warranted for 11 lines, and
`file_length`/`type_body_length` are disabled in this repo's `.swiftlint.yml`
— no ceiling pressure either way.
**Tests (RED-first):** three pins in `ImportExternalTests` driving the REAL
watch closure (`model.externalWatcher.onEvent?()` — the exact code a
directory event runs), over a dedicated temp dir (the watch observes the
containing folder, so the guest lives where no sibling test writes):
1. `external watch raises no 67 conflict on an unchanged BOM and CRLF file` —
BOM+CRLF guest (`"\u{FEFF}# Title\r\n\r\nBody line.\r\n"`) opened through
`openExternal`; pins the normalized open (`session.text`), then fires the
watch closure twice: no alert, ever.
2. `external watch still conflicts on a real write and never re-arms after
yes-reload` — the load-bearing negative: a REAL foreign write (different
content, same BOM/CRLF representation) still raises the alert (the
departure gate must not go blind); yes-reload takes the foreign content
normalized; the next watch event over the unchanged file does NOT re-arm.
3. `external watch never re-arms after keep-local on a BOM and CRLF file` —
the No answer's leg: keep-local sees the (normalized) disk state, the
local buffer stays and stays pending (`saveState == .changed`); no
re-arm.
## Verification
- **RED at the pinned base** (5341c4ee + tests only, commit b69ddd3's tree):
`./scripts/full-test.sh start -- -only-testing:MuseionTests/ImportExternalTests`
→ run dir `20261130T211504Z-Museion`: **11 executed / 8 passed / 3 failed**
(xcodebuild exit 65; all three failures are the new pins on
`!session.conflictAlert`), 164 SwiftCompile lines (cold build, real
compile — #197 clear). Suite-name filter per #195/#31/#134 (the file also
holds the suite; filter by SUITE name, never file name).
- **GREEN targeted** (fix tree, pre-format-pass):
same filter, run dir `20261130T211616Z-Museion`: **11 executed / 11
passed / 0 failed** (xcodebuild exit 0), 59 SwiftCompile lines.
- **GREEN full rail** at the fix commit 70dd47e (exact committed tree,
post-format): `./scripts/full-test.sh start` → run dir
`20261130T211720Z-Museion`: **720 executed / 720 passed / 0 failed /
0 skipped, xcodebuild exit 0**, 3 SwiftCompile lines (incremental rebuild
of the touched files — nonzero, #197 clear). 720 = the 717 baseline + the
3 new pins; the 717 rail re-covers the untouched open path (acceptance 3).
- **swiftformat** `.`: 0/152 files formatted, 278 skipped, rc 0.
- **swiftlint** `.`: 0 violations, 0 serious, 141 files, rc 0.
- GitNexus impact analysis: not run — no `.gitnexus/`, no gitnexus binary, no
`.claude/skills/gitnexus/` in this clone (root AGENTS.md's GitNexus block
is stale, as the cycle-6 audit disclosed); the manual caller trace above is
the impact analysis. No AGENTS.md file was written by this session
(consent-gated): the intended root-window row and the Museion/AGENTS.md
EditorSession-bullet delta ship as the owner-apply patch
`~/daedalus-builds/museion/brief-32-agents-owner-apply.patch`
(`git apply --check` clean at the branch head).
Evidence classes: failing-test proof (RED 3/3 at base), coupled-run proof
(targeted GREEN + full-rail GREEN at the committed head), structural proof
(caller-trace table above).
## Commits
- b69ddd3 `test(editor): pin the external watch's false 67 conflict` (RED,
pushed first)
- 70dd47e `fix(editor): normalize the guest watch's disk read`
- docs: CHANGELOG [Unreleased] entry + this log + INDEX row
@@ -33,6 +33,26 @@ feature list and usage instructions now that the codebase is stable.
`docs/AGENTS.md` Local Contract for `docs/releases/<version>.md` + Child DOX Index row. `docs/AGENTS.md` Local Contract for `docs/releases/<version>.md` + Child DOX Index row.
- Three commits (`docs(readme)`, `build(release)`, `chore(release)`) and annotated tag `v0.1.0` on - Three commits (`docs(readme)`, `build(release)`, `chore(release)`) and annotated tag `v0.1.0` on
the last. the last.
- **Signing prerequisites (Alexander, this Mac):** Developer ID Application identity created through
developer.apple.com + a Keychain Access CSR (Xcode's Manage Certificates refuses even for the
Account Holder); `notarytool store-credentials museion-notary` registered by Alexander.
- **`scripts/release.sh` hardened by the real runs:** capture `codesign -dvv` before grepping
(pipefail + `grep -q` SIGPIPEs codesign → false "not Developer ID signed"); read notarytool's
status FIELD (`--wait` exits 0 on Invalid; JSON goes to stdout only — no output-path option);
sign the DMG before submitting (Gatekeeper's `spctl -t open` on the image needs it); retry the
staple 6× (ticket can lag "Accepted"); two shipped-layout proofs before notarizing — apex must
run from the export and the app must not link libyaml.
- **Reading renderer made self-contained (`Museion/Resources/`):** `apex` → 1.1.58 (the
bundle had 1.1.17; the official universal release tarball, `.sha256` verified), arm64 slice,
rpaths replaced by the single `@executable_path/../Resources/libyaml.bundle`, Developer ID–signed
with `--options runtime`; `libyaml.bundle/libyaml-0.2.dylib` (0.2.5 from Homebrew's Cellar, install
name `@rpath/libyaml-0.2.dylib`) beside it, same identity; `THIRD-PARTY-NOTICES.md` (both MIT
texts fetched from the source repos). `--no-mixed-lists` still exists in 1.1.58 (ADR-0011's
requirement). ADR-0011's Bundling consequence rewritten; `Museion/AGENTS.md`
reading-mode line; README license pointer; CHANGELOG `**reading:**` entry.
- Final DMG: `dist/Museion-0.1.0.dmg` 3.0 MB — notarization **Accepted**, staple valid, `spctl`:
DMG and the app inside both `accepted, source=Notarized Developer ID`; apex runs from the mounted
DMG with the bundled libyaml.
- Verification: `scripts/full-test.sh` at the tagged commit — 717 executed / 717 passed / 0 failed; - Verification: `scripts/full-test.sh` at the tagged commit — 717 executed / 717 passed / 0 failed;
`shellcheck scripts/release.sh` clean; `bash -n` clean; preflight refusal exercised; archive step `shellcheck scripts/release.sh` clean; `bash -n` clean; preflight refusal exercised; archive step
ran (38 s); DMG step proven on the dev-signed archive app (3.3 MB UDZO, mounts, signature ran (38 s); DMG step proven on the dev-signed archive app (3.3 MB UDZO, mounts, signature
@@ -62,6 +82,13 @@ feature list and usage instructions now that the codebase is stable.
| `security find-identity -v -p codesigning` showed only `Apple Development` despite Alexander having a Developer ID | A Developer ID private key exists only on the Mac that generated the CSR; the portal copy is useless without it | Preflight names the Xcode path (Settings ▸ Accounts ▸ Manage Certificates ▸ + ▸ Developer ID Application) or a `.p12` import from the other Mac | | `security find-identity -v -p codesigning` showed only `Apple Development` despite Alexander having a Developer ID | A Developer ID private key exists only on the Mac that generated the CSR; the portal copy is useless without it | Preflight names the Xcode path (Settings ▸ Accounts ▸ Manage Certificates ▸ + ▸ Developer ID Application) or a `.p12` import from the other Mac |
| `git log --oneline` hid the merge commit `3bb1782` and read as if HEAD were `cac66f6` | This machine's log config suppresses merges in short logs | Trust `git status --branch` and `git show -s` for ancestry; the snapshot's "ahead 2" was the merge + one chore commit | | `git log --oneline` hid the merge commit `3bb1782` and read as if HEAD were `cac66f6` | This machine's log config suppresses merges in short logs | Trust `git status --branch` and `git show -s` for ancestry; the snapshot's "ahead 2" was the merge + one chore commit |
| AGENTS.md session-log window was one log stale (11-23 missing) | The 11-23 write-log did not refresh the window | Window rebuilt from INDEX's 10 newest rows | | AGENTS.md session-log window was one log stale (11-23 missing) | The 11-23 write-log did not refresh the window | Window rebuilt from INDEX's 10 newest rows |
| Xcode ▸ Manage Certificates ▸ + ▸ Developer ID Application: "This operation can only be performed by the Account Holder" — for the Account Holder | Xcode caches the team role as Admin on Xcode 27.2 / macOS 27.2 (documented by others on the same combo) | Website route: Keychain Access ▸ Certificate Assistant CSR → developer.apple.com ▸ Certificates ▸ + → download `.cer` → `security import` (not `open`, which strands an "Add Certificates" dialog). Script header + refusal message point there now |
| First notarization: `notarytool --wait` passed, `stapler` failed "Record not found" | Submission was **Invalid**, not slow: `--wait` exits 0 on Invalid, so `set -e` walked on | Script reads the status field from `--output-format json` (stdout only) and prints Apple's log on anything but Accepted |
| Apple's log: `Contents/Resources/apex` "does not have the hardened runtime enabled" | Xcode never signs Mach-Os in Resources — the bundled apex was ad-hoc linker-signed | Sign apex at commit time with Developer ID + `--options runtime`; Xcode copies and seals it as a resource |
| Deeper: the bundled apex could never run on a clean Mac | apex's release build links `@rpath/libyaml-0.2.dylib` with rpaths for its CI runner, `/usr/local/lib`, `/opt/homebrew/lib`; macOS ships no libyaml → reading mode silently fell back to source for every non-Homebrew user since #76 | Vendor `libyaml.bundle/libyaml-0.2.dylib` beside apex, same team signature (library validation), one rpath that resolves in bundle AND checkout; proved by removing the dylib ("Library not loaded") and restoring it |
| `Museion/Resources/libyaml-0.2.dylib` → `ld: library 'yaml-0' not found`; and `otool -L Museion` showed `@rpath/libyaml-0.2.dylib` with nothing in Frameworks | Xcode's synced-folder classifier treats a dylib in the folder as the APP's link target — would have shipped an app that can't launch | Extension-less still linked (Xcode sniffs Mach-O content); a `.bundle` folder is an opaque resource → `libyaml.bundle/`. `release.sh` now refuses if the app links libyaml and runs apex from the export |
| `spctl -a -t open … Museion-0.1.0.dmg` → "rejected, source=no usable signature" after a successful notarize+staple | The DMG itself was unsigned; the image-level assessment needs a signature for the ticket to ride | `codesign --timestamp --sign "$SIGNER" "$DMG"` before submitting |
| `lipo … -out` → usage dump | The flag is `-output` | `lipo in -thin arm64 -output out` |
## Files Changed ## Files Changed
@@ -75,21 +102,26 @@ feature list and usage instructions now that the codebase is stable.
| `.gitignore` | `dist/` | | `.gitignore` | `dist/` |
| `AGENTS.md` | Stack line → macOS 27+; commands block `release.sh`; scripts index row; session-log window | | `AGENTS.md` | Stack line → macOS 27+; commands block `release.sh`; scripts index row; session-log window |
| `docs/AGENTS.md` | `docs/releases/<version>.md` contract + index row | | `docs/AGENTS.md` | `docs/releases/<version>.md` contract + index row |
| `Museion/Resources/apex` | 1.1.58 (was 1.1.17): arm64 slice, single rpath → `libyaml.bundle`, Developer ID + hardened runtime (committed signed) |
| `Museion/Resources/libyaml.bundle/libyaml-0.2.dylib` | New — vendored libyaml 0.2.5, install name `@rpath/libyaml-0.2.dylib`, Developer ID–signed |
| `Museion/Resources/THIRD-PARTY-NOTICES.md` | New — apex + libyaml MIT notices (ships in the bundle) |
| `docs/adr/0011-apex-html-reading-pipeline.md` | Bundling consequence rewritten (vendoring, signing, `.bundle` rationale, re-sign on cert rotation) |
| `Museion/AGENTS.md` | Reading-mode line: bundled apex facts + `.bundle` rule |
| `README.md` | License section points at the third-party notices |
| `CHANGELOG.md` | `**reading:**` entry under 0.1.0 Fixed |
## Open Items & Next Steps ## Open Items & Next Steps
- [ ] Alexander: create the Developer ID Application identity on this Mac (Xcode ▸ Settings ▸ - [ ] Authorization to commit the reading-renderer fix (`fix(reading): …`), the `release.sh`
Accounts ▸ Manage Certificates… ▸ + ▸ Developer ID Application — Account Holder only) or hardening (`fix(release): …`), and this log — then move the still-local tag:
import the `.p12` from the Mac that holds the private key. `git tag -f v0.1.0 <release commit>` so the tagged tree is the one the DMG was built from.
- [ ] Alexander (for notarization): `xcrun notarytool store-credentials museion-notary --apple-id … - [ ] Only on explicit go: `git push origin main v0.1.0`, then the Gitea release with
--team-id 3M7APDAAC5 --password <app-specific password>` — the secret never leaves his hands. `dist/Museion-0.1.0.dmg` attached and `docs/releases/0.1.0.md` as the body.
- [ ] Then `./scripts/release.sh` → `dist/Museion-0.1.0.dmg`; mount test, `spctl` should read - [ ] When the Developer ID certificate rotates: re-sign both bundled binaries (ADR-0011 has the
`accepted, source=Notarized Developer ID`. one-liners), otherwise notarization fails on the stale team signature.
- [ ] Only on explicit go: `git push origin main v0.1.0`, then the Gitea release with the DMG - [ ] apex upgrades: same recipe (download the universal release tarball, verify `.sha256`, lipo,
attached and `docs/releases/0.1.0.md` as the body. rpaths, sign) — ADR-0011. Ask upstream for a statically linked build so the dylib dance
- [ ] README's "signed and notarized" sentence is true only after the step above lands — revert disappears.
to the Gatekeeper-workaround wording if notarization is skipped.
- [ ] Optional: a screenshot for the README (launch the archive build, `screencapture -l <window>`).
- [ ] Pre-existing, not touched: Release build emits `Text +` deprecation warnings in - [ ] Pre-existing, not touched: Release build emits `Text +` deprecation warnings in
`TrendsPaneView.swift:389–391`. `TrendsPaneView.swift:389–391`.
+1
View File
@@ -6,6 +6,7 @@ Complete history of session logs in this directory, newest first. One-line summa
| Date | Type | File | Summary | | Date | Type | File | Summary |
|------|------|------|---------| |------|------|------|---------|
| 2026-12-01 | milestone | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) | Release 0.1.0: version bump + tag, README feature/usage rewrite, distilled release notes, release.sh (Developer ID DMG, notarize); rail 717/717; Developer ID cert pending | | 2026-12-01 | milestone | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) | Release 0.1.0: version bump + tag, README feature/usage rewrite, distilled release notes, release.sh (Developer ID DMG, notarize); rail 717/717; Developer ID cert pending |
| 2026-11-30 | fix | [20261130-external-watch-compares-unnormalized-text_log.md](20261130-external-watch-compares-unnormalized-text_log.md) | Unticketed fix (brief-32, argus cycle-6): the external guest's watch reads through the ONE shared external normalizer — the false #67 conflict on unchanged BOM/CRLF files (re-arming after sibling events and alert answers, blocking departures/quit) is gone; real foreign writes still raise; RED-first 3 pins over the real watch closure; rail 720/720 |
| 2026-11-23 | fix | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) | Unticketed fix (brief-28, argus cycle-5): a Home repoint is a guarded document departure — the gate runs before the preference/binding commit, the refusal keeps Home A and the buffers; document identity is (Home, ID) across the model and re-checked at async completion (card scan, rescan — both mutation-checked); RED-first 6/6 at ca265d3b, review r1 +2 pins (rescan hoist, draft survives); rail 717/717 | | 2026-11-23 | fix | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) | Unticketed fix (brief-28, argus cycle-5): a Home repoint is a guarded document departure — the gate runs before the preference/binding commit, the refusal keeps Home A and the buffers; document identity is (Home, ID) across the model and re-checked at async completion (card scan, rescan — both mutation-checked); RED-first 6/6 at ca265d3b, review r1 +2 pins (rescan hoist, draft survives); rail 717/717 |
| 2026-11-19 | fix | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) | Quit routes through the departure gate (#200): conflict-held shutdown, BLOCK-QUIT at applicationShouldTerminate, never-loaded-retype guard; finish-audit fixes; rail 708/708 | | 2026-11-19 | fix | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) | Quit routes through the departure gate (#200): conflict-held shutdown, BLOCK-QUIT at applicationShouldTerminate, never-loaded-retype guard; finish-audit fixes; rail 708/708 |
| 2026-11-17 | fix | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) | Unticketed fix (brief-27, argus cycle-4): stdin writes move to a dedicated writer queue — engine backpressure can no longer defeat the request deadline, Stop, or a bounded reaping close; neverRead/serverPing fake modes, 3 RED-first smokes + healthy-contract pin, suite 697/697 | | 2026-11-17 | fix | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) | Unticketed fix (brief-27, argus cycle-4): stdin writes move to a dedicated writer queue — engine backpressure can no longer defeat the request deadline, Stop, or a bounded reaping close; neverRead/serverPing fake modes, 3 RED-first smokes + healthy-contract pin, suite 697/697 |
+28
View File
@@ -0,0 +1,28 @@
# Museion 0.1.1
*Released 2026-12-03 · a bug-fix release. Entry-by-entry detail: [CHANGELOG.md](../../CHANGELOG.md).*
0.1.1 fixes one bug that shipped in [0.1.0](0.1.0.md) and refreshes the reading-mode renderer.
## What is in it
**No more false "file changed on disk" alerts on guest files.** Opening a `.md` file from outside your library as a guest (⌘O, or a drop) worked — until the file carried a byte-order mark or Windows line endings. Then Museion raised the *Reload / Keep Local* conflict alert on every sibling file event in that folder, even though nothing had changed, and kept re-raising it after either answer. Worse, the false alert blocked every departure: selecting another piece, New Post, quitting. The file watch now reads the disk through the same normalizer the editor uses on open (BOM strip + CRLF→LF), so the compare is like-for-like. A real external write still raises the alert — the guard is not blinded.
**apex 1.1.59.** The bundled reading-mode renderer moves from 1.1.58 to the current upstream release, packaged exactly as in 0.1.0: arm64 slice of the official universal tarball, checksum verified, Developer ID–signed with the hardened runtime, libyaml vendored beside it. No behavior change in reading mode.
## Known limits
- Unchanged from 0.1.0 — see [0.1.0's known limits](0.1.0.md#known-limits).
## Install
Download `Museion-0.1.1.dmg` below, open it, drag Museion to Applications (replaces 0.1.0 in place).
- **macOS 27 or later**, Apple Silicon.
- Hermes and a provider key are needed only for Passes and Sessions; the editor, library, outlines, and publishing work without them — same as 0.1.0.
The app is Developer ID-signed and notarized.
## Numbers
Suite 720 at the tag, run through `scripts/full-test.sh`; SwiftFormat and SwiftLint clean repo-wide.