fix(engine): CRLF frontmatter, shared per-OS paths, multi-platform spec amendments - #173
Merged
Merged
Conversation
…bution Record the 2026-09-16 platform decisions as dated amendments beside the original text: - distribution spec: Intel Mac (x64) and Linux .deb (x64) in scope, with EARS criteria; AppImage, a Windows desktop app, and non-macOS self-update stay out. Fix the stale npm package name. - distribution design: new §11 (one release platform table, per-platform install locations and CLI channel, Linux .deb specifics, split release jobs). - control-plane: npm publishes before Homebrew; the CLI dispatcher moves into the engine; the npm package ships the policy fixtures; milestone 7 starts with the Windows read path. - channels and site specs: native Intel Mac and Linux downloads, npm CLI as the no-app route. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
CRLF: every frontmatter reader tested startsWith("---\n"), so a file saved
with Windows line endings parsed as having no frontmatter and silently lost
its type, title, and dates; past the fence, the last field kept a trailing
\r and was dropped too. okf-local, files, layer-files, and promote now go
through one splitFrontmatter helper, and frontmatter writes keep the file's
line endings.
Paths: new platform-paths.mjs answers where config, data, and cache live on
macOS, Linux (XDG), and Windows, per control-plane spec §5.12, with
CONTEXTCAKE_* overrides. The app-bundled CLI (always the macOS path before)
and the npm CLI (~/.config on Windows before) both read their default
manifest from it.
Promotion bindings move to the data directory. Their macOS home was a
"Local State" folder inside Electron's userData, where Chromium keeps a file
of that name, so staging a promotion failed with ENOTDIR on any Mac that had
run the app. Bindings staged in the old location are still read and removed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
The SQLite store reuses postings by file fingerprint (size, mtime), which a parser change never touches. Without a format bump, an unchanged CRLF note indexed before the frontmatter fix would keep postings and a `type` column from its old frontmatter-less parse until someone edited it. Bump FORMAT_VERSION to 6, test that an older-format store re-analyzes every document, and record the rule in CLAUDE.md. Also note in the manifest trust gotcha that CONTEXTCAKE_MANIFEST and CONTEXTCAKE_CONFIG_DIR select the CLI's default manifest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
This was referenced Sep 17, 2026
siracusa5
added a commit
that referenced
this pull request
Sep 17, 2026
main moved while this PR was open: #173 landed as a squash commit, and #174 (homepage hero) and #183 (version 0.9.4) landed beside it. The squash gave #173's content a new identity, so the three files this branch already carries from it conflicted; this branch's versions supersede them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: John Siracusa <siracusa5@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First slice of the multi-platform downloads work: Intel Mac, a Linux
.deb, a CLI that installs and runs without the Mac app, and the Windows MCPB. This PR records those decisions in the specs and lands two engine fixes the rest builds on. A file saved with Windows line endings now keeps its frontmatter. The app, its bundled CLI, and the npm CLI now agree on where the manifest lives on every OS.Changes
.debx64 are in scope; AppImage, a Windows desktop app, and non-macOS self-update stay out, with the reasons..debspecifics, and split release jobs.fixtures/*.json, Windows milestone starts with the read path./installrequirements updated.packages/core/src/frontmatter.mjs):startsWith("---\n"): okf-local, files, layer-files, promote. A CRLF file lost its type, title, and dates without warning.\rand was dropped.packages/core/src/platform-paths.mjs):CONTEXTCAKE_*overrides.~/.configon Windows. Both now read their default manifest from the helper.Local Statefolder inside Electron's userData. Chromium keeps a file of that name there, so staging a promotion failed withENOTDIRon any Mac that had run the app.platform-paths.mjs.Test Plan
npm test: 65/65 suites, retrieval eval shows no regressionapps/desktop:npm test153/153 on Node 22,test:cli-status,test:navigationfrontmattersuite: CRLF and LF parse identically; a CRLF frontmatter write reads the last field and keeps CRLFplatform-pathssuite covering darwin, linux (incl. relative XDG ignored), win32, overridesplatform-paths.mjsprofile-runtime-test.shrun withoutCONTEXTCAKE_LOCAL_STATE_DIRunder a HOME whereLocal Stateis a file. It passes; the old path fails withENOTDIR.Notes
~/.config/ContextCake; it is now~/.config/contextcakeper §5.12. Nothing has shipped there.apps/desktopnpm run smokewas not run: it needs a console build, and nothing here touches app startup.contextcakeandcontext-cakeare both unregistered on npm. Reserve them with hand-published0.0.0placeholders.🤖 Generated with Claude Code