Files
deepseek-harness/scripts
gengruilin bf02f7e1fb feat(config-editor): insert, remove, and edit rows of the profile patch
The editor had one write, `edit()`, which replaces the config of a row
whose plugin is running. Nothing added a row to the profile patch or
removed one, and `edit()` rejects a row that is switched off or failed, so
a config that makes a row fail could not be corrected through the editor.

`insert()` appends a row to the profile patch and starts it. `remove()`
deletes a row that the profile patch inserted, together with the patch's
override items for that row, and `configuration()` marks such a row as
`inserted`. `editRow()` replaces a row's config as `edit()` does and also
accepts a row that is switched off or failed: that row stores the config
as given, and its plugin validates it at the next start. A written row
that is switched on must be active after the reconciliation. Otherwise the
file gets its prior content back, and the call rejects with the activation
diagnostic.

The four writes share the lock, the higher-layer check, the atomic write,
and the restore. `edit()` keeps its checks and changes in two cases. When
an edit resets an override to the inherited config and deletes the emptied
patch item, the comment above that item stays in the file; for the first
item it is the file header. When the reconciliation with the prior patches
rejects after a rejected write, the caller receives the rejection of its
own write, and the second rejection is logged as a warning.

The editor reads the root context in one place, so its entry in the
root-read baseline drops from 3 to 1.

Refs #9155
2026-11-25 04:48:56 +08:00
..
2026-09-08 22:31:16 +08:00