Skip to content

Record the unowned unit-test RED inventory before cause-specific fixes - #243

Merged
284km merged 1 commit into
mainfrom
codex-misc-unowned-red-inventory
Nov 24, 2026
Merged

284km merged 1 commit into
mainfrom
codex-misc-unowned-red-inventory

Conversation

@284km

@284km 284km commented Nov 24, 2026

Copy link
Copy Markdown
Owner

This records A1's inventory before any cause-specific fixes: 56 candidate RED cases, with the 39 Ripper/error_highlight cases reserved for A2 and the existing Time, AST, C API, and VM groups separated explicitly. Each row names the exact archived test and its initial cause group.

The source is the newest completed main run with all eight shards and a unittest-report: 45383249482, main 3e14a977. Newer completed runs lack that aggregate. The report predates the reference upgrade and used Ruby 4.0.9; the record explicitly requires fresh reproduction on current main with clean Ruby 4.0.10 before a fix or ownership decision. The table is historical evidence, not a newly measured scoreboard.

Validation:

  • sh mspec/record_hygiene.sh: passed, 342 files.
  • run_corpus.sh --both and MERE_RUBY_VM=1 run_corpus.sh: not rerun for this documentation-only inventory; no runtime or corpus changes.
  • Source gates: no implementation changed; cause-specific PRs run and report all gates.
  • Related CRuby files compared with main: no tests executed for this artifact-only inventory; the archived filenames and exact cases are listed for subsequent one-file comparisons. No full unit suite or Rails component suite was run.
  • Tight-GC, fixed-seed max RSS: not applicable to a documentation-only change. Resource reproductions require MERE_RUBY_GC_TIGHT=1, --seed=1, and process-family measurements for child-spawning tests.

No workflow, test assertion, exclusion, or resource budget is changed. The next step for every retained cause is reproduction, then a separate fix 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.

