Skip to content

test(cli): follow the smoke command's output destination - #12610

Merged
cixzhang merged 1 commit into
mainfrom
test/smoke-follow-destination
Nov 18, 2026
Merged

cixzhang merged 1 commit into
mainfrom
test/smoke-follow-destination

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Who this helps

Whoever reads the daily "CLI on minimum Node" run. Today's run (44258944787) failed its global-mode smoke on one check: "project with Core 0.7.1 only: printed command runs in sh and reaches 0.7.17". The command the CLI printed ran and exited 0, but it writes to the path it names, src/pages/settings.tsx, while the smoke looked for src/pages/settings/page.tsx, so it reported "wrote=false". The CLI was right; the check was wrong.

What changes

Re-cut of #12609 by astracat-bot, byte-identical (credited as co-author):

  • .github/scripts/cli-global-mode-smoke.mjs: the check takes the destination from the printed command's last word. A .tsx destination is the file it looks for; a folder means page.tsx in it; <path> keeps the random output folder. It clears that file or folder before each shell runs the command.
  • .github/scripts/cli-global-mode-smoke.test.mjs: a printed .tsx destination (settings.tsx, profile.tsx) is checked at that file, and a command that writes nothing there still fails; a folder destination is still checked at its page.tsx.

Tests

  • Local: cli-global-mode-smoke.test.mjs, 6 of 6.
  • It explains today's failure: the smoke's other 31 checks passed, and the failing one shows rc=0 wrote=false for a command whose destination is a .tsx file.

CI impact

None: a test script for the daily minimum-Node workflow and its unit test.

Overlap checked: #12609 (the original; it closes when this merges)

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain shepherd, through merge-guard.

Re-cut of #12609 by astracat-bot, byte-identical.

Co-authored-by: astracat-bot[bot] <astracat-bot[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 18, 2026 9:11am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 9:20 AM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 1ffe415

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 1ffe415

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · time to green −45 min · standard runners · 2 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 219 219 0
Runner pool, runner-minutes a day 71,349 71,349 0 (0%)
Average concurrent jobs 49.5 49.5 0
Time to green (median → this run) 64.5 min 19.6 min −45 min
Runs a day 326 326 0

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/cli-global-mode-smoke.mjs, .github/scripts/cli-global-mode-smoke.test.mjs.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet. The pull request is a draft, so its CI and Lint runs were skipped; marking it ready for review starts them.

The smoke's printed-command check now follows the destination the CLI prints, which matches where astryx template writes a page outside a Next App Router (a .tsx file) and inside one (a folder holding page.tsx). The two new file-destination cases fail against the current script and pass with this change, and all six cases pass.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the scheduled minimum-Node run's smoke failed one check whose printed command exited 0 but was reported as writing nothing — verified in that run's smoke log (31 passed, 1 failed, rc=0 wrote=false).
  • Claim: the printed command writes src/pages/settings.tsx while the check looked for src/pages/settings/page.tsx — verified (the base script's hard-coded path; the CLI's destination and copy code).
  • Claim: the check takes the destination from the printed command's last word (the file, a folder's page.tsx, or the placeholder's random folder) — verified (cli-global-mode-smoke.mjs:714-720).
  • Claim: it clears that file or folder before each shell runs the command — verified (cli-global-mode-smoke.mjs:733-737).
  • Claim: the tests check file destinations at the file, still fail a command that writes nothing, and still check a folder at its page.tsx — verified (cli-global-mode-smoke.test.mjs:82-101).
  • Claim: 6 of 6 tests pass — verified; the two file-destination cases fail against the base script.
  • Claim: a byte-identical re-cut of the earlier pull request, with its author credited as co-author — verified (identical diff; co-author trailer).
  • Claim: no CI impact — verified: no workflow, job, runner or timeout changes; the script also serves the manual cross-OS smoke workflow.
  • Claim: the earlier pull request closes when this merges, plus the ownership and landing notes — process statements, not checkable from the code.
  • File: .github/scripts/cli-global-mode-smoke.mjs — clear.
  • File: .github/scripts/cli-global-mode-smoke.test.mjs — clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 18, 2026 09:20
@cixzhang
cixzhang merged commit 9de1980 into main Nov 18, 2026
137 checks passed
@github-actions
github-actions Bot deleted the test/smoke-follow-destination branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 1ffe4156 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant