Repository navigation
fix(ci): reject bare version strings in Firebase release notes - #292
libravault-pipeline-bot[bot] wants to merge 1 commit into
Conversation
Firebase App Distribution's tester invite page auto-linkifies dot-separated, domain-shaped tokens (e.g. "0.4.6.1-alpha") without validating a real TLD or requiring a scheme, so a version mention in our own release-notes text renders as a dead "Server Not Found" link. Confirmed live on the 0.4.6.1-alpha / build 12 invite page (run 32177679056). Add a validation step that fails android-firebase-distribution.yml early, before any build/signing work, if release_notes contains a bare dotted version-like token. The matching logic lives in .github/scripts/check_release_notes_version_link.sh (mirroring the resolve_linked_issue.sh pattern already used in this repo) so it has its own standalone regression test, run directly since there's no shell-test harness wired into CI yet. Firebase's own auto-generated page heading has the same broken-link styling but is templated by Firebase itself from the APK's versionName/versionCode, not from anything this repo submits, so it is not fixable here — documented as a known limitation in docs/android-firebase-distribution-process.md. Closes #290
📱 iOS Build Status: PASSED✅ iOS Simulator Build & Unit Tests - success iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
QA verification — PR #292 vs issue #290Scope check: Neither PR #292 nor issue #290 carries Acceptance criteria (issue #290's own "Fix" section is the checklist)
What I ran and verified myself
AGENTS.md conventions
Non-blocking flag for whoever picks this up nextPR #291 ( ResultAll originating-issue acceptance criteria are met, the regression guard is a real (non-mocked) assertion proven to fail on broken logic, and the fix reproduces + blocks the actual reported incident input. No regressions found in related areas (no other workflow or app code touched). QA verdict: PASS |
Principal review — PR #292Verdict: Risk classificationRe-ran Verification performed
No CONFIRMED-severity findings. One PLAUSIBLE/minor nit for a human to weigh, not blocking:
Why
|
|
Superseded/stale — #291 (merged 2026-08-19T05:11:38Z) already fixed the same problem (issue #290, now closed) with an equivalent CI guard in the same workflow file. This PR predates that merge and is now CONFLICTING against dev. Closing rather than merging a duplicate. Found while triaging the status:needs-human-merge backlog. |
…very 4h (#335) * feat(ci): add every-4h human-merge sweep for the needs-human-merge backlog docs/agent-team-pipeline.md's state machine ends most risk:high PRs at status:needs-human-merge — correct by design, but until now that backlog only got cleared when a human noticed it and manually asked Claude Code to review + merge each one (as happened this session for PRs #327 and #324, plus closing #292 and #326 as stale/superseded along the way). This adds a new, separate workflow that automates the noticing, not the judgment: - human-merge-sweep.yml: schedule-triggered (every 4 hours) + workflow_dispatch for manual testing. Plain GITHUB_TOKEN — merging/ closing PRs isn't blocked by this repo's "Actions can't create/approve PRs" setting the way *opening* one is (principal-review.yml's own auto-merge step already proves this), so no App-token minting needed. - human-merge-sweep-agent.md: the actual review persona. Re-verifies each status:needs-human-merge PR is still current (stale/conflicting PRs get closed with an explanation if genuinely superseded, left alone if ambiguous), does a real second review (reads the whole diff, cross- checks claims against ground truth, checks for vacuous tests) before merging, and separately sweeps ALL open PRs for the same staleness pattern regardless of label. Hard rule, not a judgment call: never merges anything touching .github/workflows/**, .github/agent-policy.yml, or .claude/agents/** — that class of change always needs a human directly, however clean it looks. - human-merge-sweep-log.md: audit trail, same spirit as auto-merge-log.md but for this human-merge-routed path instead of the risk:low auto-merge path. This PR itself is exactly the kind of change its own new agent is hard-coded to never touch (.github/workflows/**, .claude/agents/**) — by design, flagging it plainly rather than leaving that as an implicit assumption: needs a human's own read, this session will not self-merge it even if CI is green. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * feat(ci): extend human-merge sweep to cover status:needs-info too status:needs-human-merge isn't the only place the pipeline parks work on a human — status:needs-info (issue triage that's underspecified, or a PR whose QA/review run crashed or hit workflow-file drift) blocks on a human just as silently, and was out of scope for the sweep as first built. Adds Part 3 to human-merge-sweep-agent.md, deliberately more conservative than Parts 1-2 given how different the task is — "is this safe to merge/close" is a mechanical check, "does this actually need a human" is not: - Detects when status:needs-info was applied because the *pipeline* crashed (turn budget exhausted, workflow-file drift) rather than because there's a real open question, and retries the stage that crashed — at most once per item, logged to human-merge-sweep-log.md same as a merge. - For everything else — the default assumption, not an edge case — never answers, never changes a label, never invents scope. Only ever ensures a clear comment exists naming the actual open question, so a human can answer faster. - Hard-excludes anything labeled security/release-blocker (agent-policy.yml's sensitive_issue_labels) from all autonomous action, including investigation. Bumped --max-turns 120→160 (three backlogs to work per run now, not two) and broadened human-merge-sweep-log.md's scope/column naming (PR → Item) to cover issues and retries alongside merges/closes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix(ci): missing id-token permission + retry using the wrong token Two CONFIRMED findings from principal review of PR #335's own diff: - permissions: was missing id-token: write. Every sibling workflow invoking claude-code-action carries this with an identical comment citing issue #158 ("Could not fetch an OIDC token" after 3 retries) — missed here, and continue-on-error: true on the agent step would have swallowed the failure silently, forever, every 4 hours. - Part 3's retry action re-applies status:ready-for-dev/needs-qa/ needs-review to restart a crashed pipeline stage — that label change must trigger the corresponding workflow, which a plain GITHUB_TOKEN cannot do (see docs/agent-team-pipeline.md's "Cross-workflow triggering"; pr-intake.yml already mints an App token for exactly this reason). Fixed by minting the same pipeline App token and passing it to the agent step as a distinctly-named PIPELINE_APP_TOKEN, with explicit instructions (both in the workflow prompt and the persona file) that it's used for that one action only — everything else stays on the default GH_TOKEN, unchanged. Also tightened the retry-dedup check flagged as a plausible weak point: "grep the comment history for retry text" is now "grep for an exact <!-- human-merge-sweep-retry --> marker, always the first line of the retry comment" — an exact string match instead of a fuzzy read. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Firebase App Distribution's tester invite page auto-linkifies dot-separated, domain-shaped tokens (e.g.
0.4.6.1-alpha) without validating a real TLD or requiring a scheme. Our ownrelease_notestext can trigger this, rendering as a dead "Server Not Found" link — confirmed live on the0.4.6.1-alpha/ build 12 invite page (run 32177679056).This PR adds the "in our control" half of the fix described in the issue: a validation step in
android-firebase-distribution.ymlthat fails theworkflow_dispatchrun early — before any build/signing work — ifrelease_notescontains a bare dotted version-like token.Not fixed here (and not fixable from this repo): Firebase's own auto-generated page heading ("Release notes for
0.4.6.1-alpha(12)") has the identical broken-link styling, but it's templated by Firebase itself from the APK'sversionName/versionCode, not from anything this repo submits. Per the issue, that needs Firebase Console access / Google support and is out of scope for an automated PR.Approach
.github/scripts/check_release_notes_version_link.sh— new script exposing a testablecontains_bare_version_token()function (mirrors the existingresolve_linked_issue.shpattern: guardedif [ "${BASH_SOURCE[0]}" = "${0}" ]block for direct/CLI use, sourceable for tests). Matches tokens with at least two dots (three numeric segments, e.g.1.2.3) so it doesn't flag ordinary prose like "section 2.3" or "iOS 17.4" (one dot), with an optional-alpha/-rc1-style suffix. Deliberately not anchored to a word boundary before the digits — the reported case (v0.4.6.1-alpha) still linkifies starting at the first digit, with the leadingvleft outside the link, so a leading letter must not exempt the token..github/scripts/test_check_release_notes_version_link.sh— standalone regression test (nogh/network calls), same convention astest_resolve_linked_issue.sh. Not wired into any CI job — matching its sibling, there's no shell-test harness in this repo yet. Ran locally, all 7 cases pass; also verified it goes red when the regex is broken (temporarily replaced it with a non-matching pattern, confirmed 3 failures, restored).android-firebase-distribution.yml— new first step after checkout, passingrelease_notesvia env var (same pattern the laterDistributestep already uses) rather than interpolating it into the shell script directly.docs/android-firebase-distribution-process.md— added a "Gotchas" entry documenting the guard and the unfixable-upstream half, so a future maintainer doesn't have to rediscover this from the workflow diff alone.Risk
This touches
.github/workflows/android-firebase-distribution.yml, which matchessensitive_pathsin.github/agent-policy.yml(CI/CD and release plumbing) —classify_pr_risk.pywill forcerisk:highon this PR regardless of size, so it will land onstatus:needs-human-mergerather than auto-merging. Flagging explicitly perAGENTS.mdso the principal review agent doesn't have to rediscover why from the diff alone.The change is additive and narrowly scoped: one new validation step that only runs before any build/signing/distribution work, and only affects the manually-triggered
workflow_dispatchpath (no effect on any other workflow or on app code). Defaultrelease_notesvalue ("Beta build via GitHub Actions") does not trip the check.Closes #290