Skip to content

Commit 95d0479

Browse files
committed
runtime-migration docs: 02d is merged and 09 is rebased onto it
The two items HANDOFF held open for this branch are both done — the rebase onto main (02d, #15218) ran in this session, and the Task 4 codemod defects were fixed in the review rounds — so the "Pending on rt/09" section goes, the README sequence table marks 02d merged, and the plan's execution log records the rebase and its verification outputs, including the CRLF fixture failure the rebase surfaced and the .gitattributes pin that fixes it.
1 parent b6a215e commit 95d0479

2 files changed

Lines changed: 20 additions & 11 deletions

File tree

‎dev-docs/runtime-migration/09-ral-fs-and-temp-layer.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,3 +2672,23 @@ Seven review rounds on the forward guard that skips files patching `Deno.*` (for
26722672
- Commit "tools: codemod-deno-ral --reverse reports canonicalPathSync instead of mapping it to Deno.realPathSync": `--reverse` no longer maps `canonicalPathSync` to `Deno.realPathSync` (the monkey-patched `normalizePath` on stable branches); it reports the binding in `left` with a hint naming `originalRealPathSync`, before the re-export check so a re-exported name keeps the hint. Pinned by the `reverse-realpath` and `reverse-realpath-reexport` fixtures. TDD: the new test failed first with a type error (`kCanonicalReverseHint` not exported). Suite after: `ok | 28 passed | 0 failed`. CLI dry-run on the fixture printed `:2: left: 'canonicalPathSync' (deno_ral/fs.ts) is not Deno.realPathSync on branches that load core/deno/monkey-patch.ts; use originalRealPathSync from deno_ral/original-real-path.ts; edit by hand` and `Summary: 1 files scanned, 1 would be rewritten, 1 replacements, 0 with collisions, 0 skipped, 1 left`. Plan text updated at Behaviour (reverse), the Task 5 backport text and the review checklist.
26732673
- Commit "tools: codemod-deno-ral freezes the write guard and skips the known patch files by path": the write guard is documented as best-effort and frozen, and `kCodemodPatchFiles` (`src/core/deno/monkey-patch.ts`, `src/core/performance/metrics.ts`) is a backstop checked after the guard, so a caught file keeps the guard's reason. Pinned by `patch-file-backstop.input.ts` (a `Reflect.get` write the guard misses) run under both listed paths. TDD: the test failed first with `result.skipped` `undefined` (the file was rewritten). Probe before documenting the gaps (Deno 2.7.14, `codemodFile` dry run): all three reproduced — `Reflect.get(globalThis, "Deno")` → skipped undefined, 1 replacement; computed key `globalThis[k]` → skipped undefined, 1 replacement; comma-wrapped `Object.assign((0, Deno.build), …)` → skipped undefined, 1 replacement. Suite after: `ok | 29 passed | 0 failed`. Full dry run (`--rules fs,temp,env,process,platform --dir src --dry-run`) unchanged: `src/core/deno/monkey-patch.ts: skipped: assigns to Deno.realPathSync at line 17`, `src/core/performance/metrics.ts: skipped: assigns to Deno.readTextFileSync at line 23`, `Summary: 624 files scanned, 224 would be rewritten, 816 replacements, 18 with collisions, 2 skipped`; `git status --short src` empty. README "Open decisions with an owner" gained the PR 20b and PR 25 rows that remove the two entries later.
26742674
- Commit "runtime-migration docs: PR 09 plan matches its execution; tracking section is tool-neutral": private details (tracker IDs, maintainer-local worktree paths, tracker instructions) left the committed docs; README progress tracking is tool-neutral. Acceptance criteria, Verification and the review checklist now match what was executed: ral suite `ok | 24 passed | 0 failed` (on Windows `23 passed | 1 ignored`), codemod suite `ok | 29 passed | 0 failed`, and the ratchet baseline check is `git diff upstream/main...HEAD -- tools/runtime-boundary-baseline.json` showing only `tests` 874 → 875. RC1 (ReadFileOptions) was closed without a code change: the codemod reports `qualified-path.ts`'s own `readTextFile`/`readTextFileSync` as collisions, no caller passes `options`, and an aborted read's `DOMException.message` is getter-only, so a `signal` in the layer would break `errorWithPath`; only the Context line records the decision. Step 3 checks: both greps printed nothing; baseline diff is the one hunk above; suites re-run after the edits: codemod `ok | 29 passed | 0 failed`, unit ral `ok | 23 passed | 0 failed | 1 ignored`.
2675+
2676+
### Rebase onto main (#15218)
2677+
2678+
- `git fetch upstream && git rebase upstream/main`: upstream/main was one commit ahead of the branch base (`623cd99e8`, PR 02d); 36 commits replayed. Only `dev-docs/runtime-migration/HANDOFF.md` conflicted — the status line and "How to resume" step 5, which both sides edited; resolved to "PR 02 (#15135), 02c (#15153) and 02d (#15218) are merged, 09 (the `src/deno_ral/` fs, temp and errors layer) is in progress, and the next to run are 00a, then 00b" and "PR 02, 02c and 02d are merged, 09 is in progress; …". README auto-merged.
2679+
- First codemod run after the rebase: `FAILED | 15 passed | 14 failed`, every failure a pure line-ending diff. Replaying the branch re-checked `tools/codemod/**` out, and `core.autocrlf=true` converted the LF blobs to CRLF working-tree files (`git ls-files --eol` showed `i/lf w/crlf`), while the fixture tests compare bytes verbatim and ts-morph inserts lines as `\n`. Fixed by pinning `tools/codemod/** text eol=lf` in `.gitattributes` (commit "tools: pin the codemod test files to LF checkouts") and re-checking out: all 76 files now `i/lf w/lf`.
2680+
- `package/dist/bin/quarto.cmd run --dev tools/check-runtime-boundary.ts`:
2681+
2682+
```
2683+
scope Deno.* calls std-import files
2684+
src 992 (baseline 992) 49 (baseline 49)
2685+
src-js 7 (baseline 7) 0 (baseline 0)
2686+
resources 12 (baseline 12) 1 (baseline 1)
2687+
package/src 240 (baseline 240) 3 (baseline 3)
2688+
tests 875 (baseline 875) 176 (baseline 176)
2689+
OK: no count exceeds the baseline.
2690+
```
2691+
- `git diff upstream/main...HEAD -- tools/runtime-boundary-baseline.json`: one hunk, `tests` `"denoCalls": 874,` → `"denoCalls": 875,`.
2692+
- `package/dist/bin/tools/x86_64/deno test --allow-all --import-map=src/import_map.json tools/codemod/` → `ok | 29 passed | 0 failed (705ms)`.
2693+
- `cd src && ../package/dist/bin/tools/x86_64/deno check --unstable-kv --unstable-ffi --import-map=import_map.json quarto.ts` fails on Deno 2.7 with the import-access error recorded above; with `--allow-import` (the recorded workaround) → `Check quarto.ts`, exit 0.
2694+
- ral suite: `run-tests.ps1 --agent unit/ral/` is rejected ("Only .ts, or .qmd, .md and .ipynb passed to smoke-all.test.ts are accepted") and `run-tests.sh` on Windows looks for `package/dist/bin/tools/deno`, which does not exist (the binary is under `tools/x86_64/`), so the five test files were passed explicitly: `cd tests && pwsh -Command '$env:QUARTO_TESTS_NO_CONFIG="true"; .\run-tests.ps1 --agent unit/ral/errors.test.ts unit/ral/fs.test.ts unit/ral/safe-exists-file.test.ts unit/ral/safe-remove-dir.test.ts unit/ral/temp.test.ts'` → `ok | 23 passed | 0 failed | 1 ignored` ("safeRemoveDirSync with symlinks" is `ignore: isWindows`).

‎dev-docs/runtime-migration/HANDOFF.md‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ The C-row correction of `aliasTarget()` in PR 36 is subsumed by PR 36 Decision 4
7676

7777
Two notes for whoever continues: the B1 commit carries the maintainer's author identity by mistake (an amend and force-push was refused; the attribution line is in the message); the triage's C rows for PRs 33, 35 and 36 overlapped files that B2, B4, B7 and B8 edited, and were run after the pass landed (all three are done).
7878

79-
## Pending on `rt/09` before its PR opens
80-
81-
Written 2026-10-28; delete this section once both items are done.
82-
83-
1. Rebase onto `main`: PR 02d merged as #15218 (`623cd99e8`).
84-
`HANDOFF.md` conflicts on the two status lines both branches edited; resolve them to "02d (#15218) is merged, 09 is in progress".
85-
After the rebase, set the README `02d` row to `merged`.
86-
`tools/runtime-boundary-baseline.json` merges without a conflict; `quarto run --dev tools/check-runtime-boundary.ts` should then report `src` 992, `resources` 12, `tests` 875 and no "rose" message.
87-
2. Task 4 review: the committed codemod (`c5af406bc`) had four defects, each to be fixed with a fixture before Task 5.
88-
Reverse mode turned a shorthand property (`{ os }`) into invalid syntax (`{ Deno.build.os }`); a type-only namespace import (`import type * as fs`) was overwritten with named imports; an existing `import { type statSync }` plus a `Deno.statSync(...)` call produced a duplicate binding; and forward mode rewrote calls on a local binding named `Deno`.
89-
9079
## How to resume
9180

9281
1. Work from an up-to-date `main`: the plans are there.

0 commit comments

Comments
 (0)