Skip to content

NRCL-100 Replay sports strategies across synthetic venue recordings - #35

Merged
hudsonaikins merged 10 commits into
mainfrom
codex/nrcl-100-polymarket-paper
Sep 10, 2026
Merged

NRCL-100 Replay sports strategies across synthetic venue recordings#35
hudsonaikins merged 10 commits into
mainfrom
codex/nrcl-100-polymarket-paper

Conversation

@hudsonaikins

@hudsonaikins hudsonaikins commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Run one price-rule strategy through the existing simulator and durable queue on synthetic Kalshi and Polymarket US sports books. The additive neural-book/1 boundary preserves exact decimal depth, native IDs, sports terms, source/observation timestamps, and explicit assumed fees.

Normalized sports recordings support the named YES team-wins proposition only; NO headers and mismatched strategies fail explicitly. Legacy Kalshi input retains YES/NO support. Malformed, missing, one-sided, crossed, stale, future-dated, out-of-sequence, or mismatched books fail closed. Header validation prevents path replacement from mixing report identity with different rows; source-dated fill books must be strictly newer than the pending intent.

The paper model is now neural-paper/2. Model-qualified identities prevent upgraded jobs from reusing old results. Completed v1 jobs remain inspectable; queued v1 jobs fail explicitly with resubmit guidance. Report identities change with the model version.

Synthetic fixtures produce identical decisions and multi-level fills across venues. Actual compatibility remains unknown until two attached sports contracts are compared. No collector, live execution, market-data retention permission, certified fee schedule, or deployment is introduced.

Depends on #33 (NRCL-99), through a7ee8f08f017e0ff3a31bdfe7b4d163ce0d8d64c. Base remains main so existing PR checks run. Merge #33 first. Merge requires user approval.

Validation for beec8dfcaf4b6835ee5c31bf7ae8c43514dad27a:

  • 411 tests passed, 6 skipped; includes cross-venue depth replay, queue/restart, atomic path replacement, delayed-source fills, model upgrades, and unsupported-side rejection.
  • Ruff, mypy (80 files), explicit changed-file Black, docs/example validators, Fumadocs typecheck/build, and diff checks passed.
  • Repository-wide Black reports no files because of its existing include configuration; changed Python files were checked explicitly.
  • Hosted CI and official review rerun on this candidate; current status tracked by GitHub.

Plane: NRCL-100.

@makeplane

makeplane Bot commented Sep 10, 2026

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor Author

@codex review

Review ce7c0ef. NRCL-100 changes are after the contract commit from #33; focus on malformed/stale/depth/venue rejection, unchanged legacy results, deterministic queue/restart behavior and synthetic-only boundary.

@github-actions

Copy link
Copy Markdown

📚 Documentation Status

✅ Code changes detected

  • Docstring coverage checked
  • API documentation validation completed
    ✅ Documentation changes detected
  • Documentation structure validated
  • Links checked for broken references
    ✅ Example changes detected
  • Example documentation validated
  • Code syntax verified

This comment is automatically generated by the documentation workflow.

Copy link
Copy Markdown
Contributor Author

@codex review

Review ee34754. Incorporated #33's fixture-identity and wire-source validation repairs through ded734c. NRCL-100 API/fixtures unchanged; full local suite now 397 passed, 6 skipped. Check the exact current head for remaining actionable recording/simulation/queue 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: ee3475468d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread neural/recordings.py Outdated
Comment thread neural/recordings.py

Copy link
Copy Markdown
Contributor Author

@codex review

Review exact head 2b4722a. Both previous recording findings are fixed with regressions: report/iterator metadata binding across atomic replacement, and cancellation of source-dated liquidity at/before intent creation. Includes final #33 authority validation repair391b7f5. Local suite407passed/6skipped; all required local gates pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 2b4722ad8c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Contributor Author

@codex review

Review exact head c735106. Only change since2b4722ad is merging #33's IPv6 zone-ID source rejection and regressions througha7ee8f08. NRCL-100's already-addressed replay identity and source-causality fixes remain unchanged. Full local suite409passed/6skipped; all required local gates pass.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread neural/paper.py
Comment thread neural/recordings.py
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

Neural/neural/paper.py

Lines 106 to 107 in c735106

elif update.source_at is not None and update.source_at <= created:
row["reason"] = "source_not_after_intent"

P1 Badge Bump the model version for the new replay semantics

When an existing PaperJobs database contains a completed or queued legacy recording whose next book has source_at <= created, this branch changes that job from a fill to a cancellation while PAPER_MODEL remains neural-paper/1. Because the model string participates in the job ID and submit() ignores ID conflicts, an identical post-upgrade submission can silently return the pre-upgrade result, while a previously queued copy executes with the new result under the same identity. Version the paper model when introducing this behavioral change so durable results remain reproducible across upgrades.


if (market.venue, market.market_id) != (header["venue"], header["market_id"]):
raise ValueError("sports market does not match recording venue/market")

P1 Badge Bind the header side to the attached sports proposition

When a normalized recording declares outcome: "no" but attaches the same SportsMarket used for the corresponding YES proposition, this check accepts it because it binds only venue and market ID. The simulator then trades the NO book while reporting the attached YES-side outcome_team_id; following the documented comparison flow can consequently label a YES report and its opposite NO report compatible because compare_sports_markets() never receives the header side. Include an explicit side in the sports identity or otherwise validate that the attached outcome ID/team represents the header's selected side.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Contributor Author

@codex review

Review exact head beec8df. Both P1 findings are fixed: model v2 separates durable upgrade identities and rejects queued v1 execution; normalized sports books now explicitly support the named YES team-wins side only, preserving legacy Kalshi YES/NO. Focused upgrade and side-rejection regressions pass. Full local suite: 411 passed, 6 skipped; all required gates pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: beec8dfcaf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@hudsonaikins
hudsonaikins merged commit c770569 into main Sep 10, 2026
9 checks passed
@hudsonaikins
hudsonaikins deleted the codex/nrcl-100-polymarket-paper branch September 10, 2026 20:48
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