Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

ci: the dependent-audit record says why a scope is undecided (#10699)

Cindy Zhang3262350d4409
diff --git a/.github/scripts/a11y-dependent-audits.mjs b/.github/scripts/a11y-dependent-audits.mjs
index fb29cb9dda..b468b23fce 100644
--- a/.github/scripts/a11y-dependent-audits.mjs
+++ b/.github/scripts/a11y-dependent-audits.mjs
@@ -332,6 +332,10 @@ function main() {
ran: plan.files,
deferred: plan.deferred,
complete: plan.complete,
+ // Why the scope is undecided, so a reader can say "split" or "re-run".
+ ...(plan.everything
+ ? {undecided: truncated ? 'truncated' : 'unreadable'}
+ : {}),
};
fs.writeFileSync(out, `${JSON.stringify(record, null, 2)}\n`);
if (plan.owed.length === 0) {
diff --git a/.github/scripts/a11y-dependent-audits.test.mjs b/.github/scripts/a11y-dependent-audits.test.mjs
index f5dd8a6843..f84eaf525c 100644
--- a/.github/scripts/a11y-dependent-audits.test.mjs
+++ b/.github/scripts/a11y-dependent-audits.test.mjs
@@ -309,6 +309,13 @@ describe('an undecided scope', () => {
fs.readFileSync(path.join(dir, 'record.json'), 'utf8'),
);
expect(record.complete).toBe(false);
+ // The last run here had no --truncated: the record says why it is undecided.
+ expect(record.undecided).toBe('unreadable');
+ run(['--all', '--truncated']);
+ expect(
+ JSON.parse(fs.readFileSync(path.join(dir, 'record.json'), 'utf8'))
+ .undecided,
+ ).toBe('truncated');
} finally {
fs.rmSync(dir, {recursive: true, force: true});
}