Found while reviewing
PR #352, feat/v06-batch at 1cab240df85d5896c5390697c069720ff2bb24d3.
The Python support-bundle port is not contract-compatible with the Rust oracle in two coupled ways:
- It always sets
ExitCode.SUCCESS after writing the file, even when its embedded doctor report contains failed checks and the emitted envelope contains error-severity issues.
- It deliberately substitutes Python's build/flash-readiness
doctor_cmd._collect checklist for the oracle's debug-focused report, omitting debugger state and changing the checks/content.
The module and tests describe this as a known divergence, but the Rust implementation explicitly makes doctor.summary.fail > 0 a doctor failure.
Direct oracle reproduction
Run both binaries with the same resolved SDK/project, an empty PATH, and separate bundle destinations:
Rust: rc=4, ok=false, exitCode=4
issues=[support-bundle.hostPrerequisites:error]
Python: rc=0, ok=true, exitCode=0
issues include workspace/error, westResolved/error,
hostPython/error, hostPrerequisites/error, zephyrSdk/error, ...
The Rust bundle's context/checks included:
context: debuggerExtensions, projectSelected, ...
checks: workspaceRoot, sdkRoot, boardYaml, codeLLDBExtension,
lldb, hostPrerequisites, zephyrSdkAvailableForHost, homePath
The Python bundle omitted debuggerExtensions and projectSelected, and used a different checklist (sdk, workspace, westResolved, hostPython, zephyrSdk, setools, jlink, ...).
Impact
- Automation sees
ok:true and exit 0 even though the envelope reports errors.
- A support bundle attached for a debug failure omits the debugger/LLDB facts the command exists to collect.
- Consumers cannot treat the Python port as the command that the v0.4.1 contract describes.
Acceptance criteria
- Failed doctor checks produce
DOCTOR_FAILURE / exit 4 / ok:false, matching the oracle.
- The bundle carries the debug-focused doctor report, including standalone values for
projectSelected and debuggerExtensions and checks for CodeLLDB/LLDB where applicable.
- A live oracle-parity test compares the same failing-host case; no deliberate-divergence exemption.
Related: #260, #257, PR #352.
Found while reviewing
PR #352,
feat/v06-batchat1cab240df85d5896c5390697c069720ff2bb24d3.The Python
support-bundleport is not contract-compatible with the Rust oracle in two coupled ways:ExitCode.SUCCESSafter writing the file, even when its embedded doctor report contains failed checks and the emitted envelope contains error-severity issues.doctor_cmd._collectchecklist for the oracle's debug-focused report, omitting debugger state and changing the checks/content.The module and tests describe this as a known divergence, but the Rust implementation explicitly makes
doctor.summary.fail > 0a doctor failure.Direct oracle reproduction
Run both binaries with the same resolved SDK/project, an empty
PATH, and separate bundle destinations:The Rust bundle's context/checks included:
The Python bundle omitted
debuggerExtensionsandprojectSelected, and used a different checklist (sdk,workspace,westResolved,hostPython,zephyrSdk,setools,jlink, ...).Impact
ok:trueand exit 0 even though the envelope reports errors.Acceptance criteria
DOCTOR_FAILURE/ exit 4 /ok:false, matching the oracle.projectSelectedanddebuggerExtensionsand checks for CodeLLDB/LLDB where applicable.Related: #260, #257, PR #352.