Skip to content

fix(desktop): preserve own JSON keys in task grading - #10331

Merged
kaoru0822-kitauji merged 4 commits into
mainfrom
fix/10330-witness-state-keys-c6-01a1d00b
Nov 13, 2026
Merged

kaoru0822-kitauji merged 4 commits into
mainfrom
fix/10330-witness-state-keys-c6-01a1d00b

Conversation

@kaoru0822-kitauji

@kaoru0822-kitauji kaoru0822-kitauji commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #10330. Desktop task grading discarded own JSON members named __proto__ at two admission boundaries:

  • A present state file could be reported absent, incorrectly passing file_absent; malformed views under that path were silently ignored.
  • A row predicate {id:1,"__proto__":"wanted"} became {id:1}, so a nonmatching row could pass row_present. A predicate containing only that column was rejected as empty.

Use the existing jsonRecordSchema for state files and row conditions. Normalize optional file errors at their owner and remove the redundant downstream projection. Exact keys, nested values, column validation and the nonempty-predicate rule are preserved. The evaluator, draft producer and exported Python verifier already iterate the owned entries; no downstream repair or new abstraction is needed.

Verification

Executed on macOS arm64 with Node 24.22.1/npm 11.16.0, after merging main bbe2bcc979:

  • State-key baseline: 6 failed, 42 passed on the original affected base. Row-condition baseline: 4 failed, 30 passed on the updated branch before its condition-parser fix. Ordinary/constructor controls work.
  • Two focused runs: 216 passed across 12 files. Coverage includes task parsing/grading/drafting, state admission, production MCP registration with an HTTP computer fixture, all advertised MCP schemas, generated Python verifier behavior, witness records/bundles, secrets and JSON values.
  • npm run check — passed; typed lint: 0 errors, 4,987 advisory warnings.
  • npm run docs:check — passed, including 9 documentation consistency tests.
  • npm run verify:test-discovery — all 3,507 files discovered exactly once.
  • npm run check:fast and git diff --check — passed.

The first broader run selected Apple's Python 3.9 and had nine verifier failures because that interpreter lacks BaseException.add_note. Repeating it with the existing Python 3.15.2 passed all 174 tests in that run. The additional 42-test run also passed.

Hosted CI on 23d4ecc977fe29e4a7c73e80a917b8ff9ec69b2f passed, including all four required checks, source tests and all eight built-test shards. The computer and protocol are source-owned stand-ins; installed AgentEnv, a real desktop application, other hosts and natural special-name prevalence remain unverified. No performance claim is made.

Scope and coordination

Ordinary correctness fix within existing JSON admission contracts; no new authority, provider, execution, setup or advertised schema. Extra wire metadata remains accepted. The sibling audit groups both confirmed losses in this PR. The latest inventory of 874 open PRs has no competing condition-parser change; #9292 adds an unrelated output-admission test in the shared MCP test file. No related cleanup remains in these owners.

Author readiness

Human owner: @kaoru0822-kitauji. This author is exempt from the declaration under CONTRIBUTING.md; no human review is attested here.

  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T10:26:57.448508Z 23d4ecc New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

This PR preserves own JSON keys such as __proto__ in desktop task witnesses and row conditions.

  • Task checks find files named __proto__ in app state.
  • Row checks keep conditions on special column names.

No new actionable issues were found. The previous unnumbered finding is fixed: both failure guards now throw the parser's actual error. Tests were not rerun during this review. The live supersession check was blocked by missing GitHub authentication; no replacement PR was established.

Reviews (3) · Last reviewed commit: "fix(desktop): retain own column keys in ..." · Reviewed by Greptile

Comment thread src/domain/desktop/buildWitness.test.ts Resolved
@kaoru0822-kitauji kaoru0822-kitauji changed the title fix(desktop): preserve own state keys in task witnesses fix(desktop): preserve own JSON keys in task grading Nov 13, 2026
@kaoru0822-kitauji
kaoru0822-kitauji merged commit cd96c5e into main Nov 13, 2026
52 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the fix/10330-witness-state-keys-c6-01a1d00b branch November 13, 2026 14:07
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.

[Bug] Build-task witness drops a present __proto__ state file and passes its absence check

1 participant