Repository navigation
Description
Mirror of wiki-studio's Release B tracker (gosha70/wiki-studio#38) for the bridge side. wiki-studio 0.6.0 (released 2026-10-24) names one limitation that only memkernel can close, and memkernel's own Release B items depend on it. Everything below was checked against this repository's src/memkernel/wiki/sync.py and studio.py at 9d93544 and against wiki-studio's 0.6.0 CHANGELOG and docs/roadmap.md.
What 0.6.0 changed that the bridge touches
- An OS advisory wiki lock (
<wiki-parent>/.<wiki-dir>.wiki-studio.lock) serialises every cooperating writer:promote,propose, the ingest-log append,audit-flush.api.proposeandapi.promotetake it themselves. Add the lock file to.gitignorewhere the wiki lives in a repository. - Commit scope.
promotewrites only the paths a patch-set names plus its own.audit/proposals/<name>/. It no longer writes back every differing*.md. - Receipts. Every promoted proposal is archived under
<proposals>/.applied/<name>/with areceipt.json(state, submission digest and manifest, wiki identity by device and inode, the writes made). A retry of an interrupted promotion is resolved from the receipt; nothing is re-applied. - Base revisions. An
updateedit needsbase_sha256(the hash of the page the author read) or is refused with exit 9 unlessallow_unguarded_updates=True. The bridge is unaffected today:studio.pyemits onlycreate,append-indexandappend-log, which promote unchanged. - Containment. Links outside the project root or through a symlink now fail lint and so promote;
--source-rootadmits legitimate outside directories. - Ingest log. New records carry
hash_recipe: 2; a consumer that recomputes the hash picks the recipe by that key. - The pin
wiki-studio >=0.3.1,<1admits 0.6.0 as it stands.
The blocking item: the outer snapshot and rollback
sync.py takes _WikiSnapshot of every *.md and every .audit/**/plan.json before propose_and_promote and restores all of it on GateError or OSError. That restore runs outside the wiki lock and after wiki-studio's own rollback, so it can undo another writer's committed changes made between take() and restore(): their pages are rewritten to the snapshot's bytes, and their .audit/proposals/<name>/plan.json is deleted as "a file that appeared during the export" (the exact case _tracked was written to catch for pre-0.4.1 promote). 0.6.0's release notes say mixed-writer safety across the stack is claimed only once this is closed.
Two ways to close it; either is acceptable to wiki-studio:
- Hold the lock across the lifecycle. Take
wiki_studio.wikilock.WikiLock(wiki_dir, timeout)aroundtake()→propose_and_promote()→restore(). Noteapi.propose/api.promoteacquire the lock themselves and it is not re-entrant in-process; wiki-studio would need to accept a held lock on those two entry points (aswrite_patch_set_dirandappend_ingest_logalready do internally). File that as a wiki-studio request if this route is chosen. - Remove the snapshot. With 0.6.0's scoped commit, exception rollback, receipts and per-proposal archive, the whole-wiki snapshot no longer protects against anything wiki-studio's own protocol does not cover; the bridge would report
gate_errorfrom the exception and leave recovery topromote's receipt rules.
Gate checklist (the "combined integration gate", first item of Release B)
- Snapshot/rollback holds the lock across the lifecycle, or is removed (above).
- Bridge compatibility test against wiki-studio 0.6.0: creates and appends through
api.propose+api.promoteland; a second export of the same pages is refused ascreateof an existing page (exit 9) and reported, not retried blindly. -
.applied/<name>/receipt.jsonandplan.jsonare read by whatever the bridge records about an export (at least the submission digest), so a replayed export can be recognised and does not duplicate memories. - The lock file is ignored or tolerated wherever the bridge creates a wiki inside a git checkout.
- If the bridge ever emits
updateedits, it reads the page first (api.read_page) and passesbase_sha256; it never passesallow_unguarded_updates=Truesilently. - The
.audit/ingest-log.mdconsumer, if any, honourshash_recipe. - A combined concurrency test: a wiki-studio
promoteof another proposal running during a bridge export; both land, neither is reverted, both archives exist.
memkernel's remaining Release B items (from wiki-studio's roadmap, for shaping)
- Governed configuration that requires the gate and refuses the unchecked fallback writer; an identified ungated mode for independent deployments.
- Import of approved revisions only, by page identity and revision hash. Today
sync.pyskips onlydeprecatedpages and imports drafts (status feeds importance, not eligibility); approval must come from the gate's record, bound to the revision hash and policy, with revalidation after a manual edit, and self-declared approval refused. - Withdrawal on supersession, deprecation and explicit deletion; a pending / applied / failed synchronisation state with a retry path; no claimed transaction across Markdown and the memory store.
- Reconciliation of originating raw memories through an explicit page-to-source mapping: a memory an approved page corrects is marked superseded, provenance retained; a multi-source page withdraws only what it corrects.
- Curation debt at session start; bounded candidate batches; source content hashes with git revision metadata.
Exit evidence for Release B as a whole: one complete correction loop (retain, export, review, import, correct, next-session recall) on clean installs with compatible versions, surviving retries.
Activity
gosha70 commentedon Oct 25, 2026
Week-0 decisions for Release B, taken by the owner on 2026-10-24 and recorded in wiki-studio's pitch
specs/pitches/38-release-b-governed-curation/pitch.md(shaped, not yet bet):_WikiSnapshottake/restore aroundpropose_and_promoteand scaffolds throughapi.init. wiki-studio's API stays unchanged; its side of the combined gate is test-only. The held-lock alternative is not taken.api.review_state) by week 5. If it slips, wiki-studio ships 0.7.0 with the memkernel limitation intact and Release B stays open.correctsfield, registered by wiki-studio's ADR-0002 as a memkernel-interpreted key. Its value syntax is not final until memkernel defines a restricted reference-token grammar that excludes commas and ambiguous quoting; a round-trip fixture parsed by both sides, carrying several corrections on one page, pins it.What wiki-studio 0.7.0 will provide for the bridge, per the pitch: a root manifest from
init(wiki_id, schema version, effective-schema fingerprint, policy),api.infowith formats and capabilities of the shipped build,approve/api.approvewith immutable records keyed by (page, revision, policy, decision),api.review_state(approved, stale, policy-changed, superseded, unapproved with reason), optionalpage_id,superseded_by, and findings without a model call.gosha70 commentedon Oct 25, 2026
Correction to the comment above, after further pitch review on wiki-studio PR #44:
api.init; same cycle, snapshot removal by week 2 and approved-only import by week 5; a memkernel-ownedcorrectskey whose grammar memkernel defines.schema.version, which only an ADR bumps; the fingerprint covers only the project's loaded override files under<wiki>/schema/, read by one contained no-follow loader that also feeds the prompt; drift is refused only on a governed wiki (approval_required: true), so a wiki-studio package upgrade never blocks the bridge's writes.api.proposewill not change a caller's bytes by default:page_idassignment is opt-in (assign_page_ids=True), so the bridge's creates land unchanged until memkernel chooses to carry the key.Merge pull request #58 from gosha70/spec/memkernel-0-6-part-2a
Merge pull request #55 from gosha70/feature/memkernel-0-6-release-b
Merge pull request #60 from gosha70/feature/memkernel-0-6-part-2a
Merge pull request #76 from gosha70/spec/memkernel-0-7-withdrawal
Merge pull request #78 from gosha70/feature/memkernel-0-7-withdrawal
gosha70 commentedon Nov 4, 2026
Release B part 2c, memkernel's side, is merged: spec #91, build #92 (merge commit
93ba78d, headaa24c24). This comment covers only the items 2c closes. The other gate items, and the Release B exit run (one correction loop on clean installs), are separate.Gate checklist items only the bridge can tick
.applied/<name>/receipt.jsonis read for every gated export since 0.6. The response carriesproposal,submission_digestandarchived_dir. An export that fails during its commit is classified from the receipt as committed, not committed or uncertain. 2c adds nothing here..<wiki-dir>.wiki-studio.lock, beside the wiki directory (api.proposeandapi.promotetake the lock). memkernel creates no file of its own there. The README tells a project whose wiki is in git to add.<wiki-dir>.wiki-studio.*to its.gitignore(forknowledge/wiki,knowledge/.wiki.wiki-studio.*). That covers the lock file and wiki-studio 0.8's search cache.hash_recipe. memkernel reads no wiki-studio ingest log, so it has no consumer forhash_recipe. The README says so.memkernel's Release B items delivered by 2c
Governed configuration and an identified ungated mode. The setting is
MEMKERNEL_WIKI_MODE:auto(the default) is unchanged.governedrefuses export and import, writing and reading nothing, unless one preflight passes:api.infolistswiki-lock,receipts,root-manifest,page-id,approval-record,superseded-byandfindings;governed(approval_required: true);The direct writer is never used, so
update_index=Falseis refused too.ungatednever loads wiki-studio.Both tools report
mode(gatedorungated) andconfigured_mode.Curation debt at session start. The
startupandclearblock gains a### Curation debtsection:api.findingscounts in a fixed order, review kinds first;It is at most 500 characters, taken from the long-term context's share, so the block stays under 9,000. The check runs in a spawned child, bounded to 2.5 s once the child has started. Measured on a 200-page wiki: median 0.71 s (1.05 s from the session-start hook). It reads the sync ledger without changing it. In
governedmode it reads nothing until the preflight passes.Bounded candidate batches.
MEMKERNEL_WIKI_EXPORT_BATCH(default 10) new pages per export, most important first. The response'sremainingcounts the rest.Source content hashes with git revision metadata. Every exported page carries
memkernel_sha256, the memory's content hash. Apath:source gainssha:(git log -1 --format=%h, the citation rule) only when the file is tracked and unchanged.page_idopt-in. Gated exports passassign_page_ids=True. A page renamed or moved under itspage_idkeeps one live memory, which supersedes the record at the old path. A move with unchanged bytes needs no new approval, because wiki-studio's approval follows thepage_idand the bytes.Seen against wiki-studio 0.7.0
approverefuses a page moved into a directory that doesn't match itspage_type. Even so, the moved page reportsapproved(record_matches_live) without a new approval.approvealso refuses a new page at the old path while the moved page keeps the same slug (duplicate slug).memkernel handles both cases; the tests in
tests/integration/test_wiki_governed_mode.pypin them.gosha70 commentedon Nov 6, 2026
Release B exit evidence, memkernel's side: recorded. #48's exit criterion is "one complete correction loop (retain, export, review, import, correct, next-session recall) on clean installs with compatible versions, surviving retries". Two runs, recorded once each on 2026-11-05 from clean trees under
eval/release-b-exit/README.md's protocol and merged in #101 (merge commitd4e2a73ff79181b4d3cf0f826e125569f6df229f), show it on the released memkernel 0.7.0 and wiki-studio 0.8.1.manifest.jsonsha2567305b9ee429f6490d8e3a47f8e6abbff224367472b953e55104dd9f8a2767ac9ba71ff7ab0f2c50daa7849f5b533fcf52f5a514e61138099876f6a19e6588039completed, exit 0, 75 of 75 checkscompleted, exit 0, 31 of 31 checksgit_commit)fbc28a4361432b763326a539c758b9b56757f9c70cd33f0e38c29bdadbdbd123a0b55250e7bafa86The two "Recorded from" commits differ only because each run starts from a clean tree, so the upgrade run was recorded from the commit that added the exit run's directory;
run.pyandrecord.pyare byte-identical in both (sha2562c7f7f73…andeff69aba…).Both runs:
3653ae5b…and wiki-studio 0.8.1360d9d76…, plus memkernel 0.6.011fb3699…for the upgrade run.all-MiniLM-L6-v2at1110a243fdf4706b3f48f1d95db1a4f5529b4d41), with the hub offline. Python 3.11.3. No model backend on any path.The exit run. A governed wiki (
approval_required: true), with memkernel inMEMKERNEL_WIKI_MODE=governed.The loop:
corrects:) and approves;page_sha:is the approved revision.The withdrawals: a deprecated page, a deleted page, and a page superseded by its successor each leave the current answers, with their records kept.
Surviving retries:
Each converges: the expected pages and records, unique page ids and index entries, no duplicate receipt, and no unfinished ledger entry.
The upgrade run. A store written by memkernel 0.6.0 is upgraded in place to 0.7.0.
ambiguousand changes no memory.adopt_legacy=trueadopts each record once.pip checkafter the upgrade is clean.This closes memkernel’s exit evidence for Release B. The gate checklist items outside memkernel are not covered here.
gosha70 commentedon Nov 8, 2026
Closing: every gate item is done, and gosha70/wiki-studio#38 is closed. The gate checklist above, item by item, at
main700d31f:tests/integration/test_wiki_studio_gate.py:test_creates_and_appends_land_through_propose_and_promote;test_a_page_another_writer_creates_after_planning_is_refused_once_and_kept: a create of an existing page is refused withPromoteValidationError(exit 9), reported ingate_error, and not retried.test_a_promoted_export_reports_its_proposal_and_receipt; ticked in the 2c comment above..<wiki-dir>.wiki-studio.*ignore pattern.updateedits andbase_sha256. The bridge emits onlycreate,append-indexandappend-log(src/memkernel/wiki/studio.py), so there is noupdateto guard, and noallow_unguarded_updates.hash_recipe. memkernel reads no ingest log; the README says so.test_another_promote_during_an_export_lands_and_neither_is_reverted: another proposal promoted during an export lands, neither is reverted, and both archives exist.memkernel's Release B items shipped in 0.6.0 and 0.7.0. The exit evidence is recorded in the comment above (#101).