Skip to content

v5.1.1 — The One Where Your Brain Stops Running Builds

Choose a tag to compare

@tpierrain tpierrain released this 07 Sep 20:25
· 264 commits to main since this release
c10e4b5

What this release is about

Every time you saved a note, your second brain started a software build in your own GitHub account. This release stops it, and removes the cause from brains that already have it.

If you gave your brain a private repository — for a backup, or so your notes follow you from one computer to another — it saves and pushes your notes as you work. That part was working exactly as intended.

What was not intended: every brain was also carrying the automated checks that the Kenjaku launcher runs on its own code. They were sitting in a folder the install should never have copied, and nobody noticed, because nothing in the product ever mentions builds. GitHub, for its part, took them at face value: each push started a full build on several machines, and each one failed — there is nothing to build in a folder of notes. On a real brain that meant roughly nineteen builds a day, against the free allowance of the owner's own account, and a failure mail each time.

This was an oversight, not a trade-off: no version of Kenjaku ever meant a brain to run anything. A brain stores and syncs your notes. It never builds.

Were you affected? Every brain created by v3.1.0 through v5.1.0 has the two files on disk — they have been travelling since 17 June 2026. But they only do anything if your brain also has a repository on GitHub and pushes to it (git config secondbrain.autopush true, which is what the backup and shared-brain setups ask for). A brain with no remote was never affected, and neither were your notes, in any case. You can check in one look: open your brain's repository on GitHub and click Actions — if there is a list of failed runs there, this release is for you, and one update makes it stop.

What you get

When you update your brain — ask it to update (/update-engine); a few minutes, and your notes are not touched.

  • 🏗️ The builds stop, and so does the failure mail. The two files that caused them are removed from your brain, and GitHub has nothing left to run.
  • 🧾 Your brain says so, in plain words, at the moment it does it. Not "2 files removed": that the builds have stopped, that the mail stops, and that the cost stops with it.
  • 🔒 A workflow you wrote yourself is never touched. Only the two files the launcher has ever shipped are removed, by name — and because your brain is a git repository, the removal is in your own history, readable and reversible.

When you create a new brain — nothing to do, it is true from this version on.

  • ✨ A new brain has never had any of this. The launcher's own machinery no longer travels into the brains it generates.

The rest of the time — the moment you set up a backup, or invite someone into a shared brain.

  • 📖 The documentation now says what your repository does, and what it does not. One sentence where you wire up a remote, and one where a second person joins: it stores and syncs, it never builds — so if you ever see builds running there again, you know it is a defect and not something you did.

What you have to do

Open your second brain and ask it to update. It does the rest, and tells you what changed.


Under the hood

Written so it can be read without knowing the codebase: each technical name is explained the first time it appears.

The cause. Kenjaku is itself a software project, and like any software project it keeps its own automated checks in a folder called .github/ — the tests that run on our code every time we change it. When the installer builds your brain, it copies the launcher's files across and drops the ones that are only useful to us; that drop-list is DEV_ONLY_PREFIXES (in scripts/lib/tracked-files.mjs), and .github/ was simply never on it. So filterCopyable, the function that does the dropping, handed our two check files — ci.yml and mutation-nightly.yml — to every brain it generated.

From there, two things run on their own. A brain that has been given a remote repository and told to push (git config secondbrain.autopush true, exactly what SETUP §7 recommends for a backup) pushes once per turn, and ci.yml starts on every push — so every saved note launched the full set of checks, on several operating systems at once. mutation-nightly.yml, for its part, is on a timer and needed no push at all. Every run failed, because there is nothing in a folder of notes for those checks to build. Measured on a brain in the field: about 19 runs a day, on the order of 720 GitHub Actions minutes billed against a free monthly allowance of 2,000. Reported as #92, which stays open until a real brain is seen losing the files at an update — the report was field evidence, and so is its closure.

The half that fixes new brains. .github/ joins that drop-list, next to maintainers/. The test behind it asks git for the real list of files the launcher tracks, rather than a made-up list written by hand, so a check file added next year is caught by the same assertion without anyone remembering. And it first verifies the launcher really does have .github/ files — otherwise an empty list would look like a clean one and the test would pass while proving nothing.

The half that rescues brains already out there is a small module of its own, scripts/lib/workflow-retreat.mjs. Kenjaku already had a mechanism for removing something from a brain, but it could not be reused here: that one only deletes a file when it can prove it delivered that exact file itself, byte for byte, from what the brain recorded at install. No brain in the field recorded anything for these two files — they arrived by accident, outside every category the engine keeps track of. Sent through that door, every brain would have answered "I can't prove it, so I keep it", and this release would have announced a fix that removed nothing at all.

So the proof used here is a different, deliberately blunt one: the two file names the launcher has ever shipped, written out literally. No pattern matching, no list read from a config file, no value taken from anywhere — this door has no input, which is exactly what makes it safe enough to ship in a hurry. Anything outside .github/workflows/ is refused, and so is a path that starts there and then climbs back out towards your notes. It runs only during an update (never during the silent repair your brain does at session start, where a deletion would happen with nobody told about it), it is harmless to run twice, and it says nothing at all when there is nothing to remove — which will be every update from now on.

What the rehearsal on a real brain caught, and no unit test could. Before shipping, the release is rehearsed against a copy of a real brain (originals read-only, copy taken without its git history). Result: both files gone, the deletion safely inside the update's own commit, and not one byte of the owner's notes touched — and the report said nothing about it. The reason is subtle and worth writing down: the summary you read after an update is printed by the engine that ran the update, which is the old one, and the old one has never heard of this release's new sentence. By the next update there is nothing left to remove. The sentence would therefore have appeared never, and the rescue would have been a silent deletion of two files inside somebody's repository. Kenjaku already had one voice for exactly this situation (announceWhatTheOldRecapCannot), and the sentence now goes through it, with the wording kept in a single shared place so the two voices that say it cannot drift apart. Four tests, written first and seen failing; rehearsal re-run afterwards to watch the sentence appear.

Checks. The scripts/lib/** suite: 2679 tests, all passing. Field rehearsal: passed, twice. Marketing surface re-read (CONVENTIONS §10): nothing became false, nothing new to sell, no board re-rendered. The heavier checks (mutation testing, waiting on the full cross-platform matrix) were deliberately waived for this hotfix, on the argument that the change has nothing variable to explore — the deletion names two literal file paths and reads no input.

Knowingly still open. Kenjaku only ever mentions a new version at the start of a session, and quietly. Making that mention more insistent — so that someone who never notices it still ends up updating — was considered and not done here: it changes a line every owner reads every single day, and it rescues nobody tonight who is not already updating. It waits for a release with room to weigh it properly. The other open issues were not covered by this release and stay open.