From 71c0e95759426396157faad1629cae4b0665b7ae Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 28 Aug 2026 03:52:18 -0700 Subject: [PATCH] Make a skipped growth guard visible and the hint copy-pasteable A skipped guard and a passing guard looked identical in the log, which is the same failure shape as the fail-open it replaced. The bootstrap branch now emits a ::warning:: naming the base SHA, so the one PR where the guard cannot run says so instead of going quietly green. Print the script path relative to the caller. Mobile runs this from mobile/, where a repo-root-relative path is not runnable as printed. --- .github/workflows/mobile.yml | 2 +- .github/workflows/pr.yml | 2 +- config/scripts/typecheck-diagnostic-baseline.mjs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 5af2ed16c22..01436186622 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -64,7 +64,7 @@ jobs: echo "TYPECHECK_BASELINE_BASE_PATH=$base_baseline" >> "$GITHUB_ENV" echo "Mobile growth guard ACTIVE against $BASE_SHA." else - echo "Mobile base has no baseline; this is the introducing PR, growth guard INACTIVE." + echo "::warning::Mobile growth guard INACTIVE: base $BASE_SHA has no baseline yet. Expected only on the PR that introduces it." fi - name: Setup Node.js diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a8fb02bc924..f6625066e01 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -232,7 +232,7 @@ jobs: echo "TYPECHECK_BASELINE_BASE_PATH=$base_baseline" >> "$GITHUB_ENV" echo "E2E growth guard ACTIVE against $BASE_SHA." else - echo "E2E base has no baseline; this is the introducing PR, growth guard INACTIVE." + echo "::warning::E2E growth guard INACTIVE: base $BASE_SHA has no baseline yet. Expected only on the PR that introduces it." fi - uses: ./.github/actions/install-node-dependencies diff --git a/config/scripts/typecheck-diagnostic-baseline.mjs b/config/scripts/typecheck-diagnostic-baseline.mjs index 727b686a55f..16fb9a73a6d 100644 --- a/config/scripts/typecheck-diagnostic-baseline.mjs +++ b/config/scripts/typecheck-diagnostic-baseline.mjs @@ -139,7 +139,8 @@ function subtractDiagnostics(left, right) { /** Failures here are routine, so the message carries its own fix. */ function regenerationHint() { const argv = process.argv.slice(2).filter((value) => value !== '--write') - return `Regenerate with: node ${relative(repoRoot, import.meta.filename)} ${argv.join(' ')} --write` + // Relative to the caller, not the repo: mobile runs this from mobile/. + return `Regenerate with: node ${relative(process.cwd(), import.meta.filename)} ${argv.join(' ')} --write` } function formatDiagnostic(diagnostic) {