Commit 9cbc333
* fix(ai): stabilize backpressure deferral dedup key against volatile counters (#14156)
The backpressure deferral log floods (~8% of orchestrator-log lines): recordDeferral dedups via deferralLogKeys, but the dedup key embeds the full reasonText, and memorySummaryBackfill emits 'pending-memory-minisummary:${backlog}' whose count changes every poll — so the key churns and the dedup never fires while kbSync holds the heavy-maintenance lease for hours.
Strip a trailing ':<digits>' from the dedup key only; the full reasonText (with count) stays in the log message + the recordTaskOutcome payload. Recurring deferrals now collapse to one log per episode (clearDeferralLogState still re-logs a new episode). No change to deferral/lease behavior. Unit: 4 changing-counter polls -> 1 log, post-clear -> re-logs; 28/28 specs pass.
* refactor(ai): key deferral dedup on stable (task, blocker, reasonCode), not regex-stripped reasonText (#14156)
Follow-up to the #14157 depth-floor point (broad trailing-number normalization also collapsed constant interval-style reasons like periodic-sync:1800000). Drop the volatile reasonText from the dedup key entirely and key on the deferred task + blocker + reasonCode — stable, declared identifiers. The deferred task's source-class is already implied by taskName and the count is volatile noise, so the key gains no distinction from reasonText. Full reasonText stays in the log message + the recordTaskOutcome payload. 28/28 specs pass.
---------
Co-authored-by: tobiu <tobiasuhlig78@gmail.com>
1 parent b03aa1e commit 9cbc333
2 files changed
Lines changed: 48 additions & 3 deletions
File tree
- ai/daemons/orchestrator/services
- test/playwright/unit/ai/daemons/orchestrator/services
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
292 | 332 | | |
293 | 333 | | |
294 | 334 | | |
| |||
0 commit comments