Skip to content

fix(desktop): bound exported task array-index conversion - #9139

Merged
morluto merged 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-exported-task-large-array-index
Nov 6, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-exported-task-large-array-index

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A task pointer with a 5,000-digit canonical array index is absent in REA but crashes the exported Python verifier with ValueError: Exceeds the limit (4300 digits) for integer string conversion. That aborts evaluation instead of returning the task check's verdict.

Problem and change

The shared task schema permits this pointer. The Python evaluator converted the entire token before checking the array's length. Reject an index whose decimal spelling is longer than the array length before converting it; convert remaining bounded tokens once. Canonical-index validation and ordinary lookup behavior stay unchanged. No interpreter setting or arbitrary pointer-length limit is introduced.

The regression runs both pointer lookup and actual exported value_absent checks against REA lookup semantics. It covers a 5,000-digit index on nonempty and empty arrays, valid positions including a two-digit position, ordinary out-of-range positions, and a leading-zero non-index.

Contract and scope

  • Owner: _step in the generated Python task evaluator; TypeScript semantics remain unchanged.
  • Existing local task-verification correctness fix; no new provider or target-execution authority, schema, dependency, installation, Evidence or release-metadata changes.
  • Captured bytes and task input are preserved. The existing verifier still evaluates the requested task; it now returns absence for an unrepresentable out-of-range index.
  • Related issue: none; found in source audit. Issue and open/closed PR searches for Python pointer/large-index conversion found no matching fix.

Evidence and validation

  • Executed before fix: TypeScript lookup returned none; Python 3.12 raised the integer-conversion ValueError. The focused reproduction failed.
  • After fix: node node_modules/vitest/vitest.mjs run tests/boundary/providers/desktopTaskArrayIndex.test.ts src/domain/desktop/viewPointer.test.ts — 13 passed.
  • Targeted oxlint on the evaluator and new regression — exit 0; new regression formatted with repository oxfmt.
  • Broader desktopTaskPython.test.ts parity run failed on checks 5 and 21. Reverting the index fix and rerunning reproduced exactly those same two differences. This retained local snapshot does not establish the cause of those pre-existing differences; no broad-pass claim is made.
  • Validation ran in the retained local source snapshot. This two-file patch is based on current main fe27f96720856cd07b5f1c9daf70ddd5b0d865ff; CI must verify that exact combination. No real agentenv computer or end-to-end generated bundle was run.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • Concrete existing-behavior bug and focused fix.
  • Ordinary contribution scope; additional maintainer authority decision is not applicable.
  • Current-HEAD CI has completed.

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The change appears safe to merge; no blocking issues were found.

Summary

The exported Python evaluator now rejects oversized array indices before calling int.

  • Exported task checks return a verdict for oversized array indexes.

Reviews (1) · Last reviewed commit: "fix(desktop): bound exported task array-..." · Reviewed by Greptile

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review November 6, 2026 10:50
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T10:50:43.169870Z
We couldn’t complete this review. Comment @codex review to try again.
91db326 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto
morluto merged commit ee2f5b9 into morluto:main Nov 6, 2026
47 of 48 checks passed
earakely-scale added a commit to earakely-scale/rea that referenced this pull request Nov 6, 2026
main's morluto#9139 bounds the exported verifier's array-index conversion in the
pointer code this branch moved into appTaskPythonPointer.ts. The bound is
applied there, and appTaskPython.ts keeps this branch's shared pointer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants