Skip to content

ci: install jsonschema for manifest contract tests - #277

Merged
Pigbibi merged 2 commits into
mainfrom
codex/pre-p3-f0-semantics-v3-implementation-20260731
Jul 31, 2026
Merged

ci: install jsonschema for manifest contract tests#277
Pigbibi merged 2 commits into
mainfrom
codex/pre-p3-f0-semantics-v3-implementation-20260731

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds jsonschema only to the CI test install list. The retained F0 product files are unchanged.

Pigbibi and others added 2 commits July 31, 2026 10:01
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 8ba8276 into main Jul 31, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/pre-p3-f0-semantics-v3-implementation-20260731 branch July 31, 2026 02:26

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

ℹ️ 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 +186 to +187
if timezone in {"Factory", "posixrules"}:
_invalid()

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 Reject the host-dependent localtime timezone

When a manifest uses calendar.timezone: "localtime", ZoneInfo resolves it successfully on common systems, but the zone is determined by that machine's local configuration. The current deny-list therefore accepts evidence whose meaning can change across hosts while its canonical bytes and digest remain identical, undermining research reproducibility; reject localtime as well or restrict this field to stable IANA zone identifiers.

Useful? React with 👍 / 👎.

if not isinstance(parsed, dict):
_invalid()
return validate_research_input_manifest(parsed)
except (InvalidResearchInputEvidence, UnicodeDecodeError, TypeError, ValueError, json.JSONDecodeError):

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 Normalize recursion failures from deeply nested JSON

When an untrusted payload contains roughly 1,000 nested arrays or objects, json.loads raises RecursionError, which is not covered by this exception handler. read_research_input_manifest_json therefore leaks an unexpected exception instead of the documented InvalidResearchInputEvidence, so callers that rely on the public error type can be terminated by malformed input; reject excessive nesting or translate RecursionError here.

Useful? React with 👍 / 👎.

Comment on lines +108 to +109
numerator = int(fraction[1:]) if fraction else 0
denominator = 10 ** (len(fraction) - 1) if fraction else 1

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 Bound timestamp fractions before constructing big integers

On supported Python 3.10 runtimes, or newer runtimes with the integer digit limit disabled, an untrusted timestamp can contain an arbitrarily long fractional part because the regex and schema impose no maximum. Converting that fraction and constructing 10 ** digits consumes superlinear CPU and large memory before the manifest can be rejected or compared, allowing a moderately large payload to stall validation; cap fractional precision consistently in the schema and validator or compare bounded strings without constructing huge integers.

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