You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5b7009c
Browse filesBrowse the repository at this point in the historyBrowse files
Fail the runtime boundary PR check on counts main would reject (#15208)
In pull request mode, only a Deno.* call that src/deno_ral replaces
failed the Runtime Boundary check. Any other count increase was a
warning on a green job, so a PR could merge without its baseline update
and turn main red. #15202 did this, and main was fixed by 4bebcb4.
#15134 hit the same failure earlier.
The check now fails when a count is above the PR's own
tools/runtime-boundary-baseline.json. That is the same comparison the
push check makes on main after merge. The contributor has nothing to
change. A maintainer updates the branch with main, runs
--update-baseline --accept-increase, and pushes the baseline to the PR.
A count that fits under the PR's baseline and was not raised by the PR
is reported as a notice and does not fail the run. Covered Deno.* API
errors are unchanged.
Related to #15153, #15183, #15202, and #15134.
Copy file name to clipboardExpand all lines: dev-docs/runtime-migration/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,7 @@ The rows below are the ones that still need a named person or an external answer
132
132
| PR 18, all tasks (from #15180) | the Deno backend keeps the `v8-<v8Branch>` store directory; reconcile it with the store names `index`/`sass-index` and the `<identifierHash>-<inputHash>.css` naming. Task 2 Step 2 shrinks to the API change: `this.index.list({ prefix: [] })` becomes `this.index.list([])`, and the `clear()` body #15180 shipped stays as is (`storeDir` paths, `safeRemoveSync`, immediate entries skipped; test `projectCache - clear() removes disk and immediate entries of a populated cache`). Drop the Context sentence saying `join` throws in `clear()`, and the Risks lines about that throwing path; one `cache.ts``Deno.removeSync` is now `safeRemoveSync`. Refresh every Verified usage line number | coordinator | PR 18 step 0 |
133
133
| PR 18 Tasks 1–3 (from the #15119 fix, once `src/deno_ral/kv.ts` is on `main`) |`kv.ts` already exists (`openKv`, `getKv`, `kvOp`, `KvDamagedError`) and both caches go through it, so Task 1 extends the file instead of creating it and its "Module not found" RED step no longer holds. `openKeyValueStore` keeps the damage mapping: a damaged value reads as a miss with one warning, a damaged file fails with `KvDamagedError` naming the folder to delete, any other error is wrapped with the path. The `src` baseline drops by 5, not 7 (the two `Deno.openKv` calls are already in the layer). The `Deno.openKv` grep acceptance check covers `src` and `package` only, since three cache tests build damaged fixtures with `Deno.openKv` on purpose. The `kv.ts` row in `.claude/rules/typescript/deno-ral.md` exists: update it | coordinator | PR 18 step 0 |
134
134
| PR 19 Task 1, PR 27b | both replace the whole body of `platform.ts`: keep the `v8Branch` export (`_TEMPLATE.md`, "`platform.ts`"); PR 27b computes it from `process.versions.v8`| coordinator | step 0 of each |
135
+
| PR 02c (from #15202, which turned `main` red) | Decided 2026-10-27: PR runs fail on any increase that leaves a count above their own `tools/runtime-boundary-baseline.json` (exactly what the push check on `main` will compare), instead of only warning; an increase that still fits because `main` sits below its baseline is a notice; 02c's "everything else is a warning for the maintainer" and its "exit 1 if any error, else 0" no longer hold. Per-line findings stay warnings saying the contributor has nothing to change, plus one `::error` saying a maintainer pushes the baseline update before merging; the remedy is unchanged (update the branch with `main`, `--update-baseline --accept-increase`, push to the PR). Rejected: an acceptance label (the merged tree still carries the old baseline, so `main` fails anyway) and warn-only with a merge checklist (the human step is what failed). A plan whose expected delta raises a count runs `--accept-increase` in its PR (PRs 01 and 05 already do) | maintainer | step 0 of any plan that raises a count |
135
136
| PR 30 | tagged `v8-<branch>/` directories are left behind like the untagged `.kv` files; remove `v8Branch` and its contract-test line together with its last consumer. What "damaged" means for the JSON index (unparsable or truncated file): keep the miss-with-warning versus fail-naming-the-folder split or not. The Deno KV damage tests (`tests/unit/kv-damage.test.ts` and the damaged-store cases in `sass-cache.test.ts` and `project-cache.test.ts`, from the #15119 fix) build real SQLite damage: they are replaced or deleted here, because PR 32 runs the full unit suite on Node, where neither `Deno.openKv` nor its damage exists, and "`sass-cache.test.ts` stays green" is restated accordingly | maintainer (damage semantics), coordinator (the rest) | PR 30 step 0 |
Copy file name to clipboardExpand all lines: dev-docs/runtime-migration/_TEMPLATE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ Repository conventions that plans must respect (`.claude/CLAUDE.md` and `.claude
84
84
- Unit tests live in `tests/unit/` (runtime-layer tests under the existing `tests/unit/ral/`), use `unitTest` from `tests/test.ts` and assertions from `tests/asserts.ts` (added by PR 02), and run with `cd tests && QUARTO_TESTS_NO_CONFIG=true ./run-tests.sh --agent unit/<file>.test.ts`.
85
85
The ratchet (PR 02) has a `tests` scope: tests written by PRs 09 and later use `deno_ral``fs`/`temp`/`process`, never raw `Deno.*`.
86
86
- Landing order inside Phase 1: 02 → 02b → 08 → 22 → 10–13 → 14, with 09 before 10; 22 depends on PR 04 (Phase 0). 02c lands before any other count-changing PR.
87
-
- A PR that adds an equivalent `deno_ral` replacement for a `Deno.*` API adds its exact keys (e.g. `readTextFileSync`) to `kRalDenoReplacements` in `tools/check-runtime-boundary.ts` in the same change, which turns later increases of that API into errors; a PR that adds a std seam may add a `kStdSuggestions` entry (suggestions never fail a PR). Under `kBrowserSharedPaths` (`src/core/lib/`, which the browser-side YAML intelligence imports and which therefore cannot import `deno_ral`) a covered API is only a warning.
87
+
- A PR that adds an equivalent `deno_ral` replacement for a `Deno.*` API adds its exact keys (e.g. `readTextFileSync`) to `kRalDenoReplacements` in `tools/check-runtime-boundary.ts` in the same change, which turns later increases of that API into errors; a PR that adds a std seam may add a `kStdSuggestions` entry (a suggestion never makes a finding an error). Any increase that is not an error still fails the PR run while the count exceeds the PR's own baseline (`--update-baseline --accept-increase`), so a plan that raises a count runs that step in the PR. Under `kBrowserSharedPaths` (`src/core/lib/`, which the browser-side YAML intelligence imports and which therefore cannot import `deno_ral`) a covered API is only a warning.
88
88
A conflict in a codemod PR is resolved by resetting the file to `main` and re-running the codemod, never by hand (the codemod is idempotent, PR 09); a conflict on a shared file (`tools/runtime-boundary-baseline.json`, `deno.lock`, the shim, the `deno-ral.md` table, a changelog) follows README ground rule 8.
89
89
- Commands in the plans write the Linux path `package/dist/bin/tools/x86_64/deno`; on Apple Silicon it is `tools/aarch64/deno`, on Windows `tools\x86_64\deno.exe`.
90
90
- Size is by file count (S < 10, M 10–40, L > 40 files); a plan that is large by volume but small by files says so next to the letter.
`${scope}: +${n}${DENO}${api} in ${file}; src/deno_ral has no replacement yet, so nothing to change in this PR. A maintainer accepts the new count before merging (see the job summary).`;
449
+
`${scope}: +${n}${DENO}${api} in ${file}; src/deno_ral has no replacement yet, so nothing to change in this PR. A maintainer accepts the new count before merging; this job stays red until then (see the job summary).`;
450
450
451
451
// deno-lint-ignore require-await
452
-
unitTest("check-runtime-boundary - renderDelta uncovered increases: warnings and maintainer block, not failed",async()=>{
452
+
unitTest("check-runtime-boundary - renderDelta uncovered increases: warnings and maintainer block, failed until accepted",async()=>{
"tests: tests/unit/c.test.ts now imports the standard library directly (testing/asserts); if tests/asserts.ts exports what this file uses with the same behaviour, import it from there. Otherwise nothing to change in this PR: a maintainer accepts the new count before merging (see the job summary).",
522
+
"tests: tests/unit/c.test.ts now imports the standard library directly (testing/asserts); if tests/asserts.ts exports what this file uses with the same behaviour, import it from there. Otherwise nothing to change in this PR: a maintainer accepts the new count before merging; this job stays red until then (see the job summary).",
520
523
]);
521
524
});
522
525
@@ -675,17 +678,40 @@ unitTest("check-runtime-boundary - renderDelta accepts only counts the PR itself
675
678
// main sits below its baseline for calls; the PR raises only std-import files.
`tests: +1 ${DENO}cwd in tests/unit/a.test.ts; within tools/runtime-boundary-baseline.json, which main sits below.`,
679
684
"tests: tests/unit/c.test.ts now imports the standard library directly (testing/asserts); accepted by this PR's tools/runtime-boundary-baseline.json.",
const{ success, out }=awaitrunAgainst(root,"HEAD");
743
+
assert(success,out);
718
744
assert(!out.includes("::warning"),out);
745
+
assert(!out.includes("::error"),out);
719
746
assert(out.includes("::notice file=tests/j.test.ts,line=1::tests: +1 "+DENO+"cwd in tests/j.test.ts; accepted by this PR's tools/runtime-boundary-baseline.json"),out);
720
747
assert(out.includes("### Accepted in this PR"),out);
"::error::This PR raises runtime boundary counts that tools/runtime-boundary-baseline.json does not accept yet. Nothing for the contributor to change: a maintainer pushes the baseline update to this PR before merging (see the job summary).",
/** Printed once in PR mode when a warning fails the job, so the contributor knows the remedy is not theirs. */
519
+
constkPendingAcceptanceError=
520
+
`This PR raises runtime boundary counts that ${kBaselineRelPath} does not accept yet. Nothing for the contributor to change: a maintainer pushes the baseline update to this PR before merging (see the job summary).`;
521
+
517
522
constsigned=(n: number)=>n>0 ? `+${n}` : `${n}`;
518
523
519
524
/** `current` is measure() of the working tree (the merge result on CI), so `current - deltas` is the base.
@@ -539,6 +544,11 @@ export function renderDelta(
539
544
(current[scope]?.[field]??0)<=raised;
540
545
};
541
546
constacceptedSuffix=`; accepted by this PR's ${kBaselineRelPath}.`;
547
+
// The push check on main compares with `merged`: a count within it cannot turn main red,
548
+
// even when the PR did not raise it (main sits below its baseline).
? `${finding.scope}: +${finding.delta} Deno.${finding.name} in ${finding.file}${acceptedSuffix}`
563
-
: `${finding.scope}: ${finding.file} now imports the standard library directly (${finding.name})${acceptedSuffix}`,
574
+
? `${finding.scope}: +${finding.delta} Deno.${finding.name} in ${finding.file}${suffix}`
575
+
: `${finding.scope}: ${finding.file} now imports the standard library directly (${finding.name})${suffix}`,
564
576
));
565
577
continue;
566
578
}
@@ -633,6 +645,8 @@ export function renderDelta(
633
645
summary.push(
634
646
"### Maintainer action before merging",
635
647
"",
648
+
"Nothing for the contributor to change: this job stays red until a maintainer accepts the new counts.",
649
+
"",
636
650
"This PR raises counts (warnings above). Where a warning suggests a module, check whether the PR should use it; accept the rest. Before merging, update the branch with `main`, then run",
637
651
"",
638
652
" quarto run --dev tools/check-runtime-boundary.ts --update-baseline --accept-increase",
@@ -647,7 +661,7 @@ export function renderDelta(
647
661
accepted,
648
662
notices,
649
663
summary: summary.join("\n"),
650
-
failed: errors.length>0,
664
+
failed: errors.length>0||warnings.length>0,
651
665
};
652
666
}
653
667
@@ -886,6 +900,9 @@ if (import.meta.main) {
886
900
for(const{ message, file, line }ofrendered.errors){
0 commit comments