Repository navigation
feat(gdb): name why close requires an explicit inferior disposition - #11652
Conversation
The pre-cleanup close refusal carries diagnostics.inferior_disposition_required (multiple-inferiors or no-durable-output-sink, the cleanup codes a forced stop would report) and live_inferiors, so callers and tests need not read its prose.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Low impact] This PR appears safe to merge; it adds refusal details without changing cleanup decisions. SummaryAdds a machine-readable reason and live inferior count when
Reviews (1) · Last reviewed commit: "feat(gdb): name why close requires an ex..." · Reviewed by Greptile |
Summary
Refs #10508 (last item: the pre-cleanup close refusal prose). When
close_gdb_sessionrefuses to detach automatically, the reason was only in prose ("Multiple live GDB inferiors require an explicit disposition…" vs "…no durable inferior TTY is verified"). The refusal now carries the reason and the live inferior count as typed diagnostics.Problem and expected behavior
Before: a caller (or test) could tell the two refusal causes apart only by reading
message.After:
details.diagnostics = { inferior_disposition_required: "multiple-inferiors" | "no-durable-output-sink", live_inferiors: N }. The values are the existingDebuggerCleanupIncompleteCodes that a forced stop reports for the same conditions, checked withsatisfies.Change and scope
src/gdb/GdbSessionManager.ts: the refusal passesdiagnostics; the message,userMessage, remediation andretryable: trueare unchanged.tests/boundary/providers/GdbSessionManagerCoverage.test.ts: both cases (single inferior without a verified TTY, two inferiors) assert the typed reason and count on the error and on the projection.Not included: other debugger providers (Rizin, LLDB) have no equivalent pre-cleanup refusal.
Contribution scope: within existing boundaries.
Contract and boundary impact
details.diagnosticson thiscapability_unavailablerefusal.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
GdbSessionManager.ts(no diagnostics) and pass with the change.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/providers/GdbSessionManagerCoverage.test.ts: 207 passed; with main's manager, 2 failed.npm run check:fast: passed.npx oxfmton the changed files.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.