Skip to content

SameWrite 1.2.1

Choose a tag to compare

@ipeterpetrus ipeterpetrus released this 15 Sep 04:03
· 23 commits to main since this release

A patch release with one product fix. Overall token-cost improvement is still NOT_PROVEN and
nothing about SameWrite's behaviour changed.

The fix

The default guard installer now creates its destination parent directory.

bash hooks/install.sh — the guard installation the README documents — aborted on any machine where
~/scripts did not already exist, which is most machines:

install -m 0755 "$PKG/write_noop_guard.py" "$DST"      # $DST defaults to $HOME/scripts/...

install does not create parent directories, and GNU's -D flag does not exist on macOS, so the
fix is a portable mkdir -p before the copy. The ledger line immediately below it already did this;
the guard line was missed.

Why this needed its own tag

The bug is pre-existing: it is in v1.1.0 and v1.2.0 too. It is not a regression in
either. It was found shortly after v1.2.0 was tagged, and fixed on main right away — but a
published tag is immutable, so the two diverged:

install path had the fix before this release
/plugin marketplace add ipeterpetrus/samewrite (tracks main) yes — marketplace users already had it
cloning or downloading the v1.2.0 tag no

v1.2.1 exists to close exactly that gap. v1.2.0 was not moved, retagged or edited, and it still
points at 14eb217.

Why it survived three releases

No test had ever run the default destination. Every one of them set SAMEWRITE_DST to a directory
it had just created — reasonable in isolation, since a test should not write into a real home, but
together it meant the path every user takes was never exercised once.

The general lesson is worth more than the fix: an acceptance test that injects environment
overrides for convenience stops testing the default path, and the default path is the product.

What now prevents it:

  • tests/test_coexist.py runs the installer with the default destination in a throwaway home.
    The check was confirmed to go red against a copy of the tree with the mkdir -p removed —
    verified again for this release: exit 1, guard absent.
  • tests/acceptance_public.sh installs from the published marketplace into an isolated HOME
    and CLAUDE_CONFIG_DIR and drives the whole user path. This is the test that found the bug. Local
    acceptance proves the code works; public acceptance proves that what was published works, and
    those are different claims.

Verified for this release

check result
fresh home with no ~/scripts, from the v1.2.1 tag source exit 0, directory created, guard installed once
reinstall into the same home settings byte-identical, still exactly one guard entry
uninstall every samewrite hook entry removed, foreign statusLine and custom keys untouched
red/green oracle installer without the fix: exit 1, guard absent
public marketplace install version 1.2.1, ~/scripts confirmed absent beforehand, guard landed
deterministic suite 416 assertions across 11 suites, adapter drift clean, plugin manifest valid

Unchanged from 1.2.0

skills/samewrite/SKILL.md, skills/edit-discipline/SKILL.md, hooks/write_noop_guard.py,
tools/carry.py and tools/optimize.py are byte-identical to v1.2.0, and the three
model-facing files are still byte-identical to v1.1.0. No model benchmark was re-run, because
there is no model-facing change that could invalidate one.

overall token-cost improvement NOT_PROVEN (−1.7%, 8/10 fixtures, p = 0.109, smaller than the rig's own null-vs-null variance)
quality non-inferior on correctness, safety, evidence completeness and authority compliance
Hermes Agent skill VERIFIED (0.21.3, 1ad89ac) — 80 B listing, 0 B unused body
Hermes observer UNTESTED
GPT-5.6 Sol portability UNTESTED
bash-output-shaping REJECTED · listing-prune DEFERRED

Upgrading

Nothing beyond the usual update. If you installed the guard on a machine where it silently failed,
re-run bash hooks/install.sh — it is idempotent and will now create the directory it needs.

Full notes: docs/RELEASE_NOTES_1.2.1.md