client-core: resolve pipe file sinks against config.toml #337

Merged
natsukium merged 1 commit from issue-335 into main 2026-09-22 02:04:32 +09:00
Owner

Closes #335.

A pipe binding's { file = "<path>" } sink was the one file-valued config key carried into the runtime action verbatim, so where it wrote depended on the window's working directory. It now resolves at config load like shader.post.file: config-directory-relative, ~/ expanded, absolute paths untouched. A document parsed from text (no file behind it) keeps the documented working-directory rule.

Decision: the last comment on #335 (six rounds of independent design review). Code review: pi luna (one blocker, ~/ alone was not expanded; fixed with a test) then pi sol (PASS).

Docs: keybindings.md, config.md, control-surfaces.md (existing decision now names the pipe sink), CHANGELOG.md, regenerated config schema.

Closes #335. A `pipe` binding's `{ file = "<path>" }` sink was the one file-valued config key carried into the runtime action verbatim, so where it wrote depended on the window's working directory. It now resolves at config load like `shader.post.file`: config-directory-relative, `~/` expanded, absolute paths untouched. A document parsed from text (no file behind it) keeps the documented working-directory rule. Decision: the last comment on #335 (six rounds of independent design review). Code review: pi luna (one blocker, `~/` alone was not expanded; fixed with a test) then pi sol (PASS). Docs: `keybindings.md`, `config.md`, `control-surfaces.md` (existing decision now names the pipe sink), `CHANGELOG.md`, regenerated config schema.
client-core: resolve pipe file sinks against config.toml
Some checks failed
bench / Criterion full-suite snapshot (pull_request) Has been skipped
fuzz / cargo fuzz nightly long-run (pull_request) Has been skipped
bench / Criterion regression gate (pull_request) Failing after 2m28s
darwin / detect relevant changes (pull_request) Successful in 9s
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 54s
fuzz / cargo fuzz smoke (per target) (pull_request) Successful in 1m35s
pr / nix flake check (pull_request) Successful in 47s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m19s
pr / wire schema is compatible with the base (pull_request) Successful in 10s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 1m5s
pr / publish felis (x86_64-linux) (pull_request) Has been skipped
windows / detect relevant changes (pull_request) Successful in 4s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo clippy (Windows cross) (pull_request) Successful in 12s
windows / cargo nextest (Windows) (pull_request) Successful in 9m55s
windows / frontend smoke (Windows) (pull_request) Successful in 4m22s
windows / package felis (x86_64-pc-windows-msvc) (pull_request) Has been skipped
e950eca265
A `pipe` binding's `target = { file = "..." }` was the one file-valued
config key carried into the runtime action verbatim, so the same durable
config wrote to a different place depending on which working directory
the window was launched from: a launcher, a WM keybinding and a shell
all give different answers, and none of them is the focused session's
directory. The rule every other file-valued key already follows is the
one recorded in control-surfaces.md, so the sink now resolves at config
load like `shader.post.file`: `~/` expands, an absolute path is taken as
written, and a relative one lands beside the config that names it.

`resolve_path` runs in the config layer rather than in `into_target`,
because `keymap` compiles without the `native` feature while the home
directory lookup does not. `PipeSink::File` and `PipeTarget::File`
therefore carry a `PathBuf`, which keeps a resolved path lossless for a
config directory that is not UTF-8.

Assisted-by: Claude Code
natsukium deleted branch issue-335 2026-09-22 02:04:33 +09:00
Commenting is not possible because the repository is archived.
No description provided.