fix(reconciler): export RestartDebounceWindow and assert >= reconcile interval (#2284) #2297
Reference in New Issue
Block a user
Delete Branch "fix/reconciler-debounce-coupling-2284"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the MED item from comprehensive-review follow-up #2284.
Problem:
restartDebounceWindow = 60swas set exactly equal to the CP instance reconciler interval (60s) with zero margin. If someone drops the reconciler interval below the debounce window, a workspace flipped offline by one tick can be reprovisioned again by the next tick before the debounce drops it, reopening the double-reprovision thrash class (internal#544).Fix:
RestartDebounceWindowfrom thehandlerspackage (was unexported).>=relationship.main.gothat fatals if the interval ever exceeds the debounce window, making the coupling fail-closed.Test plan:
go build ./cmd/serverpasses.TestRestartByID_DebounceExpiresAfterWindowpasses.Closes #2284
5-axis review: APPROVED.
Correctness: Exports the restart debounce window and adds a startup invariant that it must be at least the CP instance reconciler interval. That directly protects the internal#544 self-fire/double-reprovision coupling from silently drifting if the reconciler interval changes.
Robustness: The check fails fast at startup when the invariant is broken instead of letting the system run with a known thrash risk. Existing debounce tests continue to shrink the exported package variable and restore it afterward. Security: no auth, secrets, or tenant boundary changes. Performance: no steady-state cost beyond one startup comparison; the reconciler interval itself is unchanged. Readability: the coupling is documented at both the server launch site and the debounce definition.
Required-context review: head
53130ee020is mergeable; CI/all-required, E2E API Smoke, Handlers PG, and Platform Go are green.merge-queue: updated this branch with
mainate441def8b3a8. Waiting for CI on the refreshed head.merge-queue: updated this branch with
mainat31283a292a34. Waiting for CI on the refreshed head.merge-queue: updated this branch with
mainatd768d8667b0f. Waiting for CI on the refreshed head.APPROVED. Churn re-review on current head
aa5d1ef8. Merge-base diff is scoped to the CP instance reconciler interval coupling and restart debounce tests. RestartDebounceWindow is exported, the reconciler startup asserts it is >= the reconcile interval, and tests update the shortened-window override accordingly. No stale-base collateral found.Re-reviewed current head
aa5d1ef8. Researcher 9232 is on this head. Merge-base diff is scoped to workspace restart debounce guard/export and self-fire test updates. CI / all-required is green; the reconciler interval guard prevents debounce-window drift and no stale-base collateral or fail-open behavior was found. Remaining red/cancelled contexts are outside all-required/governance noise.