fix(cron): preserve auth prompts in truncated command results#96370
fix(cron): preserve auth prompts in truncated command results#96370qingminglong wants to merge 2 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this branch is useful and the current head fixed the earlier failed-webhook blocker, but the open sibling PR is the stronger canonical landing path because it covers the same preservation bug plus external delivery redaction with exact-head proof. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Use the proof-positive sibling PR as the canonical fix if maintainers accept its operator-history versus redacted-external-delivery boundary, then close the remaining duplicate preservation PRs. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Use the proof-positive sibling PR as the canonical fix if maintainers accept its operator-history versus redacted-external-delivery boundary, then close the remaining duplicate preservation PRs. Do we have a high-confidence way to reproduce the issue? Yes. Current main tail-truncates command output in src/process/exec.ts and runCronCommandJob summarizes only the retained tail, while the linked issue gives a concrete synthetic device-code repro. Is this the best way to solve the issue? No for this PR as the landing path. It is a plausible fix, but the sibling PR is the better canonical solution because it keeps the bounded preservation behavior and adds explicit redaction for external delivery. Security review: Security review cleared: No concrete supply-chain defect was found in this branch; the security-boundary reason to close is that the canonical sibling has stronger external redaction coverage. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 4010b81a77f4. |
245166e to
ff44a30
Compare
ff44a30 to
8cce141
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
ffa752e to
9d6c8e7
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
9d6c8e7 to
dd9d611
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
Fixes #96343.
Cron command output can be truncated before an interactive auth/setup prompt reaches the visible result. That makes device-code login flows hard to complete because the operator may lose the login URL, code, or next-action instruction.
Why This Change Was Made
This PR was rewritten as a minimal fix on top of current
main. It keeps the normal command output cap, but lets the process runner preserve a small bounded set of important auth/setup lines when truncation happens.The cron command runner uses those preserved lines only for the interactive/operator summary. Non-interactive delivery paths keep using a separate delivery summary so webhook, announce, and plugin hook messages stay bounded and do not inherit the expanded interactive text. Failed completion webhooks keep the existing omission boundary and do not include command summaries, diagnostics, or embedded diagnostic state.
User Impact
Evidence
node scripts/run-vitest.mjs src/gateway/server-cron.test.ts src/cron/command-runner.test.ts-> passed, 2 Vitest shards, 62 tests total.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test-local-pr96370.tsbuildinfo --pretty false-> passed.node_modules/.bin/oxfmt.CMD --check --threads=1 src/gateway/server-cron-notifications.ts src/gateway/server-cron.ts src/gateway/server-cron.test.ts-> passed.node_modules/.bin/oxlint.CMD --tsconfig config/tsconfig/oxlint.core.json src/gateway/server-cron-notifications.ts src/gateway/server-cron.ts src/gateway/server-cron.test.ts-> passed.git diff --check-> passed.Redacted behavior proof from the focused cron command run:
Note:
corepack pnpm exec oxfmt --check ...was replaced with the direct localoxfmt.CMDbinary in the Codex worktree because pnpm attempted dependency reconciliation and aborted without a TTY before running oxfmt.