Follow CLONE_THREAD edges across strace -ff files when excluding the ownership process's stat/status reads. Keep provider child processes outside the allowance and document the same-process attribution limit. Validate setup result array shapes and preserve the original failed-plan JSON instead of masking it with a diagnostic TypeError.
24 lines
763 B
JavaScript
24 lines
763 B
JavaScript
/** Describe a failed package setup-plan check without masking its result shape. */
|
|
export const setupPlanFailureMessage = ({
|
|
planned,
|
|
plannedExecution,
|
|
plannedClaudeConfig,
|
|
plannedCodexConfig,
|
|
plannedCursorConfig,
|
|
}) => {
|
|
const actionKinds = (actions) =>
|
|
Array.isArray(actions)
|
|
? actions.map((action) => action?.kind ?? action)
|
|
: actions;
|
|
return `packaged setup plan was not read-only: ${JSON.stringify({
|
|
status: planned?.status,
|
|
exitCode: plannedExecution.status,
|
|
plannedKinds: actionKinds(planned?.plannedActions),
|
|
appliedKinds: actionKinds(planned?.appliedActions),
|
|
result: planned,
|
|
claudeConfig: plannedClaudeConfig,
|
|
codexConfig: plannedCodexConfig,
|
|
cursorConfig: plannedCursorConfig,
|
|
})}`;
|
|
};
|