Skip to content

Commit 861e72a

Browse files
committed
docs: runtime migration, point the covered-API probe at a file the check can fail
Verification 4 appended Deno.build.os to src/core/lib/text.ts and expected exit 1, but findings under src/core/lib/ are warning-only since that code is browser-shared. The recipe now uses src/command/utils.ts, where the covered error and the exit code still show.
1 parent ea38fd6 commit 861e72a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎dev-docs/runtime-migration/02c-ratchet-pr-delta-and-guidance.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ Run from the branch worktree; `Q` is `package/dist/bin/quarto` (`quarto.cmd` on
333333
1. Unit tests: `cd tests && QUARTO_TESTS_NO_CONFIG=true ./run-tests.sh --agent unit/tools/check-runtime-boundary.test.ts` → all pass.
334334
2. Replay #15134 on the ratchet commit, in a scratch worktree, with `BRANCH_TREE` the branch worktree: `git worktree add --detach ../rb-a cf768e183 && cd ../rb-a && git merge --no-edit 32bffe280 && cp "$BRANCH_TREE/tools/check-runtime-boundary.ts" tools/ && "$BRANCH_TREE/$Q" run --dev tools/check-runtime-boundary.ts --against HEAD^1; echo "exit=$?"` → five warnings (`tests/unit/path.test.ts`: `makeTempDirSync`, `mkdirSync`, `writeTextFileSync`, `removeSync`, +1 each; `tests/unit/project/project-context-input-files.test.ts`: `mkdirSync` +2), the maintainer line `tests 832 / 177` printed, `exit=0`. Copying the tool makes the tree dirty: `--against HEAD^1` then also counts the tool's own diff, which is outside every scope, so the result is unaffected.
335335
3. Replay #15136 on the broken main: same with base `360bb7245` and head `4a18e9d4a` → one notice `main is above ... (tests Deno.* calls 832 > 826)`, no warning, `exit=0`.
336-
4. Covered increase: on the branch, add `export const o = Deno.build.os;` at the end of `src/core/lib/text.ts`, commit, run `--against HEAD~1` → the covered error with the added line number, `exit=1`; then `--against no-such-rev` → `exit=2`; `git reset --hard HEAD~1` (the probe commit only).
336+
4. Covered increase: on the branch, add `export const o = Deno.build.os;` at the end of `src/command/utils.ts`, commit, run `--against HEAD~1` → the covered error with the added line number, `exit=1`; then `--against no-such-rev` → `exit=2`; `git reset --hard HEAD~1` (the probe commit only).
337337
5. CLI contract: absolute mode prints the Acceptance rows and `OK: no count exceeds the baseline.`, `exit=0`; `--accept-increase` alone → `exit=2`; `--against HEAD --update-baseline` → `exit=2`; `--update-baseline --accept-increase` → `exit=0` and `git diff --stat tools/runtime-boundary-baseline.json` empty on an unchanged tree.
338338
6. Remove the scratch worktrees (`git worktree remove --force ../rb-a`, likewise for the #15136 one) after checking `git -C ../rb-a status --short` lists only the copied tool.
339339
7. CI: the PR's own Runtime Boundary run is green and its summary shows only the PR's own delta.
@@ -450,3 +450,7 @@ Run from the branch worktree; `Q` is `package/dist/bin/quarto` (`quarto.cmd` on
450450

451451
- P2 verified and fixed: `build.os` and `build.arch` were covered in every scope, so adding one to the engine template under `src/resources/create/` (scope `resources`, user code that cannot import `src/deno_ral/`) or to a plain `.js` file (`src-js`) failed CI with a hint that cannot work there. Both map entries now carry `scopes: ["src", "package/src", "tests"]`, the scopes that import `deno_ral` today (`package/src` and `tests` verified by grep). Test `a covered API is only an error where deno_ral can be imported` failed before (`resources` returned the hint), passes after; `unit/tools/check-runtime-boundary.test.ts` → 38 passed, counts unchanged.
452452
- Its note about a concurrent uncommitted change in `src/core/cleanup.ts` was a probe edit of mine from a failed reproduction attempt, reverted with `git checkout -- <file>` after checking the diff was that one line; the tree is clean.
453+
454+
### 2026-10-22: Verification 4 target file
455+
456+
- `src/core/lib/` is browser-shared and its covered APIs are warning-only (see "browser-shared code" above), so the V4 recipe's probe file `src/core/lib/text.ts` no longer exits 1. The recipe now appends to `src/command/utils.ts`: `--against HEAD` with the uncommitted probe prints `src: +1 Deno.build.os in src/command/utils.ts; use os (or isWindows, isMac, isLinux) from src/deno_ral/platform.ts instead (runtime boundary, see dev-docs/runtime-migration/README.md)` with `line 18` and `exit=1`; restored with `git checkout --` after checking the diff was that one line.

0 commit comments

Comments
 (0)