Skip to content

fix(downstream-upgrade): reserve sync stdout for PR number - #367

Merged
jeffredodd merged 1 commit into
mainfrom
fix/downstream-pr-sync-stdout
Oct 23, 2026
Merged

jeffredodd merged 1 commit into
mainfrom
fix/downstream-pr-sync-stdout

Conversation

@jeffredodd

@jeffredodd jeffredodd commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

pr-sync.sh sync leaked the URL printed by gh pr edit / gh pr create before echoing the PR number. The workflow captures that stdout and passes it to gh pr checks, so a value such as https://github.com/Fiestaboard/FiestaBoard/pull/2310\n2310 is treated as a branch that cannot be found. That lookup error enters the CI-failure recovery path and can drop adoption commits.

Redirect those two command outputs to stderr, reserving stdout for the PR number. Regression mocks now emit GitHub-style URLs, make a newly created PR discoverable on the second lookup, and assert the captured stdout for both create and edit paths. Only the script and its existing test change.

Original evidence: downstream upgrade run 39218165144, docs job (URL\n182) and core job (URL\n2310, followed by the adoption rollback).

TDD verification

Fresh base: 370980102472519e35ce46a9e8d52dfd231c8209 (main). Original downstream suite: 7/7 scripts passed.

Before changing production code, bash scripts/downstream-upgrade/tests/test_pr_sync.sh was run with each new assertion and exited 1 for the intended reason:

FAIL: sync stdout is only the existing PR number (expected '7', got 'https://github.com/acme/app/pull/7
7')
FAIL: sync stdout is only the created PR number (expected '8', got 'https://github.com/acme/app/pull/8
8')

After the fix:

  • bash scripts/downstream-upgrade/tests/test_pr_sync.sh — exit 0, both exact stdout assertions pass.
  • bash scripts/downstream-upgrade/tests/run.sh — exit 0, 7/7 test scripts pass.
  • shellcheck scripts/downstream-upgrade/*.sh scripts/downstream-upgrade/tests/*.sh — exit 0.
  • git diff --check — exit 0.

Local full-suite limitation: this clean Mac checkout has no node dependencies, and no software was installed. npm test exited 127 (vitest: command not found). npm run release:test reported 256 passes and 12 module-loading failures, all because esbuild is absent: board-accessible-name, board-characters, board-code-62-glyph, board-dimensions-identity, board-flap-cascade, board-live-region, board-lookup-proto, cn-equivalence, component-inventory-coverage, plugin-preview-code-62-glyph, story-variant-coverage, and token-registry under scripts/ci/tests/. The PR's normal CI installs dependencies and runs the full suite.

Exact-head CI

CI run 39317763475 completed successfully for head a32fc12340c1b4ab090bc1150e92a59d266f1971: all 37 jobs passed, including CI Success. The normal dependency-installed CI passed all 7 downstream test scripts, 46 perf harness tests, 392 release tests, and 1,434 unit tests (33 skipped), plus lint/format/typecheck, package build, all 12 accessibility shards, all 16 visual capture shards and visual comparison, and Bundle Budget with no regressions. This covers the suites that could not run fully in the clean local checkout.

No downstream PRs or adoption commits were modified. This is a draft for review; do not merge automatically.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression report

✅ No visual changes across 3280 screenshot(s).

📦 Open the full visual report (artifact vrt-report.html) · workflow run

Baseline from this run · commit a32fc12

@jeffredodd
jeffredodd marked this pull request as ready for review October 23, 2026 02:47
@jeffredodd
jeffredodd merged commit 7227137 into main Oct 23, 2026
37 checks passed
@jeffredodd
jeffredodd deleted the fix/downstream-pr-sync-stdout branch October 23, 2026 02:49
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