fix(config): Record a change to compaction rules and labels - #1133
Open
JeanMertz wants to merge 3 commits into
Open
fix(config): Record a change to compaction rules and labels#1133JeanMertz wants to merge 3 commits into
JeanMertz wants to merge 3 commits into
Conversation
Editing `conversation.compaction.rules` now reaches the conversation. Before, the delta compared rules element by element, so reordering them or dropping one produced nothing and the conversation kept compacting the way it always had. The rules carry their own merge strategy, so the delta says `replace` and the fold reaches the list the user wrote, order included. An empty list is left alone: it says nothing about rules rather than asking for none, since resolution substitutes the built-in defaults for it, and every sparse partial reaching the delta carries one. Replacing with it would record zero rules nobody asked for and make a later `jp conversation compact` do nothing. With this, no field is exempt from the law that a cleared field survives a fold, and the list of exceptions the sweep consulted is gone. Every field the schema names can be set, cleared, and have either recorded. Signed-off-by: Jean Mertz <git@jeanmertz.com>
A label rule added to the workspace config now applies to conversations created before it existed, matching how a server, tool, plugin or model alias already behaves. The conversation layer is a resolved snapshot merged over the layer built from the config files, and this map stated `replace` on that snapshot, so it dropped every rule the files declared and the conversation did not. It merges per key instead, which leaves the conversation's own rules winning field by field while a rule only the files declare survives. That was the last map stating `replace` from a snapshot, so the helper that did it has no callers left and is gone. `attachments` still states it and still should: appending is its default, and a list that merged with itself would double. Signed-off-by: Jean Mertz <git@jeanmertz.com>
The conversation layer states its label rules per key rather than as a `replace`, and an empty map of them is skipped on the wire where the wrapper was not. Every stored conversation config is three lines shorter for it. Belongs with the commit before this one; squash the two when splitting the branch. Signed-off-by: Jean Mertz <git@jeanmertz.com>
JeanMertz
force-pushed
the
config-compaction-labels
branch
from
September 8, 2026 08:09
50c82b0 to
52498cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reordering a compaction rule, or dropping one, reaches the
conversation. Both were computed and discarded, so the conversation kept
compacting by the rules it was created with and recomputed the same
non-delta on every turn.
A label rule the workspace config gained after a conversation was
created reaches that conversation, matching how every other map now
behaves.
The list naming fields whose clear could not be recorded is gone. No
field is exempt from the law that a clear survives a fold.