Follow-up to #4092 for #4090: filter.<name>.clean/.smudge/.process commands in a
repository's config ran under status, diff and git worktree remove. The console lists the
configured drivers (a config read) and blanks each on the command line before those
commands, and refuses the probe when a driver name cannot be blanked exactly. Real-git
tests with positive controls; fake-git fixtures answer the listing. Version 0.43.2.
Co-Authored-By: RuFlo <ruv@ruv.net>
- tui: the page bar was painted from session.state.view, which the AI page never sets, so on page 6 it kept the previous page lit; it now follows session.page (9 tests, 4 failed first)
- tui --help and the console README said keys 1-5; they are 1-6 and o c s e m a (test holds the help text)
- cli: policyTrustRoot() no longer joins an empty or relative $HOME, which put the anchor mirror and key under the working directory; falls back to the account home or refuses (2 tests, 1 failed first)
- docs: ruflo-tui-walkthrough.svg re-recorded from real frames with the AI page and its ask-first card, 6 AI marked
Co-Authored-By: RuFlo <ruv@ruv.net>
paint() drew the page bar from session.state.view, which the session leaves alone on the AI page (the shared console state
keeps the last non-AI page), so the bar marked Overview (started with --view ai) or the previous page (reached with 6).
It now uses session.page. Also: ruflo tui --help said keys 1-5; it is 1-6.
Test first: the new tui-nav.spec case fails without the change and passes with it; also checked in a real tmux pane on the
rebuilt bundle (started on ai, and 4 then 6: both mark 6 AI). Only tui/ changed (not hooks/), so no console version bump.
Co-Authored-By: RuFlo <ruv@ruv.net>
`git worktree remove` runs its own `git status` on the worktree before deleting it. On the
console's removal path (REMOVE_ARGV), measured on git 2.43.0:
- it ran the repository's core.fsmonitor. REMOVE_ARGV was the only worktree-page git call
without `-c core.fsmonitor=false`;
- it fired a post-index-change hook, from config core.hooksPath or from a plain file in
.git/hooks;
- with status.showUntrackedFiles=no (a normal user setting), both the console's STATUS_ARGV
probe and git's own check read a worktree holding new, unsaved files as clean, and the
removal deleted them without --force. Data loss.
Changes:
- REMOVE_ARGV adds `-c core.fsmonitor=false -c core.hooksPath=/dev/null
-c status.showUntrackedFiles=normal`.
- STATUS_ARGV adds `--untracked-files=normal`, git's default, so what it counts does not
change.
- adr-mission.ts changedFiles: `git status` adds `--no-optional-locks -c core.fsmonitor=false`.
- register.ts: `git describe --dirty` adds the same, plus `-c core.hooksPath=/dev/null`.
describe rewrites a stale index even with --no-optional-locks, so it fired the hook.
Tests, in tests/git-config-exec.spec.ts:
- Builders: the argv builders carry the guards.
- Scan: a whitespace- and quote-tolerant scan of git array literals in hooks/ and tui/. It
fails if an fsmonitor-running subcommand lacks the guard, if describe or removal lacks the
hooks-off flag, or if a literal sets core.fsmonitor twice. It still misses argv built from
a variable, a spread or a `]` inside an element.
- Real git, each case with a positive control showing the plain command does the harm:
- REMOVE_ARGV runs neither program;
- with showUntrackedFiles=no the probe lists the new file and REMOVE_ARGV refuses (the
plain removal deletes it);
- register.ts's describe literal, parsed from the source and run against the hostile repo,
runs neither program;
- changedFiles does not run the fsmonitor.
- Mutation: each of the 7 guards, reverted on its own, fails the spec.
Test isolation only, no product change:
- wf-security-worktrees: the stateful sequence is pinned with { shuffle: false }, and the
real-git cases get the 60 s their header asks for;
- tui-ai-host: each release case has its own home;
- wf-send-stub: requests are counted from the case's own start, and the NONE-key case now
asserts that a request was sent.
Shuffled seeds 2, 3 and 4 failed 3, 3 and 1 of these on main, and pass now.
Still open (documented in REMOVE_ARGV's comment):
- filter.<driver>.clean/.process commands, also on diff --numstat, as wf-drill-io.ts notes;
- lazy fetches in a partial clone (core.sshCommand, credential helpers);
- modifications hidden by index flags (assume-unchanged, skip-worktree, core.ignoreStat):
git's own check does not see them, and `-c` cannot undo them.
- orbitalGlobe reads a one-degree land mask built once (0.407 -> 0.268 ms at 140x24, 0.176 -> 0.120 ms at 100x16; 0.16% of globe glyphs differ along coastlines); palette parsed once per theme
- scripts/bench-theme.mjs: per-tick cost of the animated pictures, Classic vs Orbital
- tests/themes-adversarial.spec.ts: 45 specs on import, store and model-facing text
Co-Authored-By: RuFlo <ruv@ruv.net>
- boot log + self-check area + help guide for the themes view; nav test lists it as by-name
- bump console to 0.43.0 (plugin.json UTF-8 restored, CHANGELOG, version.ts, smoke pin)
- remove render-theme-demo.py (repo rule: no Python); README points at frames.json
- generate-console-theme skill: allowed-tools: Read
- split pane icons and startup loads out of pane.ts/controller.ts (both back under 500 lines)
Co-Authored-By: RuFlo <ruv@ruv.net>
The Stop hook is right to never block a turn, but it also never said
anything when a write failed — those are two independent decisions that
were conflated into one. track.mjs's persistToMemory() already computed a
real, useful failure reason on a failed `memory store` call, but
TRACK_QUIET=1 (always set by the Stop hook) made main() return before that
reason was ever printed anywhere, discarding it unconditionally for every
failure mode — WAL refusal, schema drift, permissions, a future backend
change — identically and invisibly. Separately, ruflo-hook.cjs (the actual
registered cross-platform Stop-hook shim) ran track.mjs with stdio:'ignore'
and never inspected spawnSync's own result, so a crash/timeout/non-zero
exit in track.mjs itself was equally invisible.
Added _diagnostic-log.cjs: a shared, best-effort logFailure() that appends
one JSON line (ts, source, reason, sessionId) to
~/.claude-flow/logs/cost-tracker-failures.log — a home-relative path
consistent with the existing ~/.claude-flow convention used elsewhere
(global-ai-budget.ts). Capped at 512KB, rotated to the most recent 200
lines rather than left to grow unboundedly. Every operation is wrapped in
try/catch, including a call made with no argument or a null/undefined one
(destructuring happens inside the try, not in the parameter list) — the
module's whole reason for existing is to never throw, since it sits behind
the single most load-bearing invariant in this issue: the Stop hook must
still exit 0 no matter what, even if the diagnostic log write itself fails.
track.mjs now logs a real persistToMemory() failure before the
TRACK_QUIET-gated return that used to discard it; TRACK_DRY_RUN's
intentional placeholder is never logged as a failure. ruflo-hook.cjs now
inspects spawnSync's result and logs a spawn error, non-zero exit, or
signal; still calls done() unconditionally regardless.
21 new tests cover: a real failure logging correctly even under
TRACK_QUIET=1 (the actual bug condition, not just the easy unset case),
dry-run never logging, ruflo-hook.cjs's own spawn-failure layer, the
never-block invariant surviving an unwritable log directory, cap/rotation
truncating correctly, and logFailure's null/undefined argument safety.
Verified end-to-end against this machine's real local ruflo CLI in
addition to the hermetic fixtures. Full plugin smoke suite (64 checks)
passes with no regressions.
Co-Authored-By: RuFlo <ruv@ruv.net>
A root npm install crashes in arborist on this workspace; the tui leg only needs esbuild. build-tui.mjs looks in the repo first, then in RUFLO_ESBUILD_DIR.
Co-Authored-By: RuFlo <ruv@ruv.net>
Page 6. Reuses harness.send and the conversation bridge's sendTo, not a second harness. Host.spawn runs only the pinned Codex 0.162.0
release (never current or PATH), read-only, from a fixed argument allow-list; Host.httpSend sends only https POST to openrouter.ai or a
convoTargets host, never follows a redirect, and a key is read by variable name and never drawn. Enter shows a card of exactly what would be
sent; a lone y answers it only while it was drawn in full (#3983); spend cap from the provider-reported cost. e2e host matrix gets a tui leg
(keyless in CI, live gated). Not in this PR: the workspace-write toggle.
Co-Authored-By: RuFlo <ruv@ruv.net>
Five pages (Overview, Cost, Swarm, Events, Missions) with keys 1-5 / o c s e m / Tab / Shift-Tab, a page bar, a key line that
shortens with the width, clear-and-redraw on resize, a position bar under 60 columns and a notice under 40. Room is left out on
purpose (a message box and Claude sessions this host does not have).
state.isStandalone is the capability flag: on this host the shared chrome is not drawn (no tab bar, footer buttons, Launch,
Ask Claude, Claude control card); a button nobody can press is not drawn, a state chip and a section title are. Missions reads
the ADR-406 record only. Under Claude Code nothing changes. Console 0.42.7.
Co-Authored-By: RuFlo <ruv@ruv.net>
- ruflo-mods 0.6.0: selfCheck option (default on): one toast per session when an enabled ruflo plugin is missing from the marketplace clone with no cached install, fixed text with the repair; read-only, fail-open
- smoke: /ruflo-mods stays an alias of /ruflo mods; the self-check cannot write or echo repository text
- ADR-477 addendum: what Claude Code 2.1.289 draws for icons, SGR, OSC 8, OSC 0, bidi, CR (icons only; no colour; one slot)
- ADR-404 addendum: doctor/install hardening and the self-check
Co-Authored-By: RuFlo <ruv@ruv.net>