Skip to content

ci: route lockfile drift alerts - #1553

Open
allyblockcast[bot] wants to merge 2 commits into
masterfrom
cto/blo-27611-lockfile-alert
Open

ci: route lockfile drift alerts#1553
allyblockcast[bot] wants to merge 2 commits into
masterfrom
cto/blo-27611-lockfile-alert

Conversation

@allyblockcast

@allyblockcast allyblockcast Bot commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Route failures from the scheduled lockfile drift monitor to Alertmanager with stable labels and preserve the failing workflow status.

  • Issue: https://paperclip.blockcast.net/BLO/issues/BLO-27611
  • Adds .github/scripts/post-lockfile-drift-alert.mjs with a stable LockfileDriftDetected alert identity.
  • Keeps contents: read; no repository write permission is added.
  • Alert delivery is fatal, so an unavailable Alertmanager cannot silently turn the monitor green.

Verification

  • node --test .github/scripts/tests/post-lockfile-drift-alert.test.mjs scripts/check-lockfile-overrides-consistency.test.mjs (15/15 passed)
  • node scripts/check-lockfile-overrides-consistency.mjs (current tree consistent)
  • git diff --check (clean)

Post-merge verification remains: run a deliberate drift failure twice to confirm one Alertmanager incident with updated context, then confirm a normal scheduled run stays green and emits no alert.

@allyblockcast
allyblockcast Bot requested a review from kkroo as a code owner August 30, 2026 11:39
@allyblockcast

allyblockcast Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

🔗 Paperclip issue: BLO-27611

1 similar comment
@allyblockcast

allyblockcast Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

🔗 Paperclip issue: BLO-27611

@allyblockcast

allyblockcast Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention:

Missing or incomplete:

  • Missing section: ## Thinking Path
  • Missing section: ## What Changed
  • Missing section: ## Risks
  • Missing section: ## Model Used
  • PR is titled ci: but includes source code changes (.github/scripts/post-lockfile-drift-alert.mjs). Please retitle as fix:, feat:, or refactor: so the right gates run, or remove the source code changes if this is genuinely a ci: PR.

Once updated, push a new commit and these checks will re-run automatically.

— commitperclip

@allyblockcast allyblockcast Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ally — Consolidated PR Review

Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 83a53c9

Critical Issues (0)

Important Issues (0)

Suggestions (1)

  • [native-codex] .github/scripts/post-lockfile-drift-alert.mjs:43 — when DRIFT_SUMMARY is unset, this passes { violations: [null] } to buildAlert, producing an alert description containing - null rather than the function's (summary unavailable - see the run log) fallback.
    • Pass null as the summary when the environment variable is absent, or filter unset values before constructing the violations array.

Strengths

  • Stable Alertmanager labels and a two-hour TTL provide useful deduplication across the hourly schedule.
  • Alert delivery failures remain visible while the workflow still fails on detected drift.
  • The new helper has focused unit coverage for labels, descriptions, and TTL behavior.

Recommended Action

  1. Consider addressing the unset-summary fallback before relying on this helper from other workflows or manual dispatches.

@allyblockcast

allyblockcast Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention:

Missing or incomplete:

  • Missing section: ## Thinking Path
  • Missing section: ## What Changed
  • Missing section: ## Risks
  • Missing section: ## Model Used
  • PR is titled ci: but includes source code changes (.github/scripts/post-lockfile-drift-alert.mjs). Please retitle as fix:, feat:, or refactor: so the right gates run, or remove the source code changes if this is genuinely a ci: PR.

Once updated, push a new commit and these checks will re-run automatically.

— commitperclip

@allyblockcast allyblockcast Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ally — Consolidated PR Review

Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: f24e973

Critical Issues (0)

Important Issues (0)

Suggestions (1)

  • [native-codex] .github/scripts/post-lockfile-drift-alert.mjs:43 — the current head correctly passes null when DRIFT_SUMMARY is unset, preserving buildAlert's summary fallback. Keep this regression covered if the workflow environment changes.

Strengths

  • Stable Alertmanager labels and a two-hour TTL provide deduplication across hourly failures.
  • Alert delivery failures remain fatal, while detected drift still causes the workflow to fail.
  • The helper tests cover labels, descriptions, fallback behavior, and TTL semantics.
  • The workflow retains read-only repository permissions and separates alert delivery from the final failure step.

Recommended Action

  1. No Critical or Important code changes are required from this review.
  2. Resolve the currently failing repository policy check rejecting the shared App-attributed commit before merge; the dependent verification lanes are skipped as a result.
  3. Consider the Suggestion opportunistically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants