Commit e679e8f
committed
fix(connectors): isDisconnect only fires on explicit enabled:false
The second branch of the previous `isDisconnect` check evaluated
`state.config.connectors[connectorName]?.enabled` AFTER the cloned new
config was written into `state.config`, making the check equivalent to
"incoming payload omits enabled". Any config-only update (e.g. token
rotation) that didn't include the `enabled` field while the connector
was previously active would silently fire `onConnectorDisconnect` and
purge the live credential cache, breaking the next workflow generation
(Greptile P1).
Drop the second branch — only treat the POST as a disconnect when the
incoming payload explicitly sets `enabled: false`. `wasEnabled` is no
longer needed, so it's also removed.1 parent f43249e commit e679e8f
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | 151 | | |
155 | 152 | | |
156 | 153 | | |
| |||
159 | 156 | | |
160 | 157 | | |
161 | 158 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments