Skip to content

DEVEX-1653: flip Slack classifier to bright-line on_rt rule (Phase 3)#149

Merged
pdodgen-revparts merged 1 commit into
mainfrom
devex-1653-flip-classifier
Jul 9, 2026
Merged

DEVEX-1653: flip Slack classifier to bright-line on_rt rule (Phase 3)#149
pdodgen-revparts merged 1 commit into
mainfrom
devex-1653-flip-classifier

Conversation

@pdodgen-revparts

Copy link
Copy Markdown
Contributor

Context

The DEVEX-1653 sweep completed 2026-07-09:

This PR is Phase 3: flip the classifier from tag-shape inference to bright-line rule based on the declared on_rt intent.

Change

- if [[ "$IMAGE_TAG" =~ -rc\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.[0-9]+$ ]]; then
+ if [[ "$ON_RT" == "true" ]]; then
    BADGE_MRKDWN="🚂 *RT*"
    ...
  else
    BADGE_MRKDWN="⚡ *Hotfix*"
    ...
  fi

Plus updated env var (ON_RT: ${{ inputs.on_rt }} instead of IMAGE_TAG) and the block-comment rationale reflecting the new logic.

Why the flip

Tag inference could match v0.440.10-rc.2026-07-09.8 as 🚂 RT even when it was actually a hotfix backport manually promoted after Thursday's train ship (Sam's case). The dispatcher's intent is the source of truth, not the tag pattern.

Companion PR

  • encodium/actions#TBDrt-promote.sh update to dispatch with -f on_rt=true. Also opened as a draft, in this same window.

Merge order safety

Either order works — the on_rt input is already accepted by the shared workflow. Between merges:

Merge state Classifier reads Legit train ship rendered as
Neither IMAGE_TAG (tag inference) 🚂 RT (correct — rc.1 matches pattern)
Only rt-promote.sh update IMAGE_TAG (tag inference) 🚂 RT (still correct)
Only this PR ON_RT (bright-line) ⚡ Hotfix (regression — under-badged)
Both ON_RT (bright-line) 🚂 RT (correct — rt-promote.sh sets true)

Merge the rt-promote.sh PR first if there's a next promote in flight; otherwise either order is fine.

…VEX-1653 badge)

The DEVEX-1653 sweep completed (21 participant PRs merged 2026-07-09,
plus the accept-only on_rt input in #148). Every
participant's deploy chain now propagates on_rt to this workflow.

Flip the classifier from tag-shape inference to bright-line on the
declared intent:

  on_rt=true  → 🚂 RT     (only rt-promote.sh sets this)
  on_rt=false → ⚡ Hotfix (default — every other dispatch path)

This fixes Sam's 2026-07-09 rc.8 case where a hotfix backport promoted
manually via
mis-badged as 🚂 RT because the tag matched the -rc.<date>.<iter>
pattern. The tag pattern can't distinguish rc.1 (initial train ship)
from rc.N>1 (hotfix backport) — only the dispatcher's intent knows.

Depends on:
- Every participant declaring on_rt on deploy-production.yaml (done —
  21 sweep PRs merged)
- Shared slack-deploy-notification.yaml declaring on_rt input (done —
  #148 merged as ab8282c)

Companion PR (must merge in the same window):
- encodium/actions: rt-promote.sh update to pass -f on_rt=true on
  each deploy-production.yaml dispatch.

Between this PR's merge and the rt-promote.sh update landing, every
prod deploy shows as ⚡ Hotfix — including next Thursday's train ship
if rt-promote.sh hasn't been updated yet. That's the safe default
(better to under-classify than to falsely-badge as RT), but keep the
two PRs tight.
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only change to Slack badge text; brief mis-labeling is possible if this lands before rt-promote.sh passes on_rt=true for train promotes.

Overview
Slack prod deploy notifications now label 🚂 RT vs ⚡ Hotfix from the workflow input on_rt instead of inferring from the image_tag regex (-rc.YYYY-MM-DD.N).

Only dispatches that set on_rt=true (intended for rt-promote.sh) get the RT badge; everything else defaults to Hotfix. Comments on the input and classify step were updated to document the bright-line rule and why tag shape was wrong for manual rc.N>1 promotes.

The classify step env switches from IMAGE_TAG to ON_RT, and the log line reports on_rt=… → classified as ….

Reviewed by Cursor Bugbot for commit f33d6cf. Bugbot is set up for automated code reviews on this repo. Configure here.

@pdodgen-revparts
pdodgen-revparts marked this pull request as ready for review July 9, 2026 22:29
@pdodgen-revparts
pdodgen-revparts requested a review from a team as a code owner July 9, 2026 22:29
@pdodgen-revparts
pdodgen-revparts merged commit 6cd5085 into main Jul 9, 2026
2 checks passed
@pdodgen-revparts
pdodgen-revparts deleted the devex-1653-flip-classifier branch July 9, 2026 22:29
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.

1 participant