Skip to content

Latest commit

 

History

History
1357 lines (937 loc) · 160 KB

CHANGELOG.md

File metadata and controls

1357 lines (937 loc) · 160 KB

Changelog

All notable changes to maw.

v1.0.0-pre.19 (2026-09-30)

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 d with a symlink to a directory outside the repo, and your uncommitted state deleted d/x. The replay then deleted x in 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 --recover replays 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 concurrent git 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-snapshots keeps the maw undo pin that a redo still needs (bn-43x5k). refs/manifold/recovery/undo/* pins are no longer treated as a destroyed workspace named undo. The pin the next redo re-applies is protected like a live workspace's pin: only --include-live considers it, dropping it needs --force, and the refusal listing marks it UNDO. If the op log can't be read, every undo pin is protected.
  • --include-live --force no 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.
  • undo is a reserved workspace name (bn-asqh7). maw ws create undo and maw ws recover … --to undo refuse and suggest another name. maw doctor warns about an existing undo workspace, and every command in its rename hint runs as printed.

Agent guidance

  • The examples in maw --help, maw ws merge --help, maw tldr and maw agents show run non-interactively as written (bn-39nsp). They use --from main, pass --message on every landing merge, resolve conflicts with maw 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-file reference. 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.sh stops a slot whose trunk evidence falls below a minimum.
    • The campaign restarts on this release.
  • just check now runs the failpoints-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 check also runs maw-scenario's tests, where the soak's seed-stream checksums are pinned.
  • notes/v1.0-acceptance.md lists each v1.0 gate as a yes/no check with its owner, status and evidence (bn-l6o7).

v1.0.0-pre.18 (2026-09-28)

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 merge printed [OK] and left no recovery ref. Status now falls back to git status when gix fails; the merge refuses to touch a worktree whose uncommitted state it could not capture completely (the journal is kept, so maw ws merge --recover finishes 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 commit in the root landed off main, 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 --recover works after the file is renamed. Full non-UTF-8 support is tracked separately.
  • Plain maw gc no longer deletes the default workspace's refs on the consolidated layout (bn-1m3lx). It treated refs/manifold/{head,epoch/ws,ws}/default as dangling, which wiped the default workspace's op log (maw undo then reported nothing to undo) while maw doctor reported 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-snapshots keeps pins of workspaces that still exist (bn-wxg28), including the default workspace's dirty-trunk pins; --include-live drops 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 0 must 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 in crates/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 check now runs the assurance-feature clippy lane that CI runs (bn-2zubk).

v1.0.0-pre.17 (2026-09-27)

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 sync and undo all refused while it existed. maw ws merge --recover now finishes a merge whose ref update provably landed (op record, sibling rebase, target checkout, --destroy of 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. --abort finishes an already-landed merge (and points at maw undo), and the next ws merge recovers automatically. Every refusal message now points at --recover. fsck --repair no 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_change conflicts 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.toml or .maw.toml makes commands that change state refuse (bn-hcbc8, bn-qi5br). Previously they silently used defaults — e.g. ws merge absorbed trunk commits with default policy and epoch sync re-pointed the epoch at main. 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), and recover --to / migrate refuse before changing anything (bn-15ebo). Unknown .maw.toml keys 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 destroy explains 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 default works on the consolidated layout, and maw ops log orders 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 HarnessError verdict 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.

v1.0.0-pre.16 (2026-09-27)

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-conflict and 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 wa and wb conflicted on line 1 and wc edited line 7 of the same file, --resolve cf-X=wa (and --resolve-all, and atom resolution) used wa's whole file, dropping wc's committed edit while reporting wc as 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:PATH warns 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\n became l1\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 a and two others added a/b, maw ws merge reported OK and advanced the branch to a tree containing both a blob and a tree named a (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 abandon deleted 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 under refs/manifold/recovery/merge-quarantine-<id>/ with a destroy record, so maw ws recover merge-quarantine-<id> lists it and --show/--restore-file/--to work; if the pin fails nothing is removed. The library refuses to remove a quarantine worktree without proof of a pin. The redo path of maw ws undo likewise no longer re-destroys a workspace whose recovery pin failed.
  • maw merge abandon can no longer delete an ordinary workspace (bn-ggo5, bn-1cth). abandon joined the id into paths unvalidated (../.. escaped .maw/manifold/quarantine/ and could delete an outside directory holding a state.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 at maw ws destroy, which snapshots), and merge-quarantine- is reserved at workspace creation.
  • Concurrent maw ws create no 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 with index.lock: No such file or directory. Admin dirs are now marked with git's own locked "initializing" marker during creation, prune skips locked dirs, and gitdir is written last via rename.
  • gc --recovery-snapshots no longer collects fresh pins of old work (bn-3maj). Pins were aged by the pinned commit's timestamp, so a destroy --force today 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 --repair can 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 sync and maw ws undo could advance the epoch, after which neither --abort nor 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 close deletes the branch with a compare-and-swap against the checked commit. The COMMIT phase and epoch_after are written in one journal write.
  • Merge-state writes fsync the parent directory; the unsafe Cleanup -> Aborted transition is removed; SequenceGenerator no longer overflows at u64::MAX (bn-2l63, bn-s8ti).

Layout, config and LFS

  • One manifold config location per layout (bn-2dyz). Merge read .maw/manifold/config.toml while 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.toml is 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 by ws sync/ws merge. maw merge promote refreshes 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 undo no longer accepts an empty or . path, which would have removed the whole workspace (bn-2wav).

Verification

  • just check now 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 new verify workflow 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 mutants pass 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).

v1.0.0-pre.15 (2026-09-07)

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 promote checks 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.

v1.0.0-pre.14 (2026-08-26)

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_paths check 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 new ff_dirty_stale_conflict() predicate (fails closed on unreadable HEAD/tree) now leaves such a sibling untouched instead of moving it, and maw ws history records 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 PermanentlyLocked case.

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) and capture_dirty_worktree's git 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 MaskedStalePreservation DST 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 new MaskedStalePreservation oracle 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_only glob patterns were silently ignored instead of erroring; --check/--plan skipped 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.
  • .gitattributes and migration detection (bn-1b0t). worktree_state_commit ignored a modified or deleted .gitattributes when computing LFS/clean-filter behavior; the brownfield-migration notice failed to account for an existing .maw/manifold directory.
  • Recovery containment and LFS materialization (bn-1b3n). maw ws recover --restore-file followed parent symlinks outside the intended destination; pointer-shaped files that weren't actually LFS pointers were smudged anyway; materialization verification depended on an external git-lfs binary 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::RefConflict instead 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.
  • AttrsMatcher is 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_files no 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/fsck output (bn-34wr).

v1.0.0-pre.13 (2026-08-02)

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 --keep now refuses to overwrite a path that diverged from its recorded placeholder. The explicit --accept-current flow 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 prepare and preflight now 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 gh override path used by change workflows.

v1.0.0-pre.12 — reliability top-5 + field report 2 + release automation (2026-07-11)

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 75 EX_TEMPFAIL on 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. --repair re-pins unpinned recovery refs and clears only provably-orphaned merge-state, exit 0/1/2. A fresh-eyes follow-up (bn-1283) hardened --repair to 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 at refs/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_sync hooks (bn-1lhb). Configured [hooks] post_sync commands now run after any sync or auto-rebase replay, signal-only, surfaced as a NOTE in the merge summary and hook:FAIL in ws list/JSON.
  • Comment-syntax-aware conflict headers (bn-drk3). Structured-conflict headers now use the right comment syntax per file type (// for .rs etc., -- 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 old clean was renamed clean-build. Along the way, a real gix bug was found and fixed: linked worktrees only read their own .git/worktrees/<n>/info/exclude and missed the common-dir .git/info/exclude that git itself honors — maw-git status now honors it too. Two fresh-eyes follow-ups hardened this further: clean and clean-build now honor a configured non-default default-workspace name instead of only matching the literal name default (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-out post_sync hooks now run in their own process group so a SIGKILL on timeout reaches the whole descendant tree instead of leaking orphans that block the output-reader threads.
  • Merge JSON completeness (bn-20fp). --format json merge output now includes merged_sha, epochs, sources, destroyed, per-sibling siblings[] (action + overlap + hook result), warnings[], the invariant result, and recovery.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 every Cargo.toml (workspace version + all internal path-dep version = "…" 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-verify over 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 check now also runs cargo test -p maw-cli — previously the crates/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-clippy is now wired into dst-faithful.yml (it existed but ran in no workflow).
  • New tests/ci_lane_wiring.rs meta-test enforces that every *-clippy/*-check Justfile 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-cli lock-test failures under parallel execution were never a lock bug or timing race — they were fork fd-inheritance: a sibling test's Command::spawn dups the flock'd lockfile fd across fork(), and since BSD flock lives on the open file description, a just-released lock reads as held in the child until it execs or CLOEXEC clears 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=1 crutch from pre.11-era CI work is removed — maw-cli tests 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-snapshots now prunes destroy records in lockstep with recovery refs it removes; maw doctor splits abandoned-with-snapshot from the new destroy-record-unpinned.
  • Bench-feature rot fixed + sg2-bench-clippy CI lane (bn-1nmh).
  • ws list/ws ls/maw ls --names (bn-3kiv): pipeable name-only listing, order matching JSON output.
  • maw ws history no 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.

v1.0.0-pre.11 — FF-absorb is ref-faithful to siblings (2026-07-09)

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 sync refusing 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 sync reports up to date); committed-ahead + dirty siblings block the absorb before any ref moves, with the usual maw epoch sync guidance; 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_head primitive — 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/exclude issue did not reproduce — maw's dirty check already honors gitignore/exclude exactly like git status.)

v1.0.0-pre.10 — trunk dirt is never lost + multi-agent signal clarity (2026-07-09)

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 merge had 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/events journal 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 in maw ws recover as 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=union journals keep both the merged commits and the uncommitted appends — instead of a bare stash apply that could resolve to the committed side.
  • git stash create returning 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 recover command.
  • Merges announce preserving N uncommitted trunk file(s) across merge (recovery snapshot pinned), and maw ws merge --check lists dirty trunk files informationally (never blocking).

Conflicted syncs are unmistakable (bn-mq6j)

  • maw ws sync conflict summaries (new and residual committed conflicts) are now WARNING:-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 exact maw ws resolve command, 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 --help documents 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 to cd back to the project root; a failed cwd lookup hints that the directory may have been deleted.

v1.0.0-pre.9 — maw ws list shows the default workspace again (2026-06-24)

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 its maw ls alias) stopped showing default, and an otherwise-empty repo reported the misleading "No workspaces found". (The legacy v2 layout was unaffected because its default lived at ws/default/.)
  • maw ws list now synthesizes the default entry in the consolidated layout, so it always appears (sorted first), in both the text and --json output, mirroring maw 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.

v1.0.0-pre.8 — recovery-GC vocabulary clarity + green suite (2026-06-21)

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 (the maw ws recover audit entry). Running maw gc --refs to clear the maw doctor "abandoned-with-snapshot" warning did nothing, because that warning counts records while gc sweeps refs.
  • Renamed maw gc --refs → maw gc --recovery-snapshots (the old --refs is 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 --help now opens with a two-noun glossary and states the command only touches refs.
  • maw doctor messages reworded for consistency: "dangling snapshots" now reads "orphaned recovery snapshot(s)", and the "abandoned-with-snapshot" message explains it counts destroy records (expected after ws destroy, no work lost) and is not reduced by maw gc --recovery-snapshots.

Test fix (pre.7 follow-up)

  • Three changes unit tests hardcoded the legacy v2 ws/ workspace paths and broke when pre.7 made brownfield maw init default 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.

v1.0.0-pre.7 — maw init no longer restructures an existing repo (2026-06-20)

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 init no longer re-restructures a consolidated repo back to v2. The brownfield idempotency check keyed only on ws/default/ existing — which a consolidated repo lacks — so a re-run (e.g. via edict init, which invokes maw init) thought the repo was uninitialized and re-ran the full v2 restructure: converting .git/ to bare, creating ws/default/, and moving every project file into it. maw init now 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 init now 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/ .gitignore entry, with epoch₀ = HEAD. The old default produced the invasive legacy v2 bare layout (bare conversion + moving every file into ws/default/).
  • --legacy-ws opts 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 — run maw migrate to move them to consolidated.
  • maw init output now reports the resulting layout, and maw init --help documents the consolidated brownfield default.

v1.0.0-pre.6 — crash-safe merge + the production-code trust instrument (2026-06-16)

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 merge between the ref-advancing epoch CAS (the point of no return) and the separate merge-state journal write left the journal incoherent (phase=commit, epoch_after unrecorded) with no on-demand self-heal — recoverable only by a later unrelated merge. The merge now journals epoch_after before 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 --check surfaces out-of-maw trunk divergence (bn-1huu). Direct commits made to the branch outside maw (a stale epoch) are now detected and reported by --check before the merge, instead of surfacing as a confusing failure later.
  • maw --status-bar enumerates 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 maw binary over seed-generated op streams and runs the authoritative content-reachability (Oracle A) + state-coherence (Oracle B) oracles after every op — covering real ws 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-clippy gate.

v1.0.0-pre.5 — orphaned-commit class closed at the source (2026-06-13)

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_head never-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_head writes a reflog entry, and sibling rebases/syncs now appear in maw ws history (both prior incidents were forensically blind).
  • maw ws advance no 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 as maw 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/--force shell-outs (kept behind a stale TODO(gix) whose blocker — detached HEAD in linked worktrees — was already solved by set_head). New native checkout_detach / checkout_to_branch / checkout_force primitives (all reflog-writing) replace the shell-outs across sync, advance, working-copy, and merge reattach; the dead checkout_epoch is 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.

v1.0.0-pre.4 — conflict-engine hardening (bug-loop sweep) (2026-06-10)

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 both resolve 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_content with unified keep-path base guards (bn-1mn0); rename-aware modify_delete hints + 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_delete conflict 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_hint with a tree-validity invariant; --keep epoch restores from the epoch tree.

Workspace UX & safety

  • ws clean is layout-aware in the consolidated layout (bn-1s8d), and the reserved name default is refused on ws 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 --from divergence is called out loudly (bn-1abp).
  • Sanity-suppression remediation commands are single-line copy-pasteable (bn-2qbk).

v1.0.0-pre.3 — consolidated-layout dogfood round 2 (2026-06-03)

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 --list and the lifecycle:conflicted classification 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 born conflicted: N — resolve before merge, tempting a destructive maw ws resolve --keep. The conflict signal now comes from the structured rebase-conflict sidecar (matching what maw ws merge --check already 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 recover surfaces migration recovery refs (bn-sdv4). maw migrate --allow-dirty pins dropped uncommitted work to refs/manifold/recovery/<name>/<ts>, and migrate's output says to "list via maw 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 merge integration_started events (and the maw merge events reader, maw push --advance merge-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.md and maw init --help described the legacy v2 bare layout; they now describe consolidated (root checkout, .maw/workspaces/<name>/), and init --help is explicit that an existing repo's maw init produces v2 and maw migrate converts it.
  • just check no longer masks regressions (bn-8nm6). cargo clippy updates cargo's fingerprint without relinking target/debug/maw, so a bare cargo test could exec a stale binary and hide a behavior regression (it briefly masked bn-lm3i). just test now builds the debug binary first via a build-bin prerequisite.

v1.0.0-pre.2 — consolidated-layout hardening (2026-06-01)

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). Both maw init (greenfield) and maw migrate (v2→consolidated) produce an ordinary non-bare repo: .git/ is a real directory, agent workspaces are linked worktrees under .maw/workspaces/<name>/. The old repo.git/ + .git gitfile holdover is gone. This removes the untracked-git-dir-in-the-worktree that caused bn-3bkn — structurally.
  • CRITICAL fix: maw ws merge --destroy no 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 untracked repo.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 .gitignore state. Found by dogfooding; deterministic repro + DST candidate added.
  • maw migrate refuses 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 working maw ws recover --ref … --to … command.
  • maw status is layout-aware (bn-2h3g). It no longer reports every checked-out source file as a "Root extra" in the consolidated layout.

v1.0.0-pre.1 — v1.0 dogfood pre-release (2026-05-29)

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 migrate for v2→consolidated, worktree/wt aliases, 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 tldr replaces maw crib. Adopts the <tool> tldr convention: a short, affirmative quick-reference of common commands grouped by task (no essays, no anti-pattern tables), also appended to maw --help. crib remains a hidden alias. (bn-zg7c)
  • maw ws recover --into / --restore-as alias --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_tree preserves untracked files like git 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 --regex dialect 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 check is green. (bn-1r0r)

v0.61.0 — gix migration: maw no longer shells out to git (2026-05-17)

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::Tree construction only debug_asserts sorted entries — in release builds an unsorted tree was written silently. write_tree now 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_worktree now 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 doctor caught — but the class is exactly what the v1.0 trust work targets, so it's called out here rather than buried. maw ws destroy now refuses while the workspace is a live merge source; plain maw gc self-heals pre-existing dangling refs/manifold/head/*.
  • Conflicted-path dirty count fixed (bn-7kg3). count_dirty_tracked counted 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 list conflicted-state reporting (bn-2l00), concurrent-create locking (bn-3bbc), crashed-merge recovery (bn-2wyh), and bn-uyk3 / bn-35mr / bn-oas3.
  • Shared maw-git test fixtures extracted for cross-crate reuse (bn-5rdz).

Bug fix: destroy racing an in-flight merge leaks a dangling head ref (bn-cm63)

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.

Bug fix: count_dirty_tracked triple-counts conflicted paths (bn-7kg3)

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.

v0.60.9 — Branch-attached-target deletion drop fix (2026-05-11)

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:

  1. 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.
  2. The phantom-deletion gate in collect_one then ran workspace_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 when ws_head was 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).

Sibling auto-rebase output is now quieter

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 merge auto-absorbs upstream FF divergence and auto-rebases sibling workspaces by default, eliminating the "you have to run epoch sync first" and "your peers' workspaces went stale" papercuts (bn-11ip, bn-3vf5, bn-103k).
  • maw ws sync rebases by default; --no-rebase opts 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 --check is now a faithful dry-run — same source-conflict gate as the real merge (bn-qw4i).
  • Missing worktrees surfaced explicitly in ws list / merge --check with a clear recovery hint (bn-3fhj).
  • maw ws merge --message "" now rejected like a missing message (bn-17km).
  • maw ws recover discoverability + new --restore-file flag for surgical recovery (bn-sgm8).

Bug fix: maw ws merge --check honors source-conflict precondition (bn-qw4i)

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.

Bug fix: missing worktrees surfaced as MISSING in list/check (bn-3fhj)

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.

Bug fix: maw ws merge --message "" rejected like a missing message (bn-17km)

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.

Bug fix: silent worktree corruption from stale per-workspace baseline (bn-3r8s)

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 sync now advances the default workspace's per-workspace baseline ref alongside refs/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 explicit epoch 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.5 to merged.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.

Defense in depth: post-merge output sanity check during rebase (bn-2upt)

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:

  1. Size-delta — if the merged blob is larger than merge.post_rebase_size_ratio_max (default 1.5) times the largest of base/ours/theirs byte sizes, flag.
  2. 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.

Bug fix: FF-absorb predicate excludes merge target's committed paths (bn-28q2)

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.

maw ws recover discoverability + --restore-file (bn-sgm8)

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 a Next: 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 --force is also passed.
  • Rows with capture: none in the list view now render the SNAPSHOT column as -* and append a footnote explaining the work was already merged at destroy time; check git log on the merge target.

Behavior change: auto-rebase syncs clean sibling worktrees too (bn-103k)

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.

Bug fix: maw ws resolve --keep <ws> preserves workspace intent (bn-3mbj)

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.

Behavior change: maw ws merge auto-rebases sibling workspaces (bn-3vf5)

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.

Behavior change: maw ws merge auto-absorbs fast-forward divergence (bn-11ip)

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.

Behavior change: maw ws sync rebases by default (bn-3az5)

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 --rebase flag 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-rebase flag 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 --all mirrors the same default-rebase behavior; --all --no-rebase falls back to skipping workspaces with committed work.
  • maw ws sync against a clean stale workspace still fast-forwards (unchanged), and the dirty-workspace refusal is preserved.

v0.60.7 — Stale dirty exec inspection fix (bn-1vno)

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 materializing refs/manifold/ws/<workspace> via git 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.

v0.60.6 — Branch-attached workspace targets (bn-3mw9, bn-284w, bn-6ccl)

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> or ws:<name>, and invalid persistent workspace targets now point users toward maw ws attach-branch.
  • maw status and maw ws list now show branch attachments for workspaces, including branch-specific unmerged work without suggesting a default-workspace merge.
  • maw ws attach-branch now rejects plain directories under ws/ that are not maw-tracked workspaces.

v0.60.5 — Status and merge-target UX fixes (bn-35cg, bn-m7as)

Patch release for two UX fixes found immediately after the brownfield init cleanup.

  • maw status now treats root extras such as root AGENTS.md as informational context instead of a repair-needed ROOT NOT BARE warning. The compact maw status --status-bar output no longer reports root extras at all.
  • maw ws merge --help now describes the actual supported --into targets: 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.

v0.60.4 — Brownfield init root cleanup (bn-2qp5)

Patch release fixing brownfield maw init cleanup for existing repos with project metadata already at the root.

  • maw init now moves all non-structural root project entries into ws/default/, including dot-prefixed directories/files, ignored files, untracked files, and dirty tracked edits. The root is limited to .git, .manifold, repo.git, and ws/.
  • Rerunning maw init on an already-initialized repo also cleans stale root leftovers, so split trees like root .bones/ plus ws/default/.bones/ can be repaired in place.
  • maw doctor now reports project dotfiles/directories such as .bones/ and notes/ as stray root entries instead of accepting all dot-prefixed paths.
  • Internal cleanup: renamed the stabilized CLI init module from v2_init.rs to init.rs.

v0.60.3 — Rebase clean-overlap fix and release hardening (bn-2oii)

Patch release for correctness fixes found during fresh-eyes passes after v0.60.2.

  • maw ws sync <ws> --rebase now 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 release now 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 --search preserves paths containing : by parsing git grep -z output instead of splitting text hits on colon separators.
  • Git LFS credential retry now remembers which credential source was rejected, so a failed env or .netrc credential can fall through to the next available credential instead of being reused.

v0.60.2 — Honor merge-introduced drivers during dirty replay (bn-17o5)

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_protection now consults .gitattributes from 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.

v0.60.1 — CI: fix crates.io publish workflow

Patch release that corrects the publish workflow so v0.60.0 can actually reach crates.io.

  • Add maw-lfs to the publish order (it's a required dep of maw-git via the default lfs feature).
  • Use the pushed git tag (GITHUB_REF_NAME) to derive the version dynamically instead of the hardcoded 0.54.0.
  • Target the root crate explicitly via cargo publish -p maw-workspaces at the final step.
  • Add publish metadata (description, license, repository, keywords, categories) to maw-assurance so it can publish.

No library or binary behavior change since v0.60.0.

v0.60.0 — Structured-conflict rebase engine (bn-gjm8)

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.

Core engine — maw-core::merge

  • ConflictTree + MaterializedEntry (bn-3m2q, Phase 1): a tree where some paths are clean (mode, oid) entries and others are structured Conflict values, 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 all Conflict variants (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-aware diff_trees. Emits FileChange::with_identity carrying blob OID + stable FileId so the merge engine can match renames across iterations.
  • materialize (bn-11b0, Phase 4): renders a ConflictTree to 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 structured conflict-tree.json sidecar and a legacy rebase-conflicts.json projection.

GitRepo surface — maw-git

  • walk_commits(from, to, reverse) — gix-backed rev-walk with from..to semantics.
  • diff_trees_with_renames(old, new, similarity_pct) — gix rewrite detection; the existing ChangeType::Renamed { from } variant is finally populated.
  • set_head(oid) — detached-HEAD advancement without a git checkout shell-out.

Rebase integration — sync/rebase.rs

  • Pipeline: walk_commits → per-commit diff_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 feat resolves to feat#merge-parent-N when 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 --rebase acquires .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.

Merge gate — sidecar-authoritative

  • maw ws merge no longer greps for <<<<<<< in workspace worktrees. The gate is driven by conflict-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.

Resolve — maw ws resolve (bn-3rah)

  • When conflict-tree.json is present, resolve reads structured conflicts directly. --keep epoch / --keep <ws-name> / --keep both write the chosen side's blob content from the sidecar instead of parsing textual markers.
  • Auto-commit on full resolution (bn-2cc1): when --keep clears the last sidecar entry, resolve commits the resolution. Downstream merge no longer reports "ready but refuses".
  • --keep both on ModifyDelete (bn-2pry) no longer silently resurrects the pre-delete base content.
  • Symlink conflict resolution (bn-mg0j) restores the 120000 mode via std::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=NAME per-atom syntax is gone.

Safety / Prime Invariant

  • maw ws undo (bn-6cs4) now pins a recovery snapshot under refs/manifold/recovery/ before restoring to base epoch; matches the safety pattern used by destroy --force and merge --destroy.
  • capture_before_destroy (bn-3mpx): stash-create returning None on 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).

Operating-model documentation

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

  • 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.

Polish

  • 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): silent let _ = Command::new("git").output() failures on state-mutating operations now emit tracing::warn!.
  • stash_apply failure during merge replay (bn-1psp) returns an error instead of silently losing non-overlapping local edits.
  • sync --rebase of 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 contains ws/ or .manifold/.

Migration

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.

v0.59.3

Fixed — maw status --status-bar false dirty counts after mtime skew (bn-3o8k)

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.

v0.59.2

Fixed — AttrsMatcher panics on absolute paths (bn-3t55)

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.

v0.59.0 — Hardening release (bn-opm7)

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).

Refactored — rebase_conflict_count field deleted (bn-2r57)

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.

Refactored — sync.rs split into submodules (bn-23go)

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.

Testing — lifecycle invariant harness (bn-3fy4)

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=union produces 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.

Summary of bn-opm7 completion

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.5

Fixed — conflict-marker detector false-positive on source fixtures

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.

Added — hardening work from the bn-opm7 goal

This release includes the first batch of tasks from the bn-opm7 refactoring/testing goal:

  • bn-1jso: Type-safe BaseEpoch and CurrentEpoch newtypes in maw-core::model::types. The committed_ahead_of_epoch function now takes &BaseEpoch instead of &str, making the v0.58.1 bn-18dj class of bug (wrong-argument-type) a compile error. WorkspaceStatus.base_epoch is now BaseEpoch rather than EpochId, cascading the type safety to all callers.
  • bn-3kcp: Centralized workspace_owned_refs() helper in maw-core::refs. ws destroy and ref_gc now 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 sync decision gate invariants (tests/sync_proptest.rs). 4 proptests × 32 cases each, verifying that sync without --rebase never changes HEAD when local commits exist, sync --rebase preserves commit count and content, and sync --all doesn'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_driver determinism, round-trip properties, panic-free behavior.
    • crates/maw-core/tests/workspace_id_proptest.rs — WorkspaceId::new validation round-trips.
    • Inline proptest module in crates/maw-cli/src/workspace/resolve.rs — parse_file_conflicts marker handling, deterministic block IDs, malformed-input safety.

Filed — bn-3t55: AttrsMatcher panics on absolute paths

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.

v0.58.4

Fixed — conflict detection silently missed large files (bn-3h90 follow-up)

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.

Fixed — ws conflicts ignored embedded conflict markers in a single workspace

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.

Changed — worktree scan is now authoritative over the counter

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.

v0.58.3

Fixed — ws merge phantom rebase conflict (bn-3h90 Bug 1)

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.

Fixed — ws destroy leaves orphaned oplog head ref (bn-3h90 Bug 2)

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.

Added — ws repair-oplog <name> recovery command

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.

v0.58.2

Fixed — .gitattributes merge drivers now honored

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-in union driver). 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.

Changed

  • maw-lfs is now an unconditional dependency of maw-cli and the root crate. The lfs cargo feature is preserved as a no-op for backward compatibility.
  • The attributes matcher in maw-lfs is now a general-purpose .gitattributes query 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.

Added

  • 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 .gitattributes merge=<name> driver to a ConflictResolution.

v0.58.1

Fixed

  • ws sync --rebase no longer silently drops local commits on stale workspaces (bn-18dj). committed_ahead_of_epoch was 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, batch sync --all, and maw exec auto-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.

v0.58.0

Added — native Git LFS support (bn-lyk4)

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-lfs crate: pointer codec (v1 spec), content-addressed object store, .gitattributes matcher, 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_path runs the LFS clean filter when a path matches filter=lfs: real bytes → store, git blob becomes the pointer. Used by maw ws merge so merged trees carry pointers.
  • maw push uploads new LFS objects to the remote's batch endpoint before pushing refs. Config key lfs.push_before_git_push (default true) to opt out.
  • maw doctor reports pointer stubs in working trees and LFS object store size.
  • Conformance test suite validates byte-for-byte parity with git-lfs 3.7.1.

Fixed

  • No more LFS pointer stubs in working trees. Previously, maw ws create/sync/merge wrote 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 merge on 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-files path escaping.
  • Index stat refresh after smudge uses gix directly — no git subprocess. Zero git/git-lfs subprocess calls in any LFS code path.

Migration

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.

v0.57.3

Fixed

  • Untracked files in target workspace no longer silently overwritten by merge (bn-2fk0). snapshot_working_copy used gix's is_dirty() which does not detect untracked files, so no snapshot was created. Fixed by using git status --porcelain for the dirty check.
  • Force checkout fallback no longer skips snapshot replay. When git checkout failed (e.g., untracked files blocking it), the fallback used git checkout --force and 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.

Added

  • maw_git::merge::merge_text — pure-Rust 3-way text merge via gix-merge. No git merge-file subprocess needed.

v0.57.0

Added

  • maw ws resolve command. 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 --rebase now relabels git's raw conflict markers (HEAD / commit hash) with meaningful names (epoch (current) / workspace name) and prints maw ws resolve guidance.
  • 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.

Fixed

  • 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_paths now uses git stash show --include-untracked to catch files captured in the stash's third parent, preventing silent data loss for newly-added files.

v0.56.0

Added

  • Workspace descriptions. maw ws create -d "..." / --description stores a human-readable purpose label in workspace metadata. Shown in maw ws list (text: # desc suffix; pretty: dimmed line; JSON: description field). Use maw ws describe <name> <msg> to add or update a description after creation.
  • maw ls and maw ws ls aliases. Hidden shortcuts for maw ws list — less typing for interactive use.

v0.55.1

Fixed

  • ws create --from <workspace> no longer fails with "expected commit or tree, got blob". The --from resolver was returning the oplog blob ref (refs/manifold/head/<workspace>) instead of the workspace's actual git HEAD commit. Also fixed the same bug in maw changes create --source.

v0.55.0

Fixed

  • Non-required merge drivers no longer block merges. Built-in default regenerate drivers (Cargo.lock, package-lock.json) now have required = false. When the regenerate command fails (e.g., npm install unavailable or broken), the merge falls back to normal resolution with a warning instead of aborting. User-configured drivers still default to required = 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 sync first. Previously, the merge would silently drop those commits from the epoch and leave their files as unstaged changes in default.

v0.54.0

Added

  • Explicit changes workflow targets. maw changes and related workspace flows now support clearer source/target selection so change-bound and trunk-bound work stay separated.
  • Deterministic simulation tooling. maw dev sim gained 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.

Fixed

  • Sync rebase preserves local commits. maw ws sync --rebase now keeps commits ahead of the workspace epoch instead of dropping local work during stale-workspace recovery.
  • maw exec skips stale auto-sync for non-git commands. Auto-sync now only runs for git invocations, so tools like sigil eval can 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.

Changed

  • Agent workflow docs moved to edict terminology. Project guidance, prompts, and repo metadata now consistently use the edict/rite/seal/vessel naming scheme.

v0.53.0

Fixed

  • Symlink following during merge cleanup corrupts data (bn-1fi2). stash_apply() wrote all git tree entries as regular files via File::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.

Changed

  • --message required for maw ws merge (bn-1rgj). Merge no longer auto-generates commit messages. In a TTY, an editor opens (respects $VISUAL/$EDITOR). Non-TTY without --message errors with clear usage guidance.

Added

  • 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 in ws status/ws list, and block merge until resolved.

v0.52.0

Fixed

  • 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 fsck refMissingNewline warnings. Added ensure_ref_newline() post-write fixup.

Added

  • 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 a merge_check field. Opt-in (slower than plain list).

v0.51.0

Fixed

  • Tree sort order in merge engine (bn-39r3). build_tree() used plain lexicographic sort instead of git's canonical tree sort (directories sort as name/). This produced trees rejected by GitHub's receive.fsckObjects check when a directory and blob shared a common prefix (e.g., notes/assurance/ vs notes/assurance-plan.md).
  • Global-view epoch wrong source (bn-1wqe). maw ws status computed the epoch by taking the lexicographic max of workspace epochs instead of reading refs/manifold/epoch/current directly.
  • Stale merge-state warning noise (bn-2fd1). Downgraded the "stale merge-state found" message from eprintln! to tracing::debug! — it fires after successful merges and confuses agents.
  • ws diff missed 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) so git status shows a clean staged area.
  • Merge without --message gave no feedback (bn-1dkl). When no message is provided, merge now shows the auto-generated commit subject and a hint to amend.

Changed

  • 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].

v0.50.0

Fixed

  • 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. Added leading_trivia() to preserve preceding documentation and attributes on Added items.
  • AST merge appended use declarations at EOF (bn-1ldh). New use declarations added by a workspace were placed at the end of the file instead of near existing imports. Now spliced after the last surviving use_declaration in 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/current is 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 sync correctly handles workspaces that fell behind by multiple epochs.

Changed

  • Crate extraction complete. maw-git, maw-core, maw-cli, maw-tui, and maw-assurance are now independent crates in the workspace. maw-git provides the GitRepo trait with a pure-gix implementation (zero CLI calls in core).
  • Gix migration complete. All git operations in maw-git and maw-core use gix. Remaining CLI calls are isolated in maw-cli (push/fetch, detached HEAD worktree ops, rev-list --count, worktree prune).

v0.49.0

Added

  • 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() replaces git checkout --force in 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-gated fp!() 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 behind assurance.
  • 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, ReplayOutcome types 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.

Fixed

  • G2 violation: update_default_workspace() no longer uses git checkout --force. Now uses preserve_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.

v0.48.0

Added

  • Epoch merge workflow. Multiple improvements to merge reliability and agent UX.

v0.47.0

Added

  • Stateless conflict resolution with --resolve. When maw ws merge hits conflicts, each conflict gets a short terseid ID (e.g., cf-k7mx). Re-run the same merge with --resolve cf-k7mx=alice to resolve inline — no stored state, no interactive prompts, fully idempotent.
  • --resolve-all=WORKSPACE shorthand. Resolve all conflicts to one workspace's version in a single flag. Individual --resolve flags 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-style ours/theirs terminology.

Fixed

  • patch_candidate_tree slash handling. Tree patching now uses a temp index (GIT_INDEX_FILE + read-tree + update-index) instead of ls-tree -r + mktree, fixing failures on files in subdirectories.
  • Stale merge-state.json on --resolve failure. All error paths in the resolve block now call abort_merge() before returning.
  • resolve_atoms silent fallback on AST regions. Atom-level resolution now handles Region::AstNode byte 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.

v0.46.14

Added

  • maw ws describe command. Record human-readable descriptions in workspace operation logs. Visible in maw ws history output. Useful for agents to annotate work in progress or mark review readiness.
  • maw ws annotate command. Attach structured JSON metadata (test results, review status, build artifacts) to workspaces via maw ws annotate <workspace> <key> <json-value>. Visible in maw ws history --format json.

Fixed

  • 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).

v0.46.7

Fixed

  • 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.md is now allowed at the bare repo root alongside AGENTS.md and CLAUDE.md.

Changed

  • Removed inert .gitignore writing. maw init and maw upgrade no longer write a root .gitignore or workspace .gitignore — these were no-ops in a bare repo.
  • Temp dir cleanup in merge. Build-phase and resolve now use tempfile::Builder for automatic cleanup instead of manual nonce-based temp dirs.
  • Project config renamed. Botbox and Claude hook paths updated from manifold to maw.

v0.46.6

Added

  • Workspace diff command family. Added maw ws diff with deterministic comparison semantics against default/epoch/branch/oid targets.
  • Agent-safe output modes. maw ws diff now supports summary, patch, and machine-readable JSON output plus --name-only and --paths filters.
  • Diff contract and tests. Published notes/ws-diff-contract.md and added integration/unit coverage for output contract stability and migration-era execution contexts.

Changed

  • README command table now documents maw ws diff as a first-class workflow command.

v0.46.5

Fixed

  • Init default-branch alignment. maw init now reattaches ws/default to 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/default from the actual ws/default HEAD after repair/alignment.

Added

  • Regression test for stale-epoch detached default workspace recovery during idempotent init.

v0.46.4

Fixed

  • Doctor worktree validation. maw doctor now fails when ws/default exists but is not a valid registered git worktree, with explicit guidance to run maw init for repair.

Added

  • Integration tests for doctor default-workspace validation (healthy registration and orphaned-worktree failure cases).

v0.46.3

Fixed

  • False stale warning in maw status. Top-level status now treats ws/default as the persistent branch workspace and no longer reports stale/sync advice when epoch refs lag while branch state is correct.

Added

  • Regression test for default-workspace stale reporting in branch-ahead/stale-epoch scenarios.

v0.46.2

Fixed

  • Release and push safety for stale epoch refs. maw release and maw push --advance now use ancestry checks and refuse unsafe rewinds when refs/manifold/epoch/current lags 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.

Added

  • Regression tests covering branch-ahead/stale-epoch scenarios for both push --advance and release.

v0.46.1

Fixed

  • Default workspace sync semantics. maw ws sync now treats ws/default as a persistent branch workspace and skips detached-epoch sync behavior, preventing unwanted HEAD detaches.
  • Brownfield init self-heal for migrated repos. Idempotent maw init now prunes stale git worktree registrations and repairs orphaned ws/default worktree linkage when metadata exists but registration is broken.

Changed

  • Ran rustfmt across touched Manifold files to keep formatting consistent and reduce future diff noise.

v0.46.0

Added

  • Workspace backend auto-selection and benchmarking (bd-3ca3). CopyBackend, AnyBackend enum, config-driven get_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.

Closed (housekeeping)

  • 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

v0.45.0

Added

  • Reflink workspace backend (bd-1rum). RefLinkBackend in src/backend/reflink.rs — CoW workspace creation via cp --reflink=auto from immutable epoch snapshots, with fallback to recursive copy. Full WorkspaceBackend trait implementation. 34 tests.
  • OverlayFS workspace backend (bd-lm5y). OverlayBackend in src/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 --template flag on maw ws create.

Closed (housekeeping)

  • bd-3rdu (P2 Epic: Phase 3 — Advanced Merge + Conflict Model) — all 7 blockers completed

v0.44.0

Added

  • 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 touched and maw ws overlap commands for conflict prediction (bd-3cie). JSON output for orchestrators.

Closed (housekeeping)

  • 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

v0.43.0

Features

  • 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 promote and maw merge abandon commands (19 tests)
  • Persistent workspace mode: --persistent flag on maw ws create, maw ws advance rebases onto latest epoch, mode-aware staleness in maw ws list/status
  • Concurrent safety eval: Adversarial interleaving test harness with 5 agents, 100 random scenarios, git fsck integrity checks, determinism validation (29 tests)

v0.42.0

  • Feat: Agent-friendly conflict presentation (JSON structured output) — ConflictJson struct with path/reason/workspaces/base_content/sides/atoms/resolution_strategies, conflict_record_to_json() conversion, maw ws merge --format json structured 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 — MergePlan JSON with deterministic merge_id (SHA-256), plan_merge() runs PREPARE+BUILD+VALIDATE without COMMIT, artifacts written to .manifold/artifacts/, --plan flag on maw 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

v0.41.0

  • Feat: View checkpoints and log compaction — src/oplog/checkpoint.rs with CheckpointData/CheckpointView serialization, 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).

v0.40.0

  • Feat: ConflictAtom localization types — replace placeholder with full Region enum (Lines, AstNode, WholeFile), ConflictReason enum (OverlappingLineEdits, SameAstNodeModified, NonCommutativeEdits, Custom), AtomEdit struct (workspace + region + content), and expanded ConflictAtom (base_region + edits + reason). Tagged JSON serde. 44 tests. (bd-15yn.2)
  • Feat: Global view computation — CRDT merge of per-workspace MaterializedViews via GlobalView struct. 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)

v0.39.0

  • Feat: Structured Conflict model — Conflict enum with 4 variants (Content, AddAdd, ModifyDelete, DivergentRename). ConflictSide with workspace/content/timestamp, ConflictAtom placeholder for region-level conflict localization. Tagged JSON serde. 23 tests. (bd-15yn.1)
  • Feat: Per-workspace view materialization — MaterializedView struct 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() and materialize_from_ops() APIs. 18 tests. (bd-28np.1)
  • Feat: Level 1 Git compatibility — workspace state materialized as refs/manifold/ws/<name> via git stash create. Config toggle workspace.git_compat_refs (default true). Refs pruned on workspace destroy. Enables git diff refs/manifold/ws/<name>..main for debugging. 7 tests. (bd-4dsf)

v0.38.0

  • 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 (walks refs/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)

v0.37.0

  • 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 parsing git diff --find-renames --name-status, collecting untracked files, and verifying blob OIDs. 21 tests. (bd-2xxh.3)
  • Feat: Post-merge validation language presets — LanguagePreset enum (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.

v0.36.0

  • 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 --stdin with atomic CAS ref updates at refs/manifold/head/<workspace>. Single-writer invariant enforced. 16 tests. (bd-1v2t.2)

v0.35.0

  • 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 gc command — garbage-collect unreferenced epoch snapshots from .manifold/epochs/. Supports --dry-run preview. (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.

v0.34.2

  • Fix: maw ws create, maw ws destroy, and maw ws attach now work from any directory within the repo, not just the repo root. Previously failed with "must be run from the repo root" when invoked via maw exec default -- maw ws create <name>. (bd-363g)

v0.34.1

  • Fix: maw ws merge now snapshots source workspaces before rebasing/squashing. Workers that only used maw exec with 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. Now jj status is run in each source workspace to trigger a snapshot first. (bd-1lkg)

v0.34.0

  • Feat: maw exec no longer runs jj status for non-jj commands. Running maw exec alice -- cargo test creates zero jj operations, eliminating opforks from concurrent agent workspaces. Auto-sync only triggers when the command starts with jj. (bd-1h8c)
  • Feat: maw ws merge auto-detects and auto-integrates jj operation forks before merging. Up to 5 integration passes for multi-agent opforks. (bd-1h8c)
  • Feat: new check_opfork() and auto_integrate() helpers in jj.rs for programmatic opfork detection and recovery. (bd-2akx)

v0.33.0

  • Feat: maw ws merge --check pre-flight conflict detection. Trial-rebases onto main, detects conflicts, then undoes. Exit 0 = safe to merge, non-zero = blocked. Combine with --format json for structured output (ready, conflicts, stale, workspace, description). (bd-pp6o)
  • Fix: maw ws merge now returns non-zero exit code when conflicts remain. Previously returned 0 with only a WARNING printed. (bd-pp6o)

v0.32.0

  • Fix: maw push now runs jj git export before the bookmark push, preventing false "Nothing changed" when the op graph has diverged from concurrent workspace operations. (bd-bjr0)
  • Fix: maw exec blocks jj 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 suggesting maw ws merge instead. (bd-fs7c)
  • Fix: maw ws sync detects divergent commits after sync and auto-abandons empty copies. Prevents data loss when jj workspace update-stale picks the wrong copy. (bd-3pxf)
  • Fix: maw status (including --watch and --status-bar) degrades gracefully on jj sibling operation errors instead of crashing. Shows OPFORK! indicator with fix command, resumes normal display when resolved. (bd-etjx)
  • Fix: maw ws list --format text uses tab-separated columns with a header row for agent parseability. (bd-3757)

v0.31.2

  • Feat: --json is now accepted as a hidden alias for --format json on all commands that support --format (doctor, status, ws list, ws status, ws history). Hidden from --help; conflicts with --format if both specified. (bd-3i8u)

v0.31.1

  • Feat: maw ws restore <name> recovers a workspace after accidental maw 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 destroy now shows To undo: maw ws restore <name> in its output.

v0.31.0

  • Feat: maw init and maw upgrade now set ui.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 doctor checks jj version >= 0.38.0 and warns if conflict-marker-style isn't "snapshot".
  • Feat: maw ws merge now 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)

v0.30.5

  • Fix: maw ws merge now 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 --watch mode) no longer crashes when the default workspace working copy is stale. collect_status() now catches stale errors from jj workspace list and jj status, sets is_stale=true, and continues with degraded data. (bd-ubxq)

v0.30.4

  • Fix: maw init compatibility with jj 0.37.0 — ghost .jj/working_copy/ cleanup moved to after jj workspace add succeeds, preventing "No such file or directory" errors during init.
  • Refactor: split 3100-line workspace.rs into workspace/ 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 .gitignore after init, use --all for initial push to new remotes).

v0.30.3

  • maw init now 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() and revset_exists() jj helpers into new jj.rs module, replacing duplicate implementations in push.rs and status.rs.

v0.30.2

  • Fix: use &Path instead of &str for workspace paths in divergent resolution, removing unsafe .to_str().unwrap_or(".") fallbacks.
  • Fix: check git push --tags exit status and report failures/rejected tags.
  • Fix: maw exec returns ExitCodeError instead of calling process::exit directly, preserving exit code passthrough.
  • Fix: rename misleading root parameters to cwd in merge helper functions.
  • Fix: upgrade change detection uses jj's "no changes" pattern instead of git's "nothing to".
  • Internal: pass jj_cwd to push_tags instead of re-resolving it.

v0.30.1

  • 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_workspace no longer returns name with @ suffix.
  • Fix: all deprecated maw ws jj suggestions replaced with maw exec.
  • Fix: --message now applies to single-workspace merges via jj describe.
  • Fix: always use --colocate for jj git init even without existing .git/.

v0.30.0

  • 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 manual jj tag set + git push origin workflow.
  • Fix: maw release uses jj-resolved commit hash for the git tag, preventing stale ref issues.
  • Fix: maw init, maw upgrade, and maw doctor now set git HEAD to refs/heads/main after enabling bare mode. Prevents "HEAD detached" warnings from git tooling.

v0.29.3

  • Fix: text format uses structured output with [OK]/[WARN] markers for machine-parseable status.

v0.29.2

  • Fix: remove ghost .jj/working_copy/ directory that causes root pollution in bare repos.
  • Fix: maw init runs jj from ws/default/ when root lacks a working copy.

v0.29.1

  • Add --format flag to maw status, maw doctor, and maw ws history. Supports text, json, and pretty formats.

v0.29.0

  • Drop toon output format, add pretty format with automatic TTY detection. pretty is now the default for interactive terminals; text for pipes.
  • Fix: reject maw ws merge default with clear error pointing to maw push --advance. Prevents silent edit loss from jj restore running on the merge target.
  • Fix: maw status and maw doctor warn 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.

v0.28.4

  • Internal: botbox upgrades only, no user-facing changes.

v0.28.3

  • Deprecate maw ws jj — now errors with suggestion to use maw exec instead.
  • Fix: tests use temp dirs instead of creating workspaces in the live repo.

v0.28.2

  • Redesign maw status output with left-aligned glyphs and clearer labels.

v0.28.1

  • maw push now pushes git tags by default (no separate git push origin --tags needed).

v0.28.0

  • maw ws list wraps JSON/text output in a structured envelope with an advice array 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\n in watch mode for correct raw-terminal rendering.

v0.27.2

  • 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.

v0.27.1

  • Fix: all jj commands now use jj_cwd() helper to run from ws/default/ instead of bare root. Fixes maw push, maw status, maw ws list, maw ws create, maw ws status, maw ws sync, maw ws merge, maw ws prune, and maw ws history all 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, uses workspace::jj_cwd().

v0.27.0

  • New maw exec <ws> -- <cmd> <args> command — run any command inside a workspace directory. Validates workspace name (no path traversal), auto-syncs stale workspaces. Generalizes maw ws jj to work with any tool (br, bv, crit, cargo, etc.).

v0.26.1

  • 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::load falls back to ws/default/.maw.toml when root copy doesn't exist.
  • Fix: post-merge jj restore ensures on-disk files in default workspace reflect the merge.
  • Fix: maw ws destroy and maw status run jj from ws/default/ instead of bare root.
  • Fix: maw init creates default workspace with -r main so source files are present immediately.

v0.26.0

  • v2 bare repo model: workspaces moved from .workspaces/ to ws/. Default workspace relocated to ws/default/. Repo root is now metadata-only (no source files).
  • maw push uses --bookmark explicitly — works from any workspace.
  • maw ws merge rebases default workspace onto branch post-merge.
  • New maw init command sets up bare repo model (forget default ws, core.bare=true, create default).
  • New maw upgrade command migrates v1 repos to v2 layout.
  • Default workspace protected from maw ws destroy.

v0.25.0

  • maw ws jj now 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.

v0.24.0

  • Add maw push --advance flag — moves the branch bookmark to @- (parent of working copy) before pushing. Use after committing directly (version bumps, hotfixes). Without the flag, maw push now detects unpushed work at @- and suggests --advance.
  • Update all agent docs (CLAUDE.md, AGENTS.md, finish.md) to use maw push consistently instead of manual jj bookmark set + jj git push.

v0.23.0

  • Add maw push command — replaces manual jj bookmark set main -r @- + jj git push workflow. 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.toml config file support with [merge] section.
  • Add auto_resolve_from_main config to auto-resolve conflicts in specified paths (e.g., .beads/**) during maw ws merge.
  • Refine maw status --status-bar prompt glyphs and colors for workspace count, change count, and sync warning.
  • Add [repo] config section with branch setting (default: "main") — replaces hardcoded "main" throughout.