Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
bc41ffc
refactor(code): migrate single-key config readers to the shared resolver
mdrxy Aug 23, 2026
3a479d6
refactor(code): migrate explicit-snapshot config readers off the wrap…
mdrxy Aug 23, 2026
4e4a821
refactor(code): delete the legacy resolve_scalar path
mdrxy Aug 23, 2026
ba58a05
fix(code): read the user tier fresh in reload previews
mdrxy Aug 24, 2026
77c0a75
fix(code): keep endpoint trust reads live
mdrxy Aug 24, 2026
f6c6c81
fix(code): report managed rejections on UI preference writes
mdrxy Aug 24, 2026
875aeec
fix(code): stop reloading every config provider twice per reload
mdrxy Aug 24, 2026
4d36fed
test(code): pin merge strategies for real manifest options
mdrxy Aug 24, 2026
cbf0d8d
docs(code): correct comments describing the retired read path
mdrxy Aug 24, 2026
b7558ce
revert(code): drop the endpoint-trust liveness exception
mdrxy Aug 24, 2026
e1575ef
refactor(code): resolve manifest readers through the shared generation
mdrxy Aug 24, 2026
fcb2dae
fix(code): keep classifier on shared config snapshot
mdrxy Aug 24, 2026
0b724b1
fix(code): retain unreadable reload preview snapshot
mdrxy Aug 24, 2026
96ac33f
fix(code): retain skill roots across failed reloads
mdrxy Aug 24, 2026
957405c
fix(code): refresh managed policy once per reload
mdrxy Aug 24, 2026
f87f0ff
fix(code): refresh the shared resolver after direct config writes
mdrxy Aug 24, 2026
a0d9bdd
docs(code): scope the shared-generation claim to its actual readers
mdrxy Aug 24, 2026
db1f499
docs(code): correct the dotenv reader's carve-out rationale
mdrxy Aug 24, 2026
2f1a4a9
test(code): guard the resolver read / diagnostics pairing structurally
mdrxy Aug 24, 2026
ac19efe
fix(code): report a config.toml that fails to parse on reload
mdrxy Aug 24, 2026
df9b6cf
fix(code): require the managed tier when resolving for `dcode config`
mdrxy Aug 24, 2026
1c56eb1
refactor(code): make `resolver_from_snapshots` snapshots keyword-only
mdrxy Aug 24, 2026
5480938
refactor(code): narrow config predicates with `TypeIs` instead of cas…
mdrxy Aug 24, 2026
2bffc4a
docs(code): correct config docstrings that contradict the code
mdrxy Aug 24, 2026
096ccc5
fix(code): report managed policy on the sibling preference writes
mdrxy Aug 24, 2026
95fc751
fix(code): scope config diagnostic dedup to one generation
mdrxy Aug 24, 2026
ee278d5
test(code): resolve through production in the shared test helper
mdrxy Aug 24, 2026
a97f92d
fix(code): validate every contributing rank, not just selected ones
mdrxy Aug 24, 2026
cb12847
Merge branch 'main' into mdrxy/code/retire-legacy-config-wrap
mdrxy Aug 24, 2026
6412a9a
fix(code): keep managed fall-through on the shared config generation
mdrxy Aug 24, 2026
408ea2f
fix(code): continue bounded config fallthrough
mdrxy Aug 24, 2026
93558ac
fix(code): preview fresh skill-root configuration
mdrxy Aug 24, 2026
f32ee9b
fix(code): restore thread config invalidation in `clear_caches`
mdrxy Aug 24, 2026
7509fb5
test(code): pin the managed-policy probes at their callers
mdrxy Aug 24, 2026
b807a3f
test(code): pin the merge strategy of every composing option
mdrxy Aug 24, 2026
c60e297
test(code): guard that every config writer refreshes the resolver
mdrxy Aug 24, 2026
b948655
fix(code): reject a `managed_snapshot` that would be discarded
mdrxy Aug 24, 2026
eb89fc5
fix(code): narrow `TomlSnapshot.data` to `dict`
mdrxy Aug 24, 2026
5813313
fix(code): keep managed health in the write-time policy probe
mdrxy Aug 24, 2026
1ed3338
fix(code): report a rejected `sandboxes.default`
mdrxy Aug 24, 2026
ca6ca35
fix(code): name the rejected value in the auto-classifier problem
mdrxy Aug 24, 2026
dc6774f
fix(code): re-arm source diagnostics on every generation advance
mdrxy Aug 24, 2026
09ab052
fix(code): do not let a failed resolver refresh escape a committed write
mdrxy Aug 24, 2026
2843e00
fix(code): refuse to install an unusable replacement provider
mdrxy Aug 24, 2026
a3fea2f
docs(code): correct configuration docstrings the migration invalidated
mdrxy Aug 24, 2026
c63294c
docs(code): correct the configuration generation policy
mdrxy Aug 24, 2026
4008fc1
docs(code): state that an in-app write refreshes managed policy
mdrxy Aug 24, 2026
de88932
test(code): drive the cursor-style reader, not just its predicate
mdrxy Aug 24, 2026
ab2107a
refactor(code): guard the startup mode instead of casting it
mdrxy Aug 24, 2026
73921bb
fix(code): report unreadable managed policy on the theme writes
mdrxy Aug 24, 2026
798d954
fix(code): log the three remaining silent config degradations
mdrxy Aug 24, 2026
7aeace6
refactor(code): name the snapshot constructors and the resolver cache…
mdrxy Aug 24, 2026
ae8a71b
test(code): cover `toml_snapshot` and `get_healthy_managed_snapshot`
mdrxy Aug 24, 2026
e47b11a
fix(code): do not import the manifest from resolver teardown
mdrxy Aug 24, 2026
3fa7e1f
Merge branch 'main' into mdrxy/code/retire-legacy-config-wrap
mdrxy Aug 24, 2026
c307086
Merge branch 'main' into mdrxy/code/retire-legacy-config-wrap
mdrxy Aug 24, 2026
f19f88f
fix(code): report rejected managed reloads after writes
mdrxy Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions libs/code/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ Headless mode uses the same agent runtime as the interactive UI, but swaps the t

Configuration is layered across user, project, session, and runtime scopes. That lets teams share project defaults while individual users keep their own credentials, preferences, skills, and local settings.

Configuration files are read into a single process-wide generation, built on the first read and reused after that. Readers that resolve through the shared resolver all observe that one generation. They cannot disagree about a setting.

An edit to `config.toml` while the app runs has no effect on those readers until the generation advances. This happens in two places: an in-app write to the default config path, which refreshes the generation itself, and `/reload`. Each source keeps its last usable snapshot, so a file that fails to parse leaves that tier unchanged instead of erasing it.

The app does not watch files for edits. A partly applied configuration is a worse failure than a stale one.

Some readers sit outside the shared generation. Callers that take their own snapshot inspect one file generation instead of process state, and report it next to its health: `get_config_sources`, the `dcode config` command, and the `dcode doctor` command, which reads the managed file against an empty user tier. A few readers parse a file on each call, because the shared generation cannot serve them: `resolve_read_project_dotenv` runs before the project `.env` is layered into the environment, `resolve_startup_mode_with_source` needs the raw user table, and `update_check` reports the value next to the file health it just read. The reload preview also reads the user file fresh, because a dry run must show the edit under review.

The environment tier is always live. `EnvProvider` reads `os.environ` at resolution time, because the process changes it during dotenv bootstrap and on each cwd switch.

These exceptions are per caller, not per setting. A caller decides to snapshot a file itself. No option is intended to be live for one reader and cached for another, which would make the effective configuration unpredictable per option.

The main extension points are:

- **Skills and subagents** for reusable agent workflows
Expand Down
Loading