← Back to Pull requests

test(create-release): assert the release card is left off when it can't be drawn #777

Closed
unknown closed this pull request without merging on Nov 22, 2026 01:34 UTC
View on GitHub
unknown unknown commented on Nov 21, 2026 23:30 UTC
Author

Summary: Last week's change that stops Bluefin releases from showing a blank picture at the top (#749) is not actually checked by any test. The tests for the release step work from an old copy of the release instructions, so they still expect the blank picture to be attached, and undoing the fix would not turn anything red. This updates the tests, adds checks for the new behaviour, and adds a guard that fails whenever the test copy and the real instructions disagree again.

What I need from you: Review and merge.

---

Test Improvement

Why

tests/bats/test_create_release.bats tests the inline shell of bootc-build/create-release/action.yml by copying each step's run: block into a heredoc. #749 changed two of those steps ("Render release card" now emits rendered=true|false from the _card_placeholder marker; "Create GitHub Release" attaches the card PNGs only when CARD_RENDERED == true). Neither copy was refreshed, so on main:

  • create release: new tag creates the release... still asserts release-card.png release-card-dark.png bluefin.spdx.json, the pre-#749 always-attach list.

  • Nothing executes the rendered output or the CARD_ASSETS gate. Reverting either half of #749 keeps CI green.
  • The Python side of #749 (render_card.py writing the marker, render_notes.py --skip-card) is tested; only the shell glue between them was not.

    What changed

  • Re-copied the two drifted steps verbatim from the action.

  • Three bats tests: a drawn card reports rendered=true; the placeholder marker reports rendered=false; CARD_RENDERED=false leaves both card PNGs off gh release create. The existing "new tag" test now runs with CARD_RENDERED=true (the default in setup).

  • tests/test_create_release_bats_sync.py: parses action.yml and asserts every *_LOGIC heredoc equals its step byte for byte, and that no heredoc is left unchecked. Same shape as the existing tests/test_renovate_automerge_bats_sync.py; it runs in the pytest job, which now runs on every PR (#765).

  • docs/skills/testing.md: one row in the bats inventory pointing at the suite and its sync check.
  • Evidence

    At 3ab4328 (main):

    | Check | main | this branch |
    |---|---|---|
    | pytest tests/test_create_release_bats_sync.py | 2 failed (RENDER_CARD_LOGIC, CREATE_RELEASE_LOGIC), 6 passed | 8 passed |
    | bats tests/bats/test_create_release.bats | 24 ok | 27 ok |
    | full pytest (unit-tests.yml command, --ignore=tests/bats) | 1283 passed, 95% | 1291 passed |
    | pre-commit run on changed files | | passed |

    End-to-end: the no-Playwright card path ran once in the consumer validation cited on #749 (projectbluefin/common#1670); no unit test covered it, so this is a unit-coverage gap behind existing end-to-end evidence (low priority, high regression risk because the test asserted the opposite behaviour).

    Sibling PRs checked for file overlap: #731, #740, #766, #775, #776. None touch these files; #776 edits a different row of docs/skills/testing.md.

    🤖 Generated with Claude Code

    -- hive: agent=quality backend=claude model=claude-opus-5-5 claude=2.1.327

    Diff: 393 lines (+294 / -99) across 4 files Reviewer: Danathar Review duration: 123m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.43) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 393 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.358
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #777"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.1% (MEDIUM) · Higher = larger blast radius
    43.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%