mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-05 14:07:11 +08:00
fix: expose merged key-value pairs in config JSON
render_config_json now includes a 'merged' object with actual key-value pairs from the resolved runtime configuration, not just the count. Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
@@ -6323,7 +6323,7 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
|
||||
413. **DONE — ACP JSON no longer leaks tracking IDs** — verified 2026-06-04: `acp --output-format json` has no `tracking` or `discoverability_tracking` fields. Status is `not_implemented`.
|
||||
|
||||
|
||||
415. **`config <section> --output-format json` returns `merged_keys:int` (a count) with no actual merged key-value pairs — automation cannot read the resolved configuration values from JSON** — dogfooded 2026-04-30 by Jobdori on `e939777f`. Running `claw config env --output-format json`, `claw config model --output-format json`, or `claw config hooks --output-format json` all return an identical five-key envelope: `{"cwd":"...","files":[...],"kind":"config","loaded_files":2,"merged_keys":1}`. The `merged_keys` field is an integer count of how many keys were merged across the loaded files, not an object or array of the actual key names and resolved values. The `files` array shows which config files were loaded/missing but contains no per-file key-value content. The merged section content — the actual resolved `env`, `model`, or `hooks` configuration — is entirely absent from the JSON output. It only appears in the prose output as a "Merged section: env / <value>" block. **Required fix shape:** (a) add a `merged` or `resolved` object/array field to the JSON envelope containing the actual key-value pairs that resulted from merging the loaded config files for the requested section; (b) rename `merged_keys` from an integer count to either remove it (derivable from `len(merged)`) or keep it as a companion count field; (c) for each entry in `merged`, include `key`, `value`, and optionally `source_file` so automation can attribute which file contributed the value; (d) add regression coverage proving `config env --output-format json` with a non-empty env section populates `merged` (or equivalent) with the actual resolved key-value pairs. **Why this matters:** the entire purpose of `config env/model/hooks --output-format json` is to allow automation to read the resolved runtime configuration without screen-scraping prose. Returning only a count defeats the purpose and forces callers to either re-parse the prose output or re-read and merge the source config files themselves. Source: Jobdori live dogfood, `e939777f`, 2026-04-30.
|
||||
415. **DONE — config section now exposes `merged` field** — fixed 2026-06-04: `render_config_json` includes `merged` object with actual key-value pairs alongside `merged_keys` count.
|
||||
|
||||
|
||||
416. **DONE — plugins list returns structured `plugins[]` array** — verified 2026-06-04: returns `{plugins:[{name,version,enabled,path,...}], summary:{total,enabled,disabled,load_failures}}`. No `reload_runtime` in list envelope.
|
||||
|
||||
Reference in New Issue
Block a user