Skip to content

fix(tools): repair neutral read-only argument shapes (AC17) - #294

Merged
lg2m merged 7 commits into
docs/eng-1036-reliability-consolidationfrom
fix/eng-872-ac17-tolerant-arguments
Oct 14, 2026
Merged

lg2m merged 7 commits into
docs/eng-1036-reliability-consolidationfrom
fix/eng-872-ac17-tolerant-arguments

Conversation

@lg2m

@lg2m lg2m commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Read-only calls with stringified array arguments or neutral workspace/pagination hints previously failed strict decoding. AC17 repairs these observed shapes and records deterministic notes, allowing the call to execute once while retaining authority, containment and output bounds.

Spec: autonomous-core AC17 · Linear: ENG-872
Stack: depends on consolidation PR #291; this PR targets that branch.

What changed

  • Keep the strict typed decoder as the valid-call path. After a data-shape error, repair only stringified string arrays for search include/exclude and read ranges, cwd:"." on read/tree/search, search offset:0, and boolean read_file.include_ignored.
  • Reject duplicate keys, non-neutral hints, other unknown fields, malformed authority fields, path escapes and existing count limits. Existing context clamping remains; no new integer clamp without an observed call.
  • Persist deterministic notes with the result. Keep execution-error flags while adding their notes. Carry complete read-side text and original per-path bounds to dispatch, then mask/bound once after notes are added. Notes use a separate line when the resulting search header would exceed its 512-byte pruning cap or a path fills the display line. Preserve complete spill content, digest, omission metadata and file-state updates.
  • Amend tools design and the autonomous-core ledger.

Verification

  • cargo test --workspace -- --test-threads=4: 2,254 passed, 0 failed, 14 ignored (one nested embedding child invocation excluded).
  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo build --workspace and git diff --check passed on the review-fix source.
  • Ten focused repair fixtures cover unchanged valid results/hashes, refusal bounds, complete spill content/cursor integrity, actual two-page search, long-path notes, execution-error notes, original line-clipping counts and pruning-safe search headers.
  • Session regression verifies one execution/settlement and identical note-bearing persisted snapshot output.
  • Independent read-only review: Approve.

Measurements

cargo bench -p qq-core --bench tool_dispatch, identical 1,000-iteration release fixtures, 30 alternating A/B pairs and 30 same-binary A/A pairs.

  • Median baseline → candidate: 62,924.5 → 65,246.5 ns (+3.7%).
  • Same-binary control: 65,893.5 → 73,559 ns (+11.6%).
  • Candidate difference is within observed same-binary variation; high I/O makes attribution inconclusive. No quiet-host or tail qualification, performance waiver or speedup claimed. I/O some avg10 54.88% before / 39.27% after recording. Raw logs remain untracked under target/qq-perf/ac17-2026-10-13/.

Compatibility and remaining work

Protocol, descriptor and store schema are unchanged. Valid calls add no parse pass or repair formatting. Deep-path search already emits cursors beyond its existing 512-byte decoding cap; the spill fixture verifies preservation of those original bytes, and the normal-path fixture proves usable pagination. That separate baseline limitation is not fixed here.

This completes the AC17 source slice, not the whole autonomous-core plan. Remaining recovery, goal, embedding, retention, performance and live-evidence gates remain tracked in its ledger.

lg2m added 3 commits October 13, 2026 14:09
AC17 / ENG-872: two read-side behavior fixtures fail under strict decoding; authority, duplicate-key and bounds refusals remain passing. Pre-change tool_dispatch baseline captured before code edits.
AC17 (ENG-872): retain strict valid-call decoding and authority/count bounds. Note repaired string arrays and neutral pagination/workspace hints durably; preserve complete spill content, hashes and cursor bytes.
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T21:57:42.230227Z f3b7637 Manual request
ℹ️ 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 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: ff4fc2d80e

ℹ️ 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 crates/qq-core/src/tools.rs Resolved
Comment thread crates/qq-core/src/tools/dispatch.rs Resolved
Comment thread crates/qq-core/src/tools/dispatch.rs Resolved
Comment thread crates/qq-core/src/tools/dispatch.rs Resolved
lg2m added 3 commits October 13, 2026 14:44
Address all four AC17 Codex findings: note observed boolean read ignore flags, retain notes and error status on execution failure, bound complete output once, and keep search headers within the pruning cap. Preserve each existing success/error path bound and move UI/file state without cloning.

lg2m commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

All four findings are fixed in 1191d3d, with regression-first reproductions in c21d495. Ten focused repairs plus the strengthened durable-session regression pass; final workspace checks pass (2,254 tests / 0 failures). The opening description and ledger reflect the latest source and measured dispatch/control variation. Please review the updated head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: f3b7637617

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

@lg2m
lg2m added this pull request to stack #300 October 14, 2026 03:18
@lg2m
lg2m merged commit 7de994b into main Oct 14, 2026
4 checks passed
@lg2m
lg2m deleted the fix/eng-872-ac17-tolerant-arguments branch October 14, 2026 03:34
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