Repository navigation
Conversation
Preserve provider-owned guidance in selection errors so unavailable pwntools operations identify their configuration and failure instead of recommending an unsupported doctor route. Fixes morluto#3055
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
|
Closing in favor of #3087, which was opened shortly before this PR while our work was already underway. The production fixes overlap, so keeping both open would add duplicate review work. Our local verification also reproduced the original error through both real CLI commands on Ubuntu Linux, checked the unset/directory/missing-Python cases after the fix, and completed a positive configured pwntools 4.15.0 run against a benign ELF. This evidence applies to the overlapping recovery approach, not a claim that the exact head of #3087 was tested. Thanks for addressing this. |
Summary
Fixes #3055.
Unavailable pwntools operations now name the relevant configuration key and the actual refusal in both the top-level error message and recovery action. Previously these fields recommended
rea doctor, which cannot diagnose pwntools.Problem and expected behavior
On Linux x64, run
inspect-binary-layoutorinspect-recorded-crashwithREA_PWNTOOLS_PYTHONunset, pointing to a directory, or pointing to a missing file. Before this change all six cases recommend doctor. They now expose the configuration requirement or path failure already retained in the provider rejection.For example, a directory produces
REA_PWNTOOLS_PYTHON: Selected Python executable must be a regular executable file, not a directory: <selected path>inmessageandremediation.action.Change and scope
Add optional provider-owned recovery guidance to
ProviderSelectionError, preserving its existing default. Supply that guidance frompwntoolsUnavailable, using its actual configuration key so input-limit errors still identifyREA_PWNTOOLS_MAX_INPUT_BYTES. Narrow the CLI guide's doctor advice to its supported providers.Contract and boundary impact
Semantic owner and earliest changed stage: pwntools refusal construction, before shared CLI/MCP error projection.
Contribution scope fit and maintainer decision: routine correction within an existing provider. Advance scope decision is not applicable.
CLI and MCP/tool-catalog contract: message and recovery text change. Error codes, retryability, provider identity, rejection details, and captured output are preserved. No schema or catalog change.
Provider, bridge, target-format, and platform compatibility: no provider execution, bridge, supported-format, or host-admission change. Default Hopper/Ghidra/IDA advice is preserved.
Evidence, artifacts, provenance, and reconstruction: unchanged.
Target selection, authority, and cleanup: unchanged. Regression fixtures use exact-path cleanup.
Generated metadata, package, and installation: no changes.
Documentation or usability only, no new target interaction.
Evidence and regression coverage
c7105d9723c835b5e0122f5fc6cfbea86265c349reproduced the misleading guidance in all six scenarios on Ubuntu WSL x64. The same six compiled-CLI checks passed with the corrected guidance.Validation performed
Using the pinned Node 24.18.0 and npm 11.16.0:
npm run check: passed, including typecheck, lint, format, knip, metadata, module boundaries, and architecture guards.npm run docs:check: passed, including five README consistency tests.npm run verify:test-discovery: all 1,235 test files discovered exactly once.inspect-binary-layoutcall on a locally compiled ELF passed, and the selected file's SHA-256 remained unchanged.Compatibility, safety, and release
No breaking change, migration, or release metadata change. Tests cover refusal and existing provider-boundary behavior. The full real-provider verification lanes, including strace and the optional GDB/pwndbg recorded-core workflow, were not run. Windows was used for portable checks, Ubuntu WSL for this Linux-specific issue.
Implementation and two independent code-review rounds used Codex, with four Luna reviewers and one Sol reviewer per round. The final round reported no actionable findings. A documentation overclaim found in the first round was corrected and all five reviews repeated.
Before merge