Skip to content

[codex] science-grade GRRT validation contracts - #1

Merged
Protonmatter merged 2 commits into
mainfrom
codex/science-grade-grrt-validation
Jul 24, 2026
Merged

[codex] science-grade GRRT validation contracts#1
Protonmatter merged 2 commits into
mainfrom
codex/science-grade-grrt-validation

Conversation

@Protonmatter

Copy link
Copy Markdown
Owner

Summary

This PR redirects the simulator toward a validated GRRT research-platform contract while preserving the existing Python reference and accelerator layering.

Changes include:

  • adds explicit educational_proxy versus validated unpolarized transfer mode
  • replaces coordinate-basis magnetic/pitch-angle shortcuts with Kerr metric and fluid-frame invariant helpers
  • routes coefficient bricks and polarized transfer through the shared metric-aware plasma-frame helper
  • updates WebGPU and static CUDA/Metal/HIP/OpenCL Stokes kernel assets to derive launch state/conserved momenta through ZAMO camera launch instead of fixed photon constants
  • adds physics/kernel contract tests and validation docs/roadmap

Validation

  • python -m pytest -q tests/test_synchrotron_polarized_transfer.py tests/test_radiative_transfer.py tests/test_native_kernel_assets.py tests/test_kerr.py
  • python -m compileall blackhole_sim
  • python -m pytest -q
  • cargo fmt --check --manifest-path native/core/Cargo.toml
  • cargo test --manifest-path native/core/Cargo.toml
  • python -m blackhole_sim.accelerator_cli doctor --json --fail-on-emulation
  • python -m blackhole_sim.benchmark_cli --json --nr 3 --ntheta 3 --nphi 4 --points 7 --iterations 1
  • python -m blackhole_sim.accelerated_cli --width 32 --height 18 --max-steps 64 --output out\science_redirection_smoke.npz
  • local Codex skill validation with quick_validate.py for all seven installed science skills

Not Claimed

  • Direct browser WebGPU readback after the shader change was not rerun.
  • Concrete Illinois v3 selected-dump checksum and ipole baseline are still pending.
  • CUDA/Metal/HIP/OpenCL vendor SDK compilation was not run; those files remain static source assets.

@Protonmatter
Protonmatter marked this pull request as ready for review July 24, 2026 01:02
@Protonmatter Protonmatter self-assigned this Jul 24, 2026
@Protonmatter
Protonmatter merged commit c8e6277 into main Jul 24, 2026
18 checks passed

@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: b6ec9f3d28

ℹ️ 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".

Comment on lines +5 to +7
push:
tags:
- "v*"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep release artifacts behind manual dispatch

GitHub documents the push.tags filter as running the workflow when matching tags are pushed, so this new v* trigger turns every version-tag push into an artifact-delivery run that builds and uploads Python/native wheels even when no release was explicitly requested. The repository policy says .github/workflows/ is CI-only and must not publish releases without an explicit request, so this should be limited to workflow_dispatch until release work is intentionally requested.

Useful? React with 👍 / 👎.

b_con = np.asarray(sample.b_con, dtype=float)
if spin_a is not None and sample.valid:
try:
g_cov = kerr_metric_covariant(float(sample.r), float(sample.theta), float(spin_a))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Catch singular metric divisions in field fallback

For snapshots whose radial grid includes the horizon (r = r_+) or samples that land exactly there, kerr_metric_covariant divides by Delta = 0 before this helper can fall back to the Euclidean norm, and ZeroDivisionError is not caught by the new exception list. That makes coefficient-brick precompute and polarized transfer abort on a single horizon cell even though this path is meant to have a compatibility fallback; guard the horizon or include this exception before using the metric result.

Useful? React with 👍 / 👎.

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