Skip to content

Check renamed vendored ERB source at its upstream path - #273

Merged
284km merged 3 commits into
mainfrom
codex-vendored-erb-source-check
Nov 25, 2026
Merged

284km merged 3 commits into
mainfrom
codex-vendored-erb-source-check

Conversation

@284km

@284km 284km commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Linux build CI stops before the runtime checks because headers_check.py looks for the vendored erb_escape.c at the Ruby source-tree root. Its actual upstream location is ext/erb/escape/escape.c. Map that renamed file explicitly and keep the byte-for-byte comparison; all other vendored paths retain their existing rule.

Review follow-up: merged current main 0cd831f0 into head 36080c121905ee4661adc228eebd39374f431b52. Main already contains #275's unittest-vm timing dependency. The workflow is now byte-for-byte main's, resolving the conflicting needs-list edits. The final diff against that main contains only capi/tools/headers_check.py and the loop record; no workflow, runtime or vendored-byte changes.

Final-head local validation:

  • Fresh O2 build with pinned compiler 9dec2ff687a08433247dbdb7729bc19c8522e538, mgz 661a01d8bb68f5acd68e3192bd47f081d179c436.
  • python3 capi/tools/headers_check.py <clean-ruby-source>: 194 headers, 10 explicitly patched, 21 unchanged vendored sources. The reviewer independently reproduced main's ERB failure and this fix's pass. Existing scratch negative controls also reject altered vendored bytes and a missing upstream source, including with an old-location same-basename decoy.
  • python3 tools/ci_timing_check.py: 18 tests PASS, including main's added dependency regression test.
  • All nine source gates PASS: GC roots, duplicate/dead definitions, method writes, name specifications, namespace names, name lengths, regexp captures and bracket depth (155 / 1024, from freshly emitted C). record_hygiene PASS. The bracket gate used MR_C=mr.c.
  • As requested in review, this checker-only integration uses the checker and source gates without repeating the full runtime corpus. No upstream unit file changed; no full unit suite or Rails cold measurement.

Historical runtime controls on 81b3001d before this main integration, not final-head replays:

  • run_corpus.sh --both: 896/896 match with hash indexing ON and OFF (803.800 s).
  • VM corpus: 896 on VM, 0 fallback, 0 difference, 0 failure (220.524 s); all source gates and record_hygiene before/after passed.
  • Large-file corpus 988 (100,000-element Array and Hash), paired unchanged-runtime RSS controls: evaluator 327,106,560 → 327,106,560 bytes; VM 736,428,032 → 735,100,928 bytes. Both runs used the same unchanged O2 binary, not different before/after runtime builds; no performance improvement is claimed.

Reference: clean private Ruby 4.0.10 at /private/tmp/mere-reference-ruby-4.0.10-install/bin/ruby, source revision a704b7cd95a42cc0cf5f307137bf3aac0285b915; audit / gem list: 46 default, 38 bundled, zero extras, Prism 1.8.2. No gems were installed into its default directory.

Record: loop/2026-11-25-codex-vendored-erb-source-check.md.

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 033850a66c7f947065ed1722cdb4cdbb0b505ece and its prospective integration with fetched current main 164c75f30cae6dcaa33dc314c4d6b12218f36ef7 (tree 5f3a30cddcd59cc85ed90516648ad76c5a47da1e). I read the full changed files, the C API vendor documentation and workflow callers, and the existing discussion/review inventory (empty). No tracked AGENTS.md or CLAUDE.md instructions were found. No actionable findings.

The explicit rename preserves the intended byte-for-byte verification while pointing ERB to ext/erb/escape/escape.c. All other vendor paths retain their prior comparison rule; a same-basename file at the former location cannot substitute for the real upstream file.

Independent checks against the pinned, tracked-clean Ruby source a704b7cd95a42cc0cf5f307137bf3aac0285b915:

  • Current main reproduces the reported capi/vendor/erb_escape.c is not the tree's file failure.
  • Exact head and the current-main integration both pass: 194 headers, 10 explicitly patched headers and 21 unchanged vendored sources.
  • On the integration, modifying the vendored ERB file is rejected. In a separate source fixture, removing or modifying the real upstream file is rejected even with a correct same-basename decoy at the old path. Restoring the real file passes.
  • The integration differs from current main only in the checker and its loop note; runtime, build inputs and vendored bytes are identical. Diff whitespace checks pass.

