Skip to main content

Module config

Module config 

Source
Expand description

Configuration, split by ownership (ADR 0012, amended by ADR 0018-era split):

  • Repo-level .differential.toml at the target repo’s root — classification hints only. Shared by everyone reviewing the repo.
  • User-level ~/.config/differential/config.toml (XDG) — [grouping]: which agent CLI to run and its timeout, and [review]: how much context the reviewer shows around a hunk. Both are per-user choices, not properties of the repo, so neither lives in it.

HARD RULE (ADR 0012): config tunes classification hints and tool behaviour. It can never remove a file or hunk from enumeration — enumeration runs before and independently of anything in this module, and nothing here is consulted by the parser or the invariants.

Structs§

Config
GroupingConfig
[grouping] — pure data; the pipeline turns it into an LLM backend.
ReviewConfig
[review] — how much of a file the terminal reviewer shows around a hunk.
UserConfig
Everything parse_user reads, so load assigns one value rather than growing a second assignment every time the user file gains a table.

Constants§

CONFIG_FILE_NAME
USER_CONFIG_DIR
USER_CONFIG_FILE_NAME

Functions§

user_config_path
<user config dir>/differential/config.toml.