Coach: der Fall ohne Vorgeschichte, und was der Validator durchgelassen hat
common.md wird jedem Prompt vorangestellt, also galt Regel 5 -- "jede Begruendung nennt das, was in ihren Daten dafuer sprach" -- auch beim ersten Plan fuer jemanden, der noch nichts geloggt hat. Da gibt es nichts zu nennen, und die Regel hat das Modell genau dorthin gedraengt, wo es sich etwas ausdenkt. Neu steht dabei, worauf man sich stattdessen beruft: Ziel, Erfahrung, Tage, Ausruestung, Einschraenkungen -- und dass ein fehlendes window kein Fehler ist. review.md sagt jetzt ausserdem, dass ohne Sessions die ehrliche Antwort nochange ist, statt einen Grund zu erfinden. repsMax stand im Validator, aber in keiner Tabelle -- das Modell konnte einen Typ nicht verwenden, den wir akzeptieren. payload.js laesst history ganz weg, wenn nichts mit Gewicht geloggt ist. Damit lief die FR-20-Deckelung ins Leere und ein erfundenes Startgewicht ging unveraendert an einen Anfaenger durch. Ohne Vergleichswerte fliegt weight jetzt raus; die erste Session setzt die Basis, so wie create.md es ohnehin verspricht. Dazu vier Luecken, die alle dieselbe Form haben -- etwas wird gezaehlt oder gesetzt, aber nicht auf Eindeutigkeit geprueft: - Zwei Routinen mit derselben id: known ist ein Set, die Woche validierte, ohne dass feststand, welche der beiden gemeint ist. - Dieselbe Uebung zweimal in einer Routine: danach ist jedes reorder unerfuellbar (es verlangt jede id genau einmal) und jede gezielte Aenderung trifft die erste Kopie. - Eine leere Woche uebersprang die Tagesanzahl-Pruefung ganz: "vier Tage" wurde mit einem Plan beantwortet, der gar nichts einplant. - inc war nach oben offen. add-routine trug ausserdem repsMin, prog und inc nicht mit, obwohl der Bundle-Pfad sie kennt. Die drei Codex-Flags sind aus invoke() in ein exportiertes argvFor() gewandert und werden jetzt beim Wert geprueft. Sie waren vorher nirgends getestet -- eines davon zu loeschen war ein gruener Build.
This commit is contained in:
1 parent
ad82db415a
commit
5fb237682b
6 files changed
+141
-13
No files matched your search
@@ -8,6 +8,24 @@ import { run } from './spawn.js';
|
||||
|
||||
const CLI = 'codex';
|
||||
|
||||
/**
|
||||
* The exact argv every Codex job runs with.
|
||||
*
|
||||
* Exported so the three hardening flags are asserted by value rather than trusted: each one
|
||||
* removes an input the job would otherwise inherit from the host, and dropping one would
|
||||
* change what a job can see without changing anything a test looks at.
|
||||
*/
|
||||
export function argvFor(model) {
|
||||
const argv = [
|
||||
'exec', '-', // non-interactive; '-' reads the prompt from stdin
|
||||
'--skip-git-repo-check', // the job dir is a bare mkdtemp, not a repo -- without this it refuses to run
|
||||
'--ephemeral', // do not write session files; the job dir dies with the job anyway
|
||||
'--ignore-user-config' // $CODEX_HOME/config.toml would be an admin-invisible input to every job
|
||||
];
|
||||
if (model) argv.push('--model', model);
|
||||
return argv;
|
||||
}
|
||||
|
||||
export default {
|
||||
id: 'codex',
|
||||
cli: CLI,
|
||||
@@ -21,18 +39,11 @@ export default {
|
||||
},
|
||||
|
||||
async invoke({ prompt, jobDir, env, model, timeoutMs }) {
|
||||
const argv = [
|
||||
'exec', '-', // non-interactive; '-' reads the prompt from stdin
|
||||
'--skip-git-repo-check', // the job dir is a bare mkdtemp, not a repo -- without this it refuses to run
|
||||
'--ephemeral', // do not write session files; the job dir dies with the job anyway
|
||||
'--ignore-user-config' // $CODEX_HOME/config.toml would be an admin-invisible input to every job
|
||||
];
|
||||
const argv = argvFor(model);
|
||||
// $CODEX_HOME itself is still set (config.jobEnv), because that is where the CLI keeps its
|
||||
// refreshable login cache and a job whose HOME is a temp dir would otherwise find no login
|
||||
// at all. --ignore-user-config narrows that to credentials only: the cache is read, the
|
||||
// config file beside it is not, so an admin cannot be handed job behaviour they never saw.
|
||||
if (model) argv.push('--model', model);
|
||||
|
||||
// Sandbox mode is left at the CLI's default (read-only). The job only needs the model
|
||||
// to write an answer to stdout, and this process is already an unprivileged user in a
|
||||
// container -- widening it here would trade that away for nothing.
|
||||
|
||||
Reference in new issue
Block a user