@dzhechkov/harness-core 0.4.1 → 0.4.2

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/.dz-manifest.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "path": "README.md",
12
- "sha256": "060c5b874314f9d48f36d80ff9496a52069518d5da9c72886613360212b34ec3"
12
+ "sha256": "38075eff264a85fb8511a8ed21b323bd13bc095bc236a53f47aa0cd214262181"
13
13
  },
14
14
  {
15
15
  "path": "coverage/coverage-final.json",
@@ -433,19 +433,19 @@
433
433
  },
434
434
  {
435
435
  "path": "dist/feature-adr-checkpoints.d.ts",
436
- "sha256": "daa3edcc33b71810f656f44b2ac0e0267e1da3a359735ae9ce42c80105be1cb5"
436
+ "sha256": "0d80d6445c7763bfb6ca84104f27ebadfb7d5fde3fb17f8e382104b6b04025df"
437
437
  },
438
438
  {
439
439
  "path": "dist/feature-adr-checkpoints.d.ts.map",
440
- "sha256": "6af70e8f05bea3c639877c96f9df2c6198a6184d38088c6027f662e49e52f602"
440
+ "sha256": "1eba53add92f81ad29474e75d7ab762d6661f8e5cf4b6c096a736b454afbd4f1"
441
441
  },
442
442
  {
443
443
  "path": "dist/feature-adr-checkpoints.js",
444
- "sha256": "2c98cb2516c69d2d93be374dc3796dbe8d8938dee206250fadf973ed8fde5922"
444
+ "sha256": "334565154e5440279e98aa1286087657486cc30472b0e9452d7cd2f997e51371"
445
445
  },
446
446
  {
447
447
  "path": "dist/feature-adr-checkpoints.js.map",
448
- "sha256": "9578bdaec4087de1b3f29e4475420f37ce9e82289dbb5e405592f34e8ac14dec"
448
+ "sha256": "78767e0234eb35ed2e8ce13db487b9ceaf2daa078e6de830fdd530d32bcfc561"
449
449
  },
450
450
  {
451
451
  "path": "dist/feature-adr-claim-gate.d.ts",
@@ -545,19 +545,19 @@
545
545
  },
546
546
  {
547
547
  "path": "dist/index.d.ts",
548
- "sha256": "242cb7513d2926d61b2b8f47ae9f47546b4aa6c1fec5ec9d9dc05d02c23d6aab"
548
+ "sha256": "9627d08cb2cfed48c5df73139a8058df950d446e851a46b11da773f1f489e898"
549
549
  },
550
550
  {
551
551
  "path": "dist/index.d.ts.map",
552
- "sha256": "e6352b7edb4ae82b7faab536e1430305fa5a5fb0ff395b6da7861408dd4ccaf0"
552
+ "sha256": "9bdc1cb1437e8bf4d3d36633b9b3c3a79390a5ad4e7029569d1f3bca1a19778a"
553
553
  },
554
554
  {
555
555
  "path": "dist/index.js",
556
- "sha256": "786fabf610d92726578e696b5ff6b58e73eb6c215e28543277908348080601b4"
556
+ "sha256": "e5539523544cca54ee1516f66369d916de376c2dff79b92abbd4ae3a874a475e"
557
557
  },
558
558
  {
559
559
  "path": "dist/index.js.map",
560
- "sha256": "0996c1f73d91582d9eeae63539d2aee82fdd4c03ac55df008d7c5462b4207e63"
560
+ "sha256": "c8555938a52e184f548db2dd9cfba6d868ce1b8977053ba0d1036c36fa122a40"
561
561
  },
562
562
  {
563
563
  "path": "dist/learning-backend.d.ts",
@@ -585,11 +585,11 @@
585
585
  },
586
586
  {
587
587
  "path": "dist/loop-blobs.generated.js",
588
- "sha256": "7e1227881980bb499b8dd9f4a208e20371fa78503414145bac3e13b55f529c7c"
588
+ "sha256": "06617b763dc879d43f1320fdbb422fc4c61b47aea7656ca8a6508dcbe3a62778"
589
589
  },
590
590
  {
591
591
  "path": "dist/loop-blobs.generated.js.map",
592
- "sha256": "0ba0a679c36b4079acb501e8946b1ad2e0566215ca1f055562b896a944d0b3e9"
592
+ "sha256": "8c5d5828f4b0ba6dd32a15de8a3eae4e683dc8a9616d7d4cc71e07d693bfe427"
593
593
  },
594
594
  {
595
595
  "path": "dist/loop-lint.d.ts",
@@ -629,31 +629,31 @@
629
629
  },
630
630
  {
631
631
  "path": "dist/loop-render.d.ts.map",
632
- "sha256": "3529ffd29a456232d3de543c8aeeaeed32037888ea5c9352c802247a4faff627"
632
+ "sha256": "5586404be53e6aaf76ea248c420ee0f6fe1be1220e1a049112429bc5c0c0ab4c"
633
633
  },
634
634
  {
635
635
  "path": "dist/loop-render.js",
636
- "sha256": "44a5ffdd1ce93681d5a8cc52b50efbc6cad39522284f7cca982c588e2a4650db"
636
+ "sha256": "51f331c1fddf74623f02dfa45ac86ca3650b1ce885f33cb07b3c3101a9de38ff"
637
637
  },
638
638
  {
639
639
  "path": "dist/loop-render.js.map",
640
- "sha256": "7536a674a22b87551632629b2d46f69abda14952069faad16ade039bf9ce2978"
640
+ "sha256": "ffecd7640d6f93c8fa6be63ccc75e4be5a05ba74593513e4ce530300ce1ce02b"
641
641
  },
642
642
  {
643
643
  "path": "dist/loop-trace.d.ts",
644
- "sha256": "1d864c9a6cbfc53bf7464a9e5d25b866e504aac7eb51c1575f202d2e3ccabd51"
644
+ "sha256": "4b77555c0b7f31ed9a8ebacb7d84de0b0b9c7921b1a56a02ea15db27e55451c5"
645
645
  },
646
646
  {
647
647
  "path": "dist/loop-trace.d.ts.map",
648
- "sha256": "f7fb6b44f0cd2c745dc466d2f556abfe5056cae15a780119146f451530df0297"
648
+ "sha256": "8ed238c4257c566d0dbde8666d6be2c85669f7ec0485920fed96595a13df79b6"
649
649
  },
650
650
  {
651
651
  "path": "dist/loop-trace.js",
652
- "sha256": "3c774e55b5a5706bb0f28e062457d141db92d970f9fa1d492d660f9c5e0bbb8f"
652
+ "sha256": "28056d64766b8302925d76c901d3796fbbe9201c345c738fe0ce5143e7fe3a19"
653
653
  },
654
654
  {
655
655
  "path": "dist/loop-trace.js.map",
656
- "sha256": "0b890d58a4e5529848eaba26a4a921c8f9dd262a94bb99c1d82d450d4bc98fe0"
656
+ "sha256": "8de7be34542cc18737e700545cf0eaea8511accb32423666fed37c0a7c947068"
657
657
  },
658
658
  {
659
659
  "path": "dist/mcp-scan.d.ts",
@@ -1185,19 +1185,19 @@
1185
1185
  },
1186
1186
  {
1187
1187
  "path": "dist/statusline.d.ts",
1188
- "sha256": "dd48a73277b561f154142429e154533f671b681ab1a227baaff9faec59af3ee5"
1188
+ "sha256": "b55c3a156695c6c573f515eec6fd8c51ccecb360f6348188dae53fc467668fe1"
1189
1189
  },
1190
1190
  {
1191
1191
  "path": "dist/statusline.d.ts.map",
1192
- "sha256": "c5b62c2cd922a42df8e8c09ce624c598297e1e68a3ce46446b719f9c228e207f"
1192
+ "sha256": "4207a2301c0e61cdd3b6ac8d7cac04cc007091ab64f77f26124297d46ba19c9a"
1193
1193
  },
1194
1194
  {
1195
1195
  "path": "dist/statusline.js",
1196
- "sha256": "53de25686d6ba8a0e26356e02e1b0d6b318930426505e7e40333b4a77673aa33"
1196
+ "sha256": "42a136ccd10e9c58053c9539032b543cf48348b6648ec18bd6a3738b0e514666"
1197
1197
  },
1198
1198
  {
1199
1199
  "path": "dist/statusline.js.map",
1200
- "sha256": "2757465ad079ece4963f0dba521b488097642067882e43c4e888629210e33708"
1200
+ "sha256": "124317a63f64b9dc21f248fb275553bbee7bed62f8df8840fe969995ab73191b"
1201
1201
  },
1202
1202
  {
1203
1203
  "path": "dist/store-lock.d.ts",
@@ -1313,7 +1313,7 @@
1313
1313
  },
1314
1314
  {
1315
1315
  "path": "package.json",
1316
- "sha256": "5b86f2f4e995c759d1e974274d45d61e2cbd3a18b44fcb9636c9e3e4e7a343f5"
1316
+ "sha256": "ea03d5e887b1d0c162af8aeff0f4aa573f9518d0c2817e3420d2cc1c85c46d10"
1317
1317
  },
1318
1318
  {
1319
1319
  "path": "src/__tests__/golden-baseline.test.ts",
@@ -1421,7 +1421,7 @@
1421
1421
  },
1422
1422
  {
1423
1423
  "path": "src/feature-adr-checkpoints.ts",
1424
- "sha256": "f989555f819c358cbd0e2da061cae1662691a1d2c5f7be6cfcb841872b97b6b6"
1424
+ "sha256": "3b09f6bd8cb0ca2f72b2d203037712510ba6869abf2224fe339c0e9e6eececb7"
1425
1425
  },
1426
1426
  {
1427
1427
  "path": "src/feature-adr-claim-gate.ts",
@@ -1449,7 +1449,7 @@
1449
1449
  },
1450
1450
  {
1451
1451
  "path": "src/index.ts",
1452
- "sha256": "531b118b716d076613472a737678d692dcea348d67c2e968aea6dee7370cee49"
1452
+ "sha256": "fcb9874452e419c2290b4e1b20d7b2087f34d94762e1b6b14f7dd05174c699e9"
1453
1453
  },
1454
1454
  {
1455
1455
  "path": "src/learning-backend.ts",
@@ -1457,7 +1457,7 @@
1457
1457
  },
1458
1458
  {
1459
1459
  "path": "src/loop-blobs.generated.ts",
1460
- "sha256": "0fadfbe81d6f105755eb8a15ad31153df5a74785c77a8c8b3a9902d20573ab5f"
1460
+ "sha256": "7433b7f1dea51a494d4a4587872d46339383b69052e8fd2127d9feffe47eaa43"
1461
1461
  },
1462
1462
  {
1463
1463
  "path": "src/loop-lint.ts",
@@ -1469,11 +1469,11 @@
1469
1469
  },
1470
1470
  {
1471
1471
  "path": "src/loop-render.ts",
1472
- "sha256": "4c70eb24a28c252491a0b981d87e63d754d5656064ec142ef1d1eb84d727a7b6"
1472
+ "sha256": "6761caa91ce493512cf5d2791ec4f83ca33b4c1dfc1ce9c3b8068812b4034efd"
1473
1473
  },
1474
1474
  {
1475
1475
  "path": "src/loop-trace.ts",
1476
- "sha256": "e60170bc28d2d277a0b48a9aebff13c1325adfa4ec6181ac043ef3748371d40e"
1476
+ "sha256": "88f31edf1d7d1e5ba7223812ad36cc3166e66bee5e9adb2fcbc8ff2e0d82f471"
1477
1477
  },
1478
1478
  {
1479
1479
  "path": "src/mcp-scan.ts",
@@ -1605,7 +1605,7 @@
1605
1605
  },
1606
1606
  {
1607
1607
  "path": "src/statusline.ts",
1608
- "sha256": "16fd659084c6996fa659152bf25846163210bb4ffb74a36315447df94034cdc9"
1608
+ "sha256": "31000d5b249345d659478d7eb49f10771015d9c180ab265ab1cb915ee180b092"
1609
1609
  },
1610
1610
  {
1611
1611
  "path": "src/store-lock.ts",
@@ -1781,7 +1781,7 @@
1781
1781
  },
1782
1782
  {
1783
1783
  "path": "test/feature-adr-checkpoints.test.ts",
1784
- "sha256": "8564e1953e6da1f5a2b0990b1e5d8c78b24cc268a2c4eea15609d90b8fbda6f6"
1784
+ "sha256": "73ae6836ce37a7b15dfd92c616e7d8fefba9e64a50ec1fded0630e7c6cdfebaa"
1785
1785
  },
1786
1786
  {
1787
1787
  "path": "test/feature-adr-claim-gate.test.ts",
@@ -1805,7 +1805,11 @@
1805
1805
  },
1806
1806
  {
1807
1807
  "path": "test/feature-adr-training-pairs.test.ts",
1808
- "sha256": "2bb5e22fec67e0a9da8abb9265bc427a6ce257e1ef0eddae9d93b4542e5a29f7"
1808
+ "sha256": "15587c9971e17e14e7627564038a89132c983e81d4f87bf9053be61a2a459366"
1809
+ },
1810
+ {
1811
+ "path": "test/feature-adr-workflow-twin-drift.test.ts",
1812
+ "sha256": "2b43ee26290b1617fc8b4a5ae81d7958dac0761041e63cd4d544383db628fa80"
1809
1813
  },
1810
1814
  {
1811
1815
  "path": "test/files-whitelist-guard.test.ts",
@@ -1869,7 +1873,7 @@
1869
1873
  },
1870
1874
  {
1871
1875
  "path": "test/helpers/loop-step-stub.mjs",
1872
- "sha256": "69993ac98e2c82bf78c2fe3ca7921841aaa268b2279b917fabfff206280f753f"
1876
+ "sha256": "fd5929315e22bfa7f20bbd941c8a0385faf3360b0d48f473887569b03d36bf01"
1873
1877
  },
1874
1878
  {
1875
1879
  "path": "test/import-upsert.test.ts",
@@ -1913,7 +1917,7 @@
1913
1917
  },
1914
1918
  {
1915
1919
  "path": "test/loop-render.test.ts",
1916
- "sha256": "cc845e37e628baa4ba0f2ebfc74725fca8cb4c40d1836c1ff88d1345008af963"
1920
+ "sha256": "a9718058c1887f6a6268986c050bf5f8c1b08a53f4aceed7e5c15038cc9e94d2"
1917
1921
  },
1918
1922
  {
1919
1923
  "path": "test/loop-trace-seq.test.ts",
@@ -1921,7 +1925,7 @@
1921
1925
  },
1922
1926
  {
1923
1927
  "path": "test/loop-trace.test.ts",
1924
- "sha256": "cd1926fa0b86e7c1dd45ddec00f3a6bc062cfe7126d0c0a1bb28a8e8ca642dd9"
1928
+ "sha256": "3d5a71a6b2841683a7fc55947960c54a8ad5bcb8988dec2d9ef44b88d00f7b6f"
1925
1929
  },
1926
1930
  {
1927
1931
  "path": "test/mcp-scan.test.ts",
@@ -1933,7 +1937,7 @@
1933
1937
  },
1934
1938
  {
1935
1939
  "path": "test/mutation-registry.json",
1936
- "sha256": "ee885086ac4ecd407275959fe282743543f8d561427a26d9597015fe6b63108f"
1940
+ "sha256": "50101e4656c4cffe36d97c95f0b740a9e5a1ad10ad38949c3f7a2bec3d63d631"
1937
1941
  },
1938
1942
  {
1939
1943
  "path": "test/new-features.test.ts",
@@ -2045,7 +2049,7 @@
2045
2049
  },
2046
2050
  {
2047
2051
  "path": "test/statusline.test.ts",
2048
- "sha256": "8fbe02097b01e941cc7cc724c40fb03f047b893151d685ba430bb8edab8bdd5e"
2052
+ "sha256": "7398a7c71ffb095c4ad03045f59955da309184e54ce096ad65a56a72e83afdb8"
2049
2053
  },
2050
2054
  {
2051
2055
  "path": "test/store-lock.test.ts",
@@ -2097,5 +2101,5 @@
2097
2101
  }
2098
2102
  ]
2099
2103
  },
2100
- "signature": "VNexK+pVEWqJPuhd9XEa5oHNMDHjpcJ5HLymE85qNBGj81vPfv7qIZW0hUknU02KOPZ2gd6Fg66bzh7Fr+AsAw=="
2104
+ "signature": "dXB38SyT/GofWm29qA4AajJ3sOrWPM6ARzV1XsfsA9G7f8ExH5YrxDb48P/RrUT3fj0SYPsDPyl79/YClAJOBQ=="
2101
2105
  }
package/README.md CHANGED
@@ -22,6 +22,7 @@ and any other consumer.
22
22
  | `feature-adr-checkpoints` | `checkpointInputHash`, `decideCheckpointResume`, `parseCheckpointRead`, `serializeCheckpoint`, `fnv1a64`, `CKPT_SCHEMA_VERSION`, `STAGE_ARTIFACTS` | The PURE half of feature-adr's durable per-stage checkpoints (`features/<slug>/.fa-state/checkpoints.jsonl`): a dead L/XL run — or the standard stop-after-plan re-invoke — resumes completed stages instead of re-spending them. Resume = INPUT-identity (64-bit salted FNV over a schema-versioned JSON tuple incl. upstream stage results) + presence of EVERY tier-required artifact; a stale-input hash never resumes in ANY mode (`force` relaxes only the artifact probe — the tested load-bearing property). HONEST SCOPE: it does NOT fingerprint the working tree (a crash-resume legitimately sees the dead run's uncommitted writes) — after manual edits use `resume:'never'` and re-QE. Null results are never persisted or resumable; a stage-identifiable corrupt record ERASES its older entry (last-wins holds for corruption too); a codex code stage whose landing barrier said `genuinely-not-landed` is never checkpointed. The workflow mirrors this inline (wiring-guarded); RU: чекпоинт после каждой дорогой стадии — упавший ран возобновляется, а не пере-тратит завершённое |
