All notable changes to maw.
Nineteenth dogfood pre-release. It fixes data-loss bugs in the replay of uncommitted trunk edits and in maw ws recover --restore-file; the worst, found by the codex sweep, can delete files outside the repository and is in pre.18 and earlier. It also makes uncommitted trunk edits survive more merge and crash paths, and restarts the SG1 soak on a stricter harness. Upgrading is recommended. One behaviour change: undo is now a reserved workspace name.
Data loss fixed
- Replaying uncommitted trunk edits no longer deletes or writes files outside the repository (bn-3u5a4, found by the codex sweep). Suppose a merge replaced a tracked directory
dwith a symlink to a directory outside the repo, and your uncommitted state deletedd/x. The replay then deletedxin the symlink's target. Writes could follow a symlinked parent the same way. Every replay path is now checked component by component: a symlinked parent makes the replay refuse, and your state stays pinned and reported. This bug is in pre.18 and earlier. maw ws recover --restore-file <dir>no longer overwrites an ignored file in the destination without--force(bn-3u5a4). Status omits ignored files, so the check missed them. With--force, it no longer deletes an uncommitted symlink nested inside a directory in the way.- A crash inside the snapshot-failed fallback no longer leaves your edits only in a recovery ref (bn-1eg2u). The fallback now writes a checkout intent before its forced checkout, so
maw ws merge --recoverreplays your edits.
Uncommitted trunk edits across merges
- The snapshot-failed fallback now merges your edits instead of keeping only the merged version (bn-2ds48). It replays your pinned state through the same path a crash recovery uses. When you and the merge edit different hunks of one file, both survive; the same hunk gets conflict markers plus a report. Before, only a crash recovery merged them.
- An uncommitted file↔directory swap on a path the merge didn't touch stays in place (bn-ihi4h). Before, it was always replaced by the merged version and reported. The replay also applies deletions before additions now, and removes a directory only if it holds nothing but empty directories.
- Directory conflicts have a one-step restore (bn-1eg2u).
maw ws recover --ref <pin> --restore-file <dir>restores a whole directory, untracked files included. It removes the merged file or directory in its way only if that content is committed and clean, unless you pass--force. Conflict messages now say "replaced by file p" instead of "deleted". - A merge that only flips +x on a file you replaced with a symlink is reported as a type conflict (bn-ihi4h). The printed restore command puts your symlink back.
- The replay's filtered snapshot is pinned at
refs/manifold/replay/<ws>while the replay runs (bn-1eg2u), so a concurrentgit gc/prune can no longer remove it mid-merge. - Every restore command printed after a failed replay runs as printed (bn-7xuvm, bn-3u5a4). The broken
git stash apply <oid>hint is gone; maw prints one command per path, and one per file↔directory swap.
Recovery snapshots and workspace names
maw gc --recovery-snapshotskeeps themaw undopin that a redo still needs (bn-43x5k).refs/manifold/recovery/undo/*pins are no longer treated as a destroyed workspace namedundo. The pin the next redo re-applies is protected like a live workspace's pin: only--include-liveconsiders it, dropping it needs--force, and the refusal listing marks itUNDO. If the op log can't be read, every undo pin is protected.--include-live --forceno longer leaves a destroy record that points at a deleted ref (bn-43x5k). When a workspace name was reused, the old record is removed in the same pass.undois a reserved workspace name (bn-asqh7).maw ws create undoandmaw ws recover … --to undorefuse and suggest another name.maw doctorwarns about an existingundoworkspace, and every command in its rename hint runs as printed.
Agent guidance
- The examples in
maw --help,maw ws merge --help,maw tldrandmaw agents showrun non-interactively as written (bn-39nsp). They use--from main, pass--messageon every landing merge, resolve conflicts withmaw ws resolve --list/--keep, and say that an orchestrator (e.g. edict) may run the merge and that the lead pushes. A test runs them with stdin closed. - Suggested merge commands in hints and JSON fields (
recommended_command,recommended_action) include--message "<msg>"(bn-hfge7). Replace the placeholder with a real message.
Verification (the v1.0 gate)
- The SG1 soak's checks judge more and are stricter (bn-36chi, bn-ihi4h, bn-1axaz).
- A pre.18 soak seed showed that recoveries were settled before the displacement check ran, so a displaced path during a recovery could go unjudged. Recoveries are now judged first.
- Edits both sides made to one file are checked against a
git merge-filereference. A merged side kept silently where the reference conflicts is now a failure. - Also checked now: the exec bit on newly added paths, one-sided file↔directory changes, tainted recoveries, and a report that names the path together with its recovery command.
- Replacing an untouched swap is now a failure, even when reported.
- New crash windows cover the fallback and replay.
slot.shstops a slot whose trunk evidence falls below a minimum.- The campaign restarts on this release.
just checknow runs thefailpoints-feature test suites, and CI's verify workflow runs them too (bn-36chi). Until now, no gate ran the fallback and crash tests behind that feature.just checkalso runsmaw-scenario's tests, where the soak's seed-stream checksums are pinned.notes/v1.0-acceptance.mdlists each v1.0 gate as a yes/no check with its owner, status and evidence (bn-l6o7).
Eighteenth dogfood pre-release. It fixes data-loss bugs found by running the deterministic-simulation tests on the consolidated layout for the first time and by widening the SG1 soak to cover uncommitted trunk edits across merges. Several of these bugs shipped in pre.17 and earlier. Upgrading is strongly recommended. One behaviour change affects scripts: maw gc --recovery-snapshots --older-than 0 now needs --force.
Data loss fixed
- Replacing a tracked trunk directory with a symlink no longer wipes every uncommitted trunk edit (bn-1dlkd). gix status aborted on the file-type change, so the merge's snapshot failed, its fallback captured nothing, and the forced checkout overwrote the worktree while
maw ws mergeprinted[OK]and left no recovery ref. Status now falls back togit statuswhen gix fails; the merge refuses to touch a worktree whose uncommitted state it could not capture completely (the journal is kept, somaw ws merge --recoverfinishes later); and the directory/symlink change is reported as a conflict with your version pinned. - Checkout no longer deletes files through a symlink (bn-1dlkd). Its stale-file cleanup followed symlinks, so it could delete files outside the tracked tree through a symlink you created, and it never removed a tracked symlink to a directory.
- FF-absorb no longer detaches the consolidated repo root (bn-1jfui). When the merge then failed after the absorb, your next
git commitin the root landed offmain, and the next merge orphaned it. - Untracked files with non-UTF-8 names are no longer deleted by a merge (bn-31ijd, found by the codex sweep). Status silently skipped such paths. maw now refuses rather than omits: a merge stops with its journal kept, and
--recoverworks after the file is renamed. Full non-UTF-8 support is tracked separately. - Plain
maw gcno longer deletes the default workspace's refs on the consolidated layout (bn-1m3lx). It treatedrefs/manifold/{head,epoch/ws,ws}/defaultas dangling, which wiped the default workspace's op log (maw undothen reported nothing to undo) whilemaw doctorreported OK.
Correctness
- A merged change that clears an executable bit (755 to 644) is applied (bn-2nnuz). Checkout only ever added +x, so every checkout path — the trunk update after a merge,
ws sync, sibling auto-rebase, advance and recover — left the file executable, and the next commit reverted the merged mode. The snapshot-failed fallback also keeps your own mode change. - Printed restore commands quote filenames (bn-31ijd).
Recovery snapshots (behaviour change)
maw gc --recovery-snapshotskeeps pins of workspaces that still exist (bn-wxg28), including the default workspace's dirty-trunk pins;--include-livedrops them too.- Risky sweeps need
--force(bn-wxg28). With--older-than 0, a pin younger than a day, or a live workspace's pin, gc deletes nothing and lists each ref with its workspace, a LIVE marker and its age, plus the exact commands to inspect, preview (--dry-run) or rerun with--force. Scripts that ran--older-than 0must add--force.
Verification (the v1.0 gate)
- The production-tier deterministic-simulation tests now run on the consolidated layout (the default since pre.2) as well as legacy v2, with reachable prepare/validate failpoints and real SIGKILLs at commit sites (bn-1jfui).
- The SG1 soak now drives a real trunk worktree through the production
update_default_workspace, writes uncommitted trunk edits of every kind, and judges them with preservation, displacement and replay-faithfulness oracles (bn-1h9ue, bn-2zubk). A pre-release review of the harness fixed six ways a seed could pass unjudged or overstate coverage (bn-3adck); the remaining known blind spots are documented incrates/maw-assurance/src/trunk.rs. Oracle fixes for gc-drained snapshots and the destroy-record path (bn-m7kjy). The soak campaign restarts on this release's harness. just checknow runs the assurance-feature clippy lane that CI runs (bn-2zubk).
Seventeenth dogfood pre-release, focused on crash recovery, the replay of uncommitted trunk edits across a merge, fail-closed configuration, and the integrity of the SG1 soak (the v1.0 release gate). It includes a fix for a ws sync failure reported from the bones repo. A pre-release sweep (one slice run by codex / gpt-6-astra) found and fixed further defects in code added this cycle. Upgrading is recommended.
Merge crash recovery
- A merge that crashed after its commit step is recovered instead of wedging the repo (bn-1fcox). Previously the journal could only be deleted by hand, and FF-absorb,
doctor --repair,epoch syncandundoall refused while it existed.maw ws merge --recovernow finishes a merge whose ref update provably landed (op record, sibling rebase, target checkout,--destroyof sources still at their frozen HEAD, journal cleared) and aborts one that provably did not; it refuses and keeps the journal when the refs prove neither.--abortfinishes an already-landed merge (and points atmaw undo), and the nextws mergerecovers automatically. Every refusal message now points at--recover.fsck --repairno longer deletes post-commit journals. - A crash between the target checkout and the replay no longer strands your edits in a recovery ref (bn-15fzo, bn-1bkr0). A durable checkout intent lets the next run replay the original edits, including after a second crash during recovery. The intent is now written before any tree change, residual edits are pinned before cleanup, and a corrupt intent stops recovery instead of being treated as absent.
- Recovered merges report and record like live merges: no false local-vs-merge conflict, no duplicated Merge op, the target's Snapshot op is written, and skipped post-merge hooks are printed with their commands (bn-28s78, bn-1losw). If the manifold config is invalid, recovery warns and skips the sibling rebase instead of applying defaults.
Your uncommitted trunk edits across a merge
- An executable bit committed by a merged workspace is no longer reset to 644 (bn-3fcbu). Your own mode change still wins.
- Symlink/file and file/directory type changes no longer abort the replay (bn-2ygs0, bn-3jqfk). They are reported as
type_change/directory_changeconflicts that keep the merged side on disk and print one exact restore or inspect command for yours. The fidelity check no longer writes through a symlink, and the pre-merge capture and fallback recovery pin store a dirty symlink as a symlink rather than as its target's contents.
Sync
- Syncing a workspace whose commits move a directory works again (bn-1ijl). gix's rename tracker reports a whole-directory rename in addition to the per-file renames; maw read the directory as a blob and failed with "blob expected, found tree", leaving the workspace unable to merge. Directory-level renames are dropped (their files are still reported). A submodule replaced by a regular file no longer loses the file's bytes.
Configuration fails closed
- An invalid
.maw/manifold/config.tomlor.maw.tomlmakes commands that change state refuse (bn-hcbc8, bn-qi5br). Previously they silently used defaults — e.g.ws mergeabsorbed trunk commits with default policy andepoch syncre-pointed the epoch atmain. Refusals name the file, line and parse error with a fix line; read-only commands warn once. Recovery commands never refuse because of config on the consolidated layout (recover --restore-file), andrecover --to/migraterefuse before changing anything (bn-15ebo). Unknown.maw.tomlkeys warn with the nearest valid key (bn-1losw).
LFS
- Smudge decodes exactly what git-lfs smudge decodes (bn-hcbc8), so non-canonical pointers written by other tools are materialized, while size mismatches and extension pointers stay as pointers as git-lfs leaves them. maw never discards bytes past a pointer's first 1024 bytes (a deliberate difference from git-lfs).
Other
maw ws destroyexplains an "unmerged changes" refusal when the content is already in the epoch (e.g. cherry-picked) and suggests--force, which still snapshots (bn-2eszz).maw ws history defaultworks on the consolidated layout, andmaw ops logorders same-millisecond ops stably (bn-15fzo).
SG1 soak (v1.0 gate) integrity
- The pre.6 soak campaign (96% of 1e8 op-steps) is abandoned and not counted: its two "violations" were disk-quota errors, its driver counted harness errors as clean, and its in-process destroy never ran (an invalid recovery ref name was rejected and ignored), so destroy, recover and the gc recovery drain were never exercised (bn-30v6e, bn-25pac). The driver now fails closed with a
HarnessErrorverdict and a per-seed vacuity guard, infra I/O errors are retried rather than counted, pinned regression seeds must reproduce the named oracle finding, op-steps are counted exactly, and a violation can never be reported as DONE or overwritten by an infra halt (bn-2qamr). Two new crash points guarding the fixes above are crash-tested in DST (bn-1sbjf). The campaign restarts on this release's harness.
Sixteenth dogfood pre-release, focused on formal verification. The existing Kani proofs, merge property tests and Stateright protocol model had silently stopped compiling or running; they are revived, wired into just check and a new verify CI workflow, and extended to the code that actually produced past defects: path predicates, the FF-absorb sibling decision logic, the LFS pointer codec, merge-phase transitions, and the multi-process protocol. That work, a cargo mutants pass and a three-way pre-release sweep (one run by codex / gpt-6-astra) found and fixed several data-loss and corruption defects, most of them present since pre.10 or earlier. Upgrading is strongly recommended.
Data loss and corruption fixes
- K-way conflicts list every overlapping workspace (bn-1lwk; since pre.10). When three or more workspaces edited the same region, the conflict listed only the first two. Later workspaces were missing from
sides,maw ws conflicts,maw merge last-conflictand the markers, and--resolve cf-X=<ws>rejected them, so every available resolution silently discarded their committed edits. Participants are now every workspace whose edits pairwise-conflict with another's, on both the plain and AST paths. - Resolving a conflict keeps other workspaces' edits to the same file (bn-28os; since pre.10). If
waandwbconflicted on line 1 andwcedited line 7 of the same file,--resolve cf-X=wa(and--resolve-all, and atom resolution) usedwa's whole file, droppingwc's committed edit while reportingwcas merged. Conflict records now carry these "bystander" workspaces and every resolution folds their edits back in; if that fold conflicts, the bystander becomes a side instead of being dropped.content:PATHwarns when the supplied file omits a bystander's edit. - Atom-level
--resolve cf-X.N=<ws>no longer joins lines or reverts clean edits (bn-34zv). The splice dropped the region's trailing newline (l1\nwbl2\nl3\nbecamel1\nwbl2l3\n), used a wrong line offset after earlier clean edits, and reverted every clean edit outside the conflict. Atom resolution now replaces each conflict block with the chosen side's exact bytes (CRLF and missing final newline included). - AST-merge atom resolution no longer drops clean edits or overwrites following code (bn-22nk, found by the codex sweep). AST atoms omitted a participant's clean edit to another function, and added-node atoms used the variant's coordinates as base ranges. AST atoms are now used only when they provably reconstruct every side; otherwise maw falls back to diff3 atoms. Atom resolution also refuses files containing literal conflict-marker lines (which could parse to empty content); whole-file choice still works.
- File/directory clashes between shared paths no longer commit a corrupt tree (bn-2jml). If two workspaces added file
aand two others addeda/b,maw ws mergereported OK and advanced the branch to a tree containing both a blob and a tree nameda(git fsck: duplicateEntries), then failed to check it out. Clashes are now detected across all non-deleted paths, the conflict names every workspace involved, and tree building refuses any file/directory clash or duplicate entry as a last line of defence. - FF-absorb can no longer silently revert merged work or overwrite an agent's edits (bn-302v). The sibling's epoch ref was written before its files and HEAD; a crash or a warning-only failure in between left the ref ahead of HEAD, and the sibling's next merge cleanly reverted the absorbed epoch. The fast-forward also held no sibling lock and used a dirty-path list computed earlier, so a concurrent agent edit or commit could be overwritten. Each sibling is now try-locked, re-classified on fresh state, materialized, moved with a HEAD compare-and-swap (git's own
HEAD.lock), and only then has its epoch ref written. A sibling whose HEAD cannot be read is left stale instead of fast-forwarded. - Quarantine promote publishes the fix, not the failed candidate (bn-3rhz). If an agent fixed a quarantine with
git commit, promote validated the fixed worktree but published the original candidate, then deleted the worktree holding the only ref to the fix. Promote now builds on the quarantine's HEAD (which must descend from the candidate). - Removing a quarantine always leaves a recovery snapshot (bn-jfj2).
maw merge abandondeleted the quarantine worktree without a recovery pin, so fix commits and edits made inside it were unrecoverable. Abandon (and promote's cleanup, when the worktree holds anything the promoted commit does not) now snapshots it underrefs/manifold/recovery/merge-quarantine-<id>/with a destroy record, somaw ws recover merge-quarantine-<id>lists it and--show/--restore-file/--towork; if the pin fails nothing is removed. The library refuses to remove a quarantine worktree without proof of a pin. The redo path ofmaw ws undolikewise no longer re-destroys a workspace whose recovery pin failed. maw merge abandoncan no longer delete an ordinary workspace (bn-ggo5, bn-1cth).abandonjoined the id into paths unvalidated (../..escaped.maw/manifold/quarantine/and could delete an outside directory holding astate.json), and in the consolidated layout it deleted.maw/workspaces/merge-quarantine-<id>even when no quarantine was recorded — which maw's own sync/merge refusal message told users to run. Ids are validated, unrecorded ids are refused (pointing atmaw ws destroy, which snapshots), andmerge-quarantine-is reserved at workspace creation.- Concurrent
maw ws createno longer loses a workspace to a racing prune (bn-1u93). The worktree admin entry was written before the worktree directory existed; a prune from any concurrent create/destroy deleted the half-built workspace and the create failed withindex.lock: No such file or directory. Admin dirs are now marked with git's ownlocked"initializing" marker during creation, prune skips locked dirs, andgitdiris written last via rename. gc --recovery-snapshotsno longer collects fresh pins of old work (bn-3maj). Pins were aged by the pinned commit's timestamp, so adestroy --forcetoday of a workspace whose last commit was two months old lost its recovery point at the next gc. Pins are now aged by their creation time (from the ref name, else the destroy record).
Crash-safety and concurrency
doctor --repaircan no longer move the epoch backwards (bn-32g8) — it now holds the epoch lock and advances with a compare-and-swap.- Operations refuse to move the epoch under an unfinished merge journal (bn-302v, bn-3rhz). After a crashed merge, FF-absorb,
doctor --repair,maw epoch syncandmaw ws undocould advance the epoch, after which neither--abortnor the next merge could recover the journal. They now refuse and print the recovery command. - Quarantine promote is locked and atomic (bn-3w2b): it holds the epoch lock, moves epoch and branch in one atomic compare-and-swap, and refuses while an unfinished merge journal exists.
maw changes closedeletes the branch with a compare-and-swap against the checked commit. The COMMIT phase andepoch_afterare written in one journal write. - Merge-state writes fsync the parent directory; the unsafe
Cleanup -> Abortedtransition is removed;SequenceGeneratorno longer overflows atu64::MAX(bn-2l63, bn-s8ti).
Layout, config and LFS
- One manifold config location per layout (bn-2dyz). Merge read
.maw/manifold/config.tomlwhile FF-absorb, auto-rebase, backend selection and others read.maw/config.toml, so a setting in one was silently ignored by the rest. Everything now reads<manifold_dir>/config.toml; keys set only in the legacy file are still honoured with a warning.[merge.validation]in.maw.tomlis honoured (bn-ila3). - Merge quarantines are handled as quarantines (bn-1cth, bn-ila3, bn-2dyz). In the consolidated layout they were created inside the trunk checkout (
<root>/ws/); they now live under.maw/workspaces/, are skipped by auto-rebase and FF-absorb, are shown with promote/abandon commands, and are refused byws sync/ws merge.maw merge promoterefreshes the root checkout in the consolidated layout. Validation no longer creates a stray.manifold/at the root. - LFS pointer handling matches git-lfs (bn-z9t3, bn-ggo5). The parser now accepts exactly what git-lfs accepts and writes (it previously accepted malformed pointers such as keys out of order or unknown keys), and write/parse round-trip. The clean path passes content through unchanged exactly when git-lfs would, so non-canonical pointers written by other tools are no longer wrapped in a pointer-to-a-pointer, and a file that merely starts with the version line is stored in LFS. A batch-client panic on non-ASCII oids is fixed.
- The workspace name
epoch-delta(used internally for epoch-delta injection) is reserved at creation (bn-2l63).maw ws undono longer accepts an empty or.path, which would have removed the whole workspace (bn-2wav).
Verification
just checknow also runs the no-default-features build, the merge property tests (just proptests) and a fast multi-process Stateright model check (just formal-fast). A newverifyworkflow runs the Kani proofs (41 harnesses across the root crate, maw-core and maw-lfs) and the full Stateright model on PRs and pushes to main (bn-86hd).- The Stateright model now tracks file content across merge, sync, destroy, auto-sync, doctor, quarantine promote, agent edits, trunk commits and crashes, with the epoch lock and per-workspace locks. Every historical defect class (bn-mq3b, bn-rah2, bn-p3m9, split CAS, pre-bn-38vw, reversed lock order, and those fixed in this release) is kept as a mutation the checker must still catch (bn-3ppf).
- FF-absorb sibling classification is a pure function in maw-core, proven exhaustively with Kani (bn-27n7); path-containment checks are proven with Kani plus exhaustive tests over real paths (bn-2wav); a
cargo mutantspass closed every non-equivalent surviving mutant in the data-integrity modules (bn-3bjx). - Flaky tests fixed: concurrent-create race (above), validation descendant liveness (bn-2xqt), unserialized global failpoints (bn-1svi; failpoints can now be scoped to a thread).
Fifteenth dogfood pre-release, focused on merge validation and quarantine recovery.
- Verbose validation no longer deadlocks (bn-15tj). Merge and quarantine promotion drain stdout and stderr while validation commands run. Each stream retains its last 1 MiB, with explicit truncation notices. Timeouts preserve partial diagnostics and terminate the command's process group on Unix. Output collection also has a deadline when descendants retain pipe handles.
- Consolidated-layout merges use the correct workspace path (bn-1uif). The active-change ancestry guard uses backend-resolved paths for merge,
--check, and--plan. Unbound workspaces with unmerged active-change ancestry still cannot promote those commits to trunk. - Quarantine promotion refreshes the default worktree (bn-emj1). A successful
maw merge promotechecks out the promoted epoch and preserves uncommitted edits. The default worktree now agrees with the advanced branch and epoch refs. - Maintenance. Updated repository security-review instructions, corrected expressions rejected by Rust 1.98 Clippy, and pointed the manual formal-check recipe at the relocated model tests.
Fourteenth dogfood pre-release. Three data-loss-class defects closed in the FF-absorb path (the third and fourth since pre.11), a destroy-time stat-cache-blindness fix that closes the last known window in that class, a new opt-in DST corruption primitive, and two fresh-eyes sweeps that found and fixed eleven further substantiated defects across sync, checkout, recovery, and LFS materialization.
FF-absorb data-loss fixes (third and fourth in this class, after bn-p3m9 and bn-286g)
- Stale dirty siblings no longer silently revert an epoch's hunks (bn-mq3b, bn-2fto). FF-absorb could advance a dirty sibling's HEAD to the target epoch even when the sibling was more than one epoch behind with an uncommitted edit on a path that changed in an earlier epoch — the
dirty ∩ ff_pathscheck missed it because the path wasn't in the global fast-forward set. The worktree kept the stale blob behind a HEAD claiming the new epoch, so the sibling's next commit silently reverted the epoch's changes. A newff_dirty_stale_conflict()predicate (fails closed on unreadable HEAD/tree) now leaves such a sibling untouched instead of moving it, andmaw ws historyrecords the skip and any zero-replay FF-absorb advance so both are visible after the fact. - Directory/file prefix collisions are now caught (bn-26wt). The FF-absorb safety predicate only checked exact-path overlap; a directory replacing a file (or vice versa) at a shared prefix slipped past it. The central safety predicate, the stale-dirty classifier, and the sibling materializer filter now all reason about prefix collisions, not just exact paths.
- Dirty-path inspection fails closed (bn-vzj1). A repo/status error during FF-absorb's dirty-path check used to return an empty set — treated as "nothing dirty" — which could let a mutation proceed against unverified state. Errors now propagate, and all call sites reuse one verified dirty-path snapshot instead of re-querying (and re-risking silent failure) mid-operation.
- Index-write retries no longer blame the wrong failure (bn-vzj1). Index I/O retried on any error, including non-contention I/O failures it misattributed to "another process holds the lock." Retries are now scoped to the actual
PermanentlyLockedcase.
Destroy-time stat-cache blindness closed (bn-2k9e)
maw ws destroy's recovery snapshot was blind to stat-cache-masked stale worktree bytes in two places:list_dirty_paths(whether to snapshot at all) andcapture_dirty_worktree'sgit add -A(which bytes actually get staged — git's own add trusts the stat cache too). A masked file could be destroyed with its recovery snapshot silently pinning the wrong (HEAD) blob instead of the real on-disk content.- Fix reuses bn-154g's tree-diff-based hidden-divergence detector plus a chunked force-rehash pass before staging. Detector failure now widens the rehash to every tracked file (or refuses outright on the non-force path) rather than trusting the stat cache; pin failure aborts the destroy before any record or removal happens. The
MaskedStalePreservationDST oracle now judges destroy operations directly — previously carved out as "unjudged."
New DST corruption primitive (bn-22jy)
- A new opt-in fault class injects stat-cache-masked worktree corruption during DST runs (
corrupt_weight, 0 by default — byte-identical to prior runs, pinned by op-stream digest tests), verified by a newMaskedStalePreservationoracle and a regression plan that turns RED when the bn-154g guard is neutered.
Fresh-eyes sweeps (two rounds, eleven substantiated defects)
- Append-only merge-driver gate hardened (bn-3vvm). Invalid
[merge].append_onlyglob patterns were silently ignored instead of erroring;--check/--planskipped the append-only gate entirely; FF-absorb applied directory/file-swap paths in lexical order, leaving directory-to-file siblings dirty; materialization rejected non-UTF-8 Unix symlink targets it should have preserved verbatim. .gitattributesand migration detection (bn-1b0t).worktree_state_commitignored a modified or deleted.gitattributeswhen computing LFS/clean-filter behavior; the brownfield-migration notice failed to account for an existing.maw/manifolddirectory.- Recovery containment and LFS materialization (bn-1b3n).
maw ws recover --restore-filefollowed parent symlinks outside the intended destination; pointer-shaped files that weren't actually LFS pointers were smudged anyway; materialization verification depended on an externalgit-lfsbinary being present; repair and FF-absorb paths could write raw LFS pointer stubs into the worktree instead of smudged content. - Auto-rebase verification race (bn-jhd7). Materialization verification after auto-rebase ran outside the sibling lock, and corruption failpoint targets accepted relative paths that could resolve outside the intended scope; both are now scoped correctly, with cross-process and parser regressions added.
- Destructive checkout paths (bn-3s8u). The sync pre-overwrite guard failed open when authoritative content hashing errored, and native checkout could leave deleted non-UTF-8 tracked paths behind instead of removing them.
Other
- Ref-update errors from push/release are now classified by a typed
GitError::RefConflictinstead of matching a"lock"substring in the error text (bn-2gbv); this deliberately drops generic lock-contention messages down to a plain retry hint rather than misreporting them as ref conflicts. AttrsMatcheris now memoized per HEAD tree OID during blob writes instead of re-walking the HEAD tree per file — 10-38x faster on 300-2000-file snapshots (bn-2fps).checkout_detach_removes_stale_tracked_filesno longer assumes a git behavior that was never guaranteed; it now checks out in place instead of reusing a populated worktree directory (bn-24xy — not a regression in the underlying git version).- Severity wording, config-path messages, and timestamp formatting cleaned up across
doctor/fsckoutput (bn-34wr).
Thirteenth dogfood pre-release, focused on preserving user decisions during conflict resolution, hardening working-copy recovery, and making release automation reliable across maw's workspace layouts.
Conflict resolution and recovery
- Manual resolutions are preserved (bn-3v9e). Structured
--keepnow refuses to overwrite a path that diverged from its recorded placeholder. The explicit--accept-currentflow validates headers, rejects remaining conflict markers, preserves header-free bytes exactly, limits auto-commits to selected paths, and reports honestly that build/test verification is still required. - Conflict state stays coherent.
ws resolve --list,ws conflicts, and merge gates now use the same effective union of structured metadata and committed placeholders, prune stale entries per path, and provide actionable guidance for header-only and marker-bearing states. - Working-copy restoration is safer (bn-3v9e follow-ups). Snapshot and replay paths now preserve file/directory transitions and manual content without sweeping unrelated staged work; unsafe relative paths and symlink escapes are rejected before mutation.
Release and workflow tooling
- Release preparation handles single-version workspaces (bn-3oae).
maw release prepareandpreflightnow correctly update and validate the root package plus internal path dependencies, with deterministic lockfile regeneration. - Publish dry-runs are workspace-safe (bn-2s4x). The CI publish check patches internal crates to local paths so the dry-run validates the repository's actual package graph.
- Improved consolidated-layout help, default-rebase guidance, and the
ghoverride path used by change workflows.
Twelfth dogfood pre-release. The largest batch since pre.1: the "30 ideas → top 5" reliability push, full closure of a second mess field report (bn-1m4d, ~30 workspaces / 147 commits, zero data loss), the release-automation tooling used to cut this very release, and a fresh-eyes sweep across merge, clean, history, and fsck.
Reliability top-5
- Repo-level epoch lock (bn-13rc). All epoch mutations (sync, merge, advance, epoch-sync) now serialize on
.maw/manifold/locks/epoch.lock(fs4 flock, holder JSON metadata, exit 75EX_TEMPFAILon contention,[lock]config +MAW_LOCK_NO_WAIT/MAW_LOCK_WAIT_SECS). Racing concurrent syncs now serialize and both succeed instead of racing the epoch ref. maw fsck(bn-1uot). New offline deep state verifier: a 14-invariant catalog covering ref/record/recovery coherence;maw doctor's 6 coherence checks now delegate to it.--repairre-pins unpinned recovery refs and clears only provably-orphaned merge-state, exit 0/1/2. A fresh-eyes follow-up (bn-1283) hardened--repairto never treat an unreadable merge-state as repairable — deleting it could kill a live merge — plus fixed a disabled-audit JSON omission and added an advance-orphan regression test.- Prime-Invariant runtime auditor (bn-2rnq). Capture/audit brackets now run inside the epoch lock on every merge, sync, advance, and epoch-sync, printing a proof line (
INVARIANT: verified N sibling workspace(s)) and, on violation, pinning a recovery ref and blocking loudly with a nonzero exit. A fresh-eyes follow-up (bn-lf1d) extended the audit boundary to cover FF-absorb itself, so a source workspace whose committed work is lost during epoch absorption is caught instead of being hidden by the final merge audit's source exclusions. maw undo+maw ops log(bn-117s). Undoes the last epoch-mutating operation (epoch + branch CAS rewind, sources restored from recovery snapshots, dirty trunk byte-preserved), pinning the result atrefs/manifold/recovery/undo/<ts>; undo-of-undo is redo. Refuses on epoch-advanced/diverged/pushed/workspace-recreated states.- DST escape-path coverage (bn-2bcx). New out-of-maw-commit / dirty-trunk-write / gc fault classes plus sibling-ref-faithfulness and trunk-dirty-preservation oracles in the production DST tier, proven against a deliberate revert of the bn-rah2 fix (fires at step 7).
Field report 2 — closed end to end (bn-1m4d)
post_synchooks (bn-1lhb). Configured[hooks] post_synccommands now run after any sync or auto-rebase replay, signal-only, surfaced as a NOTE in the merge summary andhook:FAILinws list/JSON.- Comment-syntax-aware conflict headers (bn-drk3). Structured-conflict headers now use the right comment syntax per file type (
//for.rsetc.,--for.sql/.lua), with the legacy#form still parseable everywhere. (add/add and modify/delete headers remain#-only.) maw ws clean(bn-auu5). New command snapshots before deleting (refs/manifold/recovery/<ws>/clean-<ts>), supports--paths/--dry-run/--ignored, and defaults to requiring--force. The oldcleanwas renamedclean-build. Along the way, a real gix bug was found and fixed: linked worktrees only read their own.git/worktrees/<n>/info/excludeand missed the common-dir.git/info/excludethat git itself honors —maw-gitstatus now honors it too. Two fresh-eyes follow-ups hardened this further:cleanandclean-buildnow honor a configured non-default default-workspace name instead of only matching the literal namedefault(bn-3uiq, bn-ado3), and clean's capture path now stages into a temporary index rather than the caller's real index — the old force-stage-then-reset sequence could destroy work the caller had already staged. That same fix also bounds hook process trees: timed-outpost_synchooks now run in their own process group so aSIGKILLon timeout reaches the whole descendant tree instead of leaking orphans that block the output-reader threads.- Merge JSON completeness (bn-20fp).
--format jsonmerge output now includesmerged_sha,epochs,sources,destroyed, per-siblingsiblings[](action + overlap + hook result),warnings[], the invariant result, andrecovery.pinned_refs/cwd_destroyed; text output ends with a sentinel line → JSON hint → destroy-cwd warning, in that fixed order.
Release automation (bn-1obp) — used to cut this release
maw release prepare vX.Y.Z: lockstep version bump across everyCargo.toml(workspace version + all internal path-depversion = "…"strings, ~19 strings), Cargo.lock regen, and a CHANGELOG section scaffold. Idempotent; leaves everything uncommitted for review.maw release preflight [vX.Y.Z]: read-only gate checking version consistency, CHANGELOG presence, and a clean tree. Also runs in PR CI via the new publish-dryrun workflow (paths-filtered on manifest changes): preflight +cargo publish --dry-run --no-verifyover the full 6-crate publish chain, so a broken publish chain fails on the PR instead of at tag time.- The bare
maw release vX.Y.Z(tag + push) is unchanged. AGENTS.md's release flow now documents prepare → notes → check → commit → preflight → tag.
CI (bn-1q7x, bn-1n2b)
just checknow also runscargo test -p maw-cli— previously thecrates/maw-cli/tests/suite (undo, epoch-lock CLI tests, etc.) and the maw-cli lib unit tests were entirely CI-ungated. Landed serialized (--test-threads=1) to dodge the then-unexplained flock flakiness below; the bn-1d22 fix later removed that serialization.sg1-assurance-clippyis now wired intodst-faithful.yml(it existed but ran in no workflow).- New
tests/ci_lane_wiring.rsmeta-test enforces that every*-clippy/*-checkJustfile recipe is either wired into a workflow or explicitly marked# ci: local-only, with the convention documented in the Justfile header. - bn-1d22, the flaky-flock-test mystery, is solved: the intermittent
maw-clilock-test failures under parallel execution were never a lock bug or timing race — they were fork fd-inheritance: a sibling test'sCommand::spawndups the flock'd lockfile fd acrossfork(), and since BSD flock lives on the open file description, a just-released lock reads as held in the child until it execs orCLOEXECclears the fd (a microseconds-wide window). The fix is one-directional (a free can spuriously look held, never the reverse): tests let post-release observations settle (bounded, 5s) while must-fail-while-held assertions stay immediate. The--test-threads=1crutch from pre.11-era CI work is removed —maw-clitests run parallel again (55+ green worker runs, 9/9 lead including a 32-thread stress run).
Other fixes
- Cleanup lockstep with recovery refs (bn-3uou).
maw gc --recovery-snapshotsnow prunes destroy records in lockstep with recovery refs it removes;maw doctorsplitsabandoned-with-snapshotfrom the newdestroy-record-unpinned. - Bench-feature rot fixed +
sg2-bench-clippyCI lane (bn-1nmh). ws list/ws ls/maw ls --names(bn-3kiv): pipeable name-only listing, order matching JSON output.maw ws historyno longer hides oplog corruption behind a silent git-log fallback (bn-100i, fresh-eyes). A corrupt oplog chain now surfaces as an error instead of quietly rendering a shorter, wrong history.
Eleventh dogfood pre-release. Closes a second data-loss-class field report from mess (bn-rah2), hit on pre.10 but latent since ~v0.60.8.
FF-absorb no longer orphans committed-ahead sibling workspaces (bn-rah2)
- When a merge absorbed out-of-maw trunk commits (the epoch-behind fast-forward case), the absorb loop reset every path-disjoint sibling workspace's worktree HEAD to the absorbed tip with a raw HEAD-file write. For a sibling with committed work that silently orphaned its commit: HEAD back at base, the work demoted to uncommitted/untracked changes, no output, and the next
maw ws syncrefusing with "uncommitted changes" — a state that invited destroying reviewed work. The safety predicate only checked touched-path overlap, never committed-ahead-ness. - The absorb now classifies each sibling first: committed-ahead + clean siblings are replayed onto the absorbed epoch through the guarded rebase path (HEAD lands at the rebased commits — work stays committed, tree stays clean, the next
ws syncreports up to date); committed-ahead + dirty siblings block the absorb before any ref moves, with the usualmaw epoch syncguidance; dirty-only siblings fast-forward as before with their edits preserved. Replays run before the epoch ref advances, so a failure aborts the absorb cleanly — no sibling is ever left half-moved. - The absorb is now loud: one NOTE line per affected sibling ("replayed N commit(s) onto absorbed epoch" / "fast-forwarded to absorbed epoch") alongside the aggregate "Absorbed N upstream commit(s)".
- Both raw HEAD-file writes in the absorb path (sibling and merge-target) were retired in favor of a guarded, reflog-writing native
set_headprimitive — restoring the single-choke-point invariant for HEAD movement (bn-8flz) at the one site it had missed.
ws sync refusals name the offending paths (bn-3rst)
- "Workspace has uncommitted changes that would be lost by sync" (and the rebase-path and auto-sync-skip variants) now list the dirty files with status letters, capped at 10 with an "…and N more" tail. An operator can now tell orphaned work from junk scratch at a glance. (The reported
.git/info/excludeissue did not reproduce — maw's dirty check already honors gitignore/exclude exactly likegit status.)
Tenth dogfood pre-release. Resolves the mess multi-agent field report (bn-38nz) end to end: one data-loss-class fix at the merge/trunk boundary, plus a sweep of conflict-signaling and output-clarity improvements for orchestrated agent workflows.
Merge can no longer silently clobber uncommitted tracked trunk files (bn-1xmk)
- The trunk preserve-and-replay cycle in
maw ws mergehad three silent failure modes that could restore an uncommitted tracked file at the repo root to its committed content — the reported incident wiped a session's append-only.bones/eventsjournal that no workspace had touched. - A durable recovery snapshot (
refs/manifold/recovery/default/<ts>) is now pinned before the trunk checkout whenever the trunk has uncommitted tracked changes. It survives a clean replay and is visible inmaw ws recoveras a pinned row. - Dirty trunk files whose committed content changed across the merge (including via absorbed out-of-maw commits) now replay through the driver-aware 3-way merge —
merge=unionjournals keep both the merged commits and the uncommitted appends — instead of a bare stash apply that could resolve to the committed side. git stash createreturning nothing on a dirty tree now errors loudly instead of being treated as "clean" (mirrors the bn-3mpx destroy-path fix).- A post-replay fidelity check verifies every pre-merge-dirty file whose committed content the merge did not change ends up byte-for-byte intact; on mismatch it self-repairs from an in-memory pre-merge capture and prints the exact
maw ws recovercommand. - Merges announce
preserving N uncommitted trunk file(s) across merge (recovery snapshot pinned), andmaw ws merge --checklists dirty trunk files informationally (never blocking).
Conflicted syncs are unmistakable (bn-mq6j)
maw ws syncconflict summaries (new and residual committed conflicts) are nowWARNING:-prefixed and duplicated to stderr. Exit code stays 0 — conflicts are data, not errors.- Sibling auto-rebase results with conflicts render as a distinct
CONFLICT:line with the exactmaw ws resolvecommand, and the merge summary lists any siblings left conflicted. maw ws sync --format json(and--json) added: workspace, action, commits replayed, conflict count, and conflicted paths — mechanical detection for agents.
Auto-rebase semantic-risk hint (bn-2cvx)
- When a sibling is auto-rebased over epoch commits touching files that sibling also touches, the merge output line and the workspace's auto-rebase notice now append: "replayed over commits touching N file(s) this workspace also touches — re-run its tests before merging" (with a capped sample of paths in the notice JSON).
ws resolve --keep union (bn-nmu7)
- New resolution mode for the common "two workers each added a line to the same list" conflict: like
--keep both, but conflicted hunks get a per-hunk line union with cross-side dedup and stable order (ours' order first, theirs-only lines appended in their original order). Binary / N>2 / no-base cases fall back exactly like--keep both.
Clearer conflict-gate message for leftover headers (bn-1etl)
- When a committed file was hand-resolved (markers gone) but still begins with the maw conflict header, the merge gate now says exactly that — delete the leading
#header lines, commit, re-run — instead of the tamper-flavored placeholder message. Both cases remain hard-blocking and not bypassable by--force.
Output & UX (bn-3eew, bn-1kop, bn-1aey)
maw ws merge --check's epoch-drift note is now informational when the drift is a safe fast-forward ("will be absorbed automatically when you merge") and only warns on blocked or truly diverged states; the drift classification rides in the check's JSON output.- Merge success ends with a stable, grep-able sentinel:
[OK] merged <ws> into <branch> @ <sha>. maw ws list --helpdocuments the full lifecycle-state vocabulary (clean,stale,conflicted,committed-unintegrated, …) and mentions--format json.- Destroying a workspace (directly or via
merge --destroy) while your shell's cwd is inside it now prints a note telling you tocdback to the project root; a failed cwd lookup hints that the directory may have been deleted.
Ninth dogfood pre-release. A focused fix for a consolidated-layout list regression.
maw ws list / maw ls shows the default workspace in the consolidated layout (bn-2jez)
- In the consolidated layout the default workspace is the repo root, which lives outside
.maw/workspaces/. The workspace backend only enumerates worktrees under that directory, so the default was silently filtered out —maw ws list(and itsmaw lsalias) stopped showingdefault, and an otherwise-empty repo reported the misleading "No workspaces found". (The legacy v2 layout was unaffected because its default lived atws/default/.) maw ws listnow synthesizes the default entry in the consolidated layout, so it always appears (sorted first), in both the text and--jsonoutput, mirroringmaw status. The fix is confined to the list command — the workspace backend's enumeration (used by sync, status, gc, diff, the TUI, etc.) is unchanged.
Eighth dogfood pre-release. A small clarity pass on the recovery/GC CLI vocabulary, plus a test fix for a stale assertion left by pre.7's brownfield-init change.
Clearer recovery-snapshot vs destroy-record vocabulary (bn-8rp9)
- The recovery subsystem has two distinct artifacts that the CLI described inconsistently: a recovery snapshot (the pinned
refs/manifold/recovery/*commit holding a destroyed workspace's content) and a destroy record (themaw ws recoveraudit entry). Runningmaw gc --refsto clear themaw doctor"abandoned-with-snapshot" warning did nothing, because that warning counts records whilegcsweeps refs. - Renamed
maw gc --refs→maw gc --recovery-snapshots(the old--refsis kept as a hidden, deprecated alias). The sweep output now uses the "recovery snapshot" noun, prints the age threshold and the removed-vs-kept counts, and notes that destroy records are intentionally kept. maw gc --helpnow opens with a two-noun glossary and states the command only touches refs.maw doctormessages reworded for consistency: "dangling snapshots" now reads "orphaned recovery snapshot(s)", and the "abandoned-with-snapshot" message explains it counts destroy records (expected afterws destroy, no work lost) and is not reduced bymaw gc --recovery-snapshots.
Test fix (pre.7 follow-up)
- Three
changesunit tests hardcoded the legacy v2ws/workspace paths and broke when pre.7 made brownfieldmaw initdefault to the consolidated layout. They are now layout-aware. No product-code change — pre.7's behavior was correct; only the stale test assertions needed updating.
Seventh dogfood pre-release. A focused fix for a layout-safety bug found while dogfooding maw init on an existing repo.
maw init is layout-aware and non-destructive on existing repos (bn-2itc)
- A second
maw initno longer re-restructures a consolidated repo back to v2. The brownfield idempotency check keyed only onws/default/existing — which a consolidated repo lacks — so a re-run (e.g. viaedict init, which invokesmaw init) thought the repo was uninitialized and re-ran the full v2 restructure: converting.git/to bare, creatingws/default/, and moving every project file into it.maw initnow detects the on-disk layout before acting, and a re-run on a consolidated repo is an idempotent no-op. - Brownfield init defaults to the consolidated layout, non-destructively. On a fresh existing git repo,
maw initnow produces the consolidated.maw/layout without restructuring: the root stays the live checkout,.git/stays a normal directory, no files are moved — it only adds.maw/and a/.maw/.gitignoreentry, withepoch₀ = HEAD. The old default produced the invasive legacy v2 bare layout (bare conversion + moving every file intows/default/). --legacy-wsopts into the v2 bare layout explicitly and is honored on a fresh repo; on a repo that is already consolidated it is ignored with a NOTE (maw will not downgrade an existing layout). Existing v2 repos stay v2 — runmaw migrateto move them to consolidated.maw initoutput now reports the resulting layout, andmaw init --helpdocuments the consolidated brownfield default.
Sixth dogfood pre-release. The theme is closing the gap between what the SG1 release-gate claims and what it exercises. The 1e8 soak drives a deterministic model of maw's git-object effects — it never runs maw's real merge / HEAD-movement code. This release adds a second, complementary DST tier that drives the real maw binary through the same Prime-Invariant oracles, and building it immediately paid off: it surfaced (and this release fixes) a genuine merge crash-recovery bug, on top of other merge/status correctness fixes.
Crash-safety & merge correctness (real-code fixes)
- Merge is now crash-coherent at every commit-phase point (bn-38vw). A crash during
maw ws mergebetween the ref-advancing epoch CAS (the point of no return) and the separate merge-state journal write left the journal incoherent (phase=commit,epoch_afterunrecorded) with no on-demand self-heal — recoverable only by a later unrelated merge. The merge now journalsepoch_afterbefore the CAS (pure reordering; the ref advance is a single atomic transaction), so a crash at any commit-phase point leaves coherent state. No committed work is ever lost (it never was) and no incoherent merge-state can dangle. maw ws merge --checksurfaces out-of-maw trunk divergence (bn-1huu). Direct commits made to the branch outside maw (a stale epoch) are now detected and reported by--checkbefore the merge, instead of surfacing as a confusing failure later.maw --status-barenumerates workspaces layout-awarely (bn-3k38). The status bar now finds agent workspaces correctly under the consolidated layout.
The production-code DST trust tier (the SG1 instrument matures)
- The soak's coverage is now scoped honestly (bn-13g1). Documented precisely what the in-proc 1e8 soak does and does not exercise — it model-checks the ref/content invariants of a hand-written model of maw's git effects under fault injection; it does not run maw's production merge/HEAD-movement code.
- New production-code DST tier (bn-2byw). Drives the real
mawbinary over seed-generated op streams and runs the authoritative content-reachability (Oracle A) + state-coherence (Oracle B) oracles after every op — covering realws create/edit/commit/merge (with sibling auto-rebase)/sync/destroy/recover/advance, plus mid-op crashes (fault injection) and the cross-process rebase lock (a real two-process test). Runs deep-clean. Carries non-vacuity guards so it can never silently stop seeing committed content. - Bugs the tier found while being built — all fixed this release: a latent assurance bug where the oracle's state capture couldn't read a real linked-worktree's HEAD (so it was silently blind to committed-ahead work); the bn-38vw merge bug above; and an oracle-completeness gap (bn-3g6o) where content preserved inside maw's conflict-marker rewrites was misreported as lost.
- Deterministic interleaving primitive (bn-3ny7, bn-2byw). A spike proved the orphaned-commit "race" is a deterministic state bug, not a timing race; the resulting in-process interleaving failpoint closed a previously-unexercised never-abandon CAS-guard test gap (bn-20sa).
- maw-assurance feature build is clippy-clean (bn-1r1y), with a dedicated
sg1-assurance-clippygate.
Fifth dogfood pre-release. A field report from real multi-workspace dogfooding ("sigil") — a worker reported committing, but the commit had vanished, work left uncommitted on disk — turned out to be a Prime-Invariant violation: maw could silently abandon a committed workspace commit during a concurrent epoch advance, with zero diagnostics. Forensics proved the commit was real and orphaned by maw (and the incident then reproduced live in maw's own repo mid-investigation). The fix closes the whole class.
Prime Invariant — no committed work is silently abandoned
- Sync fast-forward refuses to abandon committed work, and exec auto-sync is race-safe (bn-29z8, HIGH). The detached-HEAD fast-forward now refuses (naming the SHAs) rather than checking out over commits not in the epoch, git's swallowed "leaving commits behind" warning is surfaced, and
maw exec's auto-sync takes the per-workspace lock with an expected-HEAD compare-and-swap so a commit landing mid-check can't be orphaned. set_headnever-abandon guard + forensic trail (bn-20sa, HIGH). The rebase HEAD move now CAS-checks the walk-start HEAD and refuses a zero-replay move over exclusive commits;set_headwrites a reflog entry, and sibling rebases/syncs now appear inmaw ws history(both prior incidents were forensically blind).maw ws advanceno longer orphans committed work (bn-8flz, HIGH). It was stash-only — it snapshotted the working copy, checked out the new epoch, and silently dropped any committed-ahead commit while printing "advanced successfully." It now routes committed-ahead work through the same guarded rebase path asmaw ws sync(replaying it onto the new epoch — its documented purpose).- Workspace epoch-ref desync self-heals (bn-1qtj). A lagging
refs/manifold/epoch/ws/<name>(failed/raced write) left a workspace permanently "stale" — endless warnings and false "committed ahead" counts; the ref write now retries loudly and read paths self-heal when HEAD already matches the epoch.
Native HEAD movement — the structural fix
- All workspace-HEAD movement consolidated onto one native gix choke-point. The orphan class kept reappearing because HEAD was moved by blind
git checkout --detach/--forceshell-outs (kept behind a staleTODO(gix)whose blocker — detached HEAD in linked worktrees — was already solved byset_head). New nativecheckout_detach/checkout_to_branch/checkout_forceprimitives (all reflog-writing) replace the shell-outs across sync, advance, working-copy, and merge reattach; the deadcheckout_epochis removed. With one guarded path instead of four, a fifth site can't silently reintroduce the bug.
Release-gate infrastructure
- SG1 soak runs on a local systemd-timer cron (bn-2yzz), replacing the dead GitHub Actions soak, accruing op-step evidence toward the v1.0 DST gate.
Fourth dogfood pre-release. An intensive multi-round bug-loop on the conflict / merge / resolve / sync engine — driven by real multi-workspace ("sigil") dogfooding — found and fixed 18 bugs before converging on a clean pass (round 6 found zero). The work concentrates on making conflict rendering, resolution, and reporting honest and lossless.
Conflict rendering & resolution engine
- Structured content conflicts render as hunk-level diff3 merges (bn-36zz). Two-side conflicts are merged hunk-by-hunk via gix instead of inlining whole files three times; the conflict header now embeds base/side blob OIDs for mechanical reconstruction.
--keep epoch/--keep bothresolve per conflicted hunk (bn-1nwn), preserving cleanly-merged edits instead of discarding them to a whole-blob choice (--keep <ws>was already per-hunk).- Binary blobs never go through the text 3-way merge (bn-1hmz, HIGH). A binary file could be run through gix's text diff3 and emerge as a fabricated "clean" merge; binary/N-side/no-base cases now fall back to whole-blob handling.
- Per-hunk resolutions run the post-merge sanity check (size + AST) before auto-commit (bn-c5ui), suppressing the commit on failure — caught from a real incident where a union resolution split a statement mid-hunk.
- Conflict records list only region-overlapping participants (bn-ztu6); reconstructed sidecars carry
base_contentwith unified keep-path base guards (bn-1mn0); rename-awaremodify_deletehints + a discarded-edit note on--keep epoch(bn-heb8); placeholder headers can reconstruct conflict metadata, fixing circular resolve guidance (bn-39i8).
Conflict-state truth & honest reporting
- Single source of truth for conflict state (bn-21cj, bn-8zqz): merge gate,
ws conflicts,resolve --list, and lifecycle/list/status/diff all agree, verified against reality (markers on recorded paths). Sync summaries now verify the FINAL post-replay HEAD, so "replayed cleanly" can no longer print (nor a sidecar be deleted) while conflict content rides in HEAD. - Sync up-to-date / fast-forward paths report residual committed conflicts (bn-6xpz).
- Epoch-deleted vs workspace-modified paths raise a
modify_deleteconflict instead of silently resurrecting the file (bn-566k).
Prime Invariant
- Directory/file path clashes surface a structured conflict instead of silently dropping a side (bn-2dy1, HIGH). Promotion installs a
ModifyDelete+df_hintwith a tree-validity invariant;--keep epochrestores from the epoch tree.
Workspace UX & safety
ws cleanis layout-aware in the consolidated layout (bn-1s8d), and the reserved namedefaultis refused onws create(bn-21qy) — no more undestroyable zombie-impostor workspace.- Stale workspaces diff against their own base epoch, not the current one (bn-1olb, bn-1abp); sibling auto-rebase emits a one-time notice, the stale-epoch warning is de-duplicated per invocation, and
create --fromdivergence is called out loudly (bn-1abp). - Sanity-suppression remediation commands are single-line copy-pasteable (bn-2qbk).
Third dogfood pre-release. Continued real-world use of the consolidated .maw/ layout surfaced a cluster of conflict-detection, recovery-discoverability, and oplog-integrity bugs — all fixed here. A new deterministic invariant harness (notes/consolidated-sim.sh) now guards the full consolidated lifecycle (including the bn-3bkn git-dir-gutting class) on every run.
- Fresh workspaces no longer falsely report conflicts (bn-16x2).
maw ws list/ws status/ws resolve --listand thelifecycle:conflictedclassification were scanning tracked-file content for<<<<<<<markers, so any repo containing legitimate marker literals (a merge tool's own source, git tutorials, diff docs, conflict test fixtures — including the maw repo itself) had every agent workspace bornconflicted: N — resolve before merge, tempting a destructivemaw ws resolve --keep. The conflict signal now comes from the structured rebase-conflict sidecar (matching whatmaw ws merge --checkalready did). Genuine dirty-working-copy conflicts (e.g. dirty-default merge overlap, which has no sidecar) are still detected and resolvable (bn-lm3i). maw ws recoversurfaces migration recovery refs (bn-sdv4).maw migrate --allow-dirtypins dropped uncommitted work torefs/manifold/recovery/<name>/<ts>, and migrate's output says to "list viamaw ws recover" — but recover only consulted destroy records, so it reported "No destroyed workspaces with snapshots found." It now enumerates pinned recovery refs in the list/inspect/restore paths, closing a Prime-Invariant discoverability gap.- Merge oplog, push, and epoch-gc are layout-aware (bn-1lj2). Several real code paths hardcoded
root.join(".manifold")instead of the layout-aware manifold dir, so in the consolidated layout the mergeintegration_startedevents (and themaw merge eventsreader,maw push --advancemerge-state, and epoch GC) used the wrong directory — splitting the merge audit trail between a stray root.manifold/and.maw/manifold/. All routed through the layout-aware path; the oplog is unified again. - Docs updated for the consolidated layout (bn-3ej6).
AGENTS.mdandmaw init --helpdescribed the legacy v2 bare layout; they now describe consolidated (root checkout,.maw/workspaces/<name>/), andinit --helpis explicit that an existing repo'smaw initproduces v2 andmaw migrateconverts it. just checkno longer masks regressions (bn-8nm6).cargo clippyupdates cargo's fingerprint without relinkingtarget/debug/maw, so a barecargo testcould exec a stale binary and hide a behavior regression (it briefly masked bn-lm3i).just testnow builds the debug binary first via abuild-binprerequisite.
Second dogfood pre-release. Real-world use of the consolidated .maw/ layout (via maw migrate) surfaced — and this release fixes — a cluster of layout/migrate bugs, including a critical data-loss one. The flagship consolidated layout is now a normal git repo and safe to use; bn-3bkn's gating condition ("not the default until fixed and proven") is satisfied.
- Consolidated layout is now a normal
.git/repo (bn-34ve). Bothmaw init(greenfield) andmaw migrate(v2→consolidated) produce an ordinary non-bare repo:.git/is a real directory, agent workspaces are linked worktrees under.maw/workspaces/<name>/. The oldrepo.git/+.gitgitfile holdover is gone. This removes the untracked-git-dir-in-the-worktree that caused bn-3bkn — structurally. - CRITICAL fix:
maw ws merge --destroyno longer destroys the git directory (bn-3bkn). On the consolidated layout the default-workspace snapshot (git add -A→git reset --hard→git clean -fd) ran over the repo root and deleted the untrackedrepo.git/(the shared git dir). The snapshot now unstages/excludes the admin+git paths (.maw,repo.git,.manifold,.git) so it can never delete the repository, regardless of.gitignorestate. Found by dogfooding; deterministic repro + DST candidate added. maw migraterefuses on a dirty default workspace (bn-2ksp). Uncommitted/staged/untracked edits were cleared from the working tree during migration (recoverable, but the printed recovery command was broken). Migration now refuses unless--allow-dirty, and the recovery hint prints a workingmaw ws recover --ref … --to …command.maw statusis layout-aware (bn-2h3g). It no longer reports every checked-out source file as a "Root extra" in the consolidated layout.
Pre-release tag bundling everything on main since v0.61.0. Installed locally and dogfooded for a few weeks before v1.0 final; not v1.0 itself. The v1.0 program is about trust — proving the Prime Invariant under stress — not speed.
v1.0 milestones since v0.61.0:
- SG1 — Prime-Invariant DST instrument. Deterministic-simulation harness that asserts "no committed work is ever lost" under fault injection; long-horizon accrual tracking (bn-2yzz). The hard release gate for v1.0 final.
- SG2 — agent-ergonomics benchmark. Pre-registered benchmark instrument with three substrate adapters (maw / git-worktrees / jj), metrics, a sweep harness, and a published friction list. Establishes that the benchmark measures coordination ergonomics, not raw speed.
- SG3 — consolidated
.maw/layout. New default layout (root is a normal checkout; agent worktrees under.maw/workspaces/<name>/),maw migratefor v2→consolidated,worktree/wtaliases, and a layout go/no-go eval gate. A cross-workspace-contamination forensic (0/0 both layouts) confirmed the layout does not increase wrong-target edits. - SG4 — verb-discoverability & ergonomics fixes. Self-describing error hints for unknown verbs plus the cheat-sheet surface; further wire-up tracked as a follow-up (bn-voy5).
- The bn-cm63 scar leads the safety claim. A destroy-vs-merge race that leaked a dangling head ref — found by maw's own chaos harness, fixed, and called out rather than buried. It is the canonical example of the trust work v1.0 is about.
CLI ergonomics (this cycle):
maw tldrreplacesmaw crib. Adopts the<tool> tldrconvention: a short, affirmative quick-reference of common commands grouped by task (no essays, no anti-pattern tables), also appended tomaw --help.cribremains a hidden alias. (bn-zg7c)maw ws recover --into/--restore-asalias--to. Agents reaching for--into(merge's verb) on recover no longer hit an unrecognized-flag error. (bn-2to8)
Correctness / safety fixes (gix-migration fresh-eyes follow-ups):
checkout_treepreserves untracked files likegit checkout --force. The prior gix path deleted every worktree file absent from the target tree — including untracked ones — a silent data-loss surface on the merge force-checkout fallback (failed-snapshot branch has no recovery ref). Now only tracked-and-stale files are removed. (bn-29x0)maw ws recover --search --regexdialect made loud. The gix migration moved from POSIX BRE (git grep) to Rust regex; saved BRE patterns could silently match differently. Help and errors now name the dialect, and a warning fires on BRE-style escapes. Also fixes a phantom trailing-empty-line in snapshot search. (bn-2b9h)- Cleared pre-existing rustfmt drift in the benchmark crates so
just checkis green. (bn-1r0r)
Minor release completing the migration off the git CLI. maw's git access now goes through the gix library via a single GitRepo trait (GixRepo implementation), with the codebase split into focused crates (maw-git, maw-core, maw-cli, maw-tui, maw-assurance, maw-lfs). No public CLI surface changed; this is an internal architecture release plus the correctness fixes the migration and a fresh-eyes/chaos pass surfaced.
Why it matters: subprocess git was the largest source of environment-coupling and parse-fragility in maw's hot paths (working-copy, oplog, recover, backend, resolve, merge engine, init). Driving git through a typed library removes a class of "works on my machine" failures and makes the engine deterministically testable — the substrate the v1.0 DST harness builds on.
Highlights:
- Full gix migration. Working-copy (bn-5k0g), recover tree-walk (bn-2j9f), oplog blob reads (bn-3005), maw-core backend (bn-p5z5), resolve/changes (bn-15wt), diagnostic utilities (bn-175a), v2 init (bn-14gc), and the merge engine (bn-3lcl) no longer invoke
git. Push/fetch are the only remaining subprocess carveouts and are now explicitly bounded (bn-28ky); the carveout inventory is tracked (bn-3471). - No silent tree corruption from unsorted entries (bn-phv1). Raw
gix::objs::Treeconstruction onlydebug_asserts sorted entries — in release builds an unsorted tree was written silently.write_treenow canonicalizes entry order. (See the gix write-tree pitfall.) - File modes preserved through the merge engine (bn-1tl6). Executable bits and symlink modes survived a round-trip through the old CLI path but were dropped by the first gix merge implementation; modes are now carried end-to-end.
- Staged-only changes no longer dropped (bn-pfh7). Prime-Invariant paths must diff HEAD→worktree, not index→worktree;
status_head_to_worktreenow does, so staged-but-unmodified content is no longer invisible to snapshot/merge. - Destroy racing an in-flight merge no longer leaks a dangling head ref (bn-cm63). Found by maw's own chaos harness. Not a work-loss bug — a coherence bug
maw doctorcaught — but the class is exactly what the v1.0 trust work targets, so it's called out here rather than buried.maw ws destroynow refuses while the workspace is a live merge source; plainmaw gcself-heals pre-existing danglingrefs/manifold/head/*. - Conflicted-path dirty count fixed (bn-7kg3).
count_dirty_trackedcounted a conflicted path once per index stage (1/2/3), tripling the dirty count for any conflicted file; it now counts the path once. - Additional fresh-eyes correctness fixes from the migration: cross-bucket dedup / quarantine index sync / symlink raw bytes,
ws listconflicted-state reporting (bn-2l00), concurrent-create locking (bn-3bbc), crashed-merge recovery (bn-2wyh), and bn-uyk3 / bn-35mr / bn-oas3. - Shared
maw-gittest fixtures extracted for cross-crate reuse (bn-5rdz).
A maw ws destroy <ws> racing a merge that had <ws> as a source could resurrect the workspace's refs/manifold/head/<ws> ref after the worktree was gone: record_merge_operations → ensure_workspace_oplog_head re-bootstrapped a Create op when read_head() returned None. The standalone destroy() path now guards against destroying a workspace that is a source of a non-terminal merge — bailing with a wait hint (live owner) or a maw ws merge --abort hint (orphaned/indeterminate). merge --destroy is unaffected (it goes through the backend destroy, not the standalone path). Plain maw gc (not just maw gc --refs) now prunes dangling refs/manifold/head/* for non-existent workspaces, so existing leaks self-heal once a current binary is installed. Regression test in crates/maw-cli/tests/destroy_vs_merge_head_ref.rs.
A conflicted path occupies three index entries (stages 1/2/3). count_dirty_tracked added one to the dirty count per non-zero-stage entry, so every conflicted file counted three times, inflating dirty/ahead reporting in ws status/ws list. The counter now dedupes consecutive conflict entries by path, counting each conflicted path once. Regression test (count_dirty_tracked_counts_conflicted_path_once) in crates/maw-git/src/status_impl.rs.
Patch release for a silent regression in maw ws merge against branch-attached merge targets, plus a quality-of-life output cleanup.
Bug fix: deletions silently dropped on cleanup workspaces created from branch-attached merge targets (bn-3bl2)
Regression of bn-129d. maw ws merge <cleanup> --into change:<id> silently dropped git rm deletions when the cleanup workspace was created from a branch-attached merge target (e.g. crib2) whose HEAD had advanced past the global epoch. The canonical reproduction: worker A merges into the change target and deletes files; workers B/C trigger modify/delete conflicts and a --resolve-all=<worker> resolution re-introduces the files; a fresh cleanup workspace then git rms and commits them; the merge of cleanup → target reports 0 unique path(s), 0 resolved and leaves the files in place.
Two converging bugs that the crate-split refactor surfaced:
backend.snapshot()diffed against the global epoch (refs/manifold/epoch/current) instead of the workspace's per-workspace baseline (refs/manifold/epoch/ws/<name>). When the global epoch lagged behind the workspace baseline — the normal shape after a branch-attached merge — files that were absent at the global epoch but present at the baseline produced an empty diff, so deletions of those files never reached the merge engine.- The phantom-deletion gate in
collect_onethen ranworkspace_creation_epoch(ws_head=status.base_epoch)which walked back to the global epoch via merge-base. Even if the snapshot did surface a deletion (via a different path), the gate would classify it as phantom because the file didn't exist at that older tree. The merge-base step was originally written whenws_headwas the workspace's actual git HEAD; the refactor changed the caller to pass the per-workspace baseline, making the merge-base walk past the workspace's true creation point.
Fix: snapshot() now reads refs/manifold/epoch/ws/<name> first (falling back to the global epoch, then HEAD); the phantom-deletion gate checks existence directly at status.base_epoch and drops the merge-base step. Regression test in crates/maw-core/src/merge/collect.rs (collect_committed_deletion_when_baseline_ahead_of_global_epoch).
New sync_worktree_to_epoch_quiet helper is now used by the sibling auto-rebase orchestrator (bn-3vf5 / bn-103k), so a maw ws merge summary contains exactly one line per sibling — the per-sibling rebase verdict — instead of also emitting the chatty synced to epoch <oid> line for each. CLI sync paths (maw ws sync) still use the chatty wrapper.
v0.60.8 — Silent-corruption hardening, conflict-as-data merge contract, auto-rebase defaults (2026-05-10)
Patch release rolling up safety fixes that close the last known silent-corruption shapes in maw ws merge and maw ws sync, plus new default behaviors that absorb routine divergence rather than refusing.
Highlights:
- No more silent doubling on merge after a direct commit: per-workspace baseline refs now advance with the epoch (bn-3r8s, bn-28q2).
- Post-rebase sanity check runs on every clean three-way merge — size-delta + AST parse — so the same family of bug cannot reappear undetected (bn-2upt).
maw ws mergeauto-absorbs upstream FF divergence and auto-rebases sibling workspaces by default, eliminating the "you have to runepoch syncfirst" and "your peers' workspaces went stale" papercuts (bn-11ip, bn-3vf5, bn-103k).maw ws syncrebases by default;--no-rebaseopts back into refs-only behavior (bn-3az5).maw ws resolve --keep <ws>preserves sibling-merged content via three-way merge (bn-3mbj).maw ws merge --checkis now a faithful dry-run — same source-conflict gate as the real merge (bn-qw4i).- Missing worktrees surfaced explicitly in
ws list/merge --checkwith a clear recovery hint (bn-3fhj). maw ws merge --message ""now rejected like a missing message (bn-17km).maw ws recoverdiscoverability + new--restore-fileflag for surgical recovery (bn-sgm8).
maw ws merge <ws> --check no longer reports [OK] Ready to merge for a workspace whose HEAD still carries unresolved structured conflicts. The sidecar gate and the HEAD-tree placeholder tripwire are now factored into a shared assert_sources_clean_for_merge helper called from both the real-merge and --check paths, so they agree on what "ready to merge" means. --force bypasses the sidecar gate on --check exactly the way it does on the real merge; the placeholder tripwire remains non-bypassable.
If ws/<name>/ is deleted while .manifold/ metadata remains, maw ws list now flags the row as MISSING and includes the exact recovery command (maw ws destroy <name> --force) instead of advertising the workspace as ready to merge. maw ws merge --check mirrors the same diagnostic. maw ws destroy --force now also purges residual registry entries, per-workspace refs, and .manifold artifacts when the worktree directory is gone, so cleanup is always one command.
Empty and whitespace-only --message values are now treated identically to omitting the flag — same No --message provided diagnostic — instead of being accepted and producing a commit with no subject or body.
Reproduced as the bn-4c6g report shape: after a direct commit on the configured branch + maw epoch sync + maw ws merge <other> --into default, the merge committed a clean tree but left the default workspace's worktree as a <<<<<<< / ||||||| / ======= / >>>>>>> block wrapping a duplicated copy of the merged file (~2× expected size, no <<<<<<< warning). Builds against the worktree saw garbage; the user blamed the merge but the commit itself was correct.
Root cause: maw epoch sync only advanced refs/manifold/epoch/current. The default workspace's per-workspace baseline (refs/manifold/epoch/ws/default) stayed at the OLD epoch. The next maw ws merge anchored HEAD at the stale baseline during snapshot/replay, treated the direct commit's content as "uncommitted local edits" relative to that baseline, and double-applied it onto the merge result via the snapshot replay. Same family of bug as bn-28q2 — direct commits on the target's branch leaving per-workspace baselines stale.
Fix:
maw epoch syncnow advances the default workspace's per-workspace baseline ref alongsiderefs/manifold/epoch/current.- The FF-absorb path (
reconcile_epoch_with_branch) now advances the target workspace's per-workspace baseline ref too. Without that fix, the same shape could sneak through automatic absorb without an explicitepoch sync. - bn-2upt's post-merge size-delta sanity check is now also wired into
replay_snapshot_with_merge_protection's per-file three-way merge — defense-in-depth for any future bug of the same shape that doesn't go through the same root cause. - Sanity check threshold formula corrected from
merged.len() / max(o,t,b) > 1.5tomerged.len() / (max(o,t) + ours_added + theirs_added) > 1.5. The simpler ratio false-flagged the most common legitimate shape (two agents adding to disjoint regions of a small file) at ~1.74× while still missing some real corruption shapes.
After three reports of the structured-conflict layer producing silently-wrong "clean" output (bn-2ghz, bn-4c6g, and an earlier sibling), maw ws sync --rebase now sanity-checks every clean three-way overlap merge before accepting it.
Two checks run, cheapest first:
- Size-delta — if the merged blob is larger than
merge.post_rebase_size_ratio_max(default1.5) times the largest ofbase/ours/theirsbyte sizes, flag. - AST parse — for files matching one of the existing tree-sitter language packs (Rust, Python, TypeScript, JavaScript, Go), try to parse the merged blob; flag if it fails to parse cleanly when both inputs parsed cleanly.
When the check trips with merge.strict_post_rebase_check = true (default), the path is routed through the conflict-tree pipeline — the user resolves it the same way they would a textual conflict. With the flag set to false, a stderr warning is emitted and the merge is accepted as clean. The check fails closed: a check-internal error or unparseable config defaults back to strict.
New config keys: merge.strict_post_rebase_check (bool, default true) and merge.post_rebase_size_ratio_max (float, default 1.5). New RebaseOutcome field: sanity_flagged_steps.
maw ws merge no longer self-blocks when the user has committed directly to the merge target's branch. The bn-11ip safety predicate was treating the target's committed touched-paths as if they were a sibling's edits — but those committed paths ARE the FF range, so the intersection was always non-empty and absorb was always refused. Now the target's committed paths are excluded from the predicate, while its UNCOMMITTED dirty edits are still checked (so a hard FF checkout cannot silently overwrite local work). The common "I made a small docs commit on main and now my workspace merge is blocked" friction is gone.
Three small fixes that close the gap between maw's recovery surface and agents who reach for raw git show <commit>:<path>:
maw ws recover(list view, no args) now prints aNext:footer that hints at<name>,--show,--restore-file, and--search.- New flag
maw ws recover <name> --restore-file <path>(or--ref <ref> --restore-file <path>) copies a single file from a recovery snapshot into the default workspace's worktree, preserving mode bits (executable, symlink). Refuses to overwrite a destination with uncommitted edits unless--forceis also passed. - Rows with
capture: nonein the list view now render the SNAPSHOT column as-*and append a footnote explaining the work was already merged at destroy time; checkgit logon the merge target.
bn-3vf5's auto-rebase advanced sibling refs but explicitly skipped worktree updates (mutate_worktree: false), to avoid clobbering uncommitted edits. The unintended consequence: ALL siblings showed phantom M files in git status, blocking subsequent maw ws sync via the dirty-workspace guard. Auto-rebase now updates both refs and worktree when the sibling is clean (re-checked under lock); dirty siblings still get refs-only treatment as before. Worktree-update failure never aborts the parent merge.
Previously --keep <ws> wrote the workspace's pre-rebase blob directly, silently dropping any sibling-merged content from the new epoch. Now performs a three-way merge of (base, epoch, ws) with the workspace winning on overlap. Sidecars without a base blob (legacy or merge-side conflicts) fall back to the old behavior with a stderr warning.
After maw ws merge advances the epoch, sibling (non-target) workspaces are automatically rebased onto the new epoch using the existing rebase machinery.
Skip rules (per sibling): currently locked → skip "in use"; dirty → skip "dirty"; mid-merge → skip "in progress"; already at the new epoch → skip "up to date". Conflicts during sibling rebase are recorded as conflict-as-data state in the sibling and reported as rebased with N conflicts; they do not abort the parent merge.
rebase_workspace now returns a structured RebaseOutcome { replayed, conflicts, conflicted_steps, fast_forwarded, worktree_updated, worktree_skip_reason }; existing CLI callers preserve their previous output.
Default-on; opt out with merge.auto_rebase_siblings = false in .manifold/config.toml or pass --no-auto-rebase to a single maw ws merge invocation.
maw ws merge no longer fails outright when the configured target branch is ahead of the epoch (the typical "someone ran git push outside maw" shape). If the divergence is a strict fast-forward AND no in-flight workspace's touched paths intersect the FF range, the upstream commits are silently absorbed into the epoch and the merge proceeds. A single line is printed to stderr — Absorbed N upstream commit(s) into epoch (<short>..<short>). — so the absorb is auditable.
When the predicate fails (e.g. an in-flight workspace touches a file the upstream commit also touched, or the divergence is a true fork), the legacy "diverged from the current epoch" error is preserved and now carries an Affected workspace(s): line listing the workspaces that block the auto-absorb. Fork divergence still requires a manual maw epoch sync.
Default-on; opt out with merge.auto_absorb_ff = false in .manifold/config.toml.
maw ws sync <name> now replays committed work onto the new epoch by default when the workspace is stale and has commits ahead. The previous behavior was to print a warning telling the user to use --rebase and exit without doing anything.
- The old
--rebaseflag is now a no-op accepted for backward compatibility, with a one-line deprecation note on stderr. It will be removed in a future version. - A new
--no-rebaseflag opts out of the default replay. With committed work ahead it refuses with a clear error and leaves the workspace untouched (no destructive reset). maw ws sync --allmirrors the same default-rebase behavior;--all --no-rebasefalls back to skipping workspaces with committed work.maw ws syncagainst a clean stale workspace still fast-forwards (unchanged), and the dirty-workspace refusal is preserved.
Patch release for a stale-workspace inspection failure found during multi-agent work.
maw exec <workspace> -- git diff ...now runs in stale workspaces with uncommitted changes without first materializingrefs/manifold/ws/<workspace>viagit stash create.maw status/workspace status queries no longer refresh Level 1 compatibility refs as a side effect, avoiding low-level index write failures during read-only status and auto-sync checks.- Level 1 compatibility refs are still materialized by snapshot paths, so
refs/manifold/ws/<workspace>remains available for intentional workspace-state inspection.
Patch release for long-lived workspaces that are attached to branches and receive follow-up merges.
maw ws merge --into <workspace>now works for a workspace attached to a branch, advancing the attached branch without moving trunk or the default workspace epoch.- Ambiguous merge targets can be disambiguated with
change:<id>orws:<name>, and invalid persistent workspace targets now point users towardmaw ws attach-branch. maw statusandmaw ws listnow show branch attachments for workspaces, including branch-specific unmerged work without suggesting a default-workspace merge.maw ws attach-branchnow rejects plain directories underws/that are not maw-tracked workspaces.
Patch release for two UX fixes found immediately after the brownfield init cleanup.
maw statusnow treats root extras such as rootAGENTS.mdas informational context instead of a repair-neededROOT NOT BAREwarning. The compactmaw status --status-baroutput no longer reports root extras at all.maw ws merge --helpnow describes the actual supported--intotargets: the default workspace, an active change id, or a workspace attached to an active change.- Attempting to merge into an unbound non-default workspace now explains the supported targets and points users toward merging into an active change target instead of implying arbitrary workspace targets are valid.
Patch release fixing brownfield maw init cleanup for existing repos with project metadata already at the root.
maw initnow moves all non-structural root project entries intows/default/, including dot-prefixed directories/files, ignored files, untracked files, and dirty tracked edits. The root is limited to.git,.manifold,repo.git, andws/.- Rerunning
maw initon an already-initialized repo also cleans stale root leftovers, so split trees like root.bones/plusws/default/.bones/can be repaired in place. maw doctornow reports project dotfiles/directories such as.bones/andnotes/as stray root entries instead of accepting all dot-prefixed paths.- Internal cleanup: renamed the stabilized CLI init module from
v2_init.rstoinit.rs.
Patch release for correctness fixes found during fresh-eyes passes after v0.60.2.
maw ws sync <ws> --rebasenow attempts a real three-way text merge before promoting same-path Add/Modify overlaps into structured whole-file conflicts. Disjoint additive edits to the same file now replay cleanly instead of committing# structured conflict at ...marker blobs into the workspace history (bn-2oii).maw releasenow verifies an already-existing tag points at the intended release commit before accepting it. If a tag exists at a different commit, release aborts instead of pushing a stale/wrong tag.maw ws recover --searchpreserves paths containing:by parsinggit grep -zoutput instead of splitting text hits on colon separators.- Git LFS credential retry now remembers which credential source was rejected, so a failed env or
.netrccredential can fall through to the next available credential instead of being reused.
Patch release fixing a dirty-target replay bug where .gitattributes merge drivers introduced by a merged workspace were ignored, causing append-only event shards (e.g. .bones/events/** with merge=union) to surface diff3 markers instead of unioning cleanly.
replay_snapshot_with_merge_protectionnow consults.gitattributesfrom both the anchor epoch and the post-merge target epoch when selecting a merge driver. Anchor rules win; target rules fill in for paths the anchor didn't govern.- Two integration tests cover the nested-driver and merge-introduced-driver cases.
No other behavior changes since v0.60.1.
Patch release that corrects the publish workflow so v0.60.0 can actually reach crates.io.
- Add
maw-lfsto the publish order (it's a required dep ofmaw-gitvia the defaultlfsfeature). - Use the pushed git tag (
GITHUB_REF_NAME) to derive the version dynamically instead of the hardcoded0.54.0. - Target the root crate explicitly via
cargo publish -p maw-workspacesat the final step. - Add publish metadata (description, license, repository, keywords, categories) to
maw-assuranceso it can publish.
No library or binary behavior change since v0.60.0.
Major refactor: maw ws sync --rebase now routes through the structured-conflict merge engine in maw-core::merge instead of a git cherry-pick loop. Closes a multi-commit fidelity gap where consecutive conflicts became order-sensitive, and eliminates 18 Command::new("git") shell-outs in sync/rebase.rs. Validated across 6 rounds of adversarial testing; 21 bones closed.
ConflictTree+MaterializedEntry(bn-3m2q, Phase 1): a tree where some paths are clean(mode, oid)entries and others are structuredConflictvalues, threaded between rebase iterations. Preserves executable bit, symlinks, and submodule mode across replay.apply_unilateral_patchset(bn-1n4i, Phase 2): per-iteration patch application over allConflictvariants (Content,AddAdd,ModifyDelete,DivergentRename). V1 semantics: "unilateral patch replaces each side"; convergence collapses back to clean.diff_patchset(bn-1lvo, Phase 3): historical patch extraction using rename-awarediff_trees. EmitsFileChange::with_identitycarrying blob OID + stableFileIdso the merge engine can match renames across iterations.materialize(bn-11b0, Phase 4): renders aConflictTreeto a final tree of entries + new blobs. For conflicted paths, inlines each side's actual blob bytes into diff3 markers with correct side labels. Writes both a structuredconflict-tree.jsonsidecar and a legacyrebase-conflicts.jsonprojection.
walk_commits(from, to, reverse)— gix-backed rev-walk withfrom..tosemantics.diff_trees_with_renames(old, new, similarity_pct)— gix rewrite detection; the existingChangeType::Renamed { from }variant is finally populated.set_head(oid)— detached-HEAD advancement without agit checkoutshell-out.
- Pipeline:
walk_commits→ per-commitdiff_patchset→apply_unilateral_patchset→materialize→create_commit, chaining parents to preserve commit count + original commit messages. - Merge-commit preservation (bn-7mbe): replayed merges keep ≥2 parents.
- Merge-side convergence (bn-2ras): when all sides agree byte-for-byte, no phantom conflict is installed.
--keep <name>matches by unambiguous prefix so--keep featresolves tofeat#merge-parent-Nwhen unambiguous. - Rename + epoch-modify (bn-3525): follows the rename, content lands at the new path (git ort-equivalent).
- Submodule gitlinks (bn-3hqg): treated as opaque entries, preserved across rebase.
- Workspace-level flock (bn-1d1g):
maw ws sync --rebaseacquires.manifold/locks/rebase/<ws>.lock; concurrent invocations on the same workspace fail-fast with a clear message. - Binary files (bn-ad5z): text-unsafe blobs render a clearly-marked placeholder that the merge gate refuses unless resolved.
maw ws mergeno longer greps for<<<<<<<in workspace worktrees. The gate is driven byconflict-tree.json(structured) +rebase-conflicts.json(legacy). A workspace is "conflicted" iff a sidecar says so (bn-m6ad, bn-3pgl). Legitimate content containing marker syntax (tutorials, fixtures, docs) merges cleanly.- Tamper-resistance tripwire (bn-28d1): the gate also refuses to merge any workspace whose HEAD tree contains a blob starting with tool-authored placeholder bytes (
# structured conflict at/# BINARY CONFLICT at). Force-immune. Deleting or emptying the sidecars cannot bypass this.
- When
conflict-tree.jsonis present, resolve reads structured conflicts directly.--keep epoch/--keep <ws-name>/--keep bothwrite the chosen side's blob content from the sidecar instead of parsing textual markers. - Auto-commit on full resolution (bn-2cc1): when
--keepclears the last sidecar entry, resolve commits the resolution. Downstream merge no longer reports "ready but refuses". --keep bothonModifyDelete(bn-2pry) no longer silently resurrects the pre-delete base content.- Symlink conflict resolution (bn-mg0j) restores the
120000mode viastd::os::unix::fs::symlink. - Legacy sidecar fallback preserved unchanged for pre-0.60 workspaces.
- Corrupt sidecar (bn-24tl) bails with a clear "regenerate via sync --rebase" message instead of leaving placeholder junk.
- Help text cleaned up (bn-2gex): the unimplemented
cf-N=NAMEper-atom syntax is gone.
maw ws undo(bn-6cs4) now pins a recovery snapshot underrefs/manifold/recovery/before restoring to base epoch; matches the safety pattern used bydestroy --forceandmerge --destroy.capture_before_destroy(bn-3mpx): stash-create returningNoneon dirty paths is no longer conflated with "nothing to preserve". Distinguishes "all dirty paths are uncapturable embedded repos" (OK to proceed) from "capturable paths refused" (abort).- Destroy-record timestamps bumped to nanosecond precision (bn-2dy4); rapid back-to-back destroys of the same workspace no longer collide.
- Executable bit preservation on rebase of newly-added files (bn-2o1y, bn-nsz0).
AGENTS.md gained a "Operating Model: Conflicts Are Data, Not Errors" section codifying the jj-style model maw follows: operations succeed even when they produce conflicts; the conflict rides with the workspace as structured data until resolve picks a side.
tests/sync_rebase_semantics.rs(bn-28rd, Phase 7): semantics preservation + narrow fidelity property (unilateral edit on an unrelated path does not corrupt a pre-existing structured conflict).tests/merge_gate_sidecar.rs: the sidecar-authoritative gate + tamper-resistance tripwire.tests/submodule.rs: rebase passes submodule gitlinks through without crashing.- Concurrent rebase integration test locks in the bn-1d1g fail-fast contract.
- Structured logging / error handling sweep across
capture.rs,destroy_record.rs,sync/rebase.rs,sync/checks.rs,advance.rs(bn-2dy4, bn-2bow, bn-2blj, bn-3pkx, bn-lc1j): silentlet _ = Command::new("git").output()failures on state-mutating operations now emittracing::warn!. stash_applyfailure during merge replay (bn-1psp) returns an error instead of silently losing non-overlapping local edits.sync --rebaseof merge commits (bn-372v) no longer silently drops content.relabel_conflict_markers(bn-lc1j) surfaces read/write errors.repo_root_from_worktree(bn-2bow) validates the derived root containsws/or.manifold/.
No user action required. Workspaces rebased by 0.59 or earlier continue to work via the legacy sidecar path. After rebasing with 0.60, both sidecar formats are written; maw ws resolve prefers the structured one.
count_dirty_tracked (the fast path used by maw status --status-bar) only compared mtime+size against the index stat cache. Any mtime skew — checkout, touch, FS remount — produced thousands of spurious "changed" files until git status ran and refreshed the cache. Fix: on stat mismatch, hash the file and compare to the index entry's blob OID (matching git's own behavior). Fast case is unchanged; the slow path only runs for stat-mismatched entries.
AttrsMatcher::is_lfs and merge_driver panicked via gix-glob's matches_repo_relative_path when passed paths starting with /. Found by proptest in bn-19tb. Fix: trim_start_matches('/') at both entry points. The previously-ignored proptest repro is now an active regression test, and the proptest strategies now include leading-slash paths for ongoing coverage.
This release completes the bn-opm7 goal: eliminate the three bug classes that produced 5 patch releases in a single week (v0.58.1–v0.58.5).
The rebase_conflict_count: u32 field in workspace metadata has been removed entirely. This field caused 3 consecutive patch releases (v0.58.3, v0.58.4, v0.58.5) because it drifted from worktree ground truth whenever users resolved conflicts via plain git instead of maw ws resolve. All callers now derive conflict state directly from a worktree scan via find_conflicted_files — there is no cache to drift.
Remaining metadata fields were audited and documented in notes/cached-fields-audit.md. All surviving fields are declarative user intent (description, change_id, mode), not derived state.
crates/maw-cli/src/workspace/sync.rs (1170 LOC) split into 4 focused files under sync/:
| File | LOC | Contents |
|---|---|---|
mod.rs |
414 | Entry points: sync(), sync_all(), auto_sync_if_stale() |
rebase.rs |
480 | Cherry-pick replay, conflict metadata I/O |
cross_target.rs |
134 | Cross-target safety guard |
checks.rs |
182 | committed_ahead_of_epoch(), dirty checks, worktree sync |
Pure organizational refactor — zero behavior changes. No file over 500 LOC.
New property-based test suite tests/lifecycle_properties.rs with 6 invariants checked after randomized workspace operations:
- I1: No zombie refs after destroy
- I2: Clean sync-rebase means no markers in worktree
- I3: Merge preserves committed content
- I4: Create-after-destroy starts with a fresh oplog chain
- I5: Sync --rebase preserves commit count
- I6:
merge=unionproduces no conflict markers
32 cases per invariant, 20s total runtime. Every recent bug (bn-18dj, bn-3h90 ×3, v0.58.4 detector regression) would have been caught by at least one of these invariants.
| Task | What it delivered |
|---|---|
| bn-1jso | Type-safe BaseEpoch/CurrentEpoch newtypes — wrong-arg class is a compile error |
| bn-3kcp | workspace_owned_refs() — one-line change to add new ref kinds |
| bn-3o7w | 4 sync proptests — fuzzes sync decision gate |
| bn-19tb | 17 parser fuzz tests — found bn-3t55 (abs-path panic) |
| bn-3fy4 | 6 lifecycle invariants — the safety net for all future work |
| bn-2r57 | Deleted rebase_conflict_count — no cache to drift |
| bn-23go | Split sync.rs (1170 LOC) → 4 files (all <500 LOC) |
v0.58.4's pre-flight conflict-marker check walked the full worktree and flagged any file whose content had a line starting with <<<<<<<. This was a false positive for source files that contain conflict-marker literals in test fixtures — notably crates/maw-cli/src/workspace/resolve.rs has raw-string fixtures with <<<<<<< at column 0 inside string literals. The result: every maw ws merge in the maw repo itself failed the pre-flight check, blocking merges of legitimate work.
Fix: The detector now scans the diff between the workspace's base and current state (HEAD + working tree) for newly added marker lines, rather than scanning full file contents. Pre-existing markers in unchanged files — including test fixtures — are invisible to the scan because they aren't in the diff. Real rebase-introduced markers are still caught because they appear as added lines in the diff.
Falls back to a full worktree walk only when the base ref can't be resolved.
This release includes the first batch of tasks from the bn-opm7 refactoring/testing goal:
- bn-1jso: Type-safe
BaseEpochandCurrentEpochnewtypes inmaw-core::model::types. Thecommitted_ahead_of_epochfunction now takes&BaseEpochinstead of&str, making the v0.58.1 bn-18dj class of bug (wrong-argument-type) a compile error.WorkspaceStatus.base_epochis nowBaseEpochrather thanEpochId, cascading the type safety to all callers. - bn-3kcp: Centralized
workspace_owned_refs()helper inmaw-core::refs.ws destroyandref_gcnow iterate this list instead of hand-listing refs. Adding a new workspace-scoped ref kind is now a one-line change — every cleanup operation picks it up automatically. Paired integration test:destroy_deletes_all_workspace_owned_refs. - bn-3o7w: Property-based tests for
ws syncdecision gate invariants (tests/sync_proptest.rs). 4 proptests × 32 cases each, verifying thatsyncwithout--rebasenever changes HEAD when local commits exist,sync --rebasepreserves commit count and content, andsync --alldoesn't drop commits across multiple workspaces. - bn-19tb: Proptest fuzz harnesses for small-input parsers:
crates/maw-lfs/tests/attrs_proptest.rs—AttrsMatcher::is_lfs/merge_driverdeterminism, round-trip properties, panic-free behavior.crates/maw-core/tests/workspace_id_proptest.rs—WorkspaceId::newvalidation round-trips.- Inline proptest module in
crates/maw-cli/src/workspace/resolve.rs—parse_file_conflictsmarker handling, deterministic block IDs, malformed-input safety.
The bn-19tb fuzz harness discovered that AttrsMatcher::is_lfs and merge_driver panic (via gix-glob) when passed paths starting with /. Minimal repro captured as an #[ignore]'d test. The matcher should either reject absolute paths or strip the leading slash. Filed for a follow-up release.
file_has_conflict_markers only read the first 256KB of each file, silently missing any <<<<<<< markers past that offset. For repos with large append-only files (e.g., tests/cve-registry/manifest.toml with thousands of entries), maw ws resolve --list and maw ws conflicts reported the workspace clean even when the worktree had real, committed conflict markers from a prior maw ws sync --rebase. The v0.58.3 reconcile logic made this worse by silently clearing the rebase_conflict_count counter based on the broken detector.
Fix: The detector now streams the entire file line-by-line (bounded at 256MB for safety), so markers anywhere in the file are reliably detected.
maw ws conflicts <ws> ran the merge engine's PREPARE+BUILD phases in a temp dir. With only one workspace under inspection, the engine sees a clean 1-side modification — it has nothing to conflict with — so marker-laden content (from a prior rebase that committed markers into HEAD) looked like ordinary content and was reported "no conflicts found". Users saw three tools agree the workspace was clean while the worktree actually had unresolved markers.
Fix: ws conflicts now ALSO scans each workspace's worktree for embedded markers and surfaces them as a separate category ("embedded conflict markers detected in workspace HEAD(s)"). ws merge now uses the same scan as an unconditional pre-flight check (not just when the metadata counter is > 0), so the authoritative signal is always ground truth from the worktree.
ws merge's rebase-conflict check now always runs the worktree scan first and reconciles the persistent rebase_conflict_count in metadata to match. The counter is treated as advisory; the worktree is the source of truth. This closes the drift window where the counter could be stale (in either direction) and the merge would silently proceed or falsely block.
maw ws merge refused to proceed when a source workspace had a stale rebase_conflict_count > 0 in its metadata, even after the user had resolved the conflict via plain git (git add, git commit). maw ws conflicts, maw ws resolve --list, and maw ws sync all reported the workspace clean — only maw ws merge trusted the stale counter. The counter was set by maw ws sync --rebase when a rebase hit a conflict, but nothing reset it when the conflict was resolved outside of maw ws resolve.
Fix: maw ws merge now reconciles the persistent counter against the worktree before blocking. If the worktree has no conflict markers, the counter is auto-cleared and the merge proceeds. maw ws resolve --list does the same reconciliation as a side effect, so running it on a clean workspace also clears the stale state.
The previously-advertised --force flag on maw ws merge is now actually implemented as a belt-and-suspenders escape hatch for cases where auto-reconciliation gets it wrong.
maw ws destroy deleted refs/manifold/ws/<name> and refs/manifold/epoch/ws/<name> but not refs/manifold/head/<name> (the oplog head ref). When a workspace was destroyed and then recreated with the same name, the new workspace inherited the destroyed workspace's oplog chain, including checkpoint annotations that referenced patch-set blobs from the dead snapshot. Subsequent merges printed a persistent warning on every invocation:
WARNING: checkpoint write skipped for workspace 'default':
checkpoint: op log read error: `git cat-file -p <blob>` failed: not found
Fix: ws destroy now deletes refs/manifold/head/<name> too. Recovery is unaffected because recovery data lives under the separate refs/manifold/recovery/<name>/ namespace. Fresh ws create after ws destroy now starts with a clean oplog chain.
For repos that are already corrupted by the pre-v0.58.3 destroy bug (i.e., already have a stale oplog chain referencing dead blobs), maw ws repair-oplog <name> archives the current head ref to refs/manifold/archive/head/<name>/<timestamp> and deletes refs/manifold/head/<name> so the next operation starts a fresh chain. Supports --dry-run for previewing the change. Worktree contents, git history, and recovery snapshots are unchanged.
Also downgrades the "damaged op log chain" warning to log once per workspace per session (instead of on every merge) when the chain is already broken.
Files with merge=union, merge=ours, or merge=binary set in .gitattributes are now merged correctly. Previously, all 3-way text merges ran through diff3 regardless of .gitattributes, producing conflict markers for append-only files (.bones/events/*.events, changelogs, event logs) that were marked merge=union. Maw had never consulted .gitattributes merge drivers in either the BUILD phase (via git merge-file -p --diff3) or the stash replay path (via gix's default text driver). Both paths now load .gitattributes from the merge base and dispatch per-path:
merge=union— lines from both sides are concatenated cleanly, no conflict markers (the same semantics as git's built-inuniondriver). Ideal for append-only event logs, changelogs, NOTES files.merge=ours— the first workspace's side is always kept for conflicting hunks.merge=binary— no text merge attempted; any divergence from base is reported as a conflict.- Unknown custom drivers (e.g.,
merge=my-thing) — safely fall back to default diff3 behavior, so unrecognized drivers don't break merges.
Nested .gitattributes in subdirectories override parent rules (matching git's precedence). Consistent with git, merge drivers are resolved against the .gitattributes at the merge base, not the incoming side — changes to .gitattributes within the merge itself don't affect the current merge.
Both the BUILD phase (normal merges) and the stash replay path (when the target workspace has uncommitted edits) honor the drivers.
maw-lfsis now an unconditional dependency ofmaw-cliand the root crate. Thelfscargo feature is preserved as a no-op for backward compatibility.- The attributes matcher in
maw-lfsis now a general-purpose.gitattributesquery engine, not just LFS-specific. New public API:AttrsMatcher::merge_driver(path),AttrsMatcher::from_gix_tree(),AttrsMatcher::from_gix_head(). - New
GixRepo::load_gitattributes_at_commit()for loading the attrs matcher at any commit — used by both the BUILD phase and stash replay.
maw_git::merge::merge_text_with_style()— pure-Rust 3-way text merge with selectable conflict-resolution strategy (Diff3,Union,Ours,Theirs).maw_git::merge::resolution_for_driver()— maps a.gitattributesmerge=<name>driver to aConflictResolution.
ws sync --rebaseno longer silently drops local commits on stale workspaces (bn-18dj).committed_ahead_of_epochwas comparing against the current epoch instead of the workspace's base epoch. Since the workspace HEAD is behind the new epoch, the check always returned 0 commits ahead, bypassing the rebase and fast-forwarding — permanently discarding local commits. Fixed all three call sites: single-workspace sync, batchsync --all, andmaw execauto-sync.- Empty commits no longer produce truncated warning during rebase (bn-3en5). Cherry-picking an empty commit (from
git commit --allow-empty) now cleanly reports "Skipped (no changes to apply)" instead of a garbled warning with an empty message.
maw now handles LFS smudge/clean natively, with no git or git-lfs subprocess invocations. Working trees in LFS-tracked repos get real binary content after maw ws create/sync/advance/merge; maw ws merge writes correct pointer blobs (not raw binaries) on LFS paths. Fully interoperable with git-lfs on disk: identical pointer format, shared .git/lfs/objects/ layout.
maw-lfscrate: pointer codec (v1 spec), content-addressed object store,.gitattributesmatcher, HTTPS batch API client, credential provider (env vars + netrc).- Checkout smudge post-pass replaces LFS pointer files with real content from
.git/lfs/objects/. Missing objects leave the pointer with a warning (never fails checkout). GitRepo::write_blob_with_pathruns the LFS clean filter when a path matchesfilter=lfs: real bytes → store, git blob becomes the pointer. Used bymaw ws mergeso merged trees carry pointers.maw pushuploads new LFS objects to the remote's batch endpoint before pushing refs. Config keylfs.push_before_git_push(default true) to opt out.maw doctorreports pointer stubs in working trees and LFS object store size.- Conformance test suite validates byte-for-byte parity with
git-lfs3.7.1.
- No more LFS pointer stubs in working trees. Previously,
maw ws create/sync/mergewrote the raw pointer text (~130 bytes) instead of real binary content because gix's checkout doesn't run external filter processes. Agents saw pointers, builds broke. - No more raw binaries in git blobs. Commits made via
maw ws mergeon LFS-tracked paths now store the correct pointer blob; real bytes go to.git/lfs/objects/. - Merge uses incoming
.gitattributes, not HEAD's stale version. Adding or removing LFS patterns takes effect in the same merge. - LFS files with missing objects no longer silently vanish from the working tree after merge. They appear as pointer stubs (ready for
git lfs pull). - Empty (0-byte) LFS files stored as empty git blobs (matching git-lfs behavior), fixing
git lfs fsck"nonCanonicalPointer" warnings and workspace recovery failures. - Non-ASCII filenames (unicode, accented characters) no longer break the merge collect phase. Fixed
git diff/ls-filespath escaping. - Index stat refresh after smudge uses gix directly — no
gitsubprocess. Zero git/git-lfs subprocess calls in any LFS code path.
If you have existing corrupted workspaces (pointer stubs on disk from older maw), run maw doctor to detect them, then maw ws sync <name> on each to re-smudge. git lfs pull works as always to populate the local store.
- Untracked files in target workspace no longer silently overwritten by merge (bn-2fk0).
snapshot_working_copyused gix'sis_dirty()which does not detect untracked files, so no snapshot was created. Fixed by usinggit status --porcelainfor the dirty check. - Force checkout fallback no longer skips snapshot replay. When
git checkoutfailed (e.g., untracked files blocking it), the fallback usedgit checkout --forceand returned early — discarding the captured snapshot. Now falls through to the replay step. - Non-overlapping edits to the same file now merge cleanly. Previously, the stash replay naively overwrote files and then wrote whole-file conflict markers for any overlap. Now uses gix-merge's built-in text driver (
gix_merge::blob::builtin_driver::text) for proper 3-way merge — non-overlapping edits combine automatically, only true conflicts get diff3 markers.
maw_git::merge::merge_text— pure-Rust 3-way text merge via gix-merge. Nogit merge-filesubprocess needed.
maw ws resolvecommand. Resolve working-copy conflicts by name instead of git ours/theirs. Supports--keep <name>(all files),--keep path=name(per-file),--keep cf-N=name(per-block),--keep both(concatenate both sides), and--list(show conflicts with block IDs). Works for both merge and sync rebase conflicts.- Merge protection for dirty target workspaces. When the merge target (e.g., default) has uncommitted edits overlapping with merged files, the merge now writes diff3 conflict markers instead of silently dropping changes via stash replay. The merge always succeeds (epoch advances), and conflicts are surfaced as data for resolution.
- Named conflict markers. Conflict markers use actual workspace names (e.g.,
<<<<<<< bn-2sc3 (merged workspace)/>>>>>>> default (local edits)) instead of generic labels or git commit hashes. - Sync rebase conflict relabeling.
maw ws sync --rebasenow relabels git's raw conflict markers (HEAD/ commit hash) with meaningful names (epoch (current)/ workspace name) and printsmaw ws resolveguidance. - DST: DirtyDefault + ResolveDefault actions. Deterministic simulation testing now covers the dirty-target-workspace scenario, which found and fixed a bug where untracked files in the stash were not detected by the merge protection.
- Stash replay no longer silently drops merged file modifications (bn-43bc). Root cause:
git stash apply's 3-way merge could resolve overlapping files by reverting to the pre-merge state. The merge commit was always correct, but the working-tree update lost changes. - Stash path detection now includes untracked files.
stash_changed_pathsnow usesgit stash show --include-untrackedto catch files captured in the stash's third parent, preventing silent data loss for newly-added files.
- Workspace descriptions.
maw ws create -d "..."/--descriptionstores a human-readable purpose label in workspace metadata. Shown inmaw ws list(text:# descsuffix; pretty: dimmed line; JSON:descriptionfield). Usemaw ws describe <name> <msg>to add or update a description after creation. maw lsandmaw ws lsaliases. Hidden shortcuts formaw ws list— less typing for interactive use.
ws create --from <workspace>no longer fails with "expected commit or tree, got blob". The--fromresolver was returning the oplog blob ref (refs/manifold/head/<workspace>) instead of the workspace's actual git HEAD commit. Also fixed the same bug inmaw changes create --source.
- Non-required merge drivers no longer block merges. Built-in default regenerate drivers (
Cargo.lock,package-lock.json) now haverequired = false. When the regenerate command fails (e.g.,npm installunavailable or broken), the merge falls back to normal resolution with a warning instead of aborting. User-configured drivers still default torequired = true. - Merge rejects diverged default workspace. When the target branch has direct commits ahead of the epoch (made outside maw), merge now fails early with a clear message to run
maw epoch syncfirst. Previously, the merge would silently drop those commits from the epoch and leave their files as unstaged changes in default.
- Explicit changes workflow targets.
maw changesand related workspace flows now support clearer source/target selection so change-bound and trunk-bound work stay separated. - Deterministic simulation tooling.
maw dev simgained run, replay, inspect, shrink, JSON output, and latest-artifact helpers, with CI artifact archival to make seeded failures reproducible. - DST artifact opener helpers. Added shortcuts for opening the latest deterministic simulation artifacts without manually hunting through
/tmp/maw-dst-artifacts.
- Sync rebase preserves local commits.
maw ws sync --rebasenow keeps commits ahead of the workspace epoch instead of dropping local work during stale-workspace recovery. maw execskips stale auto-sync for non-git commands. Auto-sync now only runs forgitinvocations, so tools likesigil evalcan run against an existing stale workspace.- Merge, sync, push, and JSON remediation contracts. Diagnostics are more actionable and machine-readable payloads are more consistent across merge planning, sync failures, push checks, and workspace status/reporting.
- Cross-target contamination guards. Trunk-targeted flows no longer accidentally absorb active change-lineage commits, and merge planning now honors explicit targets more reliably.
- Conflict recovery and restore fidelity. Recovery, remediation, destroy, and mixed-target replay edge cases are handled more safely so agents keep a clearer path back to valid workspace state.
- Agent workflow docs moved to edict terminology. Project guidance, prompts, and repo metadata now consistently use the edict/rite/seal/vessel naming scheme.
- Symlink following during merge cleanup corrupts data (bn-1fi2).
stash_apply()wrote all git tree entries as regular files viaFile::create, which follows existing symlinks and overwrites the target. Symlinks (mode 120000) are now created as OS symlinks, and existing symlinks are removed before writing regular files. This caused 1.6MB of event data loss in bones/botbox.
--messagerequired formaw ws merge(bn-1rgj). Merge no longer auto-generates commit messages. In a TTY, an editor opens (respects$VISUAL/$EDITOR). Non-TTY without--messageerrors with clear usage guidance.
maw ws sync --rebase(bn-14yf). Cherry-pick based rebase for stale workspaces with conflict-as-data support. Conflicts are recorded as JSON metadata, shown inws status/ws list, and block merge until resolved.
- TUI showed "No workspaces" when no agent workspaces exist (bn-15od). The TUI now includes the default workspace as a pane showing dirty working-copy files. Default pane sorts first and shows dirty file count in the title.
- gix ref writes lacked trailing newline (bn-3pia). Loose refs written by gix omit the trailing LF that git's canonical format requires, causing
git fsckrefMissingNewlinewarnings. Addedensure_ref_newline()post-write fixup.
maw ws list --check(bn-2iux). Runs the merge engine's conflict detection for each workspace with unmerged commits. Text output shows[clean]or[N conflict(s)]; JSON adds amerge_checkfield. Opt-in (slower than plain list).
- Tree sort order in merge engine (bn-39r3).
build_tree()used plain lexicographic sort instead of git's canonical tree sort (directories sort asname/). This produced trees rejected by GitHub'sreceive.fsckObjectscheck when a directory and blob shared a common prefix (e.g.,notes/assurance/vsnotes/assurance-plan.md). - Global-view epoch wrong source (bn-1wqe).
maw ws statuscomputed the epoch by taking the lexicographic max of workspace epochs instead of readingrefs/manifold/epoch/currentdirectly. - Stale merge-state warning noise (bn-2fd1). Downgraded the "stale merge-state found" message from
eprintln!totracing::debug!— it fires after successful merges and confuses agents. ws diffmissed untracked files (bn-3bo8). Refactored diff to compare base revision against the working tree (not HEAD), and to include untracked files in stat/patch/numstat output.- Mixed staged/unstaged after merge snapshot replay (bn-1r81). After replaying a dirty-state snapshot, all files are now unstaged via gix index reset (new
unstage_all()trait method) sogit statusshows a clean staged area. - Merge without
--messagegave no feedback (bn-1dkl). When no message is provided, merge now shows the auto-generated commit subject and a hint to amend.
- Workspace lints consolidated. Lint configuration moved from per-crate
[lints.*]sections to[workspace.lints.*]in root Cargo.toml. All crates use[lints] workspace = true. - Release profile optimized. Added
opt-level = "z", LTO, single codegen unit,panic = "abort", and symbol stripping to[profile.release].
- AST merge silent data loss (bn-2cv5). When two workspaces modified the same interstitial text (comments, whitespace between functions), the AST merge layer silently resolved to base content instead of raising a conflict. Added
interstitial_differs()check that falls back to diff3 when inter-item regions change. - AST merge stripped doc comments from new functions (bn-3vmr). Functions added by a workspace lost their
///doc comments and#[...]attributes during AST reconstruction. Addedleading_trivia()to preserve preceding documentation and attributes on Added items. - AST merge appended use declarations at EOF (bn-1ldh). New
usedeclarations added by a workspace were placed at the end of the file instead of near existing imports. Now spliced after the last survivinguse_declarationin the output. - Epoch-delta stale merge protection (bn-7phd).
inject_epoch_delta()now creates synthetic PatchSets for files changed between a workspace's creation epoch and the current epoch, forcing stale-overlapping files through diff3 conflict resolution instead of silent overwrite. - Sequential stale merge reversion (bn-1k7n). Multiple stale workspaces merged sequentially could revert each other's changes. Root cause was operational (old binary without epoch-delta code); confirmed fixed with current binary.
- Workspace reversion on stale merge (bn-1zdc). Merging a workspace created before other merges no longer silently reverts already-merged files.
- Merge ordering sensitivity (bn-2axt). Merge results no longer depend on the order workspaces are listed on the command line.
- Missing epoch ref after merge (bn-3qeh).
refs/manifold/epoch/currentis now always advanced after a successful merge commit. - Dirty default workspace data loss on merge (bn-2ge6). Uncommitted changes in
ws/default/are now captured and replayed after merge cleanup. - Concurrent merge race condition (bn-21a3). Merge pipeline now uses atomic ref updates to prevent interleaved merges from corrupting epoch state.
- Stale workspace sync after merge (bn-3v88).
maw ws synccorrectly handles workspaces that fell behind by multiple epochs.
- Crate extraction complete.
maw-git,maw-core,maw-cli,maw-tui, andmaw-assuranceare now independent crates in the workspace.maw-gitprovides theGitRepotrait with a pure-gix implementation (zero CLI calls in core). - Gix migration complete. All git operations in
maw-gitandmaw-coreuse gix. Remaining CLI calls are isolated inmaw-cli(push/fetch, detached HEAD worktree ops, rev-list --count, worktree prune).
- Assurance framework (Phase 0 complete). Six guarantees (G1-G6) defined, tested, and enforced:
- G1 (committed no-loss): recovery refs use monotonic timestamps — no collision risk
- G2 (rewrite no-loss):
preserve_checkout_replay()replacesgit checkout --forcein merge cleanup — dirty files in ws/default are captured and replayed - G4 (destructive gate): post-merge destroy captures recovery snapshot before deletion; refuses if capture fails
maw ws recover --search. Search content across all recovery snapshots using pattern matching. Supports regex, case-insensitive, and context lines.- Failpoint framework (
src/failpoints.rs). Feature-gatedfp!()macro for deterministic simulation testing. Zero overhead when disabled. - Invariant oracle (
src/assurance/oracle.rs). Six check functions (check_g1..check_g6) for DST harness. Feature-gated behindassurance. - Audit event logging (
src/audit.rs). Structured JSON audit trail for recovery operations (search, show, restore, prune) with SHA-256 pattern hashing. - Rewrite artifact types (
src/workspace/working_copy.rs).RewriteRecord,DeltaSummary,ReplayOutcometypes with JSON I/O for working-copy audit trail. - Snapshot op in oplog. When default workspace has dirty files at merge time, a Snapshot operation is recorded in the default workspace's oplog.
- Working-copy regression tests (
tests/working_copy_regression.rs). Five regression tests (T1-T5) exercising full merge path for dirty-state preservation. - Phase 0 integration tests (
tests/rewrite_safety.rs,tests/destroy_gate.rs). IT-G2 and IT-G4 integration test suites.
- G2 violation:
update_default_workspace()no longer usesgit checkout --force. Now usespreserve_checkout_replay()which captures dirty state, checks out new epoch, and replays user changes. - G4 violation: Post-merge destroy now always captures a recovery snapshot. Destroy refuses on capture failure unless
--force. - G1 collision caveat: Recovery ref timestamps now use monotonic clock with nanosecond precision — no more collision risk.
- Dangling snapshot refs: Recovery refs from failed operations are now detected and cleaned up.
- Dead code: Removed
sync_stale_workspaces_for_merge()which was unreachable.
- Epoch merge workflow. Multiple improvements to merge reliability and agent UX.
- Stateless conflict resolution with
--resolve. Whenmaw ws mergehits conflicts, each conflict gets a short terseid ID (e.g.,cf-k7mx). Re-run the same merge with--resolve cf-k7mx=aliceto resolve inline — no stored state, no interactive prompts, fully idempotent. --resolve-all=WORKSPACEshorthand. Resolve all conflicts to one workspace's version in a single flag. Individual--resolveflags take precedence.- Content snippets in conflict output. Conflict reports now show up to 5 lines from each side inline, so agents can make resolution decisions without reading files separately.
- Terseid IDs in
maw ws conflicts. The conflicts inspection command now shows the same IDs and suggested resolve commands as the merge output. - Workspace names replace ours/theirs. Resolution uses actual workspace names (
--resolve cf-k7mx=alice) instead of the confusing git-styleours/theirsterminology.
patch_candidate_treeslash handling. Tree patching now uses a temp index (GIT_INDEX_FILE+read-tree+update-index) instead ofls-tree -r+mktree, fixing failures on files in subdirectories.- Stale
merge-state.jsonon--resolvefailure. All error paths in the resolve block now callabort_merge()before returning. resolve_atomssilent fallback on AST regions. Atom-level resolution now handlesRegion::AstNodebyte ranges correctly instead of silently falling through to base content.- Partial resolve preserves already-provided resolutions. The suggested retry command now includes both resolved and remaining conflict IDs, so agents can copy-paste without manually combining flags.
maw ws describecommand. Record human-readable descriptions in workspace operation logs. Visible inmaw ws historyoutput. Useful for agents to annotate work in progress or mark review readiness.maw ws annotatecommand. Attach structured JSON metadata (test results, review status, build artifacts) to workspaces viamaw ws annotate <workspace> <key> <json-value>. Visible inmaw ws history --format json.
- Phantom deletion bug in merge (bn-1b2b). When a workspace's base epoch is older than the current epoch, files added by other merged workspaces appeared as deletions, crashing the patch-set builder or incorrectly removing files. Now filtered out in the collect phase as phantom deletions (net no-ops).
- Rename handling in git status/diff parsing. Porcelain status and name-status parsers now correctly extract the new path from renames and copies instead of including the full "old -> new" string.
- Doctor bare-root check.
GEMINI.mdis now allowed at the bare repo root alongsideAGENTS.mdandCLAUDE.md.
- Removed inert .gitignore writing.
maw initandmaw upgradeno longer write a root.gitignoreor workspace.gitignore— these were no-ops in a bare repo. - Temp dir cleanup in merge. Build-phase and resolve now use
tempfile::Builderfor automatic cleanup instead of manual nonce-based temp dirs. - Project config renamed. Botbox and Claude hook paths updated from
manifoldtomaw.
- Workspace diff command family. Added
maw ws diffwith deterministic comparison semantics against default/epoch/branch/oid targets. - Agent-safe output modes.
maw ws diffnow supports summary, patch, and machine-readable JSON output plus--name-onlyand--pathsfilters. - Diff contract and tests. Published
notes/ws-diff-contract.mdand added integration/unit coverage for output contract stability and migration-era execution contexts.
- README command table now documents
maw ws diffas a first-class workflow command.
- Init default-branch alignment.
maw initnow reattachesws/defaultto the configured branch when possible instead of leaving it detached on stale epoch commits, preventing large false dirty states after migration. - Workspace-state ref refresh on idempotent init. Brownfield init now refreshes
refs/manifold/ws/defaultfrom the actualws/defaultHEAD after repair/alignment.
- Regression test for stale-epoch detached default workspace recovery during idempotent init.
- Doctor worktree validation.
maw doctornow fails whenws/defaultexists but is not a valid registered git worktree, with explicit guidance to runmaw initfor repair.
- Integration tests for doctor default-workspace validation (healthy registration and orphaned-worktree failure cases).
- False stale warning in
maw status. Top-level status now treatsws/defaultas the persistent branch workspace and no longer reports stale/sync advice when epoch refs lag while branch state is correct.
- Regression test for default-workspace stale reporting in branch-ahead/stale-epoch scenarios.
- Release and push safety for stale epoch refs.
maw releaseandmaw push --advancenow use ancestry checks and refuse unsafe rewinds whenrefs/manifold/epoch/currentlags behind the configured branch. - Safer release tagging behavior. Releases now tag the resolved safe release commit (branch tip when epoch is stale but branch is ahead) and error clearly on divergent ref graphs.
- Regression tests covering branch-ahead/stale-epoch scenarios for both
push --advanceandrelease.
- Default workspace sync semantics.
maw ws syncnow treatsws/defaultas a persistent branch workspace and skips detached-epoch sync behavior, preventing unwanted HEAD detaches. - Brownfield init self-heal for migrated repos. Idempotent
maw initnow prunes stale git worktree registrations and repairs orphanedws/defaultworktree linkage when metadata exists but registration is broken.
- Ran
rustfmtacross touched Manifold files to keep formatting consistent and reduce future diff noise.
- Workspace backend auto-selection and benchmarking (bd-3ca3).
CopyBackend,AnyBackendenum, config-drivenget_backend(),auto_select_backend()per §7.5, criterion benchmark suite. - Performance benchmarks eval (bd-30pm). Snapshot scaling benchmarks (2 repo sizes × 3 change counts), merge partition benchmarks (fixed-total and scaling variants). All §1.1 targets confirmed: create <100ms @30k files, snapshot proportional to changes, merge proportional to touched files.
- bd-3t67 (P1 Epic: Evals — Agent Testing in /tmp) — all 7 eval beads completed
- bd-3iqh (P2 Epic: Phase 4 — CoW Workspace Layer) — all 5 blockers completed
- bd-21zn (P2 Epic: Phase 5 — The Full Manifold) — all 9 blockers completed
- bd-jsw0 (Track 5: Phase 4 CoW backend strategy) — complete
- bd-17nb (Track 6: Phase 5 long-horizon transport) — complete
- All 502 beads closed — project roadmap complete through Phase 5
- Reflink workspace backend (bd-1rum).
RefLinkBackendinsrc/backend/reflink.rs— CoW workspace creation viacp --reflink=autofrom immutable epoch snapshots, with fallback to recursive copy. FullWorkspaceBackendtrait implementation. 34 tests. - OverlayFS workspace backend (bd-lm5y).
OverlayBackendinsrc/backend/overlay.rs— zero-copy workspaces via fuse-overlayfs or kernel overlay with user namespaces, immutable epoch lowerdir, per-workspace upper/work dirs, ref-counting for epoch snapshot retention, whiteout detection. 16 tests. - Property-testing merge correctness (bd-1szh). Pushout contract verification in
src/merge/pushout_tests.rs— 16 property tests covering embedding, minimality, and commutativity with 14,500+ random scenarios per CI run. - Expanded tree-sitter semantic conflict detection (bd-3l3o). Language pack architecture for incremental grammar enablement, semantic conflict rules for symbol lifecycle and signature drift, confidence scoring, machine-readable semantic rationale in conflict output.
- Workspace templates (bd-1bei). Template system for bead archetypes with
--templateflag onmaw ws create.
- bd-3rdu (P2 Epic: Phase 3 — Advanced Merge + Conflict Model) — all 7 blockers completed
- AST-aware merge via tree-sitter for Rust, Python, TypeScript (bd-1g5h). Feature-gated
ast-merge(default on). Falls back from diff3 to AST-level edit scripts for +5-10% merge success. - Shifted-code alignment merge layer (bd-233b). Detects moved code blocks, normalizes positions, retries diff3.
- Platform CoW detection (bd-3gzh). Runtime detection of reflink, overlayfs, userns, fuse-overlayfs with auto-selection.
maw ws touchedandmaw ws overlapcommands for conflict prediction (bd-3cie). JSON output for orchestrators.
- bd-2yxa (P1 Epic: Phase 1 — Git Worktree Backend) — all 11 blockers completed
- bd-2qfp (P2 Epic: Phase 2 — Patch-Set Model + Git-Native Op Log) — all blockers completed
- bd-18py (Track 1: Phase 1 foundation), bd-e5ej (Track 2: merge safety), bd-3jt0 (Track 3: patch-set model) — all closed
- bd-21sm, bd-29e3, bd-1mjz parent beads and remaining children — all closed
- Rename-aware merge: FileId-based rename detection in partition pipeline — reroutes edits to renamed paths, detects divergent renames and rename/delete conflicts (14 tests)
- Quarantine workspaces: Failed merge validation creates quarantine workspace for fix-forward;
maw merge promoteandmaw merge abandoncommands (19 tests) - Persistent workspace mode:
--persistentflag onmaw ws create,maw ws advancerebases onto latest epoch, mode-aware staleness inmaw ws list/status - Concurrent safety eval: Adversarial interleaving test harness with 5 agents, 100 random scenarios, git fsck integrity checks, determinism validation (29 tests)
- Feat: Agent-friendly conflict presentation (JSON structured output) —
ConflictJsonstruct with path/reason/workspaces/base_content/sides/atoms/resolution_strategies,conflict_record_to_json()conversion,maw ws merge --format jsonstructured output for success and conflict cases. 20 tests. (bd-20kb) - Feat: Upgrade merge engine input from snapshots to PatchSets — FileId and blob OID fields on FileChange/PathEntry, git hash-object enrichment in collect phase, blob-OID equality in resolve phase. 16 new tests. (bd-1mjz.1)
- Feat: Merge preview (
--plan --json) and derived artifacts —MergePlanJSON with deterministic merge_id (SHA-256),plan_merge()runs PREPARE+BUILD+VALIDATE without COMMIT, artifacts written to.manifold/artifacts/,--planflag onmaw ws merge. 15 new tests. (bd-1q3f) - Closed: bd-2hw9 (Phase 1 integration tests, all children done), bd-21sm.3 (eval: conflict detection)
- sha2 dependency added for deterministic merge identifiers
- Feat: View checkpoints and log compaction —
src/oplog/checkpoint.rswithCheckpointData/CheckpointViewserialization, configurable checkpoint intervals,materialize_from_checkpoint()for fast replay from latest checkpoint,compact()to replace pre-checkpoint chain with synthetic root. 29 tests. (bd-28np.3) - Feat: ConflictAtoms in merge engine — ConflictRecord now carries
Vec<ConflictAtom>with line-level conflict localization.parse_diff3_atoms()extracts ConflictAtoms from diff3 marker output. Workspace-labeled conflict sides. 8 tests. (bd-15yn.3) - Feat: Workspace isolation integration tests — 12 tests verifying edit/create/delete/status isolation, 5-workspace concurrent edits, directory isolation, sibling destruction safety, binary files, concurrent create+delete, 50-file bulk test. (bd-2hw9.3)
- Feat: Eval 3-agent parallel disjoint files test + TestRepo::advance_epoch fix to keep refs/heads/main in sync with epoch ref. (bd-21sm.2)
- Closed parent beads: bd-15yn (Conflict model, all 3 children), bd-28np (view materialization, all 3 children). Unblocks merge engine chain (bd-1mjz), conflict presentation (bd-20kb).
- Feat: ConflictAtom localization types — replace placeholder with full
Regionenum (Lines, AstNode, WholeFile),ConflictReasonenum (OverlappingLineEdits, SameAstNodeModified, NonCommutativeEdits, Custom),AtomEditstruct (workspace + region + content), and expandedConflictAtom(base_region + edits + reason). Tagged JSON serde. 44 tests. (bd-15yn.2) - Feat: Global view computation — CRDT merge of per-workspace
MaterializedViews viaGlobalViewstruct. Epoch max, PatchSet pairwise join, destroyed workspace exclusion, cache key validation. Commutative/associative/idempotent. 21 tests. (bd-28np.2) - Feat:
maw ws undo— compensation operations via inverse PatchSet. Reads latest Snapshot from op log, computes inverse patches, appends Compensate operation, applies to working directory. Forward/inverse for Add/Delete/Modify/Rename. Redo = undo the undo. 21 tests. (bd-12p7) - Feat: Workspace lifecycle integration tests — create/list/duplicate/destroy, clean/dirty/stale status assertions. Idempotent destroy. 27 tests. (bd-2hw9.2)
- Feat: Structured Conflict model —
Conflictenum with 4 variants (Content, AddAdd, ModifyDelete, DivergentRename).ConflictSidewith workspace/content/timestamp,ConflictAtomplaceholder for region-level conflict localization. Tagged JSON serde. 23 tests. (bd-15yn.1) - Feat: Per-workspace view materialization —
MaterializedViewstruct produced by replaying op log in causal order. Handles all 7 op types (Create, Snapshot, Compensate, Merge, Describe, Annotate, Destroy). Pluggable patch-set reader.materialize()andmaterialize_from_ops()APIs. 18 tests. (bd-28np.1) - Feat: Level 1 Git compatibility — workspace state materialized as
refs/manifold/ws/<name>viagit stash create. Config toggleworkspace.git_compat_refs(default true). Refs pruned on workspace destroy. Enablesgit diff refs/manifold/ws/<name>..mainfor debugging. 7 tests. (bd-4dsf)
- Feat: Stable FileId system — 128-bit random FileId for deterministic rename tracking. FileIdMap with bidirectional path↔id mapping, atomic persistence to
.manifold/fileids, concurrent rename+edit resolution. 27 tests. (bd-b2y4) - Feat: OrderingKey with wall-clock clamp guard — composite ordering key
(epoch_id, workspace_id, seq)for causal ordering. Wall clock clamped monotonically, excluded from Ord. SequenceGenerator for per-workspace sequence+clock management. 23 tests. (bd-1182) - Feat: Enhanced
maw ws history— op log first (walksrefs/manifold/head/<name>blob chain), git commit fallback, JSON/Text/Pretty output formats, payload summarization for all 7 op types. 13 tests. (bd-23w1) - Feat: Eval scenarios — 5 agent task scenarios with scoring rubric (basic lifecycle, multi-file edit, multi-agent, conflict resolution, read-only inspection). FrictionScore 1-5 scale, RunMetrics collection, EvalReport with target threshold ≤1.5. 19 tests. (bd-29e3.2)
- Feat: Op log read — walk the causal chain from head backwards via BFS. Supports max depth limits, stop-at predicates, and diamond DAG deduplication. 21 tests. (bd-1v2t.3)
- Feat: PatchSet computation from working directory diff —
compute_patchset()builds a PatchSet by parsinggit diff --find-renames --name-status, collecting untracked files, and verifying blob OIDs. 21 tests. (bd-2xxh.3) - Feat: Post-merge validation language presets —
LanguagePresetenum (Rust/Python/TypeScript/Auto) with auto-detection from filesystem markers (Cargo.toml, pyproject.toml, tsconfig.json). Resolution pipeline: explicit → preset → auto-detect. 35+ tests. (bd-1cg0) - Milestone: Closed bd-2xxh (PatchSet types) and bd-1v2t (operation log) — all children complete. Unblocks downstream: FileId system, Conflict model, OrderingKey, workspace history, view materialization.
- Feat: PatchSet join operation — CRDT merge of two patch-sets with commutative, associative, and idempotent properties. Conflict classification with 6 distinct reasons (DivergentAdd, DivergentModify, ModifyDelete, RenameConflict, DivergentRename, Incompatible). 26 tests including property tests. (bd-2xxh.2)
- Feat: Op log write — store operations as git blobs via
git hash-object -w --stdinwith atomic CAS ref updates atrefs/manifold/head/<workspace>. Single-writer invariant enforced. 16 tests. (bd-1v2t.2)
- Major: Git-native backend — replaced jj dependency with direct git worktree operations for workspaces, merge, push, status, and release. No more jj workspace commands needed. (bd-1xfd)
- Feat:
maw gccommand — garbage-collect unreferenced epoch snapshots from.manifold/epochs/. Supports--dry-runpreview. (bd-1xu7) - Feat: New core data model types:
PatchSet/PatchValue(patch-set model §5.4),FileId(stable rename-tracking §5.8),Operation/OpPayload(operation log §5.3). Foundation for Phase 2 merge and op-log systems. (bd-2xxh.1, bd-1v2t.1) - Internal: Phase 1 integration tests for workspace lifecycle, merge scenarios, and crash recovery.
- Fix:
maw ws create,maw ws destroy, andmaw ws attachnow work from any directory within the repo, not just the repo root. Previously failed with "must be run from the repo root" when invoked viamaw exec default -- maw ws create <name>. (bd-363g)
- Fix:
maw ws mergenow snapshots source workspaces before rebasing/squashing. Workers that only usedmaw execwith non-jj commands (e.g.cargo test,br list) had on-disk edits that weren't in jj's tree — these were silently lost during merge. Nowjj statusis run in each source workspace to trigger a snapshot first. (bd-1lkg)
- Feat:
maw execno longer runsjj statusfor non-jj commands. Runningmaw exec alice -- cargo testcreates zero jj operations, eliminating opforks from concurrent agent workspaces. Auto-sync only triggers when the command starts withjj. (bd-1h8c) - Feat:
maw ws mergeauto-detects and auto-integrates jj operation forks before merging. Up to 5 integration passes for multi-agent opforks. (bd-1h8c) - Feat: new
check_opfork()andauto_integrate()helpers in jj.rs for programmatic opfork detection and recovery. (bd-2akx)
- Feat:
maw ws merge --checkpre-flight conflict detection. Trial-rebases onto main, detects conflicts, then undoes. Exit 0 = safe to merge, non-zero = blocked. Combine with--format jsonfor structured output (ready,conflicts,stale,workspace,description). (bd-pp6o) - Fix:
maw ws mergenow returns non-zero exit code when conflicts remain. Previously returned 0 with only a WARNING printed. (bd-pp6o)
- Fix:
maw pushnow runsjj git exportbefore the bookmark push, preventing false "Nothing changed" when the op graph has diverged from concurrent workspace operations. (bd-bjr0) - Fix:
maw execblocksjj bookmark set <branch>from non-default workspaces. This prevents agents from accidentally forking the jj operation graph by modifying shared bookmarks. Shows a clear error suggestingmaw ws mergeinstead. (bd-fs7c) - Fix:
maw ws syncdetects divergent commits after sync and auto-abandons empty copies. Prevents data loss whenjj workspace update-stalepicks the wrong copy. (bd-3pxf) - Fix:
maw status(including--watchand--status-bar) degrades gracefully on jj sibling operation errors instead of crashing. ShowsOPFORK!indicator with fix command, resumes normal display when resolved. (bd-etjx) - Fix:
maw ws list --format textuses tab-separated columns with a header row for agent parseability. (bd-3757)
- Feat:
--jsonis now accepted as a hidden alias for--format jsonon all commands that support--format(doctor, status, ws list, ws status, ws history). Hidden from--help; conflicts with--formatif both specified. (bd-3i8u)
- Feat:
maw ws restore <name>recovers a workspace after accidentalmaw ws destroy. Uses jj operation log to revert the forget, rematerialize the directory, and restore file content. Multi-strategy fallback ensures recovery even when op revert alone doesn't recreate the directory. (bd-2nyy) maw ws destroynow showsTo undo: maw ws restore <name>in its output.
- Feat:
maw initandmaw upgradenow setui.conflict-marker-style = "snapshot"in jj repo config. The default jj "diff" style uses%%%%%%%and\\\\\\\markers that break JSON-based editing tools agents use. Snapshot style fully materializes both conflict sides with JSON-safe markers. Requires jj >= 0.38.0. (bd-2m7c) - Feat:
maw doctorchecks jj version >= 0.38.0 and warns if conflict-marker-style isn't "snapshot". - Feat:
maw ws mergenow shows conflict file locations with line ranges and actionable resolution guidance when merge results in conflicts. (bd-2vrn) - Fix: auto-snapshot default workspace before merge rebase to prevent data loss when default has uncommitted changes. (bd-97m6)
- Fix:
maw ws mergenow preserves committed work in the default workspace. Previously, intermediate commits between main and default@ were lost during merge rebase — the whole chain is now rebased, not just the tip. (bd-342s) - Fix:
maw status(including--watchmode) no longer crashes when the default workspace working copy is stale.collect_status()now catches stale errors fromjj workspace listandjj status, setsis_stale=true, and continues with degraded data. (bd-ubxq)
- Fix:
maw initcompatibility with jj 0.37.0 — ghost.jj/working_copy/cleanup moved to afterjj workspace addsucceeds, preventing "No such file or directory" errors during init. - Refactor: split 3100-line
workspace.rsintoworkspace/module (9 files: mod.rs, merge.rs, sync.rs, status.rs, create.rs, list.rs, prune.rs, history.rs, names.rs). - Test: add 13 integration tests covering merge (5), sync (3), push (2), and config/status (3) using real jj repos in temp directories. Fix test helpers for jj 0.37.0 (commit
.gitignoreafter init, use--allfor initial push to new remotes).
maw initnow previews root cleanup before deleting files. Untracked files (not in any jj/git commit) are skipped with a warning instead of silently deleted. Only jj-tracked files — which are recoverable — are removed.- Extract shared
count_revset()andrevset_exists()jj helpers into newjj.rsmodule, replacing duplicate implementations in push.rs and status.rs.
- Fix: use
&Pathinstead of&strfor workspace paths in divergent resolution, removing unsafe.to_str().unwrap_or(".")fallbacks. - Fix: check
git push --tagsexit status and report failures/rejected tags. - Fix:
maw execreturnsExitCodeErrorinstead of callingprocess::exitdirectly, preserving exit code passthrough. - Fix: rename misleading
rootparameters tocwdin merge helper functions. - Fix: upgrade change detection uses jj's "no changes" pattern instead of git's "nothing to".
- Internal: pass
jj_cwdtopush_tagsinstead of re-resolving it.
- Fix: post-merge abandon now scoped to only orphaned commits from the workspaces being merged. Previously, the broad revset could abandon empty commits from unrelated active workspaces.
- Fix:
get_current_workspaceno longer returns name with@suffix. - Fix: all deprecated
maw ws jjsuggestions replaced withmaw exec. - Fix:
--messagenow applies to single-workspace merges viajj describe. - Fix: always use
--colocateforjj git initeven without existing.git/.
- New
maw release <tag>command — tags and pushes in one step. Creates a jj tag, exports to git, pushes the branch, then pushes the tag. Replaces manualjj tag set+git push originworkflow. - Fix:
maw releaseuses jj-resolved commit hash for the git tag, preventing stale ref issues. - Fix:
maw init,maw upgrade, andmaw doctornow set git HEAD torefs/heads/mainafter enabling bare mode. Prevents "HEAD detached" warnings from git tooling.
- Fix: text format uses structured output with
[OK]/[WARN]markers for machine-parseable status.
- Fix: remove ghost
.jj/working_copy/directory that causes root pollution in bare repos. - Fix:
maw initruns jj fromws/default/when root lacks a working copy.
- Add
--formatflag tomaw status,maw doctor, andmaw ws history. Supportstext,json, andprettyformats.
- Drop
toonoutput format, addprettyformat with automatic TTY detection.prettyis now the default for interactive terminals;textfor pipes. - Fix: reject
maw ws merge defaultwith clear error pointing tomaw push --advance. Prevents silent edit loss fromjj restorerunning on the merge target. - Fix:
maw statusandmaw doctorwarn if unexpected files exist at the bare repo root. - Fix: allow dotfiles and agent stubs (
.claude/,AGENTS.md,CLAUDE.md) at bare repo root without triggering stray-file warnings.
- Internal: botbox upgrades only, no user-facing changes.
- Deprecate
maw ws jj— now errors with suggestion to usemaw execinstead. - Fix: tests use temp dirs instead of creating workspaces in the live repo.
- Redesign
maw statusoutput with left-aligned glyphs and clearer labels.
maw pushnow pushes git tags by default (no separategit push origin --tagsneeded).
maw ws listwraps JSON/text output in a structured envelope with anadvicearray for actionable suggestions.- Green checkmarks on ideal-state items in
maw status— helps spot problems at a glance. - Hide cursor during
maw status --watch, restore on exit (q/Esc/Ctrl-C). - Fix: use
\r\nin watch mode for correct raw-terminal rendering.
- Fix: auto-resolve divergent copies when both are non-empty. After
maw ws sync, if jj forks a workspace commit into divergent copies that both have file changes, maw now resolves them automatically: identical diffs → abandon non-@, file subset → abandon, superset → squash into @. Previously required ~6 manual jj commands that agents frequently got wrong.
- Fix: all jj commands now use
jj_cwd()helper to run fromws/default/instead of bare root. Fixesmaw push,maw status,maw ws list,maw ws create,maw ws status,maw ws sync,maw ws merge,maw ws prune, andmaw ws historyall failing with "working copy is stale" when run from bare root. - Doctor uses shared
workspace::jj_cwd()instead of ad-hoc default workspace detection. - Status removes duplicated
repo_root()helper, usesworkspace::jj_cwd().
- New
maw exec <ws> -- <cmd> <args>command — run any command inside a workspace directory. Validates workspace name (no path traversal), auto-syncs stale workspaces. Generalizesmaw ws jjto work with any tool (br, bv, crit, cargo, etc.).
- Rename "coord" workspace to "default" everywhere — matches jj convention, predictable path (
ws/default/) for external tools. - Trim repo root to only
.git/,.jj/,ws/— tracked files (.gitignore,.maw.toml,.beads/, etc.) live only in workspaces. MawConfig::loadfalls back tows/default/.maw.tomlwhen root copy doesn't exist.- Fix: post-merge
jj restoreensures on-disk files in default workspace reflect the merge. - Fix:
maw ws destroyandmaw statusrun jj fromws/default/instead of bare root. - Fix:
maw initcreates default workspace with-r mainso source files are present immediately.
- v2 bare repo model: workspaces moved from
.workspaces/tows/. Default workspace relocated tows/default/. Repo root is now metadata-only (no source files). maw pushuses--bookmarkexplicitly — works from any workspace.maw ws mergerebases default workspace onto branch post-merge.- New
maw initcommand sets up bare repo model (forget default ws, core.bare=true, create default). - New
maw upgradecommand migrates v1 repos to v2 layout. - Default workspace protected from
maw ws destroy.
maw ws jjnow detects stale workspaces and prints a warning with fix command (maw ws sync) before running the jj command.- All workspace path outputs now include trailing
/for easier copy-paste into file paths.
- Add
maw push --advanceflag — moves the branch bookmark to@-(parent of working copy) before pushing. Use after committing directly (version bumps, hotfixes). Without the flag,maw pushnow detects unpushed work at@-and suggests--advance. - Update all agent docs (CLAUDE.md, AGENTS.md, finish.md) to use
maw pushconsistently instead of manualjj bookmark set+jj git push.
- Add
maw pushcommand — replaces manualjj bookmark set main -r @-+jj git pushworkflow. Handles bookmark management, sync checks, and clear error messages. - Post-merge: rebase default workspace onto branch so on-disk files reflect the merge immediately.
- Add
.maw.tomlconfig file support with[merge]section. - Add
auto_resolve_from_mainconfig to auto-resolve conflicts in specified paths (e.g.,.beads/**) duringmaw ws merge. - Refine
maw status --status-barprompt glyphs and colors for workspace count, change count, and sync warning. - Add
[repo]config section withbranchsetting (default:"main") — replaces hardcoded"main"throughout.