mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-29 19:34:29 +01:00
/codex cleanup stops asking for /careful approval, and plan-mode Codex reviews start again (#4851)
`/codex challenge` and `/codex consult` no longer stop for a /careful delete warning on every run, and the Codex second-model review in `/plan-eng-review` and `/plan-ceo-review` works in Claude Code plan mode again. Why: both broke a core review path on every use; the reports came from @dmfrede and @mcp10. Nothing to do after merge. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=security
This commit is contained in:
1 parent
77da8a0160
commit
be64b10297
12 files changed
+147
-30
No files matched your search
@@ -416,10 +416,10 @@ function codexPlanReviewRun(ctx: TemplateContext, ceo: boolean, needsApprovalRea
|
||||
// (gates 40477638211 and 40454750574: every judge sample read "(or unverified)" as a branch nothing can enter).
|
||||
return `**If \`CODEX_MODE: ready\` — run ${outsideVoiceFor(ctx).label}:**
|
||||
|
||||
${['plan-ceo-review', 'plan-eng-review'].includes(ctx.skillName) ? `Run this block for \`ready\`, in the one foreground Bash call described below.
|
||||
${['plan-ceo-review', 'plan-eng-review'].includes(ctx.skillName) ? `Run this block for \`ready\`, in the one foreground Bash call.
|
||||
Its opening harness guard rechecks the fresh shell: exit 78 uses the same Native
|
||||
fallback below, never a replacement provider. Finish termination before fallback and consume only
|
||||
completed output. Use private temporary paths, with no background jobs.` : `Run the selected backend in the one foreground Bash invocation described below.
|
||||
completed output. No background jobs.` : `Run the selected backend in the one foreground Bash invocation described below.
|
||||
Finish a failed attempt's termination before fallback; consume only its completed
|
||||
output. No background jobs or shared temporary paths.`}
|
||||
|
||||
|
||||
@@ -177,8 +177,9 @@ export function outsideVoiceInvocation(ctx: TemplateContext, requested: OutsideC
|
||||
: planRecommendation
|
||||
? "Request severity (Critical, High, Medium or Low) per finding and the prompt's Recommendation and VERDICT lines."
|
||||
: `Request severity (Critical, High, Medium or Low) per finding, a Recommendation: <action> because <reason> line, and ${VERDICT_LAST_LINE}.`;
|
||||
const preparation = `${['plan-ceo-review', 'plan-eng-review'].includes(ctx.skillName)
|
||||
? 'Create a private prompt file: run `umask 077; mktemp "${TMPDIR:-/tmp}/gstack-plan-prompt.XXXXXXXX"` in Bash and keep the returned path. Use Write to put the **complete prompt and context**, including actual plan/spec/source, in that file'
|
||||
const planPrompt = ['plan-ceo-review', 'plan-eng-review'].includes(ctx.skillName);
|
||||
const preparation = `${planPrompt
|
||||
? 'Create a private prompt file: run `[ ! -L .gstack -a ! -L .gstack/tmp ] && mkdir -p -m700 .gstack/tmp && mktemp "$PWD/.gstack/tmp/gstack-plan-prompt.XXXXXX"` and keep the returned path. Use Write to put the **complete prompt and context**, including actual plan/spec/source, in it'
|
||||
: 'Write the **complete prompt and context**, including actual plan/spec/source, to a private file'}${outsideVoiceFor(ctx).id === 'claude-code' ? ' (Claude Code has no tools, git or path access)' : ''}. Substitute its shell-quoted path for \`<prepared-prompt-file>\`; never interpolate user text into shell source. ${completion}`;
|
||||
return `${preparation}
|
||||
|
||||
@@ -186,7 +187,7 @@ export function outsideVoiceInvocation(ctx: TemplateContext, requested: OutsideC
|
||||
${outsideVoiceCommand(ctx, opts)}
|
||||
\`\`\`
|
||||
|
||||
Use Bash \`timeout: ${gateMs}\`; show the full response in a \`tool-output\` fence. Require successful execution and valid markers. Refusal, empty/malformed output, missing ${planRecommendation ? 'Recommendation: <action> because <reason>' : opts.purpose === 'design-direction' ? 'Recommendation' : 'score/severity/completion'} markers, timeout or CLI failure means \`outside_status: unavailable\`. P0/P1 findings block like native ones; \`OUTSIDE_STATUS: unverified\` is missing coverage. ${opts.purpose === 'design-direction' ? 'Continue completed proposals; native completion does not count as outside coverage.' : opts.nativeAlreadyRequired === 'dispatched' ? 'A dispatched native pass runs once either way; outside output cannot complete it.' : opts.nativeAlreadyRequired ? 'Retain the required native pass without duplicating it; it cannot complete outside coverage.' : "Use the caller's fallback; missing coverage is never clean/PASS."} After either outcome, delete only your private prompt; scratch cleanup is automatic.`;
|
||||
Use Bash \`timeout: ${gateMs}\`; show the full response in a \`tool-output\` fence. Require successful execution and valid markers. Refusal, empty/malformed output, missing ${planRecommendation ? 'Recommendation: <action> because <reason>' : opts.purpose === 'design-direction' ? 'Recommendation' : 'score/severity/completion'} markers, timeout or CLI failure means \`outside_status: unavailable\`. P0/P1 findings block like native ones; \`OUTSIDE_STATUS: unverified\` is missing coverage. ${opts.purpose === 'design-direction' ? 'Continue completed proposals; native completion does not count as outside coverage.' : opts.nativeAlreadyRequired === 'dispatched' ? 'A dispatched native pass runs once either way; outside output cannot complete it.' : opts.nativeAlreadyRequired ? 'Retain the required native pass without duplicating it; it cannot complete outside coverage.' : "Use the caller's fallback; missing coverage is never clean/PASS."} After either outcome, ${planPrompt ? "run `rm -- '<prepared-prompt-file>'`" : 'delete only your private prompt'}; scratch cleanup is automatic.`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user