@lalalic/markcut 3.2.36 → 3.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/markcut/SKILL.md +1 -1
- package/skills/markcut/evals/README.md +5 -3
- package/skills/markcut/evals/cases.json +4 -5
- package/skills/markcut/evals/check.mjs +2 -0
- package/skills/markcut/evals/check.selftest.mjs +11 -1
- package/skills/markcut/evals/output-format.mjs +54 -0
- package/skills/markcut/evals/output-format.selftest.mjs +38 -0
- package/skills/markcut/evals/run-codex.mjs +17 -27
package/package.json
CHANGED
package/skills/markcut/SKILL.md
CHANGED
|
@@ -12,7 +12,7 @@ Markcut turns a Markdown video definition into a compiled stream tree and a play
|
|
|
12
12
|
| User goal | Agent action |
|
|
13
13
|
|---|---|
|
|
14
14
|
| Understand a folder of photos or clips | Inspect the files; use `markcut vision <folder>` if scene selection needs visual/media understanding. |
|
|
15
|
-
| Make or revise a video | Load the project-selected template, author/edit its Markdown scenes,
|
|
15
|
+
| Make or revise a video | Load the project-selected template, author/edit its Markdown scenes, run `markcut verify <file>`, and **inspect real playback before claiming a finished video**. |
|
|
16
16
|
| Quickly assess story structure | `markcut preview <file> --storyboard` (placeholder media, not a final-video quality check). |
|
|
17
17
|
| Watch a native work-in-progress video | `markcut preview <file>`; test real visuals, sound, and seeking. |
|
|
18
18
|
| Ask a person to review in ChatGPT | Call the available `markcut.preview({path})` tool; handle revision-specific feedback and approval. |
|
|
@@ -4,10 +4,10 @@ The 14 capability-driven scenarios test **next-action routing, source authority,
|
|
|
4
4
|
|
|
5
5
|
## Output contract
|
|
6
6
|
|
|
7
|
-
Each case returns
|
|
7
|
+
Each case returns a decision object inside a top-level JSON object. Codex structured outputs require an object at the root:
|
|
8
8
|
|
|
9
9
|
```json
|
|
10
|
-
{"id":"case-id","action":"author","authority":"video_md","completion_gates":["verify","real_playback","human_review"],"reason":"Brief explanation"}
|
|
10
|
+
{"decisions":[{"id":"case-id","action":"author","authority":"video_md","completion_gates":["verify","real_playback","human_review"],"reason":"Brief explanation"}]}
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
- `action`: `vision | author | storyboard | native_preview | mcp_review | render | verify | repair | report`. This is the **immediate next step**, not a later gate.
|
|
@@ -15,6 +15,8 @@ Each case returns an object in a JSON array:
|
|
|
15
15
|
- `completion_gates`: any applicable checks drawn from `verify`, `real_playback`, `human_review`. `human_review` means the new revision must be reviewed/approved by an actual human before claiming a human review/approval result; it is **not** mandatory for an ordinary render. These are gates to **claim the requested outcome complete**, not actions to execute immediately.
|
|
16
16
|
- `reason`: explain the decision and why a blocker/approval cannot be assumed resolved. Do not claim actions were actually completed.
|
|
17
17
|
|
|
18
|
+
For CLI-answer scenarios, explaining a command does not mean executing it. The `cli-verify` case checks that the explanation actually names `markcut verify` without requiring the `verify` completion gate.
|
|
19
|
+
|
|
18
20
|
`cases.json` defines acceptable equivalent next actions or authorities and **required** and **forbidden** gates. The checker does not insist on irrelevant intermediate gates; the meaningful behavioral invariants matter more than one exact execution order. It still rejects a wrong initial action, wrong source authority, missing essential gate, or inappropriate human-review requirement. This avoids confusing a report of failure with a failed repair attempt.
|
|
19
21
|
|
|
20
22
|
## Run
|
|
@@ -24,6 +26,6 @@ node skills/markcut/evals/check.mjs --validate
|
|
|
24
26
|
node skills/markcut/evals/run-codex.mjs --provider openrouter --model openrouter/free
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
The `run-codex.mjs` runner uses the locally authenticated Codex CLI and current `SKILL.md`. **By default it evaluates one independent user request per Codex invocation**, matching actual Skill usage instead of testing the model's ability to manage a large multi-task JSON array. Override with `--batch-size N` only for a batch-stress experiment. The provider and model are runtime parameters; `cases.json` and the checker are provider-independent. The runner saves the actual responses, JSONL events, stderr, and a score in a per-run temporary directory. It never changes video files or asks the model to perform real side effects.
|
|
29
|
+
The `run-codex.mjs` runner uses the locally authenticated Codex CLI and current `SKILL.md`. **By default it evaluates one independent user request per Codex invocation**, matching actual Skill usage instead of testing the model's ability to manage a large multi-task JSON array. Override with `--batch-size N` only for a batch-stress experiment. The provider and model are runtime parameters; `cases.json` and the checker are provider-independent. The runner saves the actual responses, JSONL events, stderr, and a score in a per-run temporary directory. It never changes video files or asks the model to perform real side effects. The runner uses a top-level `{"decisions": [...]}` JSON schema for OpenAI compatibility, and flags any legacy/fenced response separately from behavioral correctness.
|
|
28
30
|
|
|
29
31
|
If a result fails, inspect `reason` and classify it as a Skill ambiguity, prompt conflict, incorrect eval expectation, undocumented implementation behavior, or model failure **before modifying either the Skill or the assertions**. In particular, a successful `compiled.json` is never final video playback and an old revision's human approval never applies to new content.
|
|
@@ -198,14 +198,13 @@
|
|
|
198
198
|
"request": "在正式导出前先验证 Markcut Markdown 的语法和素材路径,用什么 CLI?",
|
|
199
199
|
"action": "report",
|
|
200
200
|
"authority": "video_md",
|
|
201
|
-
"notes": "
|
|
202
|
-
"required_gates": [
|
|
203
|
-
"verify"
|
|
204
|
-
],
|
|
201
|
+
"notes": "Question asks which CLI to use, not to execute it. A correct explanation must name markcut verify; no action gate needs to have occurred.",
|
|
202
|
+
"required_gates": [],
|
|
205
203
|
"forbidden_gates": [
|
|
206
204
|
"human_review",
|
|
207
205
|
"real_playback"
|
|
208
|
-
]
|
|
206
|
+
],
|
|
207
|
+
"reason_includes": "markcut verify"
|
|
209
208
|
},
|
|
210
209
|
{
|
|
211
210
|
"id": "browser-broken",
|
|
@@ -35,6 +35,7 @@ for (const item of cases) {
|
|
|
35
35
|
check(Array.isArray(required) && required.every(v => allowed.gate.has(v)) && new Set(required).size === required.length, `${item.id} required_gates`);
|
|
36
36
|
check(Array.isArray(forbidden) && forbidden.every(v => allowed.gate.has(v)) && new Set(forbidden).size === forbidden.length, `${item.id} forbidden_gates`);
|
|
37
37
|
check(required.every(v => !forbidden.includes(v)), `${item.id} gates do not contradict`);
|
|
38
|
+
if (item.reason_includes !== undefined) check(typeof item.reason_includes === 'string' && item.reason_includes.length > 2, `${item.id} required rationale text`);
|
|
38
39
|
}
|
|
39
40
|
const skill = readFileSync(resolve(root, 'SKILL.md'), 'utf8');
|
|
40
41
|
check(skill.startsWith('---\nname: markcut\n'), 'skill metadata');
|
|
@@ -73,6 +74,7 @@ if (process.argv[2] === '--validate') {
|
|
|
73
74
|
for (const forbidden of item.forbidden_gates) check(!gates.includes(forbidden), `${item.id} incorrect completion gate: ${forbidden}`);
|
|
74
75
|
}
|
|
75
76
|
check(typeof output.reason === 'string' && output.reason.trim().length > 12, `${item.id} explanation`);
|
|
77
|
+
if (item.reason_includes) check(typeof output.reason === 'string' && output.reason.toLowerCase().includes(item.reason_includes.toLowerCase()), `${item.id} explanation names ${item.reason_includes}`);
|
|
76
78
|
if (failures === before) passedCases++;
|
|
77
79
|
}
|
|
78
80
|
console.log(`Scored ${cases.length} cases: ${passedCases}/${cases.length} passed; ${failures} failed assertions. Manually inspect reason text for misleading claims.`);
|
|
@@ -15,7 +15,7 @@ function score(responses) {
|
|
|
15
15
|
return spawnSync(process.execPath, [join(root, 'check.mjs'), file], {encoding: 'utf8'});
|
|
16
16
|
}
|
|
17
17
|
const good = cases.map(c => ({id: c.id, action: c.action, authority:c.authority,
|
|
18
|
-
completion_gates: [...c.required_gates], reason: 'Correct next action and required completion checks are recorded.'}));
|
|
18
|
+
completion_gates: [...c.required_gates], reason: c.id === 'cli-verify' ? 'Use npx @lalalic/markcut verify video.md to check Markdown paths.' : 'Correct next action and required completion checks are recorded.'}));
|
|
19
19
|
test('checker scores valid capability decisions', () => {
|
|
20
20
|
const outcome = score(good);
|
|
21
21
|
assert.equal(outcome.status, 0, outcome.stderr);
|
|
@@ -38,6 +38,16 @@ test('checker rejects a fabricated human-review requirement for a render-only re
|
|
|
38
38
|
assert.notEqual(outcome.status, 0);
|
|
39
39
|
assert.match(outcome.stderr, /render-final incorrect completion gate: human_review/);
|
|
40
40
|
});
|
|
41
|
+
test('CLI answer needs the correct command but no executed verify gate', () => {
|
|
42
|
+
const answers = structuredClone(good);
|
|
43
|
+
const cli = answers.find(c => c.id === 'cli-verify');
|
|
44
|
+
assert.deepEqual(cli.completion_gates, []);
|
|
45
|
+
assert.equal(score(answers).status, 0);
|
|
46
|
+
cli.reason = 'Use a generic video validator command, no specific command was identified.';
|
|
47
|
+
const outcome = score(answers);
|
|
48
|
+
assert.notEqual(outcome.status, 0);
|
|
49
|
+
assert.match(outcome.stderr, /cli-verify explanation names markcut verify/);
|
|
50
|
+
});
|
|
41
51
|
test('checker rejects invalid JSON rather than repairing it silently', () => {
|
|
42
52
|
const file = join(dir, 'invalid.json');
|
|
43
53
|
writeFileSync(file, '[{"id":"media-folder"}}}');
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Shared structured-output contract for the Codex eval runner. */
|
|
2
|
+
export function outputSchema() {
|
|
3
|
+
return {
|
|
4
|
+
type: 'object',
|
|
5
|
+
additionalProperties: false,
|
|
6
|
+
properties: {
|
|
7
|
+
decisions: {
|
|
8
|
+
type: 'array',
|
|
9
|
+
items: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
properties: {
|
|
13
|
+
id: {type: 'string'},
|
|
14
|
+
action: {type: 'string', enum: ['vision', 'author', 'storyboard', 'native_preview', 'mcp_review', 'render', 'verify', 'repair', 'report']},
|
|
15
|
+
authority: {type: 'string', enum: ['source_media', 'selected_video_template', 'video_md']},
|
|
16
|
+
completion_gates: {type: 'array', items: {type: 'string', enum: ['verify', 'real_playback', 'human_review']}},
|
|
17
|
+
reason: {type: 'string'},
|
|
18
|
+
},
|
|
19
|
+
required: ['id', 'action', 'authority', 'completion_gates', 'reason'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ['decisions'],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Preserve the model's decisions; normalize only recognized legacy envelopes. */
|
|
28
|
+
export function parseOutput(raw, expectedIds) {
|
|
29
|
+
let parsed;
|
|
30
|
+
let schemaCompliant = true;
|
|
31
|
+
try { parsed = JSON.parse(raw); }
|
|
32
|
+
catch {
|
|
33
|
+
const fence = raw.trim().match(/^```(?:json)?\s*\n([\s\S]*?)\n```$/);
|
|
34
|
+
if (!fence) throw new Error('Response is neither JSON nor a single complete JSON code fence');
|
|
35
|
+
parsed = JSON.parse(fence[1]);
|
|
36
|
+
schemaCompliant = false;
|
|
37
|
+
}
|
|
38
|
+
let decisions;
|
|
39
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed) && Object.keys(parsed).length === 1 && Array.isArray(parsed.decisions)) {
|
|
40
|
+
decisions = parsed.decisions;
|
|
41
|
+
} else if (Array.isArray(parsed)) {
|
|
42
|
+
decisions = parsed;
|
|
43
|
+
schemaCompliant = false;
|
|
44
|
+
} else if (expectedIds.length === 1 && parsed && typeof parsed === 'object' && parsed.id === expectedIds[0]) {
|
|
45
|
+
decisions = [parsed];
|
|
46
|
+
schemaCompliant = false;
|
|
47
|
+
} else {
|
|
48
|
+
throw new Error('Response has no valid decisions array');
|
|
49
|
+
}
|
|
50
|
+
if (decisions.length !== expectedIds.length || decisions.some((decision, index) => decision?.id !== expectedIds[index])) {
|
|
51
|
+
throw new Error('Response count or case identifiers differ from the input');
|
|
52
|
+
}
|
|
53
|
+
return {decisions, schemaCompliant};
|
|
54
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {outputSchema, parseOutput} from './output-format.mjs';
|
|
4
|
+
|
|
5
|
+
const decision = {id:'cli-verify', action:'report', authority:'video_md', completion_gates:[], reason:'Use markcut verify video.md to check paths.'};
|
|
6
|
+
test('OpenAI output schema has root object and required decisions', () => {
|
|
7
|
+
const s = outputSchema();
|
|
8
|
+
assert.equal(s.type, 'object');
|
|
9
|
+
assert.deepEqual(s.required, ['decisions']);
|
|
10
|
+
assert.equal(s.properties.decisions.type, 'array');
|
|
11
|
+
assert.equal(s.additionalProperties, false);
|
|
12
|
+
assert.deepEqual(s.properties.decisions.items.required, ['id','action','authority','completion_gates','reason']);
|
|
13
|
+
});
|
|
14
|
+
test('round-trip strict OpenAI envelope preserves every decision', () => {
|
|
15
|
+
const data = parseOutput(JSON.stringify({decisions:[decision]}), ['cli-verify']);
|
|
16
|
+
assert.equal(data.schemaCompliant,true);
|
|
17
|
+
assert.deepEqual(data.decisions,[decision]);
|
|
18
|
+
});
|
|
19
|
+
test('legacy array is accepted but flagged as noncompliant', () => {
|
|
20
|
+
const data = parseOutput(JSON.stringify([decision]), ['cli-verify']);
|
|
21
|
+
assert.equal(data.schemaCompliant,false);
|
|
22
|
+
assert.deepEqual(data.decisions,[decision]);
|
|
23
|
+
});
|
|
24
|
+
test('singleton legacy object is accepted only for one matching ID', () => {
|
|
25
|
+
const data=parseOutput(JSON.stringify(decision),['cli-verify']);
|
|
26
|
+
assert.equal(data.schemaCompliant,false);
|
|
27
|
+
assert.deepEqual(data.decisions,[decision]);
|
|
28
|
+
assert.throws(()=>parseOutput(JSON.stringify(decision),['another-id']),/valid decisions array/);
|
|
29
|
+
});
|
|
30
|
+
test('single fenced JSON is accepted without silently hiding envelope failure', () => {
|
|
31
|
+
const data=parseOutput('```json\n' + JSON.stringify({decisions:[decision]}) + '\n```',['cli-verify']);
|
|
32
|
+
assert.equal(data.schemaCompliant,false);
|
|
33
|
+
});
|
|
34
|
+
test('reject incomplete batches, bad identifiers and malformed data',()=>{
|
|
35
|
+
assert.throws(()=>parseOutput(JSON.stringify({decisions:[]}),['cli-verify']),/count or case identifiers/);
|
|
36
|
+
assert.throws(()=>parseOutput(JSON.stringify({decisions:[decision]}),['other-id']),/count or case identifiers/);
|
|
37
|
+
assert.throws(()=>parseOutput('not JSON', ['cli-verify']),/neither JSON nor/);
|
|
38
|
+
});
|
|
@@ -5,6 +5,7 @@ import { mkdirSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import { dirname, join, resolve } from 'node:path';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { outputSchema, parseOutput } from './output-format.mjs';
|
|
8
9
|
|
|
9
10
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
10
11
|
const root = resolve(here, '..');
|
|
@@ -24,15 +25,8 @@ const output = mkdtempSync(join(tmpdir(), 'markcut-skill-codex-eval-'));
|
|
|
24
25
|
const skill = readFileSync(join(root, 'SKILL.md'), 'utf8');
|
|
25
26
|
const decisions = [];
|
|
26
27
|
const run = {model, provider, batchSize, evidenceDir: output, batches: [], strictJsonFormat: true};
|
|
27
|
-
const promptIntro = `You are an agent using a Markcut Skill for a capability-decision test. This is a dry run. DO NOT execute tools, edit files, create videos or assert that tasks were completed. Use ONLY the Skill below as the behavioral contract.\n\nFor EACH independent user request, return one decision.\n\nFields:\n- id: exact request ID.\n- action: the IMMEDIATE next action, one of vision, author, storyboard, native_preview, mcp_review, render, verify, repair, report. After changes_requested, edit video.md BEFORE verifying; do not infer the edit happened. If asked a yes/no question, answer via report without executing anything.\n- authority: source_media (observations and physical assets), selected_video_template (creative/style defaults for new video), or video_md (current video source/edit/review revision/render).\n- completion_gates: zero or more checks needed BEFORE CLAIMING the user's entire requested goal complete: verify, real_playback, human_review. Gates are NOT the immediate next action. For a playable or moving-map result, real_playback matters; for explicit human review/approval, a real human must review the CURRENT revision. Do not require human_review for an ordinary MP4 render. For a factual answer about a setting, no playback is required.\n- reason: a short explanation of the action and important boundary.\n\nReturn ONLY
|
|
28
|
-
|
|
29
|
-
return {type:'array',minItems:size,maxItems:size,items:{type:'object',additionalProperties:false,properties:{
|
|
30
|
-
id:{type:'string'}, action:{type:'string',enum:['vision','author','storyboard','native_preview','mcp_review','render','verify','repair','report']},
|
|
31
|
-
authority:{type:'string',enum:['source_media','selected_video_template','video_md']},
|
|
32
|
-
completion_gates:{type:'array',uniqueItems:true,items:{type:'string',enum:['verify','real_playback','human_review']}},
|
|
33
|
-
reason:{type:'string'},
|
|
34
|
-
},required:['id','action','authority','completion_gates','reason']}};
|
|
35
|
-
}
|
|
28
|
+
const promptIntro = `You are an agent using a Markcut Skill for a capability-decision test. This is a dry run. DO NOT execute tools, edit files, create videos or assert that tasks were completed. Use ONLY the Skill below as the behavioral contract.\n\nFor EACH independent user request, return one decision.\n\nFields:\n- id: exact request ID.\n- action: the IMMEDIATE next action, one of vision, author, storyboard, native_preview, mcp_review, render, verify, repair, report. After changes_requested, edit video.md BEFORE verifying; do not infer the edit happened. If asked a yes/no question, answer via report without executing anything.\n- authority: source_media (observations and physical assets), selected_video_template (creative/style defaults for new video), or video_md (current video source/edit/review revision/render).\n- completion_gates: zero or more checks needed BEFORE CLAIMING the user's entire requested goal complete: verify, real_playback, human_review. Gates are NOT the immediate next action. For a playable or moving-map result, real_playback matters; for explicit human review/approval, a real human must review the CURRENT revision. Do not require human_review for an ordinary MP4 render. For a factual answer about a setting, no playback is required.\n- reason: a short explanation of the action and important boundary.\n\nReturn ONLY a JSON object with one decisions array containing the decisions above (no Markdown fences or text outside JSON), matching the provided output schema.\n\nMARKCUT SKILL:\n${skill}\n\nUSER REQUESTS:\n`;
|
|
29
|
+
|
|
36
30
|
console.log(`Target: codex/${provider}/${model}; artifacts: ${output}; cases=${cases.length}; batch-size=${batchSize}`);
|
|
37
31
|
for (let offset = 0; offset < cases.length; offset += batchSize) {
|
|
38
32
|
const selected = cases.slice(offset, offset+batchSize);
|
|
@@ -42,7 +36,7 @@ for (let offset = 0; offset < cases.length; offset += batchSize) {
|
|
|
42
36
|
const schemaFile = join(batchDir,'schema.json');
|
|
43
37
|
const responseFile = join(batchDir,'raw-response.txt');
|
|
44
38
|
writeFileSync(join(batchDir,'prompt.txt'),prompt);
|
|
45
|
-
writeFileSync(schemaFile,JSON.stringify(
|
|
39
|
+
writeFileSync(schemaFile,JSON.stringify(outputSchema(),null,2));
|
|
46
40
|
const cmd=['exec','--ephemeral','--skip-git-repo-check','--ignore-rules','-s','read-only','-C',batchDir,
|
|
47
41
|
'-c',`model_provider="${provider}"`,'-m',model,'-c','model_reasoning_effort="low"',
|
|
48
42
|
'--json','--output-schema',schemaFile,'--output-last-message',responseFile,'-'];
|
|
@@ -54,27 +48,23 @@ for (let offset = 0; offset < cases.length; offset += batchSize) {
|
|
|
54
48
|
run.batches.push(meta);
|
|
55
49
|
writeFileSync(join(output,'run.json'),JSON.stringify(run,null,2));
|
|
56
50
|
if (result.status!==0) {console.error(`FAIL Codex batch ${meta.index} exit=${result.status} ${result.error?.message??(result.stderr??'').slice(-450)}`);process.exit(1);}
|
|
57
|
-
const raw=readFileSync(responseFile,'utf8');
|
|
51
|
+
const raw = readFileSync(responseFile, 'utf8');
|
|
58
52
|
let response;
|
|
59
|
-
try {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
response = [response];
|
|
70
|
-
meta.strictJsonFormat = false;
|
|
71
|
-
run.strictJsonFormat = false;
|
|
72
|
-
} else {console.error(`FAIL batch ${meta.index}: output is not an array`);process.exit(1);}
|
|
53
|
+
try {
|
|
54
|
+
const parsed = parseOutput(raw, selected.map(c => c.id));
|
|
55
|
+
response = parsed.decisions;
|
|
56
|
+
meta.schemaCompliant = parsed.schemaCompliant;
|
|
57
|
+
if (!parsed.schemaCompliant) {meta.strictJsonFormat = false; run.strictJsonFormat = false;}
|
|
58
|
+
} catch (error) {
|
|
59
|
+
meta.schemaCompliant = false;
|
|
60
|
+
writeFileSync(join(output,'run.json'),JSON.stringify(run,null,2));
|
|
61
|
+
console.error(`FAIL batch ${meta.index}: ${error.message}`);
|
|
62
|
+
process.exit(1);
|
|
73
63
|
}
|
|
74
64
|
writeFileSync(join(batchDir,'normalized-responses.json'),JSON.stringify(response,null,2)+'\n');
|
|
75
65
|
writeFileSync(join(output,'run.json'),JSON.stringify(run,null,2));
|
|
76
66
|
decisions.push(...response);
|
|
77
|
-
console.log(`Batch ${meta.index}: ${response.length} decisions; strict JSON: ${meta.strictJsonFormat?'yes':'NO (
|
|
67
|
+
console.log(`Batch ${meta.index}: ${response.length} decisions; strict JSON: ${meta.strictJsonFormat?'yes':'NO (legacy envelope)'}`);
|
|
78
68
|
}
|
|
79
69
|
const combined=join(output,'responses.json');
|
|
80
70
|
writeFileSync(combined,JSON.stringify(decisions,null,2)+'\n');
|
|
@@ -82,6 +72,6 @@ const scoring=spawnSync(process.execPath,[join(here,'check.mjs'),combined],{enco
|
|
|
82
72
|
writeFileSync(join(output,'score.txt'),(scoring.stdout??'')+(scoring.stderr??''));
|
|
83
73
|
process.stdout.write(scoring.stdout??'');
|
|
84
74
|
process.stderr.write(scoring.stderr??'');
|
|
85
|
-
if (!run.strictJsonFormat) console.log('FORMAT WARNING: at least one batch
|
|
75
|
+
if (!run.strictJsonFormat) console.log('FORMAT WARNING: at least one batch did not follow the output schema; original response preserved.');
|
|
86
76
|
if (run.batches.some(b=>b.modelMetadataWarning)) console.log('Codex warning: missing model metadata; fallback metadata was used.');
|
|
87
77
|
process.exit(scoring.status??1);
|