Codex skills no longer stop on temp-file cleanup, which Codex refuses as rm -f (GST-3364) (#4612)

Skills that clean up temp files now run on Codex: Codex CLI refuses any
`rm` with a force flag, and 67 of the 1,239 shell blocks in gstack's
Codex skills used one.

This unblocks gstack on Codex (office-hours, review, ship, the plan
reviews, spec and gstack-upgrade all hit it). Nothing to do after
merging.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=state-machines
Review-Finding: gstack-upgrade/SKILL.md.tmpl:363:posix-sh-brace-expansion reader=core
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 15:29:49 +00:00
1 parent 43c9c201e3
commit bd77c8ccaa
86 files changed
+337 -204

No files matched your search

+3 -1
View File
@@ -6,7 +6,9 @@ import { freeTextFileBash } from '../../scripts/resolvers/free-text-file';
/** /ship Step 14.5's own product-tree record: the path, the Entry's reset and the shared exclude line that keeps it out of git. */
export const DOCS_AUDIT_RECORD = '.gstack/tmp/docs-audit.json';
export const DOCS_AUDIT_RESET = `rm -f ${DOCS_AUDIT_RECORD}`;
export const DOCS_AUDIT_RESET = `rm ${DOCS_AUDIT_RECORD} 2>/dev/null || true`;
/** The reset Step 14.5 printed before Codex-safe cleanup (GST-3364); captured runs replay it. */
export const DOCS_AUDIT_RESET_FORCED = `rm -f ${DOCS_AUDIT_RECORD}`;
export const DOCS_TMP_EXCLUDE = freeTextFileBash([]).split('\n').find(line => line.startsWith('_EX='))!;
/** The paths the Step 14.5 continue path may create in the product tree: the record, its directories and git's exclude file. */
export const DOCS_AUDIT_RECORD_PATHS = ['.gstack', '.gstack/tmp', DOCS_AUDIT_RECORD, '.git/info/exclude'];
+2 -2
View File
@@ -5,7 +5,7 @@ import { observeQAWrites, type QAWriteObservation } from './qa-functional-observ
import { nativeCalls } from './qa-checkpoint-evidence';
import type { SkillTestResult } from './session-runner';
import { DOC_PATH, type DocsScenario, type fixtureDocs } from './docsync-fixture';
import { docsNativeInterface, DOCS_AUDIT_RECORD, DOCS_AUDIT_RECORD_PATHS, DOCS_AUDIT_RESET, DOCS_TMP_EXCLUDE, docsCapsCommand } from './docsync-interface';
import { docsNativeInterface, DOCS_AUDIT_RECORD, DOCS_AUDIT_RECORD_PATHS, DOCS_AUDIT_RESET, DOCS_AUDIT_RESET_FORCED, DOCS_TMP_EXCLUDE, docsCapsCommand } from './docsync-interface';
import { sliceBetween } from './skill-fixture';
import { readOnlyCommandAllowed } from './read-only-commands';
@@ -253,7 +253,7 @@ export function docsCommandAllowed(command: string, fixture: ReturnType<typeof f
const text = command.trim();
if (docsPreambleCommands(fixture).some(block => block.trim() === text)) return true;
// The section prints the cap gate with the ~/.claude/skills/gstack prefix; in the fixture HOME is fixture.home, so that form names the same installed binary.
if (text === DOCS_TMP_EXCLUDE || text === DOCS_AUDIT_RESET || text === docsCapsCommand(fixture.skills.split(path.sep).join('/')) ||
if (text === DOCS_TMP_EXCLUDE || text === DOCS_AUDIT_RESET || text === DOCS_AUDIT_RESET_FORCED || text === docsCapsCommand(fixture.skills.split(path.sep).join('/')) ||
(text === docsCapsCommand('~/.claude/skills/gstack') && fixture.skills === path.join(fixture.home, '.claude/skills/gstack'))) return true;
if (readOnlyCommandAllowed(text, docsReadOnlyScope(fixture)) || docsComposedReadAllowed(text, fixture)) return true;
const insert = /^cat (['"]?)([^\s'"]+)\1 >> (['"]?)([^\s'"]+)\3$/.exec(text);