Skip to content

Tags: ersinkoc/dfmt

Tags

v0.7.4

Toggle v0.7.4's commit message
fix(client): find TCP-bound global daemon on Unix; unblock v0.7.4 gate

The config-defaults fix (82ea8db) flipped transport.http.enabled to true,
which makes the Linux global daemon bind TCP + a port file instead of the
Unix socket. But globalDaemonTarget probed only the socket on Unix, so a
TCP-bound daemon was invisible: DaemonRunning classified it "stuck" and
every daemon-backed command returned 1. That broke the release gate's
in-process integration tests on ubuntu (Windows reads the port file and
stayed green), silently blocking the v0.7.4 publish.

- globalDaemonTarget now probes the live socket first (dial-checked, so a
  stale socket falls through) and falls back to the TCP port file,
  carrying its bearer token — mirroring the existing Windows behavior.
- setupInProcessDaemon pins socket-only so the in-process tests stay on
  the auth-free rendezvous regardless of the transport.http default.
- TestRunCaptureShellWithArgsOps isolates the global dir so its
  daemon-unavailable assertion is not order-dependent on leaked daemons.
- Add TestGlobalDaemonTarget_UnixTCPFallback pinning all four branches
  (empty / TCP fallback / live socket preferred / stale socket bypassed).

Verified: full `go test ./...` green on Linux (WSL) and Windows.

v0.7.3

Toggle v0.7.3's commit message
v0.7.3 — grep finds code again; hooks work on Windows

dfmt_grep no longer searches build output. The walker had no exclusions at
all, and since WalkDir is lexical, dist/ claimed the match cap before the
walker reached source — grepping "runtime" on this repo returned 58 hits
from a compiled binary and none from internal/. Directory pruning and
binary sniffing cut 23% of the tokens over four patterns, 43% on the
worst, and the results are now source instead of a string table.

The SessionStart hook is POSIX on every platform. It was PowerShell on
Windows, which Claude Code runs through bash, so it failed on every
session start and Windows users silently lost cross-session recall.
Affected configs are migrated, not just overwritten.

Also: UTF-16LE decoding no longer mangles Latin-1 (every ç ö ü ş came
back as U+FFFD), and dfmt setup no longer writes C:c\Users\... on WSL.

v0.7.2

Toggle v0.7.2's commit message
v0.7.2 — multi-line commands work; the MCP proxy survives a daemon re…

…start

Glob patterns now carry (?s), so a two-line script no longer fails its
ALLOW check and gets blamed on a deny rule that does not exist. dfmt mcp
re-establishes its connection when the daemon idle-exits instead of
failing every remaining call in the session.

v0.7.1

Toggle v0.7.1's commit message
v0.7.1 — Git Bash coreutils reach the sandbox PATH on Windows

Every POSIX command (ls, cat, sed, awk, grep, find) returned exit 127 in
the sandbox on Windows: bash resolves to Git Bash, whose own coreutils
directory is deliberately off the Windows PATH and re-added only by an
interactive Git Bash startup the sandbox never runs.

v0.7.0

Toggle v0.7.0's commit message
v0.7.0 — daemon identity, so an upgrade takes effect

Daemon liveness was a bare socket dial that any build passes, so
reinstalling DFMT left the old process holding the host-wide lock and
serving stale code with well-formed replies. The daemon now publishes
~/.dfmt/daemon.json and is restarted when its version or its binary's
fingerprint stops matching the invoking CLI.

Also fixed, same silent-wrong-answer signature from an independent cause:
MCP tool calls never enforced their schemas' `required` arguments, so a
misnamed argument ran an empty command and returned exit 0 with no output.

Plus ExecResp.Stderr was never assigned, and on Windows a detached daemon
wedged every child process for want of CREATE_NO_WINDOW.

v0.6.9

Toggle v0.6.9's commit message
release: v0.6.9

Daemon stability: dfmt mcp is now a pure proxy to the global daemon,
idle timeout disabled when set to 0, plus three internal refactors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

v0.6.8

Toggle v0.6.8's commit message
release: v0.6.8

Refactor-and-test release. No wire contract changes — every entry is
internal cleanup that closes the refactor.md audit list.

§9 god-function list closed: handleToolsCall 228→82,
handleAPIProxy 244→79, splitByShellOperators 186→118, Grep 170→77.
(Earlier in the cycle: handleToolsList 302→20, runDoctor 344→76,
daemon.New 261→110.)

Duplication kills: new internal/osutil package (6 goosWindows
copies + 35 inline GOOS checks consolidated), named context
timeouts (rpcTimeout/toolTimeout/perProjectShutdownTimeout),
ParseGlobals consolidates 4 CLI flag helpers, resolveSpawnExePath
consolidates test-binary refusal.

Sentinel errors: sandbox.ErrPolicyDenied, sandbox.ErrPathContains-
NullByte, core.ErrJournalClosed, transport.ErrServerAlreadyRunning,
cli.errRefuseSpawnFromTestBinary. Inline errors.New duplicates
collapsed; callers can errors.Is instead of substring matching.

Removed: cli.SetGlobalJSON / cli.SetGlobalProject exported setters
(replaced by ParseGlobals, internal use only).

Fixed: --help no longer mutates state on dfmt task / install-hooks /
note / shell-init / capture / config get; global -json/--json/
--project survive direct Dispatch calls.

Tests: Wave 4 push cli 63.4→69.3%, transport 82.4→83.1%, daemon
75.0→75.2%. New setupInProcessDaemon helper. Wave 5 adds
loadedProjectsViaAPI + signalStopProcess coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v0.6.7

Toggle v0.6.7's commit message
release: v0.6.7