Reviewed 6d7b97f. Documentation only. No findings that block it.

  • The inventory comes from the newest complete main unittest report (run 45383249482, main 3e14a97, reference 4.0.9) and says so. Every row is marked as historical evidence to be reproduced on current main against a clean 4.0.10 before any fix. The exclusions match the ownership split (test/-ext-, YJIT/ZJIT, test_allocation, test_gc). The record holds no local paths or personal data.
  • Routing for the "transfer" rows, so the record can be followed:
    • VM, 10 (test_vm_dump, test_iseq, test_stack, test_rubyvm): the VM stream (work2026-df).
    • CAPI, 6 (cgi escape, erb html_escape extension, mkmf have_library): the C API stream. The erb case is what the pending erb/escape work (capi-erb-escape) targets.
    • AST, 1 (prism/magic_comment_test): the AST stream (work2026-0e).
    • TIME, 42 (test_time.rb): no "Time stream" exists any more; the only Time item that was owned (saved Time.new, #178) is done. Treat these 42 as yours under A1 unless the owner routes them elsewhere. First check whether they reproduce against a clean 4.0.10 at all: a 4.0.9 vs 4.0.10 or a time-zone difference would show up as many REDs in one file.
  • git merge-tree against current main: clean. No mere-pr-review-watch inline comments. Merging.

@284km

284km commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A1 attribution update for the original socket/test_addrinfo.rb test_marshal_memory_leak resource RED (20,000 loads after warmup, original 10-second budget unchanged). A separate diagnostic on exact main ee9cf5d, ordinary O2 / Mere 9dec2ff6 / mgz 661a01d8, matches clean Ruby 4.0.10 output on both engines, with MERE_RUBY_GC_TIGHT=1 and parsed --seed=1.

Real Addrinfo Marshal loads Reference seconds Main evaluator seconds Main VM seconds
1,000 0.1019 2.1929 2.2055
5,000 0.0816 9.6538 9.6758

These are single diagnostic observations including startup, not a statistical comparison or an original-test pass. Native samples are separate runs. They expose repeated deep_targets / stmt_targets / expr_pat_vars walks during Marshal decoding, identifying an AST-analysis performance component. Waiting helper-thread samples and recursive stack counts are not treated as application percentages.

AST-stream handoff: retain per-branch assignment-target metadata at parser/ISeq construction, preserving declaration timing and scope. In particular, run_if deliberately declares skipped branches in textual order (the ActiveRecord/corpus 974 regression); eagerly predeclaring all method locals can change which variable a block writes. I have recorded this measured component with the resource recheck. The complete original timeout remains open, and neither a memory leak nor elimination of other costs is claimed. Alias/Hash attribution and the separate ready-select interrupt repair remain separate work.

@284km

284km commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

A1/A2 resource disposition update, with original workloads/assertions/timeouts unchanged. The detailed earlier recheck remains in loop/2026-11-26-codex-misc-unowned-resource-recheck.md.

The seven Ripper resource selections were repeated on exact main 83bc573 and PR #365 head 3533171, both engines, tight GC and --seed=1. Ruby 4.0.10 passes Lexer 1 test / 3 assertions, ParserEvents 2 / 9 and Ripper 4 / 30. Main and candidate have the same original timeout errors (1, 2 and 4 respectively). The no_memory_leak methods stop at the first empty-input timeout; their later class/lambda resource subcases are not counted as executed. These remain resource REDs, not established leaks or claimed fixes. PR #365 now records these alongside its passing functional controls and full 1007/1007 evaluator and VM corpus sweeps.

A separate diagnostic identifies a shared Prism result-reconstruction/translation component. On the same verified main O2 binary, compare 0 and 1000 real calls, three alternating runs, MERE_RUBY_GC_TIGHT=1 and parsed --seed=1. Values below are median instruction differences divided by 1000, including each phase's normal Ruby loop/wrapper calls; they are not a disjoint/additive decomposition. The warmed-load case calls Prism.parse first to enable the existing native node-loader adapter. Cold public Prism.load has a different path and is not attributed to Ripper.parse.

Phase Reference instructions/call Main evaluator Main VM
Prism.dump 5553 780177 782720
Prism.load after native-adapter setup 77142 3343302 3334989
Prism.parse 29627 4076927 4097334
Ripper.parse 15723 5566979 5591102
Ripper.sexp 17079 5788859 5781224

Native node decoding is already in use; result construction and translation still contribute substantial shared Prism/AST/runtime work. This component is recorded for owner routing, while the Ripper functional fixes remain in their separate PRs. Startup-subtracted reference wall times are noisy under load, so no wall-time claim is made from this diagnostic.

Other dispositions:

  • PRs Preserve ready IO.select blocking interrupt boundaries #366 and Retain pending Thread interrupts and later kill requests #367 are merged; their detached integration passes the unchanged IO select resource test on both engines (50000 interrupts, original 60-second limit, 1 test / 3 assertions).
  • PR Preserve visibility and metadata for self aliases #372 fixes self-alias visibility and redundant metadata writes, but the original complete Alias resource workload still times out on both engines. It remains open.
  • The Addrinfo AST-analysis component and textual local-declaration constraint are documented in the earlier comment on this PR.
  • The concrete TracePoint mismatch needs the real Ruby GC.start wrapper/source frame at internal:gc; Mere currently executes a native builtin. This belongs with the GC/runtime owner. The three separate resource timeouts are not assigned to that same cause.
  • ruby/test_bignum.rb test_interrupt_during_to_s executes zero reference assertions because the reference's actual Integer::GMP_VERSION causes an early return. Mere's decimal representation finishes to_s before Thread#raise. This representation-dependent interrupt case is recorded for the native Bignum/C API owner; it is not an exercised reference comparison.

A separate Hash snapshot candidate passes the unchanged 676-key, 500000-iteration dup/replace resource case on both engines (1 test / 3 assertions, original 10-second budget). Its complete corpus acceptance is queued, and the code, completed records and final results will be published together.

@284km

284km commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

One additional Alias component for the stage10/runtime owner: PR #321's method-record validity token changes with every method-table write, and mro_bump_class uses the global MRO epoch for named owners. The original named-class definition/alias/removal loop therefore repeatedly invalidates those shared proofs. See m_state.mere around mro_bump_class and the mrec record comment, and main.mere mrec_get on exact main 83bc573.

The existing native samples also show method lookup and metadata copying. This identifies a shared cache/record component, not a complete attribution of the original timeout or evidence of a leak. PR #372 is merged for the self-alias correctness/redundant-copy fix; the unchanged original Alias resource test remains explicitly open, with the original budget and assertions preserved.

@284km

284km commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

The A1 Hash copy-storage component is now ready in #376, exact head 3ee89e031f6fb66e511696df1cf61efbf1d2a4e8. The unchanged original ruby/test_hash.rb resource selection passes 1 test / 3 assertions on both engines, with 676 keys, 10,000 warmup dups, 500,000 dup/replace operations and the original 10-second budget. Matching main 410c2314 times out on both engines. Fresh full corpus retries pass 995/995 on evaluator and VM, hash index ON/OFF; source gates and completed record hygiene pass. The PR includes tight-GC, fixed-seed RSS and three alternating cost pairs.

One separate existing Hash read-door difference remains recorded, rather than being claimed fixed by the copy change:

key = [:before]
source = {key => :stored}
copy = source.dup
key << :after
p [source[key], copy[key]]
source.rehash
p [source[key], copy[key]]

Ruby 4.0.10 prints [nil, nil], then [:stored, nil]. Main and candidate both match with indexing enabled, on both engines. With MERE_RUBY_NO_HASH_INDEX=1, both main and candidate print [:stored, :stored] twice. The initial two full attempts exposed this existing difference and are retained as failures. Corpus 1137 now explicitly rehashes both owners before testing independent writes; the original reproduction, eight baseline/candidate configurations and scope boundary are recorded in the loop note and PR description. No original upstream test or budget was changed.

This read-door/store-digest gap is separate from the large-copy resource cause. The other previously routed Alias, Ripper/Prism, GC/TracePoint, Addrinfo and Bignum components retain their recorded open status; #376 is not a claim that the whole RED inventory is resolved.

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