23
23
  | `feature-adr-training-pairs` (in `feature-adr-checkpoints`) | `buildTrainingPair`, `serializeTrainingPair`, `trainingPairPath`, `trainingPairAppendCmd`, `modelFamily`, `TRAINPAIR_SCHEMA_VERSION`, `TRAINPAIR_MAX_IO_CHARS`, `TRAINPAIR_PRIVACY_NOTE` | The PURE half of feature-adr TRAINING-PAIR capture (backlog 70e0f083): every checkpointed stage emits one SFT-ready JSONL record — STAGE INPUT (full prompt/context) → STAGE OUTPUT (artifact/result) → EVALUATION {QE grade, gradedBy, lessonsInjected} with provenance {model, FAMILY ∈ claude/codex, role} — to `.dz/fa-training/<slug>/<stage>.jsonl` (one file per stage), raw material for future local-model fine-tuning. FAMILY is load-bearing: the downstream dataset must honour the cross-model rule (QE pairs from a DIFFERENT family than the coder). Oversize guard: input+output over 48k chars is TRUNCATED with a named marker + full-text fnv1a64 — never silently dropped, never unbounded. A stage without a QE grade (router) records `grade:null` honestly. Deterministic: `ts` is passed in (the workflow fills it shell-side). Capture is default-ON in the workflow, opt-out `args.captureTrainingPairs:false`, non-blocking (a capture failure never fails the run). PRIVACY: pairs may contain target-repo code; the capture dir carries a README note; NOT gitignored by explicit owner decision. RU: тренировочные пары вход→выход→оценка с каждого прогона feature-adr — сырьё для будущей локальной модели |
24
24
  | `reqe` | `shouldEmitReqeDebt`, `buildReqeDebt`, `parseReqeDebt`, `buildReqeBrief`, `extractReportGrade`, `settleReqeDebt`, `renderReqeList`, `REQE_SCOPE` | The pure half of `dz reqe` — the re-QE debt ledger: when feature-adr's usage-adaptive override made Step-8 QE run on the coder's OWN family (the cross-model guard consciously suspended, FR-2.9), the run records a debt in `features/<slug>/.fa-state/reqe-due.json`. Emission is the NARROW case only (same-family + the ` (usage-switched)` label — never every switch, never the no-override Claude belt); settlement is FAIL-CLOSED: an existing, non-trivial report naming exactly ONE line-anchored grade (`GRADE A-F` boilerplate and `A through F` ranges refused, ambiguity refused), never the run's own 08_qe_report.md. Debts carry the emitting run's stamp so an old settlement never immunizes a fresh run. HONEST SCOPE printed everywhere: nothing re-runs QE automatically; the validator proves procedural soundness, not authorship. RU: снятый под лимитом гард «кодер не ревьюит сам себя» становится долгом на диске, а не памяткой |
25
+ | `statusline` | `statuslineData`, `readFeatureAdrState`, `writeFeatureAdrState`, `featureAdrStateDir`, `featureAdrStatePath`, `FeatureAdrState` | The live self-learning panel behind `dz statusline`, plus the LIVE-RUN segment two producers share. Each producer owns a per-slug slot under `.dz/feature-adr/learning-state/` and stamps `kind: 'feature-adr' \| 'loop'` (absent ⇒ `feature-adr`, so legacy states keep their meaning); `readFeatureAdrState` arbitrates by `(kind rank, ts)` — a fresh `feature-adr` state OUTRANKS any `loop` state, because a generated loop writes zero recalled/stored counters far more often and plain freshest-wins would empty the panel of the very thing it exists to show. Candidates are stat'ed and ordered newest-first BEFORE the bounded slice, so truncation can only ever drop the least-recent slot — a cap over an unsorted listing could hide the live slot behind older ones (MEASURED: 81 slots, the live one invisible). The render path is strictly READ-ONLY (~300 ms budget); housekeeping — a 24 h prune — belongs to the write path alone. Hostile slugs are sanitized to one bounded filename component and cannot escape the directory. Nothing older than 30 minutes is surfaced |
25
26
  | `operations` | `runInit`, `runSync`, `runVerify`, `runDoctor` | The harness operations, returning structured reports |
26
27
  | `release` | `collectPackageFacts`, `selectAffectedPackages`, `planReleaseGates`, `classifyGateExecutions`, `buildFailureIssue`, `firstOutputLine` | Pure verified-release engine behind `dz release`: plans 4 HARD gates (tests / `pnpm audit --prod` / `node --check` / bin smoke-boot) as DATA and classifies injected results fail-closed — an unbuilt package (declared `build` script, no dist JS) is a `MISSING_DIST` failure, a template-only pack is a named `SKIP_NO_ARTIFACTS` skip, `selectAffectedPackages` fail-opens to the full set when the changed-file list is unavailable |
27
28
  | `parity` | `TARGET_CAPABILITIES`, `PARITY_FEATURES`, `computeParity`, `buildParityMatrix` | Declarative target-parity model behind `dz parity`: verified capability flags per target × feature FORMS with requirements; the feature×target matrix is always COMPUTED (never hand-written), and the model must classify exactly `TARGET_NAMES` — an unclassified new target refuses to compile |
@@ -105,11 +106,11 @@ now ships the loop-designer meta-factory:
105
106
  (ha-consult-router region); the remaining hand-mirrors carry in-file "stage 2 pending" notes and
106
107
  a tracked backlog item — never a blanket closure claim.
107
108
 
108
- **BREAKING in 0.4.1** (0.x minor is this package's breaking channel): the ADR-005 workflow
109
+ **BREAKING in 0.4.2** (0.x minor is this package's breaking channel): the ADR-005 workflow
109
110
  templates are retired — `WorkflowTemplate`/`WORKFLOWS`/`getWorkflow` removed, `WORKFLOW_NAMES`
110
111
  now empty. Replacement: `dz workflow init/validate/render` + `dz workflow-lint`/`dz workflow-trace`
111
112
  (see the CHANGELOG).
112
113
 
113
114
  ## Status
114
115
 
115
- `0.4.1` — stable.
116
+ `0.4.2` — stable.
@@ -25,7 +25,7 @@
25
25
  */
26
26
  /** Blob version stamp read by scripts/gen-loop-blobs.mjs (feature loop-designer, ADR-004) — the
27
27
  * ONLY loop-designer change to this canonical file; bump when any blob-exported semantic changes. */
28
- export declare const BLOB_VERSION = "1.0.0";
28
+ export declare const BLOB_VERSION = "1.1.0";
29
29
  /** Stages the workflow checkpoints, in pipeline order. Cheap side-channel agents (usage probes,
30
30
  * fa-record, auto-cost selects) are never checkpointed; the opt-in Delivery gate re-runs by design
31
31
  * (advisory verdicts should reflect the CURRENT tree). */
@@ -113,8 +113,29 @@ export declare function checkpointReadCmd(fdirAbs: string): string;
113
113
  * is single-quote-escaped as a whole — JSON.stringify output never contains literal newlines, so
114
114
  * printf '%s\n' emits exactly one record. */
115
115
  export declare function checkpointAppendCmd(fdirAbs: string, line: string): string;
116
+ export type CaptureMode = 'capture' | 'backfill' | 'skip-disabled' | 'skip-empty';
117
+ /** Decide whether this completion is captured. A resumed stage is backfilled rather than
118
+ * skipped: its input (stage template + args) and checkpointed output are both in scope at the
119
+ * capture site, so the pair is deterministically reconstructible. trainingPairBackfillCmd's
120
+ * persistent atomic mark makes that write at-most-once, so concurrent invocations and later
121
+ * runIds cannot double-append the same pair. */
122
+ export declare function decideCaptureMode(opts: {
123
+ enabled: boolean;
124
+ resumed: boolean;
125
+ recordCount: number;
126
+ }): CaptureMode;
127
+ export type CaptureFailureReason = 'threw' | 'unserializable' | 'unverified' | 'backfill-unverified' | 'empty-output';
128
+ export interface CaptureFailureRecord {
129
+ stage: string;
130
+ mode: CaptureMode | null;
131
+ reason: CaptureFailureReason;
132
+ detail: string | null;
133
+ }
134
+ /** Normalize capture failures for collection by the caller. This recorder must never throw:
135
+ * replacing the original capture failure with a reporting failure would hide the real cause. */
136
+ export declare function captureFailureRecord(stage: unknown, mode: unknown, reason: unknown, detail: unknown): CaptureFailureRecord;
116
137
  /** Training-pair record format version. Bump on any field-shape change. */
117
- export declare const TRAINPAIR_SCHEMA_VERSION = "fa-trainpair-1";
138
+ export declare const TRAINPAIR_SCHEMA_VERSION = "fa-trainpair-2";
118
139
  /** Oversize guard cap over input+output combined (same posture as
119
140
  * CHECKPOINT_MAX_RESULT_CHARS, sized for full stage prompts): an over-cap pair is
120
141
  * TRUNCATED with a named marker + a hash of the full text — never silently dropped
@@ -157,18 +178,21 @@ export interface TrainingPair {
157
178
  schema: string;
158
179
  slug: string;
159
180
  stage: string;
181
+ /** ts is the CAPTURE time. On a record with captureMode: 'backfill' that is the RECONSTRUCTION time, NOT the stage's observation time — the original stage's timing lives in that run's .fa-state checkpoint. */
160
182
  ts: number | string | null;
161
183
  input: string;
162
184
  output: string;
163
185
  evaluation: TrainingPairEvaluation;
164
186
  provenance: TrainingPairProvenance;
165
187
  truncated: TrainingPairTruncation | null;
188
+ captureMode: 'capture' | 'backfill';
189
+ resumed: boolean;
166
190
  }
167
191
  /** Per-stage JSONL path, relative to the repo root. ONE file per stage. */
168
192
  export declare function trainingPairPath(slug: string, stage: string): string;
169
193
  /** README dropped once into the capture dir. The caveat is documented ON DISK because the
170
194
  * directory is deliberately not gitignored (explicit owner decision, 2026-08). */
171
- export declare const TRAINPAIR_PRIVACY_NOTE = "feature-adr TRAINING PAIRS (backlog 70e0f083): per-stage SFT records - STAGE INPUT (full prompt/context) -> STAGE OUTPUT (artifact/result) -> EVALUATION (QE grade + injected lessons) with model+family provenance; one JSONL file per stage per slug. PRIVACY: pairs may contain TARGET-REPO CODE and full prompts. This directory is NOT gitignored yet by explicit owner decision - review contents before sharing or publishing anything that embeds it.";
195
+ export declare const TRAINPAIR_PRIVACY_NOTE = "feature-adr TRAINING PAIRS (backlog 70e0f083): per-stage SFT records - STAGE INPUT (full prompt/context) -> STAGE OUTPUT (artifact/result) -> EVALUATION (QE grade + injected lessons) with model+family provenance; one JSONL file per stage per slug. PRIVACY: pairs may contain TARGET-REPO CODE and full prompts. This directory is NOT gitignored yet by explicit owner decision - review contents before sharing or publishing anything that embeds it. ts is the CAPTURE time. On a record with captureMode: 'backfill' that is the RECONSTRUCTION time, NOT the stage's observation time \u2014 the original stage's timing lives in that run's .fa-state checkpoint.";
172
196
  /** Assemble one SFT-ready training pair. Deterministic (ts passed in). Applies the oversize
173
197
  * guard: when input+output exceed TRAINPAIR_MAX_IO_CHARS combined, each over-budget side is
174
198
  * truncated with a marker naming the cut char count + the fnv1a64 of its FULL text (the
@@ -184,6 +208,8 @@ export declare function buildTrainingPair(opts: {
184
208
  output: unknown;
185
209
  evaluation?: Partial<TrainingPairEvaluation> | null;
186
210
  provenance?: Partial<TrainingPairProvenance> | null;
211
+ captureMode?: unknown;
212
+ resumed?: unknown;
187
213
  }): TrainingPair;
188
214
  /** Serialize one training pair to a JSONL line. The oversize guard already bounds the pair,
189
215
  * so this only fails on the impossible (all fields are plain data) — null on that, never a throw. */
@@ -192,4 +218,23 @@ export declare function serializeTrainingPair(pair: TrainingPair): string | null
192
218
  * once (if-absent guard), then append ONE line (single-quote-escaped byte-faithfully, same
193
219
  * idiom as checkpointAppendCmd). */
194
220
  export declare function trainingPairAppendCmd(repoAbs: string, slug: string, stage: string, line: string): string;
221
+ /** Readback sentinels for the caller to distinguish an at-most-once write from an existing pair. */
222
+ export declare const TP_BACKFILL_OK = "TP-BACKFILL-OK";
223
+ export declare const TP_BACKFILL_SKIP = "TP-BACKFILL-SKIP";
224
+ export declare const TP_BACKFILL_DUP = "TP-BACKFILL-DUP";
225
+ /** Build the deterministic resume-backfill command. The persistent mkdir mark is the atomic
226
+ * at-most-once primitive; the inner file-absence guard also protects pair files created before
227
+ * marks existed. The mark is RELEASED when — and only when — the append fails, so a failed backfill
228
+ * stays retryable. The `[ -f ]` path keeps the mark because the pair genuinely exists.
229
+ * KNOWN RESIDUAL: a process killed (SIGKILL, sandbox timeout) between the `mkdir` claim and the end
230
+ * of the append still leaves a poisoned mark. That window is strictly narrower than "any append
231
+ * failure" and is the same externally-killed class this feature already names for the ledger row.
232
+ * `TP_BACKFILL_SKIP` means "the per-stage pair file already existed"; `TP_BACKFILL_DUP` means
233
+ * "another run already owns this content". The two strings are deliberately NON-PREFIXING because
234
+ * the two producers parse the readback differently — the generated loop compares `===` after
235
+ * `trim`, while the `feature-adr.js` twin tests an UNANCHORED regex; a prefixed name would be `DUP`
236
+ * to one parser and `SKIP` to the other from the same bytes. The default `markKey` is per-CONTENT
237
+ * only; a caller whose line embeds a per-run identifier must pass a run-independent `markKey`.
238
+ * Marks are deliberately never pruned. */
239
+ export declare function trainingPairBackfillCmd(repoAbs: string, slug: string, stage: string, lines: readonly string[], markKey?: string): string | null;
195
240
  //# sourceMappingURL=feature-adr-checkpoints.d.ts.map
@@ -1 +1 @@
1
- {"version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designer, ADR-004) — the
27
27
  * ONLY loop-designer change to this canonical file; bump when any blob-exported semantic changes. */
28
- export const BLOB_VERSION = '1.0.0';
28
+ export const BLOB_VERSION = '1.1.0';
29
29
  /** Stages the workflow checkpoints, in pipeline order. Cheap side-channel agents (usage probes,
30
30
  * fa-record, auto-cost selects) are never checkpointed; the opt-in Delivery gate re-runs by design
31
31
  * (advisory verdicts should reflect the CURRENT tree). */
@@ -184,29 +184,43 @@ export function checkpointAppendCmd(fdirAbs, line) {
184
184
  const file = shellQuote(fdirAbs + '/.fa-state/checkpoints.jsonl');
185
185
  return 'mkdir -p ' + dir + " && printf '%s\\n' " + shellQuote(line) + ' >> ' + file;
186
186
  }
187
- // ─────────────────────────────────────────────────────────────────────────────
188
- // Training-pair capture (backlog 70e0f083) the PURE half.
189
- //
190
- // Goal: fully-local development on compact models in 4–6 months needs a dataset of
191
- // STAGE INPUT (full context+prompt) STAGE OUTPUT (artifact/result) → EVALUATION
192
- // (QE grade + the lessons injected into context) records. Everything is already in
193
- // hand at the moment each feature-adr stage completes — so capture is instrumented
194
- // NOW (every un-captured run is a lost pair); the dataset itself is built later.
195
- //
196
- // Storage: ONE JSONL file per stage under .dz/fa-training/<slug>/<stage>.jsonl
197
- // (owner decision 2026-08). Deliberately NOT gitignored (owner decision — pairs may
198
- // contain target-repo code; the capture dir carries a README privacy note instead).
199
- //
200
- // Stage asymmetry (the reason provenance.family is load-bearing): the downstream
201
- // dataset must honour the cross-model rule — QE pairs must come from a DIFFERENT
202
- // family than the coder's pairs; router/plan distill easily, code is hardest.
203
- //
204
- // Pure and deterministic like the checkpoint half: ts is PASSED IN (never Date.now()
205
- // — the workflow sandbox forbids Date, and tests must stay deterministic); the
206
- // workflow mirrors these functions inline and fills ts shell-side via sed.
207
- // ─────────────────────────────────────────────────────────────────────────────
187
+ /** Decide whether this completion is captured. A resumed stage is backfilled rather than
188
+ * skipped: its input (stage template + args) and checkpointed output are both in scope at the
189
+ * capture site, so the pair is deterministically reconstructible. trainingPairBackfillCmd's
190
+ * persistent atomic mark makes that write at-most-once, so concurrent invocations and later
191
+ * runIds cannot double-append the same pair. */
192
+ export function decideCaptureMode(opts) {
193
+ if (!opts.enabled)
194
+ return 'skip-disabled';
195
+ if (!Number.isInteger(opts.recordCount) || opts.recordCount <= 0)
196
+ return 'skip-empty';
197
+ return opts.resumed ? 'backfill' : 'capture';
198
+ }
199
+ /** Normalize capture failures for collection by the caller. This recorder must never throw:
200
+ * replacing the original capture failure with a reporting failure would hide the real cause. */
201
+ export function captureFailureRecord(stage, mode, reason, detail) {
202
+ const normalizedStage = typeof stage === 'string' && stage.trim() !== '' ? stage : 'unknown';
203
+ const normalizedMode = mode === 'capture' || mode === 'backfill' || mode === 'skip-disabled' || mode === 'skip-empty'
204
+ ? mode
205
+ : null;
206
+ const normalizedReason = reason === 'threw' || reason === 'unserializable' || reason === 'unverified' || reason === 'backfill-unverified' || reason === 'empty-output'
207
+ ? reason
208
+ : 'threw';
209
+ let normalizedDetail = null;
210
+ if (detail !== null && detail !== undefined) {
211
+ try {
212
+ const text = String(detail);
213
+ if (text !== '')
214
+ normalizedDetail = text.length > 500 ? text.slice(0, 500) + '…' : text;
215
+ }
216
+ catch {
217
+ normalizedDetail = null;
218
+ }
219
+ }
220
+ return { stage: normalizedStage, mode: normalizedMode, reason: normalizedReason, detail: normalizedDetail };
221
+ }
208
222
  /** Training-pair record format version. Bump on any field-shape change. */
209
- export const TRAINPAIR_SCHEMA_VERSION = 'fa-trainpair-1';
223
+ export const TRAINPAIR_SCHEMA_VERSION = 'fa-trainpair-2';
210
224
  /** Oversize guard cap over input+output combined (same posture as
211
225
  * CHECKPOINT_MAX_RESULT_CHARS, sized for full stage prompts): an over-cap pair is
212
226
  * TRUNCATED with a named marker + a hash of the full text — never silently dropped
@@ -226,7 +240,7 @@ export function trainingPairPath(slug, stage) {
226
240
  }
227
241
  /** README dropped once into the capture dir. The caveat is documented ON DISK because the
228
242
  * directory is deliberately not gitignored (explicit owner decision, 2026-08). */
229
- export const TRAINPAIR_PRIVACY_NOTE = 'feature-adr TRAINING PAIRS (backlog 70e0f083): per-stage SFT records - STAGE INPUT (full prompt/context) -> STAGE OUTPUT (artifact/result) -> EVALUATION (QE grade + injected lessons) with model+family provenance; one JSONL file per stage per slug. PRIVACY: pairs may contain TARGET-REPO CODE and full prompts. This directory is NOT gitignored yet by explicit owner decision - review contents before sharing or publishing anything that embeds it.';
243
+ export const TRAINPAIR_PRIVACY_NOTE = "feature-adr TRAINING PAIRS (backlog 70e0f083): per-stage SFT records - STAGE INPUT (full prompt/context) -> STAGE OUTPUT (artifact/result) -> EVALUATION (QE grade + injected lessons) with model+family provenance; one JSONL file per stage per slug. PRIVACY: pairs may contain TARGET-REPO CODE and full prompts. This directory is NOT gitignored yet by explicit owner decision - review contents before sharing or publishing anything that embeds it. ts is the CAPTURE time. On a record with captureMode: 'backfill' that is the RECONSTRUCTION time, NOT the stage's observation time — the original stage's timing lives in that run's .fa-state checkpoint.";
230
244
  /** Coerce a stage input/output to text: strings pass through; objects serialize to JSON;
231
245
  * an unserializable value degrades to String(v) — buildTrainingPair NEVER throws (capture
232
246
  * is non-blocking by contract). */
@@ -294,6 +308,8 @@ export function buildTrainingPair(opts) {
294
308
  minutes: typeof pv.minutes === 'number' && Number.isFinite(pv.minutes) ? pv.minutes : null,
295
309
  },
296
310
  truncated,
311
+ captureMode: opts.captureMode === 'backfill' ? 'backfill' : 'capture',
312
+ resumed: opts.resumed === true,
297
313
  };
298
314
  }
