Files
rea/scripts/verify-package-setup-plan.mjs
T
morluto aacf740a04 fix(ci): correlate ownership trace threads and preserve setup failures
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.
2026-10-20 00:05:22 +08:00

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,
})}`;
};