mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-04 15:57:33 +01:00
* feat(eval-plan): results --check refuses a results table without its no-gstack rows Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(model-panel): a <model>#no-gstack arm per model, identity-keyed cells, one campaign, results.md (GST-468) Each panel model also runs as <model>#no-gstack: the same fixture, ticket, tools, limits, route and reservation, with no skill folder and no routing line. The arm identity keys the ledger attempt, test name, row and summary; candidate folders are named after the fixture project and the seed commit has a neutral author. summarize reads one campaign (run id and PREREG.md sha256) and refuses a duplicate cell; suggestionLine reads the skill arms only, so the preregistered particle-1 line is unchanged. renderResults writes results.md, which passes gstack-eval-plan results --check against the new test/fixtures/model-panel/PREREG.md (supersedes GSTA-173 for later runs). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(arm-benchmark): no-gstack arm on a pinned model, 3 paired trials, both-order paired judge, spend ledger (GST-469) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(evals): no-gstack arm for the safety-rule and router evals (GST-470) GSTACK_SAFETY_ARM and GSTACK_ROUTER_ARM take a third value, none: the same fixture, tools and user request with no skill excerpt, rule text, step file or installed skill. Under none every behavioral check is recorded as an observation (none-arm-observations.jsonl) and never fails the case or writes contract-violations.jsonl; harness preconditions still assert. The four safety prompt builders (ship-evidence, codex-boundary, codex-consult, design-risk) and the router fixtures move into helpers; the rule, removed, current and before prompts stay byte-identical, proven against reference copies of main's code. pair-agent and ios-demo refuse none with the reason (NO_NONE_ARM). GSTACK_ROUTER_ARM now throws on an unknown value instead of silently running current. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: changelog fragment for the no-gstack arms in existing evals Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(arm-benchmark): arm-pair paired-judge calibration run (bar met 6/6, $7.22) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(paid-shards): keep loop-named panel and arm-benchmark cases selectable by --case The lanes moved each cell's testName into helpers, so the static detector no longer saw a computed registration and B4 failed for all eight cases. Same runtime test names; the paid runs are unaffected. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(tests): keep FREE_FIXTURES and the placeholder allowlist current for the no-gstack arms scripts/judge-calibration.ts is now an arm-benchmark paid touchfile, so it can no longer be a free consumer of test/fixtures/judge-calibration/** (CI free-suite 8). The eval-plan Step 5 fence names <prereg-path> and <results-path>; allowlist both as PATH placeholders (CI free-suite 19). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(eval-plan): cover a complete table after a partial one, --json output and the results usage error Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(eval-plan): keep the Step 7 coverage test as reviewed Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: name the changelog fragment after the branch slug Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: arm-benchmark project folder names and the arm-pair calibration corpus Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: keep the judge-calibration fixture README as reviewed Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(skills): describe eval-plan results --check Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
46 lines
1.9 KiB
TypeScript
46 lines
1.9 KiB
TypeScript
/**
|
|
* The descriptive no-gstack arm (`none`) of the safety-rule and router evals
|
|
* (GST-470, docs/TESTING_INTERNALS.md#no-gstack-arm). Under a gstack arm a
|
|
* behavioral check asserts exactly as it always has. Under `none` the same check
|
|
* is recorded as an observation: it never fails the case and never writes
|
|
* contract-violations.jsonl. Harness preconditions still assert in every arm.
|
|
*/
|
|
import * as fs from 'node:fs';
|
|
import * as path from 'node:path';
|
|
|
|
export const OBSERVATIONS_FILE = 'none-arm-observations.jsonl';
|
|
|
|
/** What the candidate sees from the instrument: its prompt and the files written beside it. */
|
|
export interface ArmTask {
|
|
prompt: string;
|
|
/** Absolute path → contents. Empty for a no-gstack arm. */
|
|
files: Record<string, string>;
|
|
}
|
|
|
|
export function writeArmTask(task: ArmTask): void {
|
|
for (const [file, text] of Object.entries(task.files)) {
|
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
fs.writeFileSync(file, text);
|
|
}
|
|
}
|
|
|
|
export interface Observation { case_id: string; arm: 'none'; check: string; held: boolean; at: string }
|
|
|
|
/** Record one no-gstack observation: in GSTACK_EVAL_DIR when set, and on stderr. */
|
|
export function recordObservation(caseId: string, held: boolean, check: string): Observation {
|
|
const row: Observation = { case_id: caseId, arm: 'none', check, held, at: new Date().toISOString() };
|
|
const evalDir = process.env.GSTACK_EVAL_DIR;
|
|
if (evalDir) {
|
|
fs.mkdirSync(evalDir, { recursive: true });
|
|
fs.appendFileSync(path.join(evalDir, OBSERVATIONS_FILE), JSON.stringify(row) + '\n');
|
|
}
|
|
process.stderr.write(`OBSERVATION ${caseId} (none): ${held ? 'held' : 'did not hold'}: ${check}\n`);
|
|
return row;
|
|
}
|
|
|
|
/** Run `assert` under a gstack arm; under `none`, record whether `held` instead. */
|
|
export function observe(arm: string, caseId: string, held: boolean, check: string, assert: () => void): void {
|
|
if (arm === 'none') recordObservation(caseId, held, check);
|
|
else assert();
|
|
}
|