Optimize dropped-item section candidates#7
Merged
Conversation
Close shutdown and evidence-provenance gaps so formal runtime results and Paper compatibility checks are merge-ready.
Pass the pinned Paper version, channel, and build through packet runs so strengthened manifest validation accepts only the intended runtime.
Align the specialized gate with the documented 5% effect-size rule while retaining confidence, MSPT, provenance, population, and candidate-work safeguards.
Arbousier1
marked this pull request as ready for review
July 20, 2026 07:24
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
SourceOwnedSectionCandidatesrollback switchIV_PERFWhy
The previous dropped-label path rebuilt global item/viewer structures every refresh. With per-viewer visibility enabled this scales toward players times all items and allocates transient lists, locations, spatial maps, and components even when no audience or pending visibility work exists.
Impact
The new path uses Paper's authoritative entity-section ownership and only processes items around eligible viewers. Visual distance, 16-block retention hysteresis, cramping, formatting, mount behavior, update cadence, and token-bucket behavior remain unchanged. The new candidate source remains behind
SourceOwnedSectionCandidates; existing configurations are not migrated automatically.Validation
Current head:
8b183d196631efeb3542365eac75383489f6d4d7../gradlew check shadowJar --no-daemon --no-build-cache --rerun-taskspassed without deleting retained evidencegit diff --checkpassedFormal dropped-item runtime gate
The canonical 12-run restart-isolated ABBA passed on Paper 26.1.2 build 74 with the following fixed workload:
ABBA,BAAB,ABBAdroppedItemMsThe gate also verified all 12 runs retained exactly 2048 tracked items and 128 labels, B performed zero full scans, A exercised full scans, and the treatment/provenance remained isolated.
Gate-policy correction
docs/phase2-performance-validation.mdhas always defined the project-wide optimization gate as at least 5% paired-median improvement with a bootstrap 95% CI that does not cross ratio 1.0. The specialized evaluator had later introduced an unsupported 50% whole-pass threshold even thoughdroppedItemMsincludes both candidate sourcing and the unchanged Paper TextDisplay refresh work. Commit8b183d1aligns the evaluator with the existing specification while retaining the stricter provenance, population, MSPT, zero-full-scan, and <=10% candidate-work safeguards. The previous clean evidence was not discarded; it was replayed locally against the corrected policy before the new independent formal run above.Allocation and native-client evidence disposition
Allocation
The four-run
A-B-B-Aasync-profiler allocation diagnostic passed evidence validation with the same production plugin artifact SHA-256 (98ff2d50927710f2ed0b1d6e29448ba57b5a6dc38dd7c17a772227d58d0f456b) used by the final clean gate. It retained the 2048/128 population window and produced four allocation profiles with recorded SHA-256 values and sizes plus the campaign manifest. This evidence is formally classified as attribution-only: profiler-overhead measurements cannot masquerade as clean effect-size evidence, and no allocation delta is used to make the runtime gate green.The only changes after that diagnostic are the validation document and evaluator policy; production bytecode is unchanged.
Native-client frames
No new native-client FPS result is claimed for this factor. The treatment changes only the server-side source used to discover candidate Item entities. A and B use the same plugin artifact and preserve the same 128 rendered TextDisplays, formatting, mount behavior, view range, update cadence, visibility policy, and protocol-facing behavior; the formal gate explicitly verifies equal rendered-label populations in every run. Therefore a separate client-frame effect-size comparison is not applicable to this source-selection-only treatment rather than missing evidence.
Existing client frame evidence for the unrelated packet-only static-item factor is deliberately not reused here. A future change that alters rendered label count, content, motion, metadata, or client protocol behavior must reopen the native-client frame gate.
Paper 26.2 compatibility
Paper 26.2 removed the public NMS
EntityType.TEXT_DISPLAYstatic constant. The packet-only bridge now resolves Bukkit'sTEXT_DISPLAYthrough Paper'sCraftEntityType.bukkitToMinecraftconverter, which is present on both Paper 26.1.2-74 and 26.2-62. The regression fixture deliberately omits the old NMS field.Performance evidence is intentionally collected on one pinned runtime. Paper 26.2 remains covered by compilation and real startup/shutdown compatibility smoke, but is not part of the formal A/B matrix. The workflow and runtime harness fix the benchmark version to Paper 26.1.2 and reject other values before preparation or server startup.
Merge status
All current-head checks and the dedicated formal runtime gate pass. The PR is ready for review and merge; this work does not merge it.