Skip to content

Replace replay-based oracles and simplify numerical alignment - #440

Merged
Trinkle23897 merged 29 commits into
mainfrom
jiayi/semantic-correctness-cleanup
Oct 21, 2026
Merged

Trinkle23897 merged 29 commits into
mainfrom
jiayi/semantic-correctness-cleanup

Conversation

@Trinkle23897

@Trinkle23897 Trinkle23897 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Replace alignment paths that replayed oracle outputs or reused native transition logic with independent official computations. Use ordinary native sampling and math, and check semantic hidden state before transferring it to the oracle. Keep native determinism and unsynchronized randomization checks separate.

This follows #432 and the existing MountainCar/HalfCheetah/DMC state-transfer pattern. AGENTS.md and the new-environment guide document the validation contract. Execution plans stay local.

Types of changes

  • Bug fix
  • Documentation

Implemented Tasks

  • Jumanji: remove future-output replay and the duplicate Python renderer; check all 26 tasks against independent transitions and semantic image content. Validate sampled cells, fruit, pieces, ghost actions and MMST priorities. Fix Snake terminal/reset bugs and missing or truncated rendered numbers.
  • MyoSuite: compare all 398 tasks numerically, fixing NPC policies, observations, rewards, contacts, integrator-state synchronization and simultaneous termination/truncation. Keep upstream patches under third_party/myosuite. Share probe launcher lookup and subprocess/JSON/error handling, while retaining each caller’s mode, seed and rendering parameters. Serialize hidden-state arrays from direct model dimensions. Isolate each probe’s intermediate coverage database while preserving LCOV aggregation.
  • Native sampling and math: remove NumPy PCG64/Ziggurat, locomotion RandomState, MJLab Torch and Jumanji JAX sampling protocols, MKL/SLEEF dependencies, ARM arithmetic emulation and XLA summation-order code. Preserve distributions, temporal correlations and event timing.
  • Playground: retain independent official steps for all 29 tasks. For sensitive Linux G1/Berkeley contacts, check compiled model arrays and options before sharing the C engine; preserve MjSpec's matching Python binding/library pair. Load OP3's pinned filesystem model once for physics and rendering. Derive reward fields from the pinned oracle instead of 22 duplicated lists, merge identical contact helpers, and remove the standalone upstream C-versus-MJX diagnostic. Share the pinned factory, native validation settings, asset resolution and frame setup between tests and documentation; preserve Go1’s alignment-only overrides and share the identical Berkeley/G1/T1 initialization; remove the obsolete second OP3 render model. All task alignment and render checks remain, with an added all-29-task documentation-generator regression.
  • Rendering: share the Linux backend probe between tests and documentation, preserve pre-import setup and context-activation checks, share CGL setup, retain first-use warmup and remove duplicate per-frame draws. Initialize plane geometry at the selected camera and match offscreen dimensions to the output. Refresh Spot's derived state after reset settling and remove its special image budget. Warm up the official first CGL frame in MJLab and the shared Playground renderer.
  • Version: update package metadata and __version__ from 1.2.7 to 1.2.8 after the preceding full CI checkpoint passed.

Saved-frame and model experiments distinguish harmless roundoff from state/render defects. Numerical budgets remain scoped to the affected quantities. The subsequent consolidation preserves existing numerical/image budgets and rollout lengths. Jumanji uses its pinned Minesweeper state schema, and unused helpers/accessors are removed.

Validation

Final head 0689d2b525177a9d76f482ac6686a1ed200213b2 passed:

  • All four platform test jobs: 109/109 targets on Linux x64, Linux ARM64, macOS and Windows, plus Linux x64 coverage. The suite includes the all-29-task Playground documentation-generator check. Bazel reused valid cached results and reran affected targets.
  • All four release/wheel jobs, including bundled-runtime validation and the complete manylinux MJLab CPU-oracle comparison.
  • Lint and clang-tidy. Local Ruff/format (236 files), Mypy (181 files), and diff checks also pass.

Focused evidence for the final validation fixes:

  • With the pinned rules_python 2.3.2 collector and coverage.py 7.10.7, concurrent processes sharing the intermediate coverage database failed 16/24 invocations. Per-probe databases passed 24/24 and retained all 24 populated LCOV reports; the final full Linux coverage job also passed.
  • Hosted fixed-state CGL diagnostics reproduced incorrect startup shadows and verified stable later frames for all 29 Playground tasks under the original image budgets. The final uninstrumented test suite passed the documentation-render check on every platform.

Complete final job logs and checksums are archived locally. The task devbox and temporary diagnostic branches were removed after their evidence was saved. Version metadata is consistently 1.2.8; no package or tag was published.

Review and remaining decision

  • Review correctness, maintenance cost and opportunities to delete code.
  • Resolve the Jumanji render-content review comment.
  • Complete the final cleanup commit's platform test and release matrix.

Craftax's compact Threefry/key-sequence core remains. Retaining it or replacing it with further semantic-state validation is still an open user decision. This regular PR remains unmerged.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T09:51:31.097430Z ca83ff4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca83ff4d11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Trinkle23897
Trinkle23897 merged commit 68e5ada into main Oct 21, 2026
12 checks passed
@Trinkle23897
Trinkle23897 deleted the jiayi/semantic-correctness-cleanup branch October 21, 2026 11:33
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