[PR #3227] [CLOSED] fix(ci): track compiler inputs and module scopes #5657

Closed
opened 2026-10-31 01:08:20 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3227
Author: @N0zoM1z0
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/3164-compiler-input-ownership


📝 Commits (4)

  • 1a48d68 fix(ci): track compiler package scopes and documentation inputs
  • 1883ddc fix(ci): invalidate caches for imported declarations
  • f9bc184 chore: merge main for compiler cache verification
  • f3781a9 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

4 files changed (+208 additions, -9 deletions)

View changed files

📝 scripts/ci/plan.mjs (+5 -2)
📝 tests/boundary/filesystem/ciChangeScope.test.ts (+9 -0)
📝 tests/boundary/filesystem/staticTaskCache.test.ts (+182 -2)
📝 turbo.json (+12 -5)

📄 Description

Compiler caches could return success after imported documentation, nested package scopes, or imported TypeScript declarations made the program invalid. On the actual repository baseline, adding src/package.json with type: commonjs left both compiler keys unchanged: Turbo returned 0 with 3/3 cached tasks while direct TypeScript compilation failed.

Track the owning package scopes and TypeScript/declaration extensions for compile and typecheck, including authored documentation code reached by the typechecker. Documentation package manifests now select code checks. Markdown, generated VitePress output, and unrelated runtime compilation retain cache reuse.

Closes #3164.

Validation on integrated head 5f861205ceef6216e578d9492a58d217cecc0ec3, with Node 24.18.0, npm 11.16.0, locked Turbo 2.11.7 and the updated locked dependency tree (qs 6.16.0):

  • 5 files / 253 tests passed, including all 244 selection/cache/required-lane/feedback assertions and nine actual compiled process CLI scenarios. The ten static-cache cases use the real compiler, production configs and private owned caches; eight fault controls cover documentation, package scope/import mappings and .d.mts/.d.cts inputs. Healthy Markdown/generated-output reuse and unaffected compilation reuse remain asserted.
  • Negative controls fail on the earlier implementation for the intended cached-success or missed-selection reason. An additional whole-repository fault experiment at the initial source baseline plus the input fix changed both compiler keys and returned nonzero; direct compilation agreed, while metadata remained reusable. No compiler or live-test result is suppressed.
  • Static checks and architecture guards passed; discovery retains 1,260 files exactly once. Four production application analyses passed again, including the tracked Notes Electron example with its window, bridge, IPC and source facts retained. These targets were analyzed statically.
  • Main's independent JSON-admission and pcap fixture regressions were investigated as #3251/#3252 and fixed upstream; #3260 additionally guards actual Evidence getter/proxy inertness. Those runtime/fixture fixes are outside this PR's effective four-file diff.

The final main synchronization changed a development dependency. Reinstalled with npm ci, forced all three preparation tasks to overwrite artifacts made before that reinstall, and reran the validation above. Only the results with the matching dependency tree are used here.

Performance: ten alternating warm Turbo input-hash/planning dry runs per configuration, after warm-up, using the same final valid working tree and pinned compiler commands. Median elapsed 437→455 ms, CPU 293→342 ms. The host was heavily loaded (load average approximately 28), so wall-clock differences are noisy; this is a measured hashing cost, not a compiler acceleration claim. Earlier lighter-load controls also showed a small absolute hashing cost. The comparison sampled 170 MiB peak summed process-family RSS at 200 ms intervals; shared pages may be counted twice and short peaks missed. Healthy static reuse is explicitly tested, while invalid programs correctly do additional work. The four real application controls completed in 6.62 s, 5.82 s user+system CPU and 249 MiB sampled family RSS with prepared artifacts; this is validation rather than a comparative speedup. Agent tokens were not measured.

Compiler commands, cache limits, live-test policy, coverage and provider admission remain unchanged. Current-head hosted CI and review are checked before merge.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3227 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3164-compiler-input-ownership` --- ### 📝 Commits (4) - [`1a48d68`](https://github.com/morluto/rea/commit/1a48d6896a5ee50dfbf8ee543812905ce7d532f3) fix(ci): track compiler package scopes and documentation inputs - [`1883ddc`](https://github.com/morluto/rea/commit/1883ddcb76dbfe2d2e9e16e759e7e6d9d5a28108) fix(ci): invalidate caches for imported declarations - [`f9bc184`](https://github.com/morluto/rea/commit/f9bc1848696eb81af45c894dfc04778d4ca59ba6) chore: merge main for compiler cache verification - [`f3781a9`](https://github.com/morluto/rea/commit/f3781a932ee1d347dd5d2878ea06e921f0f43949) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **4 files changed** (+208 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `scripts/ci/plan.mjs` (+5 -2) 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+9 -0) 📝 `tests/boundary/filesystem/staticTaskCache.test.ts` (+182 -2) 📝 `turbo.json` (+12 -5) </details> ### 📄 Description Compiler caches could return success after imported documentation, nested package scopes, or imported TypeScript declarations made the program invalid. On the actual repository baseline, adding `src/package.json` with `type: commonjs` left both compiler keys unchanged: Turbo returned 0 with 3/3 cached tasks while direct TypeScript compilation failed. Track the owning package scopes and TypeScript/declaration extensions for `compile` and `typecheck`, including authored documentation code reached by the typechecker. Documentation package manifests now select code checks. Markdown, generated VitePress output, and unrelated runtime compilation retain cache reuse. Closes #3164. Validation on integrated head `5f861205ceef6216e578d9492a58d217cecc0ec3`, with Node 24.18.0, npm 11.16.0, locked Turbo 2.11.7 and the updated locked dependency tree (`qs` 6.16.0): - **5 files / 253 tests passed**, including all 244 selection/cache/required-lane/feedback assertions and nine actual compiled process CLI scenarios. The ten static-cache cases use the real compiler, production configs and private owned caches; eight fault controls cover documentation, package scope/import mappings and `.d.mts`/`.d.cts` inputs. Healthy Markdown/generated-output reuse and unaffected compilation reuse remain asserted. - Negative controls fail on the earlier implementation for the intended cached-success or missed-selection reason. An additional whole-repository fault experiment at the initial source baseline plus the input fix changed both compiler keys and returned nonzero; direct compilation agreed, while metadata remained reusable. No compiler or live-test result is suppressed. - Static checks and architecture guards passed; discovery retains **1,260 files exactly once**. Four production application analyses passed again, including the tracked Notes Electron example with its window, bridge, IPC and source facts retained. These targets were analyzed statically. - Main's independent JSON-admission and pcap fixture regressions were investigated as #3251/#3252 and fixed upstream; #3260 additionally guards actual Evidence getter/proxy inertness. Those runtime/fixture fixes are outside this PR's effective four-file diff. The final main synchronization changed a development dependency. Reinstalled with `npm ci`, forced all three preparation tasks to overwrite artifacts made before that reinstall, and reran the validation above. Only the results with the matching dependency tree are used here. Performance: ten alternating warm Turbo input-hash/planning dry runs per configuration, after warm-up, using the same final valid working tree and pinned compiler commands. Median elapsed **437→455 ms**, CPU **293→342 ms**. The host was heavily loaded (load average approximately 28), so wall-clock differences are noisy; this is a measured hashing cost, not a compiler acceleration claim. Earlier lighter-load controls also showed a small absolute hashing cost. The comparison sampled 170 MiB peak summed process-family RSS at 200 ms intervals; shared pages may be counted twice and short peaks missed. Healthy static reuse is explicitly tested, while invalid programs correctly do additional work. The four real application controls completed in 6.62 s, 5.82 s user+system CPU and 249 MiB sampled family RSS with prepared artifacts; this is validation rather than a comparative speedup. Agent tokens were not measured. Compiler commands, cache limits, live-test policy, coverage and provider admission remain unchanged. Current-head hosted CI and review are checked before merge. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5657
No description provided.