Skip to content

fix(tools): hint past leading cd and correct placeholder handles (T20) - #285

Merged
lg2m merged 12 commits into
fix/t19-edit-freshness-exact-matchfrom
fix/eng-1035-t20-builtin-hints
Oct 13, 2026
Merged

lg2m merged 12 commits into
fix/t19-edit-freshness-exact-matchfrom
fix/eng-1035-t20-builtin-hints

Conversation

@lg2m

@lg2m lg2m commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Spec: tool-layer.md §T20. Linear: ENG-1035.

Merged with #281 (T19), #283 (T18), and #280 onto main at e22537040bfb1605ee360881220cf5d8e8408ce3. Final source c31d1a5c passed hosted CI 38426652160; main's tree exactly matches that qualified head. The stack carries the resource and overflow-floor repairs introduced during final integration.

Behavior

  • Built-in hints reach the first program after one lexical relative unquoted cd DIR &&. Prefixed commands, compound commands, and absolute/parent operands only hint under strict; plain relative built-in replacements still refuse. No classifier reparse.
  • A zero spill handle returns handle_placeholder, graded Correction, before store lookup; the message asks the model to copy a real marker.
  • Oversized search/ranges still return their existing corrections. No silent clamp, recent-handles query, or unknown-field work.
  • Prerequisite repair: env -S assignment substitution reads the original string once, uses the last assignment, and caps expansion at 16 KiB. Expanded-over-limit commands refuse with command_too_long even under full; raw source over the limit still prompts. Repeated self-references cannot recursively allocate exponential text. Narrow ownership exception is recorded in the root ledger.

Verification

Test-first T20 commit cc481b02 failed on leading-cd and placeholder dispatch before implementation. Prerequisite test-first c612655 failed on eight self-references before bounded repair 4dbf121; final regression covers 40 repetitions, expansion cap, and assignment precedence. Late overflow-floor test-first 99a07e4 exposed a new Forbidden-to-Prompt downgrade; 4f0185f1 preserves bounded prefix reasons and propagates fail-closed overflow through nested collectors. Sudo, late force, env option operands, benign echo, and nested overflow regressions pass.

env -u NO_COLOR TERM=xterm-256color cargo test --workspace -- --test-threads=4: 2243 passed, 0 failed, 14 ignored, counting the nested embedding child once. Approval suite: 95 passed. Formatting, workspace Clippy with all targets/features and warnings denied, workspace build, and ten exact-test guard fixtures pass. Clippy/build used CARGO_BUILD_JOBS=2.

Earlier runs hit headless timeouts under contention and ANSI assertions with inherited NO_COLOR=1. The final full run above passes; no failed gate is waived.

Independent second-agent review (t20_review) approves the final T20 implementation and bounded prerequisite repair. Attached path operands and recursive expansion findings were repaired.

Performance

tool_dispatch: 30 alternating saved-baseline/candidate binary pairs, medians 58.888 → 59.162 µs/iteration. Paired ratio median 0.974; 30-pair same-binary A/A 1.036, control ratio MAD 0.124. No regression demonstrated within control noise; budget unchanged. IO some avg10 was 32.24 → 28.59 %; no concurrent session-owned build/test/review during recording; other shared-host workloads are outside this session's control, no tail or speedup claim.

Final classify_command 1 KiB median of 3: 167.050 µs ≤ 200 µs. Raw evidence: target/qq-perf/t20-2026-10-13/ (untracked); initial baseline recorded before edits.

Docs and compatibility

As-built tools design, plan wording/ownership, root coordination, and ledger receipt are current. T20 adds no protocol field, schema, descriptor, or prompt version bump; inherited T19 retains its recorded version changes.

Follow-ups

D10's week after landing, ENG-1032 process cancellation, and ENG-1033 unread-edit scan optimization and classifier residuals remain separate work. ENG-1033 includes the final review's discarded env -S suffix expansion-cap over-refusal; independent review approves deferral under the recorded lead merge decision. This is unresolved code work, with no weaker approval. Plan/task index/ledger and ADR-0058 acceptance reconciled in merged #286 (ce768bbc2fb7a25b227fe3405734a316adf020a1); ENG-1035 is Done.

lg2m added 8 commits October 13, 2026 07:53
T20: placeholder dispatch and leading-cd hint regressions fail on db44ecf; oversized bounds correction guard passes.
T20 / ENG-1035. Separate hint eligibility from strict refusal; preserve lossless argument bounds and classify placeholder spill handles before store lookup. Independent review approves implementation; workspace/performance qualification pending.
@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-13T16:05:39.675837Z c31d1a5 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.

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

ℹ️ 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/approval/classify.rs Resolved

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

ℹ️ 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/approval/classify.rs Resolved
@lg2m
lg2m merged commit 669da1f into fix/t19-edit-freshness-exact-match Oct 13, 2026
4 checks passed
@lg2m
lg2m deleted the fix/eng-1035-t20-builtin-hints branch October 13, 2026 16: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.

1 participant