Skip to content

NRCL-104 Add read-only paper journal queries - #38

Merged
hudsonaikins merged 7 commits into
mainfrom
codex/nrcl-104-paper-query-api
Sep 11, 2026
Merged

NRCL-104 Add read-only paper journal queries#38
hudsonaikins merged 7 commits into
mainfrom
codex/nrcl-104-paper-query-api

Conversation

@hudsonaikins

@hudsonaikins hudsonaikins commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Consumers currently need Neural's SQLite schema to reopen saved paper experiments and reconstruct fair comparisons. This adds the experimental neural.paper_query.PaperJournal API for bounded history, inspection, verified source bytes, same-input strategy comparison, and separate sports-terms comparison.

Queries use read-only snapshots without reserving a writer, initializing/migrating journals or running jobs. Saved reports and content identities stay unchanged; derived totals live in each job's summary. Comparison fixes recording, model, market/outcome, quantity, cash, fees and simulation limits while allowing thresholds and risk caps to vary. Exact decimal products and retryable SQLite busy errors are preserved; incomplete fees and malformed stored results fail explicitly.

NRCL-104. NRCL-105 consumer migration follows the reviewed and merged API.

Validation at 37474320e471416e4a8551525d97fa84705d9f97:

  • Full suite: 451 passed, 6 skipped. Query regressions: 40 passed.
  • Ruff and mypy passed. Required Black command passed but discovers no Python files; the changed files passed an explicit formatting check.
  • Isolated rebuilt-wheel workflow passed: current/historical reopen, exact source bytes, same-input comparison for both synthetic venues, unequal-size and cross-venue rejection, sports terms, unchanged result hashes and journal bytes.
  • Wheel SHA-256: 25c0d18ec510025a7c0ed2ee2e852f8b04e31b2d5ec01dda3124924c8eb60fe3.

All nine final-head hosted checks passed. Exact-head Codex review reported no major issues; no unresolved threads. No release, deployment, real-data capture or live execution. User approved merge; merged as f5a5bd1.

Archive boundary: only rollback-journal databases are supported. WAL-format archives are rejected before opening SQLite so queries do not create sidecars; callers must not change journal mode or replace the file during a read. Invalid constants and error/status values reject explicitly. Recording recovery validates input independently of malformed result JSON.

@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

This comment is automatically generated by the documentation workflow.

@hudsonaikins
hudsonaikins marked this pull request as ready for review September 10, 2026 23:28

Copy link
Copy Markdown
Contributor Author

@codex review

@makeplane

makeplane Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

ℹ️ 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_query.py Outdated
Comment thread neural/paper_query.py

@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: 918beaf442

ℹ️ 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_query.py
Comment thread neural/paper_query.py Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

Review fixes are in 0a1e5fe: comparison now requires equal order quantity and returns derived totals under each job's summary, preserving the saved result and its content identity. Existing SQLite busy-error handling and regression remain intact. Focused query tests passed (24); full package checks, documentation checks/build, and isolated installed-wheel workflow completed successfully.

@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: 0a1e5fe734

ℹ️ 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_query.py Outdated
Comment thread neural/paper_query.py Outdated

Copy link
Copy Markdown
Contributor Author

@codex review

Final fixes at 3aa452f: fill events require a present valid fee; stored result values must be JSON text, rejecting malformed BLOBs explicitly. Query regressions: 26 passed. Full suite: 437 passed, 6 skipped. Ruff and mypy passed; rebuilt isolated-wheel workflow passed. Earlier quantity, identity, decimal and SQLite contention fixes remain covered.

@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: 3aa452f93e

ℹ️ 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_query.py Outdated
Comment thread neural/paper_query.py
Comment thread neural/paper_query.py Outdated
Comment thread neural/paper_query.py

Copy link
Copy Markdown
Contributor Author

@codex review

Candidate 22d8800 addresses remaining findings: strict finite JSON, valid error/status combinations, input recovery independent of output decoding, and explicit pre-open rejection of WAL archives to avoid sidecar writes. The documented journal-mode boundary requires callers not to replace the file or change mode during reads. Full suite 445 passed, 6 skipped; 34 query regressions passed; Ruff/mypy, docs/examples and rebuilt installed-wheel journey 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: 22d88006b7

ℹ️ 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_query.py Outdated
Comment thread neural/paper_query.py Outdated
Comment thread neural/paper_query.py

Copy link
Copy Markdown
Contributor Author

@codex review

3747432 addresses the latest three findings: parse_float rejects overflow, history validates result presence without loading traces, and non-fill events cannot contribute nonzero fees. Full suite 451 passed, 6 skipped; query checks 40 passed; Ruff/mypy and rebuilt installed-wheel workflow passed. Earlier review fixes remain covered. This API intentionally preserves historical reports as recorded rather than certifying/recomputing their semantic correctness, as documented.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 37474320e4

ℹ️ 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 f5a5bd1 into main Sep 11, 2026
9 checks passed
@hudsonaikins
hudsonaikins deleted the codex/nrcl-104-paper-query-api branch September 11, 2026 01:24
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