Repository navigation
Commit b7ac0bf
authored
fix: publish complete configuration updates for session changes (#715)
## Summary
- Extend the existing recovery path's before/after configuration
comparison into one shared configuration-change helper. Publish a
complete `config_option_update` when the advertised list changes, rather
than duplicating publication in individual callers.
- Use it for `session/set_config_option`, the legacy mode/model setters,
command-driven changes, approved-plan implementation, and
provider/recovery model refreshes. The requesting client's duplicate
notification is written before the setter response.
- Do not publish for unchanged lists, rejected changes, the existing
JetBrains 2026.1 disabled-config workaround, or a session state
superseded by replay.
- Build setter responses from the current session state after
publication. If replay replaces the session while a native settings
request is pending, the old request does not advertise stale options in
its notification or response.
- Keep v2 field conversion in the existing conversion layer. Both ACP
versions receive full lists, including dependent changes to reasoning
choices and removal of fast mode after a model switch.
Checked against ACP commit `854e6003`.
`docs/protocol/v2/session-config-options.mdx:375-379` recommends
configuration notifications whenever configuration changes, including
changes requested through `session/set_config_option`, with the
requesting client's duplicate before its response. Responses and
notifications replace the complete list.
## Scope
Based on the merged #714, not stacked on its feature branch. No
review/checklist Markdown file is added. This covers configuration
changes owned by the adapter; it does not add new native settings-event
synchronization or change active-resume environment replacement.
Remaining session/entity metadata reconstruction is separate.
## Validation
- `npm run typecheck`
- `npm run build`
- `npm test`: 2,332 passed, 39 skipped
- `npm run test:integration`: all 19 passed
- `npm run codex-test -- -p "Reply with exactly OK. Do not use tools or
modify any files." -o summary`: completed with `end_turn`
- `git diff --check`
- Opt-in E2E tests were not run.
New wire tests cover notification-before-response ordering for every
root config option on both protocol versions, complete dependent model
changes, no-op and rejected/native-failure cases, one notification for
`/plan`, legacy setters, and replay replacing the session during a
pending native settings request. Existing command, plan,
provider/recovery, and child configuration tests remain passing without
snapshot updates.1 parent ad993bb commit b7ac0bf
4 files changed
Lines changed: 232 additions & 47 deletions
File tree
- src
- __tests__/CodexACPAgent
- data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2735 | 2735 | | |
2736 | 2736 | | |
2737 | 2737 | | |
2738 | | - | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
2739 | 2743 | | |
2740 | 2744 | | |
2741 | 2745 | | |
| |||
2750 | 2754 | | |
2751 | 2755 | | |
2752 | 2756 | | |
2753 | | - | |
| 2757 | + | |
2754 | 2758 | | |
2755 | 2759 | | |
2756 | 2760 | | |
| |||
2767 | 2771 | | |
2768 | 2772 | | |
2769 | 2773 | | |
2770 | | - | |
2771 | | - | |
2772 | | - | |
2773 | | - | |
2774 | | - | |
2775 | | - | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
2779 | | - | |
2780 | | - | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
2786 | | - | |
2787 | | - | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
2788 | 2807 | | |
2789 | 2808 | | |
2790 | 2809 | | |
| |||
2858 | 2877 | | |
2859 | 2878 | | |
2860 | 2879 | | |
2861 | | - | |
2862 | | - | |
2863 | | - | |
2864 | | - | |
2865 | | - | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
2869 | | - | |
2870 | | - | |
2871 | | - | |
2872 | | - | |
2873 | | - | |
2874 | | - | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2875 | 2889 | | |
2876 | 2890 | | |
2877 | 2891 | | |
| |||
2908 | 2922 | | |
2909 | 2923 | | |
2910 | 2924 | | |
2911 | | - | |
2912 | | - | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
2913 | 2929 | | |
2914 | 2930 | | |
2915 | 2931 | | |
| |||
5028 | 5044 | | |
5029 | 5045 | | |
5030 | 5046 | | |
5031 | | - | |
5032 | | - | |
5033 | | - | |
5034 | | - | |
5035 | | - | |
5036 | 5047 | | |
5037 | 5048 | | |
5038 | 5049 | | |
| |||
5221 | 5232 | | |
5222 | 5233 | | |
5223 | 5234 | | |
5224 | | - | |
5225 | | - | |
5226 | | - | |
5227 | | - | |
5228 | | - | |
| 5235 | + | |
| 5236 | + | |
| 5237 | + | |
| 5238 | + | |
5229 | 5239 | | |
5230 | 5240 | | |
5231 | 5241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
0 commit comments