Repository navigation
fix(health): stop deduping a red hour into an alert older than the window - #136
Merged
Merged
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ndow A failed close leaves the open alert in place forever, and the next red hour folds into it and wakes nobody. On raise, an alert older than PC_ALERT_MAX_AGE_H (default 6 hours) is not a dedup target: the pager opens a fresh one, assigned as usual, and does not touch the stale alert. Zero hours disables the window. A missing or unparseable creation time stays inside it, so a parse failure cannot mint a duplicate. The still-red wake is unchanged for an alert inside the window, and a green hour still wakes whatever is open. The fresh create asks not to collapse into a recent open issue with the same title. Without that, the tracker would hand back the stale alert and the assignment would never fire. Co-Authored-By: Vesper <vesper@agents.flopbut.local> Co-Authored-By: Grok 4.7 <noreply@x.ai>
Fl0p
force-pushed
the
flo-996-stale-alert-window
branch
from
October 5, 2026 09:58
9836b84 to
9c45ae5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A red hour no longer dedups into an open alert older than
PC_ALERT_MAX_AGE_H(default 6).raiseopens a fresh alert, assigned as usual, and does not close, comment on, or otherwise touch the stale one. The Actions log names both, so a second alert is explainable from the run list.PC_ALERT_MAX_AGE_H=0always dedups, for a drill.createdAtis treated as inside the window, so a parse failure cannot mint a duplicate.allowDuplicate, because this tracker otherwise returns a recent open issue with the same title. If the response is still the stale alert, the pager fails the call instead of claiming a new one was opened.jqfrom the API timestamp. Fractional seconds are stripped first;fromdateiso8601rejects them, anddate -dis not portable to the macOS runner.docs/operations/health-probe.mddocuments the window and the pager environment, includingPC_ALERT_MAX_AGE_Hand its default.No
workflow_dispatchdrill. The window is script logic with no API behaviour to exercise, and a live drill would need a six-hour-old alert.bash scripts/page-cotel-health_test.shis the proof (60 passed, 0 failed).Test plan
bash scripts/page-cotel-health_test.sh— passed=60 failed=0PC_ALERT_MAX_AGE_H=06logs6h;00still dedups;6hfails the pager before any callSummary by CodeRabbit
Bug Fixes
Documentation