Repository navigation
Commit 337d360
committed
Remove write-only rollback state from ContextProxy
Remove the write-only rollback state from ContextProxy.
stateWriteTokens (1 repo-wide reference, the declaration), secretWriteTokens (1, declaration),
durableState (3: declaration, one .set seed, one .clear), durableSecrets (5: declaration, three .set
seeds, one .clear) and resetGeneration (3: declaration and two increments) had no reader anywhere: no
.get, no generation comparison, and repo-wide counts across src, packages, webview-ui/src and apps
equalled their in-file counts. The rollback that actually runs is stateWriteOwner plus secretWriteOwner
plus the read-back, and those two maps are read - by ContextProxy.spec.ts - so they stay.
Removed: the five declarations, four durable seeds, two generation increments, two clears, and the
comment blocks that described only that machinery. ContextProxy.ts goes 842 lines -> 797 lines (-45).
#1562 and #1565 already carry this same strip, so the two chains converge on one ContextProxy shape
(799 lines on the #1562 side) rather than diverging further.
No test was dropped or renamed: the twelve cases named in the review thread (spec lines 116, 219, 253,
271, 318, 331, 378, 453, 528, 562, 762, 1143) all pass unchanged, and none of their titles names a
deleted field - each states the behaviour it proves ('restores the previous cached value when the
durable write fails', 'does not reseed the durable record from a pre-reset write that completes after
the reset', and so on), so there was nothing to rename without renaming away the assertion.
Verification on this head: ContextProxy.ts 797 lines, 0 added / 45 deleted against e27b693; tsc src 0
errors, tsc webview-ui 0 errors; eslint --max-warnings=0 clean and src/eslint-suppressions.json
unchanged; prettier --check clean. Vitest --no-file-parallelism: ContextProxy 87/87, api-configuration
16/16, registerCommands 66/66, webviewMessageHandler 178/178, ClineProvider 447/447 (794 tests, 0
failures). Removing write-only state is a subtraction of executable lines: 45 lines out of the
extension-side scope, which moves the changed-executable-line gate down rather than up.1 parent e27b693 commit 337d360
1 file changed
Lines changed: 0 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 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 | 81 | | |
106 | 82 | | |
107 | 83 | | |
| |||
120 | 96 | | |
121 | 97 | | |
122 | 98 | | |
123 | | - | |
124 | | - | |
125 | 99 | | |
126 | 100 | | |
127 | 101 | | |
| |||
131 | 105 | | |
132 | 106 | | |
133 | 107 | | |
134 | | - | |
135 | | - | |
136 | 108 | | |
137 | 109 | | |
138 | 110 | | |
| |||
142 | 114 | | |
143 | 115 | | |
144 | 116 | | |
145 | | - | |
146 | | - | |
147 | 117 | | |
148 | 118 | | |
149 | 119 | | |
| |||
169 | 139 | | |
170 | 140 | | |
171 | 141 | | |
172 | | - | |
173 | 142 | | |
174 | 143 | | |
175 | 144 | | |
| |||
566 | 535 | | |
567 | 536 | | |
568 | 537 | | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | 538 | | |
574 | 539 | | |
575 | 540 | | |
| |||
792 | 757 | | |
793 | 758 | | |
794 | 759 | | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | 760 | | |
800 | 761 | | |
801 | 762 | | |
802 | 763 | | |
803 | 764 | | |
804 | 765 | | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | 766 | | |
812 | 767 | | |
813 | 768 | | |
| |||
0 commit comments