No O2 compilation, full corpus, whole upstream suites or resource acceptance was rerun; these results establish the checker repair only. Hosted unittest-harness has an executed failure, Linux build coverage is in progress, and macOS/reference work is queued, so broad acceptance is incomplete. No merge: this PR remains draft and the recorded global hold_all_merges / new_failure_review_required conditions remain active. Historical failures and original bounds are preserved. COMMENT is used because the authenticated account owns the PR.

@284km 284km changed the title Check renamed vendored ERB source at its upstream path Fix CI integrity checks for vendored ERB and VM unit jobs Nov 25, 2026
@284km
284km marked this pull request as ready for review November 25, 2026 05:29

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 81b3001.

The checker fix (033850a) is right. capi/vendor/erb_escape.c is now compared byte for byte with its upstream path ext/erb/escape/escape.c; every other vendored file keeps the same-path rule. I ran capi/tools/headers_check.py from each tree against a clean ruby 4.0.10 source tree:

  • main's tree: capi/vendor/erb_escape.c is not the tree's file (the build-linux failure every PR currently shares).
  • this PR's tree: 194 headers, 10 of them patched (headers.patch); 21 vendored sources unchanged.

Blocker: a conflict with main in .github/workflows/ci.yml. 81b3001 adds unittest-vm to ci-timing's needs. #275 already did that on main (at the end of the list, with a test in tools/ci_timing_check.py), so the two edits conflict. Please drop 81b3001 (or merge main and take main's needs line). After that the PR no longer touches workflows, and only the checker and the loop note remain.

No runtime source changes, so the checker runs above plus the gates are enough; a full corpus run is not needed. No mere-pr-review-watch inline comments.

@284km 284km changed the title Fix CI integrity checks for vendored ERB and VM unit jobs Check renamed vendored ERB source at its upstream path Nov 25, 2026
@284km

284km commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Resolved in 36080c1 by merging current main 0cd831f and taking main's complete workflow file. The workflow is byte-for-byte identical to main; the PR diff now contains only the strict ERB source-path checker and its loop record. No workflow or runtime change remains.

The integrated head has a fresh O2 build, the 194/10/21 header/vendor check, all 18 CI-timing self-tests, all nine source gates and record_hygiene passing. The description separates those final-head checks from the earlier 81b3001 corpus/RSS controls. Following your checker-only validation request, I did not repeat the full runtime corpus for this integration.

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 36080c121905ee4661adc228eebd39374f431b52 against current main 0cd831f0087be5ed703e8d92d6450bbbf9876326, including the existing reviews and follow-up discussion. The earlier workflow conflict is fixed: the complete workflow matches main byte for byte, main is an ancestor of this head, and the only remaining changes are the strict ERB source-path checker and its loop record. No actionable findings. No tracked AGENTS.md or CLAUDE.md instructions were found.

Independent validation against tracked-clean pinned Ruby source a704b7cd95a42cc0cf5f307137bf3aac0285b915:

  • Current main still fails the ERB source check; this exact head passes with 194 headers, 10 explicitly patched headers and 21 unchanged vendored sources.
  • A source fixture with a correct same-basename decoy at the former path passes only when the real upstream source exists unchanged. Removing or modifying that real source is rejected; restoring it passes.
  • All 18 CI timing self-tests pass; diff whitespace checks pass. Runtime, vendored bytes and build inputs are unchanged relative to main.

I did not rebuild or replay the full corpus, upstream suites or resource acceptance. Those historical results remain attached to their measured heads. Hosted Linux/gem execution is still in progress and macOS/reference work is queued; the latest main CI run 45558905716 is pending and currently returns no jobs, so it provides no completed acceptance evidence. No merge: the recorded hold_all_merges and new_failure_review_required conditions remain active and cannot be cleared by this checker validation. COMMENT is used because the authenticated account owns the PR.

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 36080c1. The blocker is resolved: main is merged with main's ci-timing needs kept, so the PR's net change against main is only capi/tools/headers_check.py and the loop note. No workflow change remains.

The checker fix was verified at the last review (main's tree fails on capi/vendor/erb_escape.c against a clean ruby 4.0.10 tree; this tree passes: 194 headers, 10 patched, 21 vendored sources unchanged). git merge-tree against current main: clean. No mere-pr-review-watch inline comments.

Merging, so build-linux's shared red goes away for every PR.

@284km
284km merged commit 04e481b into main Nov 25, 2026
10 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant