Skip to content

ci: the Node record refresh downloads leg logs with their colour codes, and stops on a log with no Node legs - #12687

Merged
josephfarina merged 1 commit into
mainfrom
ci/node-record-log-escapes
Nov 18, 2026
Merged

josephfarina merged 1 commit into
mainfrom
ci/node-record-log-escapes

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Maintainer impact

The Node record refresh has not run since its log reader changed. The first refresh after that change stopped at its read step: gh api refuses to write a response that contains terminal escape sequences unless it gets --allow-escape-sequences, and every Node leg's job log carries Vitest's colour codes (https://github.com/meta/astryx/actions/runs/44393915078: "the response contains terminal escape sequences; pass --allow-escape-sequences to output it anyway"). It failed safely: the job stops before the check and the record, so it wrote no record, pushed nothing and left the open refresh pull request unchanged. Until this merges, the record does not refresh.

Intended invariant

The refresh records every Node test file a leg ran, or it writes no record (AST-030 FR22). Which files run never depends on the record.

Change

  • .github/workflows/node-record-refresh.yml: the leg-log download passes --allow-escape-sequences to gh api, so the raw log, colour codes and all, reaches the readers. The comment says why.
  • .github/scripts/node-record-refresh.mjs: check also fails, and writes no reasons, when the run log has no Node leg lines at all.

Evidence

  • Failure before the change: the run above, and locally the read step's exact script with the real gh against main's run 44309827137 exits 1 with the same message.
  • Success after the change: the same script with the flag exits 0, writes 11,068 leg-log lines, and check passes the completeness guard (every leg's file count matches its Vitest summary) and names the drifted files.
  • Red first: with the workflow change reverted, 2 of 28 tests in node-record-refresh.test.mjs fail: the read-step command shape, and the new test that runs the read step against a leg log with colour codes.
  • Product/runtime behavior verified unchanged: CI-only change; no package code.
  • CI impact: none for pull requests; the refresh job runs as designed again.
  • Grader: no grader effect. The change touches only the refresh workflow and its script, which no grader reads.

Scope

Components: none

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • CI=1 vitest run --project node .github/scripts/node-record-refresh.test.mjs: 28 passed.
    • New: the read step's exact script runs against a leg log with colour codes, through a stand-in gh that keeps the real one's rule (a response with escape sequences is written only with --allow-escape-sequences). It exits 0, keeps the colour codes in the log, passes the guard and times every file. Without the flag it fails.
    • New: check exits 1 on a log with no Node leg lines and writes no reasons.
  • Prettier clean on the changed files.

@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:04pm 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:08 PM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cbe58fc

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · cbe58fc

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 −41.5 min · standard runners · 1 other workflow changed (not measured) · 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 23 min −41.5 min
Runs a day 326 326 0

Other workflows: node-record-refresh.yml changed: runs on workflow_run, schedule (41 */6 * * *), workflow_dispatch; standard runners; its minutes are not measured here

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/node-record-refresh.mjs, .github/scripts/node-record-refresh.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 CI run at this head was cancelled because CI was full, so the required checks still need a re-run (re-run its jobs, or push) before merge.

No blocking findings. The new read-step test fails without the flag, the empty-log case fails without the guard, and main's own colour-coded Node leg logs pass check on this head with the completeness guard intact.

Claims and files checked

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

  • Claim: the refresh stops at its read step because gh refuses to write a log with terminal escape codes, and Node leg logs carry Vitest's colour codes: verified (main's failing refresh run; escape bytes in every Node leg log of a recent main run).
  • Claim: the failure was safe, with no check, record, push or pull-request update: verified (the later steps were skipped in that run).
  • Claim: until this merges the record does not refresh: verified (the read-step test fails with the workflow change reverted).
  • Claim: the refresh records every Node test file a leg ran or writes no record, and which files run never depends on the record: verified in code (incompleteLegs and the new guard); the second half matches the CI spec's FR22 wording, and the first paraphrases it.
  • Claim: the download passes --allow-escape-sequences and a comment says why: verified (workflow lines 80-82 and 91).
  • Claim: check fails and writes no reasons on a log with no Node leg lines: verified (script lines 237-242; test lines 592-614).
  • Claim: with the flag, the read step writes 11,068 lines and check passes the guard and names drifted files: verified independently on the same run's logs (11,068 lines; 3 drifted files).
  • Claim: with the workflow change reverted, 2 of 28 tests fail: verified (the command-shape test and the colour-code read-step test).
  • Claim: CI-only, with no product, pull-request CI, grader or public API effect: verified (only the refresh workflow, its script and its test change).
  • Claim: 28 tests pass and Prettier is clean: verified.
  • File .github/workflows/node-record-refresh.yml: clear.
  • File .github/scripts/node-record-refresh.mjs: clear.
  • File .github/scripts/node-record-refresh.test.mjs: clear.

Automated review (maintainer link)

@josephfarina josephfarina reopened this Nov 18, 2026
@josephfarina
josephfarina merged commit d7566ba into main Nov 18, 2026
106 of 137 checks passed
@github-actions
github-actions Bot deleted the ci/node-record-log-escapes branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — cbe58fcc 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