Skip to content

Port v0.57.0: detect whitespace turn_context candidates - #488

Merged
Finesssee merged 2 commits into
port/upstream-0.57.0from
port/micro-0.57.0-codex-whitespace
Sep 13, 2026
Merged

Finesssee merged 2 commits into
port/upstream-0.57.0from
port/micro-0.57.0-codex-whitespace

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Problem

Upstream v0.57.0 commit 2188c90 accepts valid Codex JSONL event records with legal whitespace. The Windows port's candidate filter recognized compact turn_context records but could discard whitespace-formatted records before the existing JSON parser saw them.

Change

  • Admit generic turn_context candidate text in the existing Codex candidate gate.
  • Add focused parity coverage for compact versus whitespace/tab-spaced event_msg and turn_context records.
  • Keep unrelated response records rejected.

This is the first isolated micro-PR on the v0.57.0 integration branch. It does not change parsing, cache/checkpoint behavior, scan ordering, recovery, versions, scripts, or documentation.

Validation

  • git diff --check passed.
  • cargo fmt --all -- --check passed.
  • Focused Cargo test and cargo check --tests were attempted but could not execute because this host has no cl.exe; PATH resolves Git's usr/bin/link.exe, which fails the MSVC linker invocation with link: extra operand.
  • The staged and committed diff contains only:
    • rust/src/core/jsonl_scanner/codex/helpers.rs
    • rust/src/core/jsonl_scanner/tests.rs

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 077b8e06-16b9-484c-884b-3397b168144c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tlq5l

tlq5l commented Sep 13, 2026

Copy link
Copy Markdown

Thermo-nuclear code-quality review (Oracle-coordinated read-only swarm)

Verdict: PASS for merge readiness; no merge-blocking maintainability issue was found in this PR.

Reviewed the parser candidate change and its compact-versus-spaced JSON regression coverage under the requested thermo rubric. One non-blocking concern is recorded at rust/src/core/jsonl_scanner/codex/helpers.rs:326: the raw substring check for "turn_context" broadens candidate detection and can send unrelated lines through the fallback parser. In the stacked path this also exposes a parser-routing edge case for a type-less usage row whose model text contains that token; that stack-level case is being fixed before merge.

No new large-file, wrapper, orchestration, type-boundary, or decomposition regression was found. The finding is intentionally non-blocking for this isolated PR, but the related data-loss edge case blocks the dependent stack until repaired.

@tlq5l

tlq5l commented Sep 13, 2026

Copy link
Copy Markdown

Thermo re-review correction — BLOCKED.

Oracle’s final adjudication confirms the merge-blocking parser regression is introduced by this PR. The broad raw substring check at rust/src/core/jsonl_scanner/codex/helpers.rs:326 makes parser.rs:73-88 treat event candidacy and bare usage candidacy as mutually exclusive. A supported type-less usage row whose model is "turn_context" can therefore be silently dropped. Remedy: keep bare usage eligibility independent of the event fast-path and add the regression case. This is the base fix that #489 and #490 depend on.

@tlq5l

tlq5l commented Sep 13, 2026

Copy link
Copy Markdown

Thermo follow-up: blocker fixed and validated.

Oracle's final thermo adjudication had blocked this PR because event-marker detection could suppress a valid type-less bare usage record when the model value contained turn_context.

Commit dccacc6aa makes bare "usage" candidacy independent of the event fast-path, adds the adversarial turn_context case, and fixes the test-only helper import needed by the existing #488 tests.

Validation: cargo fmt --all -- --check; cargo test --manifest-path rust/Cargo.toml process_line_ (2/2); and cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings all pass.

Oracle post-fix verdict: PASS. This PR remains the first merge in the stacked parser sequence.

@Finesssee
Finesssee merged commit 6b65eea into port/upstream-0.57.0 Sep 13, 2026
1 check passed
@Finesssee Finesssee mentioned this pull request Sep 15, 2026
junglesub-bot Bot pushed a commit to junglesub/Win-CodexBar that referenced this pull request Oct 4, 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.

2 participants