Make Threadnote 4 self-contained - #84
Open
Kashkovsky wants to merge 64 commits into
Open
Conversation
Kashkovsky
marked this pull request as ready for review
July 28, 2026 12:17
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
Threadnote 4 replaces the OpenViking/Python/Node.js runtime chain with a self-contained Bun distribution, moves
canonical product state under
~/.threadnote, and adds a zero-plugin Obsidian bridge. Users install one Threadnotedistribution and do not need Node.js, npm, Bun, Python, OpenViking, a database server, or a background daemon.
~/.threadnoteembedded Bun application
lifecycle boundaries
~/.threadnote/indexesnode-llama-cppinferencehybrid recall
locks, Windows support, and large-repository traversal
Why
Threadnote 3 depended on a separately managed OpenViking/Python service and npm/Node.js installation. Installation,
upgrades, model preservation, recovery, and cross-platform behavior therefore depended on several external runtimes
and background state.
Threadnote 4 makes canonical data and all normal recall/write paths product-owned and local. Derived indexes can be
discarded and rebuilt without risking canonical memories. The installed application embeds Bun and runs inference in
process; users do not install or manage an application runtime.
Bun runtime and distribution contract
1.3.14is pinned for builds and embedded into every release executable.src/standalone.tsowns the singleBunRuntime.runMainprocess boundary. Application services compose Effectswithout nested runtimes.
@effect/platform-bunand@effect/sql-sqlite-bun; SQLite WAL files remain disposable derivedstate.
mcp-servermode.node-llama-cppis isolated behind one adapter and may load only the compatible prebuilt native payload shippedbeside Threadnote. It never silently compiles llama.cpp or invokes Python.
Windows arm64/x64.
publication remains disabled until Authenticode signing is approved and verified.
Runtime and storage contract
~/.threadnoteis the sole product-owned home.threadnote://URIs remain authoritative.progress feedback.
doctorreports the degraded capability.
preservation, and process-identity leases so running releases are not pruned.
truncated, escaping, or oversized payloads before activation.
Production diagnostics and issue reporting
~/.threadnote/logs, rotating a 1 MiB active file through five retained generationsthreadnote logsfor locating and reviewing retained support filesthreadnote report-issuepreview-only by default, with credential blocking, path redaction, terminal-control rejection, strict log-schema parsing, and bounded newest-entry excerptsgh api --hostname github.com, passing public bytes in an owner-only temporary JSON file rather than process argumentsgh auth loginwithout installing or authenticating automaticallyObsidian bridge
The Obsidian integration is deliberately asymmetric so a vault can participate in recall without replacing
Threadnote's authority and lifecycle model.
Vault → Threadnote recall
recall_contextthreadnote://resources/external/obsidian/...authority: externalandtrust: untrustedregardless of note frontmatterThreadnote → vault projection
Bases
navigation
Vault Inbox → candidate review
Source indexing never creates durable memories, and editing a generated projection never updates Threadnote.
Threadnote remains authoritative for identity, provenance, trust, lifecycle, recall, and sharing.
Migration and compatibility
validated receipts
~/.openvikingsource is preserved unchanged for rollback and completed migrations are not repeatedlyadvertised
update-check.jsonstate plus transient shareFETCH_HEAD,COMMIT_EDITMSG,gc.log, and Git-generated lockfiles cannot block migrationremove legacy memories
compatibility fallbacks
publishing
Release and update process
Threadnote 4 is distributed through immutable GitHub Releases, not npm.
package.jsonand add.github/release-notes/vX.Y.Z.md; the file must begin with## What's new.Publish standalone releasemanually against a selected branch to build, sign, and notarize bothmacOS targets without publishing.
vX.Y.Ztag. The tag-triggered workflow rejects version or release-note mismatches beforebuilding.
Apple notarization, and waits for acceptance. Linux uses the immutable GitHub release plus SHA-256 checksums as its
trust root.
prepends the curated notes to GitHub's generated changelog, and verifies the release is immutable.
Pull-request and ordinary CI builds stay unsigned. Windows build/signing jobs remain present but hard-disabled until
an Authenticode provider and bundled-native-code policy are approved.
There is intentionally no npm transition update from Threadnote 3 to 4 because that boundary cannot be tested safely.
Existing v3 users install v4 fresh; the installer preserves
~/.openvikingfor migration and rollback. Once v4 isinstalled,
threadnote updateandthreadnote update --betause immutable GitHub Releases with checksum verification,side-by-side installation, and atomic activation.
Root causes addressed
Validation
installers, concurrent production logging, and digest-approved support reporting; local packaged E2E currently passes
17 tests with one platform-specific skip
Release status
v4.0.0-beta.13is published as an immutable Apple/Linux prerelease. It contains signed/notarized macOS arm64/x64 and Linux arm64/x64 archives with adjacent SHA-256 files. Beta.13 completes interrupted local-share recovery by preserving the current managed-share Git index and staging state while recovering disjoint legacy memories and unpublished Git objects. It still fails closed on conflicting refs, configuration, reflogs, operation state, and other durable Git content, and leaves the legacy rollback source untouched. PR source CI and the complete release workflow passed, and the release tag tree exactly matches this branch.Windows artifacts are not published yet; Windows remains a compile and self-contained E2E gate until Authenticode is
ready.