Repository navigation
ci: the Node record refresh downloads leg logs with their colour codes, and stops on a log with no Node legs - #12687
Conversation
…s, and stops on a log with no Node legs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec cbe58fc |
PR Analysis Report🔎 Preview ·
|
| 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
There was a problem hiding this comment.
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 (
incompleteLegsand the new guard); the second half matches the CI spec's FR22 wording, and the first paraphrases it. - Claim: the download passes
--allow-escape-sequencesand a comment says why: verified (workflow lines 80-82 and 91). - Claim:
checkfails 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
checkpasses 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.
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 apirefuses 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-sequencestogh api, so the raw log, colour codes and all, reaches the readers. The comment says why..github/scripts/node-record-refresh.mjs:checkalso fails, and writes no reasons, when the run log has no Node leg lines at all.Evidence
ghagainst main's run 44309827137 exits 1 with the same message.checkpasses the completeness guard (every leg's file count matches its Vitest summary) and names the drifted files.node-record-refresh.test.mjsfail: the read-step command shape, and the new test that runs the read step against a leg log with colour codes.Scope
Components: none
Testing
CI=1 vitest run --project node .github/scripts/node-record-refresh.test.mjs: 28 passed.ghthat 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.checkexits 1 on a log with no Node leg lines and writes no reasons.