Skip to content

feat: add research input manifest contract - #272

Closed
Pigbibi wants to merge 2 commits into
mainfrom
codex/pre-p3-f0-contract-recovery-20260730
Closed

feat: add research input manifest contract#272
Pigbibi wants to merge 2 commits into
mainfrom
codex/pre-p3-f0-contract-recovery-20260730

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Scope

  • implement the frozen research_input_manifest.v1 Python contract
  • add the structural Draft 2020-12 JSON Schema
  • add contract-to-test traceability and positive/negative coverage

Exact three-file change only. No F1/P3, provider, data capture, materialization, publication, consumer, broker, order, account, capital, position, leverage, cloud, deploy, or live behavior.

Evidence

  • exact base: 5a83f508552bb68115123aa378795325094a7b52
  • tests-first RED: 119 failed before implementation (missing module/schema)
  • focused: 122 passed
  • full CI-equivalent: 746 passed, 1 skipped, 3 subtests passed
  • Ruff: passed
  • compileall: Python 3.13 and 3.11 passed
  • independent prepublication audit: PASS, P1/P2=0

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi

Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Initial review request 1/1. Exact immutable head: d79e19bd644b8c3d03f307fc0d4679e66bc5d55f.

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

ℹ️ 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 thread src/quant_platform_kit/data/research_input.py Outdated
Comment thread src/quant_platform_kit/data/research_input.py Outdated
Comment thread src/quant_platform_kit/data/research_input.py
Comment thread src/quant_platform_kit/data/research_input.py Outdated
Comment thread src/quant_platform_kit/data/research_input.py Outdated
Comment thread src/quant_platform_kit/data/research_input.py
Comment thread src/quant_platform_kit/data/research_input.py Outdated
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi

Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Final review request 1/1 after the single consolidated remediation. Exact immutable head: d1e82553b68913a9cde71483cad436b59b5a4f8d. No post-final patch or third review is permitted.

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

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

exact = _Decimal(delta.days * 86_400 + delta.seconds)
fraction = match.group("fraction")
if fraction is not None:
exact += _Decimal(f"0.{fraction}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Compare timestamp fractions without Decimal rounding

When a timestamp has more fractional digits than the active decimal context can retain, adding the fraction to the epoch-second integer rounds it before comparison. With the default precision, for example, as_of = 2026-07-30T09:00:00.00000000000000000001Z and observed_at = 2026-07-30T09:00:00.00000000000000000009Z both become Decimal('1785402000.000000000000000000'), so the later observation is accepted and can leak future data. Fresh evidence against the earlier remediation is that its new Decimal addition remains context-limited despite the unrestricted \d+ fraction; compare a lossless representation or reject excess precision.

Useful? React with 👍 / 👎.

Comment on lines +122 to +124
parsed = _datetime.fromisoformat(
text[:-1] + "+00:00" if text.endswith("Z") else text
)

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 Support all permitted fractions on Python 3.10

On Python 3.10, which the package declares as supported, datetime.fromisoformat() only accepts fractional seconds with three or six digits, while this contract's regex and schema permit any non-empty digit sequence. Consequently valid timestamps such as .1Z, .12Z, or nanosecond .123456789Z are rejected on Python 3.10 but accepted on Python 3.11, making manifest validity interpreter-dependent; validate the whole-second portion separately from the unrestricted fraction.

Useful? React with 👍 / 👎.

"path": {
"type": "string",
"minLength": 1,
"pattern": "^(?!/)(?!.*//)(?!.*/$)(?!.*\\\\)(?!.*\\u0000)(?!.*(?:^|/)\\.{1,2}(?:/|$)).+$"

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 Align schema path handling with runtime validation

When a member path contains a POSIX-valid line terminator, such as data/a\nb, _member_path() accepts and canonicalizes it, but this schema pattern rejects it because . does not match line terminators. Consumers that prevalidate canonical manifests against the bundled schema will therefore reject evidence accepted by the public Python validator; either reject these characters in _member_path() or express the same accepted character set in the schema.

Useful? React with 👍 / 👎.

@Pigbibi

Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Final current-head Codex review on d1e82553b68913a9cde71483cad436b59b5a4f8d delivered 1 P1 and 2 P2 blockers after the single allowed consolidated remediation. Under the frozen F0 recovery contract and Review Policy V3, post-final patch, third review, and a second recovery/reslice are forbidden. Closing unmerged as FAILED_PARKED_REPEATED_F0; guarded merge and F1/P3 remain unauthorized.

@Pigbibi Pigbibi closed this Jul 30, 2026
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