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.
This commit is contained in:
Brennan Benson
2026-08-28 03:52:18 -07:00
parent a1e1d295ff
commit 71c0e95759
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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) {