Repository navigation
Ignore empty native candidates in boxed return freshness - #8419
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No actionable issue was identified in the boxed String freshness change; it is ready to merge after normal checks. Security Architecture Review
Pre-merge checks |
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Singleton accessor publication is not fully represented in the sharing holder graph. Replacing the generic container effects could lose an alias returned directly by a class method or indirectly through an instance arm. Keep the previous effects whenever the program declares singleton readers or writers; explicit class-method writes remain eligible. Add direct and transitive identity regressions and an explicit-write control.
…/upstream-contributions/pg-correctness-20261005/boxed-freshness-20261010/spinel-fix into fix/native-placeholder-freshness
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
What this changes
Loading a native class such as
StringIOadds empty rows to the polymorphic candidate index. Freshness analysis treats those placeholders as possiblemethod_missingimplementations and native method arms, so an otherwise fresh user-method result can be refused under--share-strings.Skip a native candidate only when it has no Ruby method, inherited reader, or native binding. Use the same predicate for the dynamic-hook scan and called-name scan, including the boxed String proof. Real native methods and
method_missinghooks remain conservative.Generic tests load StringIO and mutate a fresh String returned by a boxed user call, and retain the refusals for inherited
method_missingimplementations and native-classmethod_missingreaders.Validation
Stacked on #8420, including its exact attested commit
d02b51ec9fb1. The eight-path native-specific patch is byte-identical to the previously reviewed patch; the singleton-accessor guard remains ahead of native filtering.Full
make -j6 gate CC=gcc-12 GATE_CACHE=1 TEST_JOBS= BENCH_PJOBS=1passed on Linux x86_64, merged with master4412e698feb4. Headc0d5945467cccarries the verified Gate trailer for tested tree9145b082f74d; attestation changed no source or compiler bytes.Seven focused sharing-verifier programs on this combined tree pass with zero diagnostics, failures, or channel gaps. Inherited
method_missingand reader refusal fixtures pass in the full gate; the real native borrowed-binding control remains conservative.Optcarrot generated C is byte-identical to master4412 (616,836 bytes; SHA-256
c05a6c722851314f695b908536097947f324d9c430fb81d5749b42d71b4adefa); checksum 59662 and all six scale ratios match.Both listed shared-corpus failures produce exactly the clean baseline's Discussion: share a mutable String by default, and copy only where the analysis proves no one else sees the change #6765 refusals. No known-failure entry was changed.
The separate verifier is not globally green: five known affected cases match the clean master4412 log after only temporary-path normalization. Both exit 1 with two unratcheted exception-channel diagnostics, eight stale entries, one net_http_zlib generated-C parity failure, and 10 channel gaps. No ratchet entry was added or waived; unobserved channels are not proven safe.
Final-head hosted clang CI and Gate verification pass for
c0d5945467cc. CodeRabbit completed a full review of that exact head with no actionable comments and zero review threads. Other platform lanes are skipped by the PR workflow. Its generic docstring-coverage warning remains disclosed; it is not represented as passing.New tests have
.expectedfiles matching CRuby 4.0 with frozen string literals; refusal tests carry# spinel: not-crubyNo added test uses values past 2^31
Full
make gate, Optcarrot C, and scale comparison against the same masterDepends on: Compose boxed String builtin freshness with user returns #8420