299
315
  /** Serialize one training pair to a JSONL line. The oversize guard already bounds the pair,
@@ -318,4 +334,49 @@ export function trainingPairAppendCmd(repoAbs, slug, stage, line) {
318
334
  ' && { [ -f ' + shellQuote(readmeAbs) + ' ] || printf \'%s\\n\' ' + shellQuote(TRAINPAIR_PRIVACY_NOTE) + ' > ' + shellQuote(readmeAbs) + '; }' +
319
335
  " && printf '%s\\n' " + shellQuote(line) + ' >> ' + shellQuote(fileAbs));
320
336
  }
337
+ /** Readback sentinels for the caller to distinguish an at-most-once write from an existing pair. */
338
+ export const TP_BACKFILL_OK = 'TP-BACKFILL-OK';
339
+ export const TP_BACKFILL_SKIP = 'TP-BACKFILL-SKIP';
340
+ export const TP_BACKFILL_DUP = 'TP-BACKFILL-DUP';
341
+ /** Build the deterministic resume-backfill command. The persistent mkdir mark is the atomic
342
+ * at-most-once primitive; the inner file-absence guard also protects pair files created before
343
+ * marks existed. The mark is RELEASED when — and only when — the append fails, so a failed backfill
344
+ * stays retryable. The `[ -f ]` path keeps the mark because the pair genuinely exists.
345
+ * KNOWN RESIDUAL: a process killed (SIGKILL, sandbox timeout) between the `mkdir` claim and the end
346
+ * of the append still leaves a poisoned mark. That window is strictly narrower than "any append
347
+ * failure" and is the same externally-killed class this feature already names for the ledger row.
348
+ * `TP_BACKFILL_SKIP` means "the per-stage pair file already existed"; `TP_BACKFILL_DUP` means
349
+ * "another run already owns this content". The two strings are deliberately NON-PREFIXING because
350
+ * the two producers parse the readback differently — the generated loop compares `===` after
351
+ * `trim`, while the `feature-adr.js` twin tests an UNANCHORED regex; a prefixed name would be `DUP`
352
+ * to one parser and `SKIP` to the other from the same bytes. The default `markKey` is per-CONTENT
353
+ * only; a caller whose line embeds a per-run identifier must pass a run-independent `markKey`.
354
+ * Marks are deliberately never pruned. */
355
+ export function trainingPairBackfillCmd(repoAbs, slug, stage, lines, markKey) {
356
+ if (typeof repoAbs !== 'string' || repoAbs === '')
357
+ return null;
358
+ if (typeof slug !== 'string' || slug === '')
359
+ return null;
360
+ if (typeof stage !== 'string' || stage === '')
361
+ return null;
362
+ if (!Array.isArray(lines) || lines.length === 0 || !lines.every(line => typeof line === 'string' && line !== ''))
363
+ return null;
364
+ const dirAbs = repoAbs + '/.dz/fa-training/' + slug;
365
+ const readmeAbs = repoAbs + '/.dz/fa-training/README.md';
366
+ const fileAbs = dirAbs + '/' + stage + '.jsonl';
367
+ const markDir = repoAbs + '/.dz/fa-training/.backfill-marks';
368
+ const markStage = stage.replace(/\.\./g, '_').replace(/\//g, '_');
369
+ const resolvedMarkKey = markKey === undefined ? fnv1a64(stage + '\0' + lines.join('\n')) : markKey;
370
+ const markPath = markDir + '/' + markStage + '-' + resolvedMarkKey;
371
+ const appends = lines
372
+ .map(line => "printf '%s\\n' " + shellQuote(line) + ' >> ' + shellQuote(fileAbs))
373
+ .join(' && ');
374
+ return ('mkdir -p ' + shellQuote(dirAbs) +
375
+ ' && { [ -f ' + shellQuote(readmeAbs) + ' ] || printf \'%s\\n\' ' + shellQuote(TRAINPAIR_PRIVACY_NOTE) + ' > ' + shellQuote(readmeAbs) + '; }' +
376
+ ' && mkdir -p ' + shellQuote(markDir) +
377
+ ' && if mkdir ' + shellQuote(markPath) + ' 2>/dev/null; then ' +
378
+ 'if [ -f ' + shellQuote(fileAbs) + ' ]; then echo ' + shellQuote(TP_BACKFILL_SKIP) +
379
+ '; else { ' + appends + ' && echo ' + shellQuote(TP_BACKFILL_OK) + '; } || { rmdir ' + shellQuote(markPath) + ' 2>/dev/null; false; }; fi' +
380
+ '; else echo ' + shellQuote(TP_BACKFILL_DUP) + '; fi');
381
+ }
321
382
  //# sourceMappingURL=feature-adr-checkpoints.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-adr-checkpoints.js","sourceRoot":"","sources":["../src/feature-adr-checkpoints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;qGACqG;AACrG,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;0DAE0D;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAU,CAAC;AAG9F;;;;8EAI8E;AAC9E,MAAM,CAAC,MAAM,eAAe,GAA2C;IACrE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,oBAAoB;IAC5B,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,oCAAoC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AAG,SAAS,GAAG,GAAG,GAAG,eAAe,CAAC;IACnE,MAAM,OAAO,GAAG,KAAK;SAClB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;SAChF,IAAI,CAAC,MAAM,CAAC,CAAC;IAChB,OAAO,CACL,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC;QAChC,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,yBAAyB,GAAG,UAAU,CAAC,sBAAsB,CAAC,GAAG,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,KAAK;QAC9I,eAAe,GAAG,UAAU,CAAC,OAAO,CAAC;QACrC,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,qBAAqB;QAC9D,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QAClF,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,GAAG,iBAAiB,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,4BAA4B;QAC1I,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,MAAM,CACtD,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -42,7 +42,7 @@ export type { LearningSignalBackend, LearningSignalStats, LearningSample, Signal
42
42
  export { DEFAULT_VECTOR_TIMEOUT_MS, DEFAULT_HARMONIZE_THRESHOLD, REINFORCE_RRF_CAP, withVectorTimeout, isVectorNoise, patternVectorEntry, dreamVectorEntry, memoryRecordVectorEntry, readVectorEngineMode, readHarmonizeThreshold, vectorMirrorEnabled, resolveVectorEngine, mirrorEntriesToVector, mirrorPatternsToVector, backfillVectorMirror, mergeHybridHits, recallHybrid, teachGuard, vectorTierStatus, reindexVectorStore, harmonizeVectorStore, selectClusterKeeper, importRvfCheckpoint, } from './vector-tier.js';
43
43
  export type { VectorEngine, VectorEngineKind, VectorEngineMode, VectorEntry, VectorHit, ImportVectorRow, MirrorReceipt, ResolvedVectorEngine, HybridRecall, HybridRecallMode, HybridHit, RankedPattern, VectorServiceOptions, VectorTierStatus, HarmonizeItem, HarmonizeCluster, HarmonizeReport, HarmonizeOptions, ImportReport, ImportOptions, ReindexVectorReport, TeachGuardResult, } from './vector-tier.js';
44
44
  export { runSetup, generateHooksConfig, generateAgentdbWriter, writerVersionOf, AGENTDB_WRITER_VERSION } from './setup.js';
45
- export { statuslineData, readFeatureAdrState, writeFeatureAdrState, featureAdrStatePath } from './statusline.js';
45
+ export { statuslineData, readFeatureAdrState, writeFeatureAdrState, featureAdrStateDir, featureAdrStatePath } from './statusline.js';
46
46
  export type { StatuslineData, FeatureAdrState, WriteFeatureAdrStateInput } from './statusline.js';
47
47
  export { indexPatternsToAgentdb, resolveAgentdbPath, searchAgentdbPatterns, listAgentdbDzIds, resolveAgentdbEmbedder, cosineSimilarity, importVectorsToAgentdb, reindexAgentdbRows, bumpAgentdbUses, clearAgentdbQuarantine, deleteAgentdbByDzIds, readAgentdbRowsByTaskType, DZ_OWNED_TASK_TYPES } from './agentdb-index.js';
48
48
  export type { AgentdbSearchHit, AgentdbSearchResult, AgentdbImportRow } from './agentdb-index.js';