Skip to content

test(gdb): expect configurable stream truncation diagnostics - #8899

Closed
ShuaixinHuang wants to merge 3 commits into
morluto:mainfrom
ShuaixinHuang:codex/test-gdb-configurable-truncation
Closed

ShuaixinHuang wants to merge 3 commits into
morluto:mainfrom
ShuaixinHuang:codex/test-gdb-configurable-truncation

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #8965 at the author's request.

Main synchronization: upstream now fixes the stale expectation using debuggerAdmissionRecovery. Preserve that complete upstream assertion and add this PR's independent literal checks for the cap, effective default, environment recovery and unknown completeness. The prerequisite duplicate-import repair is already in main and drops out of this PR's diff. Both resolved files passed repository formatting; the current integrated tree needs fresh hosted CI, and no new Windows/Linux provider lifecycle validation is claimed.

Supersedes #8890 at the author's request. The branch and code are unchanged; this new PR requires its own CI and initial author readiness confirmation.

Summary

Update the oversized-stream regression to match the implemented configurable GDB output cap. The existing test still expects “This release has no runtime override”, so current CI fails even though the stream is dropped and the next command succeeds.

Problem and expected behavior

Actual shard failure and portable-test failure both stop at the obsolete limitation string. Current GDB evidence names the effective/default byte cap, REA_DEBUGGER_MAX_COMMAND_OUTPUT_BYTES recovery, the separate fixed record cap and unknown completeness.

No issue is linked: this was found while diagnosing those executed CI failures. Related existing functionality: #8029 and #8056.

Change and scope

Only the expected diagnostic assertions change. They now check the command-output and record limits, the effective/default byte budget, launch-environment recovery and unknown completeness. All original completion, truncation, subsequent-command and successful-close assertions remain unchanged. No timeout, resource limit or skip is changed. The branch also includes the exact two-line duplicate-import cleanup from #8884 as a prerequisite, so CI can compile and run this regression. That prerequisite changes no runtime behavior. Ordinary test maintenance; scope decision not applicable.

Contract and boundary impact

Existing GDB stream handling and Evidence diagnostics are the producing boundary. This change aligns test expectations with that implemented contract. CLI/MCP schemas, provider support, authority, target interaction and package/generated metadata do not change.

Evidence and regression coverage

  • Hosted Linux CI demonstrates the exact obsolete-string failure in both lanes.
  • Local reproduction used the exact current-main GdbSessionManager.ts and copied the affected current-main test into an isolated worktree. It reproduced the same obsolete-string failure.
  • With the new assertions, stream completion/truncation, configuration diagnostics and a subsequent command pass locally. The final close assertion then fails because the Windows host refuses owned GDB termination that might terminate inferiors. That assertion remains in the submitted test.
  • No complete local test pass or real GDB/target execution is claimed. The fixture uses the existing fake spawner.

Validation performed

  • Local check:fast: 2 tasks passed, 52.099 s (isolated surrounding tree predates current main; imported current-main producer used for this reproduction).
  • Targeted boundary reproduction: original text assertion fails; corrected assertions proceed through the subsequent command and stop at the unchanged Windows close restriction.
  • Remote diff inspected: the diagnostic assertions in one existing test file (upstream blob 5d0adde808fbbb330dfaae20a81f40a576948fb0), plus the exact prerequisite import cleanup from fix(build): remove duplicate AST traversal import #8884 (fixed blob 8df1bc04e480520b2ee5278506dc88aa9f5cf92e).
  • Windows Node22.20.0/npm10.9.3, not the pinned npm; no dependencies installed.

Compatibility, safety, and release

Draft pending actual Linux CI for the complete unchanged lifecycle. Current upstream also has the independent duplicate-import build blocker tracked by #8884. This branch explicitly carries that prerequisite to let CI verify the combined build and test correction; if #8884 lands first, its change drops out of this PR's diff. No production or release change, and no runtime verification on Linux/macOS or real debugger claimed.

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

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Adds independent diagnostic checks to the existing oversized-stream regression.

  • The GDB stream test checks the output-limit guidance explicitly.

Reviews (2) · Last reviewed commit: "Merge main into codex/test-gdb-configura..." · Reviewed by Greptile

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review November 4, 2026 13:01
@chatgpt-codex-connector

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 ⚠️ Failed 2026-11-04T13:01:04.944384Z
We couldn’t complete this review. Comment @codex review to try again.
10b1466 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 added area: tests Test suite and verification provider: gdb Analysis provider / engine: gdb labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suite and verification provider: gdb Analysis provider / engine: gdb

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants