feat: add track-latest dev install mode to ahoy install#139
Open
REPPL wants to merge 3 commits into
Open
Conversation
`abcd ahoy install` symlinks the pinned built binary, so dogfooding live development meant hand-rolling a `~/.local/bin/abcd` wrapper that ran `go build -C <repo> && exec` on every call. This retires that workaround. `--dev` installs a POSIX-sh shim at the same PATH target that rebuilds abcd from the source tip on every invocation and execs the fresh binary. A broken build fails loudly and never execs a stale binary (loud-staging). The mode is detected from the installed shim itself and surfaced by `abcd ahoy` status as `install: dev (tip build)` — never recorded in the tracked repo config, so it can never go stale or dirty a committed file. Installing over an existing install applies-as-update in either direction; a foreign occupant is never clobbered, and uninstall removes the shim (it is ours). Wired through the CLI flag, the ahoy plugin surface, and the regenerated CLI reference and compatibility surface. The shim is written with the store's no-follow atomic writer and recognised by an exact prefix, per the security review; the config-recording mechanism the original design proposed was dropped as dead (nothing reads it) per the code review. Assisted-by: Claude:claude-opus-4-8
The track-latest dev install mode (abcd ahoy install --dev) settles the open fork: build the mode, not document the wrapper. Assisted-by: Claude:claude-opus-4-8
modeWouldChange's --dev branch returned true for an absent PATH target (kind != binTargetDevShim), setting modeForced on a fresh install. stepSymlink then wrote the machine-scope shim even when the user declined the ConfigChange (PATH) approval — a consent bypass a plain install does not have. Narrow the --dev branch to the genuine switch (kind == binTargetOwnedSymlink): a fresh --dev install now flows through the symlink.missing gap, whose gapDriven path respects a declined ConfigChange. Transitions (owned symlink -> shim) stay forced and idempotence (dev shim -> already_up_to_date) is unchanged. The mirror non-dev branch already returns false for an absent target, so it has no equivalent hole and is left as-is. Assisted-by: Claude:claude-opus-4-8
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the always-latest dev install mode for dogfooding (ledger issue iss-75, minor):
abcd ahoy install --devinstalls a rebuild-from-source shim at the PATH target instead of the pinned-binary symlink, so the dogfooded binary is always the tip build and the hand-rolled wrapper the issue captured is retired.Chained PR: base is
fix/iss-101-102-lockless-lmw-class(#138) — this branch edits the same ahoy install files and ledger-resolves with the chained--impactverb. Merge order #136 → #137 → #138 → this; GitHub retargets automatically.What changed
go buildagainst the resolved plugin root and execs the fresh binary on every invocation. A broken build prints loudly to stderr and exits 1 before the exec — a stale binary is never silently run..abcd/config.jsonwas dropped — nothing reads that section, the file is git-tracked (machine-local state does not belong in a committed file), and the on-disk signal cannot go stale.install_modechange echo, per the established install-over-install semantics; uninstall removes the shim; normal install behaviour is pinned by a regression test.--devflag, plugin surface docs, regenerated CLI reference and surface registry, CHANGELOG (Added).--devpointed at a packaged (non-source) plugin root fails loudly on every call — dogfood-only by design, documented.Verification
make preflightexit 0 (build, gofmt, vet, tests, race),record-lintexit 0.impact: additive.'\''escaping was verified empirically against live/bin/shwith adversarial paths; provenance, foreign-file and uninstall guards all held; the shim narrows exposure versus the retired wrapper). Correctness initially FIX-FIRST on one confirmed defect — a fresh--devinstall wrote the machine-scope shim even when the ConfigChange (PATH) approval was declined, a consent bypass the plain install doesn't have — fixed in the third commit (the forced-mode check narrowed to the genuine symlink→shim switch, with a watched-fail reproduction, the approved path re-verified, and the mirror direction confirmed hole-free), then re-reviewed PROMOTE.