Repository navigation
Make world observation setup readable - #10
Merged
Merged
Conversation
Author
|
Reviewed: the observation setup is laid out readably with the same checks in the same order (exports, platform, publication value, trigger range, field count, span bounds and fixed tick length, stable tick, 1024-byte world, rollback on a core refusal). No behaviour change. Merging. |
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.
World observation setup grouped validation, pointer resolution and cleanup into long lines, making the diagnostic boundary difficult to review. Expand startWorldObservation into readable blocks while preserving its validation rules and cleanup behavior.
Follow-up to the P3 review of merged romdev #8; based on browser-environment after #7, #8 and #9. Host JavaScript only: native patches and published WebAssembly payloads are unchanged.
Measurement separation is verified in the companion romdev-browser monteslu#16 regression suite. All 15 benchmark configurations execute the production BundleSession handler with actual GB/GBC/NES cores through load, frame execution, partial/coalesced replay, checkpoints, digest-only checks and restore. A guard fails if startWorldObservation is called, native observation-arm calls stay zero, and native publication/event counters stay zero. The performance page loads bundle.worker; deliberate world checks use a separate world-check worker. These guards run in tests, outside measurement timings.
Self-review: compared the revised validation expressions and error paths with the original. Native multiplayer and world-observation suites: 29/29 on the merged-core baseline. Companion library: build/typecheck and 94/94 tests, including 15 observation-disabled configurations. Dev integration: Worker
1b4eea3b-cbff-4123-a0e0-083ec35e7f23, app597bb9252f59200057bd9e960a0b3aec783491dc, library3cedc6f7d1ac0c7ba80f3567fcc6ab037a2bf2c2at/lib/romdev-browser/1.1.0-dd23c2485c/, bundle build86a58c7defbc31eef0291a8be2cdf757a3cfffba1f7898e7cfa8e0d2000ab3ff, clean core/host source2ba6b52aee3cdc477fa107c9513deccb5c6c7145. Existing room, fast-path, checkpoint, cable and benchmark stack is preserved. App build and 130/130 tests passed during normal dev deployment.External procedure (no Google login required):
node --test tests/benchmark-observation.test.mjsin romdev-browser MCP tools/list emits draft-07 tupleitemsarrays that OpenAI-compatible APIs reject (HTTP 400) monteslu/romdev#16. This is a test-only probe and is not included in timed browser measurements.Physical-phone performance acceptance remains separate and pending. No merge or production deployment.
Current follow-up dev smoke: Mac Chrome 152 and Android emulator Chrome 154 each completed 15/15 deterministic cases, one coalesced correction per case and zero hidden interruptions. Owner/operator read-back matched build
86a58c7defbc31eef0291a8be2cdf757a3cfffba1f7898e7cfa8e0d2000ab3ffand clean core/host2ba6b52aee3cdc477fa107c9513deccb5c6c7145. Chrome console errors: zero. The separate Chrome world-check page passed 9/9, confirming deliberate diagnostic observation still works. Reports: Chrome6a659ba9d5c5dd5716ea76b5bb0f71e923d62b4458bd376c09e5763decf855bd(Chrome-observation-3cedc6f), Androidf3f8c9862710a6a661be2843900d022d7e58b3a5a0508a6fd165b63fca54b1c1(Android-observation-3cedc6f). These correctness checks do not qualify physical-phone performance.