amsd-pipeline-workflow 0.1.22 → 0.1.23

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.
@@ -37,7 +37,9 @@ function runScriptStep(a, input) {
37
37
  /**
38
38
  * A GATE BLOCK IS FAILURE HISTORY (run 11, 2026-10-20: the reproduction gate blocked one story five times and nothing carried the reason to the next attempt).
39
39
  * When the reproduction gate RAN and did not pass, one record is appended to the run's story-failures.jsonl in the pipeline's own format
40
- * (story-attempt.sh:2666–2688: storyId, failureClass, model, attempt, exitCode, rawBytes, outputTokens, maxIterations, timestamp) plus the gate's reason: the
40
+ * (story-attempt.sh:2666–2688: storyId, failureClass, model, attempt, exitCode, rawBytes, outputTokens, maxIterations, timestamp) plus the gate's reason and the block's ordinal. `attempt` stays 0:
41
+ * the pipeline's ladder classifier (lib/model-ladder.sh classify_ladder_tier) counts distinct .attempt values and the highest one over EVERY record of the story, and a gate block is not a Writer retry
42
+ * attempt — numbering blocks there would move the Writer to the "high" (dearer) ladder without anyone choosing it (review of R2). The
41
43
  * driver persists the file to the lane's log (driver/stages.js persistFailures) and the next generation reads it (generator/generate.js plan.repro.priorBlocks).
42
44
  */
43
45
  function recordGateBlock(a, result) {
@@ -46,7 +48,7 @@ function recordGateBlock(a, result) {
46
48
  const file = path.join(a.state, 'pipeline-env', 'logs', 'story-failures.jsonl');
47
49
  let prior = 0;
48
50
  try { prior = fs.readFileSync(file, 'utf8').split('\n').filter(Boolean).map((l) => JSON.parse(l)).filter((r) => r.storyId === pj.story && r.failureClass === 'repro-gate-block').length; } catch { prior = 0; }
49
- const rec = { storyId: pj.story, failureClass: 'repro-gate-block', model: 'gate', attempt: prior + 1, exitCode: 2, rawBytes: 0, outputTokens: 0, maxIterations: 0,
51
+ const rec = { storyId: pj.story, failureClass: 'repro-gate-block', model: 'gate', attempt: 0, blockOrdinal: prior + 1, exitCode: 2, rawBytes: 0, outputTokens: 0, maxIterations: 0,
50
52
  timestamp: new Date().toISOString(), gate: '3.55', reason: String(result.reason || '').slice(0, 1500) };
51
53
  fs.mkdirSync(path.dirname(file), { recursive: true });
52
54
  fs.appendFileSync(file, `${JSON.stringify(rec)}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amsd-pipeline-workflow",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "The AMSD pipeline as Claude workflows. Installed by the amsd-pipeline installer: install.sh --workflows",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {