rig-parts 2.69.0 → 2.71.0

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/cli.ts CHANGED
@@ -62,7 +62,7 @@ import { replacementTreeDigest } from './src/replacementrecord.ts';
62
62
  import { type ComposeInput, composeStage, IMAGE_SEP, PLATE, PROVENANCES, refusePreviewLoopSeam, SCENE_CAMERA_REPORT_SPEC, SCENE_REPORT_FILE, SCENE_REPORT_SPEC, SCENE_SPEC } from './src/scene.ts';
63
63
  import { buildSheet, defaultCaption, type Tile, tilesFrom } from './src/sheet.ts';
64
64
  import { loadComparison, requiredProblems, structureLines } from './src/structure.ts';
65
- import { type ArgvTable, assembleOutputFiles, BUILD_RUN_FILE, CHECK_RUN_FILE, clearComposeRun, clearRunRecord, clearRunStamp, readPackageIdentity, realWhereItExists, recordArgv, rigOutputFiles, RUN_STAMP_FILE, RUN_STAMP_SPEC, type RunStampFileEntry, writeRunRecord, writeRunStamp } from './src/runstamp.ts';
65
+ import { type ArgvTable, assembleOutputFiles, bindAssembleWrapperInputs, BUILD_RUN_FILE, CHECK_RUN_FILE, clearComposeRun, clearRunRecord, clearRunStamp, readPackageIdentity, realWhereItExists, recordArgv, rigOutputFiles, RUN_STAMP_FILE, RUN_STAMP_SPEC, type RunStampFileEntry, writeRunRecord, writeRunStamp } from './src/runstamp.ts';
66
66
  import { authorLayerLine } from './src/tags.ts';
67
67
 
68
68
  const EXIT_OK = 0;
@@ -125,13 +125,17 @@ usage:
125
125
  Write <map>.binding.json with both file hashes; never overwrite a receipt.
126
126
  Attests the current files, not that inference used this input.
127
127
 
128
- rig-parts depth-apply --parts <assembled-dir> --manifest <manifest.json> --config <depth-recipe.json> --rig-config <config.json> --out <empty-dir> [--groups <name>[,<name>...]]
128
+ rig-parts depth-apply --parts <assembled-dir> --manifest <manifest.json> --config <depth-recipe.json> --rig-config <config.json> --out <dir> [--groups <name>[,<name>...]] [--source-sha256 <sha256>]
129
129
  Register floating-point JSON depth or signed normals, normalize inside
130
130
  alpha >=128, apply declared median/relief and group near/zScale/pivot,
131
131
  extend past alpha, and write parts, relocated config and depth-report.json.
132
132
  Normals require one closed convex island. See AUTHORING for the schemas.
133
133
  --groups applies only the named recipe groups; the others' parts get no
134
134
  sheet, and the selection is recorded in depth-report.json.
135
+ --source-sha256 verifies the source tree and writes a derivation receipt
136
+ inside <dir>/set, with config.json and depth-report.json beside set.
137
+ This bundle requires an absent output directory. Without the flag, an
138
+ absent or empty output directory receives the parts and both sidecars.
135
139
 
136
140
  rig-parts layers <dir | layers.json | file.psd>
137
141
  Read a See-through decomposition — the ComfyUI wrapper form (a directory
@@ -1310,7 +1314,7 @@ const TAKES = {
1310
1314
  'depth-bind': { valued: ['--map', '--input', '--part'], switches: ['--help'] },
1311
1315
  'depth-prepare': { valued: ['--parts', '--config', '--out'], switches: ['--help'] },
1312
1316
  'depth-place': { valued: ['--parts', '--config', '--rig-config', '--out'], switches: ['--check-turn', '--help'] },
1313
- 'depth-apply': { valued: ['--parts', '--manifest', '--config', '--rig-config', '--out', '--groups'], switches: ['--help'] },
1317
+ 'depth-apply': { valued: ['--parts', '--manifest', '--config', '--rig-config', '--out', '--groups', '--source-sha256'], switches: ['--help'] },
1314
1318
  layers: { valued: ['--export', '--template', '--canvas', '--full', '--source', '--config'], switches: ['--help'] },
1315
1319
  sheet: { valued: ['--source', '--layers', '--out', '--cell', '--cols'], switches: ['--help'] },
1316
1320
  rig: { valued: ['--config', '--parts', '--out', '--idle-keys', '--page-edges', '--pack-shape', '--page-size'], switches: ['--help'] },
@@ -2353,13 +2357,15 @@ function cmdAssemble(args: string[]): number {
2353
2357
  clearRunStamp(out);
2354
2358
  const pkg = readPackageIdentity(join(import.meta.dir, 'package.json'));
2355
2359
  const startedAt = fixedClock ?? new Date().toISOString();
2360
+ let wrapperInputs: ReturnType<typeof bindAssembleWrapperInputs>;
2356
2361
  const result = assembleStage(
2357
2362
  { source, full, head, config, ...(flags.has('--requirements') ? { requirements: flags.get('--requirements') as string } : {}), ...(seam === undefined ? {} : { seam: seam as SeamRule }), ...(project === undefined ? {} : { project: project as ProjectRule }), ...(alts.length === 0 ? {} : { alts }) },
2358
2363
  { partsJson: join(out, 'rig', 'parts.json'), partsDir: join(out, 'rig', 'parts'), recomposite: join(out, 'render', 'recomposite_rig.png'), errorMap: join(out, 'render', ERROR_MAP_FILE) },
2359
2364
  console.log,
2365
+ (readings) => { wrapperInputs = bindAssembleWrapperInputs(readings); },
2360
2366
  );
2361
2367
  const finishedAt = fixedClock ?? new Date().toISOString();
2362
- writeRunStamp({ pkg, command: 'assemble', startedAt, finishedAt, outDir: out, configPath: config, inputs: { cwd: process.cwd(), source, full, head }, outputPaths: assembleOutputFiles(out, result) });
2368
+ writeRunStamp({ pkg, command: 'assemble', startedAt, finishedAt, outDir: out, configPath: config, inputs: { cwd: process.cwd(), source, full, head }, wrapperInputs, outputPaths: assembleOutputFiles(out, result) });
2363
2369
  return EXIT_OK;
2364
2370
  } catch (err) {
2365
2371
  if (staged !== null) {
@@ -3179,11 +3185,14 @@ function cmdDepthApply(args: string[]): number {
3179
3185
  if (typeof f === 'string') return usage(f);
3180
3186
  try {
3181
3187
  const groups = f.get('--groups'), selected = groups === undefined ? {} : { groups: groups === '' ? [] : groups.split(',') };
3182
- const result = applyDepth({ parts: f.get('--parts')!, manifest: f.get('--manifest')!, config: f.get('--config')!, rigConfig: f.get('--rig-config')!, out: f.get('--out')!, ...selected });
3188
+ const sourceSha256 = f.get('--source-sha256');
3189
+ const result = applyDepth({ parts: f.get('--parts')!, manifest: f.get('--manifest')!, config: f.get('--config')!, rigConfig: f.get('--rig-config')!, out: f.get('--out')!, sourceSha256, ...selected });
3183
3190
  for (const row of result.parts as Array<Record<string, unknown>>) console.log(`depth-apply: ${row.part} levels=${row.levels} clip=${row.clipFraction} reliefRigPixels=${row.reliefRigPixels} sign=${row.sign}`);
3184
3191
  const selection = result.selection as { groups: string[]; leftOut: string[] } | undefined;
3185
3192
  if (selection !== undefined) console.log(`depth-apply: applied groups ${selection.groups.join(', ')}; left out ${selection.leftOut.length === 0 ? 'no part' : selection.leftOut.join(', ')}, without a depth sheet`);
3186
- console.log('depth-apply: wrote registered parts, config.json and depth-report.json; run rig for the core gate');
3193
+ console.log(sourceSha256 === undefined
3194
+ ? 'depth-apply: wrote registered parts, config.json and depth-report.json; run rig for the core gate'
3195
+ : 'depth-apply: wrote registered parts with derivation receipt in set, with config.json and depth-report.json beside set; run rig for the core gate');
3187
3196
  return EXIT_OK;
3188
3197
  } catch (error) { return printRefusal(error); }
3189
3198
  }
package/docs/AUTHORING.md CHANGED
@@ -5890,6 +5890,8 @@ row in this page's `rule` and `line` tables; the selftest holds that (`TY16`).
5890
5890
  | <a id="LAYERS_EXPORT_DIR_EMPTY"></a>`LAYERS_EXPORT_DIR_EMPTY` | `layers --export <dir>` was given a file, or a directory that is not empty (issue #359): a file left there could be read in place of the one written | a new directory, or empty it |
5891
5891
  | <a id="LAYERS_EXPORT_ROUND_TRIP"></a>`LAYERS_EXPORT_ROUND_TRIP` | the export, read back, differs from the input's reading (the detail names the first difference) — an exporter bug, not an input problem | report it with the input named |
5892
5892
  | <a id="ASSEMBLE_SOURCE_PRESENT"></a><a id="ASSEMBLE_SOURCE_DECODES"></a>`ASSEMBLE_SOURCE_PRESENT`, `ASSEMBLE_SOURCE_DECODES` | the painting is missing or not a PNG | `--source` |
5893
+ | <a id="ASSEMBLE_WRAPPER_PNG_CONFLICT"></a>`ASSEMBLE_WRAPPER_PNG_CONFLICT` | standalone `assemble` decoded PNG bytes with two different SHA-256 digests for the same wrapper role (`full` or `head`) and manifest-relative path | keep the PNG bytes stable throughout the run, then re-run `assemble` |
5894
+ | <a id="ASSEMBLE_WRAPPER_PNG_PATH"></a>`ASSEMBLE_WRAPPER_PNG_PATH` | standalone `assemble` cannot record the selected PNG as a canonical slash-delimited path within its wrapper manifest's directory | place the PNG within that directory and use a relative path free of drive prefixes, backslashes and NUL characters |
5893
5895
  | <a id="ASSEMBLE_GROUND_PLAIN"></a>`ASSEMBLE_GROUND_PLAIN` | WARN only, never a refusal (issue #996): under project: visible, where paintingEdges reads the ground, with `assemble.ground` absent or `plain`, more than 2 % of the painting's border ring is not one colour (the ring is `SILHOUETTE_BORDER` px wide; a pixel counts when it differs from the ring's median by more than `SILHOUETTE_LIMIT`). Two causes: the ground is not plain, or the figure crosses the border | if it is the ground, declare `assemble.ground: busy`; if the figure crosses the border, leave the ground as it is (the WARN never changes output) |
5894
5896
  | <a id="SHEET_SOURCE_PRESENT"></a><a id="SHEET_PNG_PRESENT"></a>`SHEET_SOURCE_PRESENT`, `SHEET_PNG_PRESENT` | `sheet`'s painting, or a part PNG a `parts.json` lists, is missing | `--source`, `--layers` |
5895
5897
 
@@ -7078,7 +7080,7 @@ outside the consumed inputs.
7078
7080
  | <a id="CHECK_INPUT_PRESENT"></a><a id="CHECK_INPUT_IS_JSON"></a><a id="CHECK_PART_PNG_PRESENT"></a><a id="CHECK_PART_PNG_MATCHES_BOX"></a><a id="CHECK_PART_SLOT_PRESENT"></a><a id="CHECK_RIG_STAGE_PRESENT"></a><a id="CHECK_RIG_STAGE_IS_THE_CANVAS"></a><a id="CHECK_RIG_ROOT_BONE"></a><a id="CHECK_IDLE_PRESENT"></a>`CHECK_INPUT_PRESENT`, `CHECK_INPUT_IS_JSON`, `CHECK_PART_PNG_PRESENT`, `CHECK_PART_PNG_MATCHES_BOX`, `CHECK_PART_SLOT_PRESENT`, `CHECK_RIG_STAGE_PRESENT`, `CHECK_RIG_STAGE_IS_THE_CANVAS`, `CHECK_RIG_ROOT_BONE`, `CHECK_IDLE_PRESENT` | the rig directory is incomplete or disagrees with `parts.json` (`CHECK_PART_SLOT_PRESENT`: a part with no slot of its own name, which the judgement lines render it by; `CHECK_INPUT_PRESENT` on `--set` / `--all-sets`: no `parts.json`, no `alternates`, or the named set is not in `alternates`). `motion.json` is required even with no animation in it, because `rigc build` takes `--motion` (a spec with `"animations": {}` builds green); `CHECK_IDLE_PRESENT` names an `idle` with no positive `duration`, or a missing `idle` when the loop seam bar is declared. Without that bar, an absent `idle` is measured around (§7). `CHECK_INPUT_PRESENT` on `…/parts.json`: `--parts` named a directory without `parts.json` — most often `parts/` itself — or, without `--parts`, the rig directory has none while the directory above it does (build's layout, `<out>/rig` under `<out>/parts.json`). The detail says it: "--parts names the directory holding parts.json and parts/, not parts/ itself (after build, that is build's --out, whose rig is <out>/rig); without --parts it is --rig", and names the parent when the parent holds `parts.json`. With neither (no `--parts`, and no `parts.json` beside `rig.json` or above it), the rig is measured without parts and nothing is refused (§7) | re-run rig (`build` does both); for `…/parts.json`, `--parts` — the directory above `parts/` |
7079
7081
  | <a id="CHECK_SOURCE_SIZE"></a>`CHECK_SOURCE_SIZE` | the painting `--source` names is not this rig's: no single `rig_scale` takes its width and height to the stage's (assemble makes the canvas `trunc(w × rig_scale)` x `trunc(h × rig_scale)`), or, with `parts.json` read, its `scale_rig_per_source` does not; or the stage is not whole pixels. Refused before anything is built | the painting the rig was made from — the stage's own size, or the painting `assemble` was given |
7080
7082
  | <a id="CHECK_SOURCE_PNG"></a>`CHECK_SOURCE_PNG` | `--source` names a file that does not read as a PNG | a PNG |
7081
- | <a id="CHECK_SETUP_MATCHES_PAINTING"></a>`CHECK_SETUP_MATCHES_PAINTING` | region, slot, failing-pixel box, slot pixelcount, complete region pixelcount and declared limit | compare the source painting beside the actual setup; follow [Source before scissors](#source-before-scissors), then rerun with the same authored limit |
7083
+ | <a id="CHECK_SETUP_MATCHES_PAINTING"></a>`CHECK_SETUP_MATCHES_PAINTING` | region, slot, failing-pixel box, slot pixelcount, complete region pixelcount and declared limit. A `max_pixels` budget set to its own baseline with margin 0 is a no-regression bar, and cannot see a defect present when the baseline was measured | compare the source painting beside the actual setup; follow [Source before scissors](#source-before-scissors), then rerun with the same authored limit |
7082
7084
  | <a id="CHECK_SETUP_PAINTING_MASK"></a>`CHECK_SETUP_PAINTING_MASK` | declared figure-mask PNG cannot be read or decoded, its byte SHA-256 or original painting grid differs, or its alpha support is empty | supply independent figure alpha support with the declared hash and source grid; rendering never supplies the missing mask |
7083
7085
  | <a id="CHECK_SETUP_PAINTING_BACKDROP"></a>`CHECK_SETUP_PAINTING_BACKDROP` | declared backdrop PNG cannot be read or decoded, its byte SHA-256 differs, its original painting grid differs, or any alpha is not 255 | supply an opaque plate with the declared lowercase SHA-256, aligned to the original painting; no fitting or white fallback |
7084
7086
  | <a id="CHECK_SETUP_PAINTING_SOURCE"></a>`CHECK_SETUP_PAINTING_SOURCE` | a declaration without a source painting | supply `--source`; the assembled composite is not an independent reference |
@@ -7983,10 +7985,11 @@ Under `--source <painting.png>`, a second reported line, also never a FAIL
7983
7985
  | <a id="SETUP_POSE_VS_SOURCE"></a>`SETUP_POSE_VS_SOURCE` | the setup pose against the painting, by `assemble`'s own `measureRecomposite` over the stage's pixels — `mean_abs` and `within_share` (mean channel, within 8), `error_px` (max channel over 40), `uncovered_error_px` (of those, where the pose has alpha 128 or less), `hole_count` and the largest hole's box — with `painting_px`, `stage_px`, `render_px` and `render_scale` beside them. The painting is resampled onto the stage as assemble resamples it (lanczos3, alpha dropped). rigc renders onto an opaque grey, so the pose over white and its alpha are read off a second still of the same pose with every slot tinted black; both are carried onto the stage with the seam's map turned round (bilinear) | none — status `REPORTED`; assemble applies no bar to the figures it measures, so none is derived here | 3.146 / 93.43 % / 12,399 / 1,732, 518 holes, the largest 61 px at 351,157 6x20 (assemble's recomposite: 2.391 / 95.81 % / 11,050 / 1,564, 453) | 1.095 / 97.30 % / 5,348 / 1,239, 313 holes, the largest 88 px at 479,416 6x29 (assemble's: 0.835 / 97.95 % / 4,512 / 1,185, 259) | not written without `--source` |
7984
7986
  | <a id="PART_SUPPORT_REPORT"></a>`PART_SUPPORT_REPORT` | report-only alpha >= 128 observation; pairs use pre-rig `parts.json` placements in setup slot order, and Unowned uses the official renderer's setup on the native stage grid | every pair is measured with its independent authored cut domain or unavailable with its reason; the headline gives adjacent raw pairs and classified coverage, with UNCLASSIFIED when there is no extent witness. Every touching or overlapping raw pair carries shared boundary length, bounds of shared segments and overlap cells, overlap area, and the label "ownership unknown, unclassified". Disjoint pairs are absent from raw rows. Exact shared 4-neighbour unit edges carry both names, an edge box and candidate missing-domain area under the front part. Unowned painted silhouette cells outside the actual setup union carry 4-connected boxes and areas, including open-edge gaps. Default build supplies its painting internally for this report only. Standalone check needs `--source`. Legacy output without the optional domain sidecar, bone-only bindings and limbs without an authored radial width are unavailable. WARN, REPORTED and UNCLASSIFIED add no gate. |
7985
7987
  | <a id="CHECK_SUPPORT_GRID"></a>`CHECK_SUPPORT_GRID` | a support sidecar, part PNG or painting cannot be registered to the declared native canvas | use the same parts.json dimensions and source scale, and regenerate assemble output; no resized or guessed domain is substituted |
7986
- | <a id="SETUP_MATCHES_PAINTING"></a>`SETUP_MATCHES_PAINTING` | declared region count, native box, limit and actual top contributor rows; observations source-over white unless `setup_painting.backdrop` declares the opaque plate behind a full-frame painting | PASS/FAIL against authored limits; no limit is SKIP, or the refusal `SETUP_PAINTING_REQUIRED_LIMIT` under `setup_painting.required: true`; with `--source`, no declaration is SKIP with its reason and declaration remedy; undeclared regions are not judged |
7988
+ | <a id="SETUP_MATCHES_PAINTING"></a>`SETUP_MATCHES_PAINTING` | declared region count, native box, limit and actual top contributor rows; observations source-over white unless `setup_painting.backdrop` declares the opaque plate behind a full-frame painting | PASS/FAIL against authored limits; no limit is SKIP, or the refusal `SETUP_PAINTING_REQUIRED_LIMIT` under `setup_painting.required: true`; with `--source`, no declaration is SKIP with its reason and declaration remedy; undeclared regions are not judged. A `max_pixels` budget set to its own baseline with margin 0 is a no-regression bar, and cannot see a defect present when the baseline was measured |
7987
7989
  | <a id="BOUNDARY_COLOUR_STEP"></a>`BOUNDARY_COLOUR_STEP` | the worst colour-step excess over the rig's own pieces at any part boundary of the setup and every idle frame, its part pair, frame and stage pixel, and the declared `max_step_excess` | PASS/FAIL against the declared allowance (FAIL is [`CHECK_BOUNDARY_COLOUR_STEP`](#CHECK_BOUNDARY_COLOUR_STEP), an unreadable piece [`CHECK_BOUNDARY_COLOUR_UNMEASURED`](#CHECK_BOUNDARY_COLOUR_UNMEASURED)); no `boundary_colour` in the requirements file is SKIP with its reason and the declaration to add, never a pass |
7988
7990
  | <a id="BEHIND_PART_SEAMS"></a>`BEHIND_PART_SEAMS` | selected front pair and declaration provenance, per-frame `behind_slots`, core seam grid, separate `setup`, `motion_opened` and `standing` readings, sampled/read/unmeasured counts, per-frame hits, worst frame, temporal spans and spatial runs | required for pairs with an authored effective threshold: PASS/FAIL against the effective allowance, default 0; a contact-only pair's motion line ends `; support setup-contact` (and the frame count with `lower_bound_cells`) when it is read from setup contact edges; missing T is a nonrequired SKIP and HOLE, while mandatory unread evidence causes `CHECK_BEHIND_PART_SEAMS_UNMEASURED` and combined FAIL; no declaration is SKIP, and curved or diagonal openings are not certified |
7989
7991
  | <a id="SOURCE_EXPOSURE"></a>`SOURCE_EXPOSURE` | for each part with a `source_state_map`, the stage pixels per state (`occluded`, `partial-top`, `depth-tie`, `mixed-source-states`) that the setup pose and every frame of every animation show, one row per part, state and frame; how many texels of each state the part holds; the frames read; the signal used | REPORTED, never a pass, without a declaration; PASS/FAIL against a declared `source_exposure.max_px` (FAIL is [`CHECK_SOURCE_EXPOSURE`](#CHECK_SOURCE_EXPOSURE), an unreadable piece [`CHECK_SOURCE_EXPOSURE_UNMEASURED`](#CHECK_SOURCE_EXPOSURE_UNMEASURED)). Absent from `check.json` and the console when no part has a map and nothing is declared |
7992
+ | <a id="SETUP_SEAM_TRANSMISSION"></a>`SETUP_SEAM_TRANSMISSION` | Written only when a painting is registered on the setup grid (a hash-bound `painting_in_rig` or a declared `setup_painting` source); without one the block is absent, which means not measured, not clean. Measures pixels along a shared edge of an over/under pair of normal-blend drawn pieces where the setup render is lighter than the painting, and the longest unbroken run of them (`longest_lighter_run_px`, `lighter_px`, `world_box`, `edge_length_px`, `sampled_px`, `painting_eligible_px`, `darker_px`, `worst_transmission`). It usually means the under piece ends at the over piece's edge instead of running beneath it, so whatever is behind shows through the two soft edges; `worst_transmission` saturates and is not a severity | none — status `REPORTED`, outside `bar_outcomes`, the warning tally and the exit code; a measured run with no qualifying pair writes `rows: []` and prints `no shared edge has a lighter run`. To confirm and repair, render over two background colours — a line that takes the background's colour is transmission — and extend the under piece beneath the edge |
7990
7993
 
7991
7994
  `assemble` writes optional `part_support_domains.json` beside `parts.json`, with
7992
7995
  spec `rig-parts-support-domains/1`. It binds the exact parts.json and named PNG
@@ -10413,6 +10416,25 @@ config it would emit with the recipe applied. If either changes the assembly
10413
10416
  reading, it reports [`ASSEMBLY_CONFIG_STALE`](#ASSEMBLY_CONFIG_STALE) before
10414
10417
  writing the mapped output. A successful handoff carries the original digest.
10415
10418
 
10419
+ For a recorded source, pass its accepted whole-set digest to publish a
10420
+ depth-only derivation. Prepare and bind the maps against that exact source.
10421
+
10422
+ ```sh
10423
+ rig-parts depth-apply --parts recorded --manifest inference/manifest.json --config depth.json --rig-config config.json --source-sha256 <accepted-digest> --out mapped
10424
+ rig-parts rig --parts mapped/set --config mapped/config.json --out compiled
10425
+ ```
10426
+
10427
+ Use a new, disjoint `--out` directory. The command publishes `set/`,
10428
+ `config.json`, and `depth-report.json` together after verification. The parts
10429
+ tree and its active receipt live in `set/`. Prior receipts stay in the tree
10430
+ with their original bytes. A source digest mismatch or a bad receipt is
10431
+ reported as [`REPLACE_PART_SOURCE_HASH`](#REPLACE_PART_SOURCE_HASH) or
10432
+ [`REPLACE_PART_RECORD`](#REPLACE_PART_RECORD). In Bun, use
10433
+ `verifyDepthReplacementDelta(recorded, 'mapped/set')` from
10434
+ `@rig-c/parts/replace-parts` to verify the derivation. The
10435
+ [replacement record contract](STABILITY.md#parts-replacement-record)
10436
+ defines both inventories and the depth variant.
10437
+
10416
10438
  The separate recipe is not a new field on character config:
10417
10439
 
10418
10440
  ```json
@@ -10593,6 +10615,9 @@ by `rig`, so their output requires no alternate compiler or dependency pin.
10593
10615
  | <a id="DEPTH_INPUT_JSON"></a>`DEPTH_INPUT_JSON` | malformed numeric or configuration JSON | write valid finite JSON |
10594
10616
  | <a id="DEPTH_PART_RESOLVES"></a>`DEPTH_PART_RESOLVES` | selected or cleared name absent from parts.json | use the assembled part name |
10595
10617
  | <a id="DEPTH_OUTPUT_EMPTY"></a>`DEPTH_OUTPUT_EMPTY` | nonempty output directory or output containing an input, or `depth-map` cannot create its output exclusively | choose a separate absent or empty output directory, or for `depth-map` an absent output file in a writable directory |
10618
+ | <a id="DEPTH_RECORD_OUTPUT"></a>`DEPTH_RECORD_OUTPUT` | the recorded output path is occupied, overlaps an input, or cannot be published, or the source already contains the proposed receipt path | choose an absent, writable `--out` directory disjoint from every input and use a source with a fresh receipt path |
10619
+ | <a id="DEPTH_RECORD_DELTA"></a>`DEPTH_RECORD_DELTA` | the manifests, sheet ownership, byte inventories or receipt claims disagree with a depth-only derivation | restore the exact source and regenerate the result through `depth-apply --source-sha256` with distinct sheet paths |
10620
+ | <a id="DEPTH_RECORD_MANIFEST_BOUND"></a>`DEPTH_RECORD_MANIFEST_BOUND` | the recorded source contains `cut_material_sources.json`, which binds to its `parts.json` | supply a recorded source whose assembly did not emit the cut-material sidecar |
10596
10621
  | <a id="DEPTH_MAP_BINDING"></a>`DEPTH_MAP_BINDING` | invalid part name for `depth-map` or `depth-bind`, or malformed present map receipt, wrong part, map hash or inference-input hash | use a nonempty plain part filename for the command, or re-run depth for the affected receipt and call `rig-parts depth-bind --map <numeric-map.json> --input <prepared.png> --part <name>` |
10597
10622
  | <a id="DEPTH_MAP_BINDING_ABSENT"></a>`DEPTH_MAP_BINDING_ABSENT` | WARN only: no receipt, compatibility policy dated 2026-11-16 | re-run depth for these inputs, then `rig-parts depth-bind --map <numeric-map.json> --input <prepared.png> --part <name>` |
10598
10623
  | <a id="DEPTH_INPUT_BINDING"></a>`DEPTH_INPUT_BINDING` | changed recipe, art, part record, crop, padding or inference PNG | prepare again for these exact inputs |
@@ -11126,8 +11151,8 @@ Internal `SeamSupport.drawings` never enters check JSON. Named requirement
11126
11151
  <!-- check-row-table:begin -->
11127
11152
  | Row family | Registered JSON paths | row_scope | row_kind | row_subjects (producer expression) | Producer |
11128
11153
  | --- | --- | --- | --- | --- | --- |
11129
- | `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | part when the supplied mapping resolves a piece; otherwise rig | finding | resolved piece for e.slot; otherwise [] | [check.ts:3887](../src/check.ts#L3887) |
11130
- | `ANIMATIONS_DO_NOT_FOLD.folding` | `ANIMATIONS_DO_NOT_FOLD.folding` | part when the supplied mapping resolves a piece; otherwise rig | finding when entry === undefined; otherwise evidence | resolved piece for slot; otherwise [] | [check.ts:3847](../src/check.ts#L3847) |
11154
+ | `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | part when the supplied mapping resolves a piece; otherwise rig | finding | resolved piece for e.slot; otherwise [] | [check.ts:3889](../src/check.ts#L3889) |
11155
+ | `ANIMATIONS_DO_NOT_FOLD.folding` | `ANIMATIONS_DO_NOT_FOLD.folding` | part when the supplied mapping resolves a piece; otherwise rig | finding when entry === undefined; otherwise evidence | resolved piece for slot; otherwise [] | [check.ts:3849](../src/check.ts#L3849) |
11131
11156
  | `ART_JOINT_DISTANCE.joints` | `ART_JOINT_DISTANCE.joints` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [artjoints.ts:86](../src/artjoints.ts#L86) |
11132
11157
  | `BEHIND_PART_SEAMS.contributors` | `BEHIND_PART_SEAMS.turn.pairs[].frames[].standing.samples[].contributors`; `BEHIND_PART_SEAMS.turn.pairs[].frames[].motion_opened.samples[].contributors`; `BEHIND_PART_SEAMS.pairs[].setup.motion_opened.samples[].contributors`; `BEHIND_PART_SEAMS.pairs[].setup.standing.samples[].contributors`; `BEHIND_PART_SEAMS.pairs[].frames[].motion_opened.samples[].contributors`; `BEHIND_PART_SEAMS.pairs[].frames[].standing.samples[].contributors` | 'pair' | evidence | [pair.a, pair.b] | [behindseams.ts:664](../src/behindseams.ts#L664) |
11133
11158
  | `BEHIND_PART_SEAMS.hits` | `BEHIND_PART_SEAMS.pairs[].motion_opened.frames`; `BEHIND_PART_SEAMS.pairs[].standing.frames`; `BEHIND_PART_SEAMS.pairs[].motion_opened.worst`; `BEHIND_PART_SEAMS.pairs[].standing.worst` | 'pair' | finding when r.px > allowance; otherwise evidence | parts | [behindseams.ts:750](../src/behindseams.ts#L750) |
@@ -11143,54 +11168,55 @@ Internal `SeamSupport.drawings` never enters check JSON. Named requirement
11143
11168
  | `BEHIND_PART_SEAMS.unread_corridors` | `BEHIND_PART_SEAMS.turn.pairs[].frames[].standing.unread_corridors`; `BEHIND_PART_SEAMS.pairs[].setup.standing.unread_corridors`; `BEHIND_PART_SEAMS.pairs[].frames[].standing.unread_corridors` | 'pair' | evidence | [pair.a, pair.b] | [behindseams.ts:585](../src/behindseams.ts#L585) |
11144
11169
  | `BOUNDARY_COLOUR_STEP.over` | `BOUNDARY_COLOUR_STEP.over` | 'pair' | finding | r.parts | [boundarycolour.ts:221](../src/boundarycolour.ts#L221) |
11145
11170
  | `BOUNDARY_COLOUR_STEP.unmeasured` | `BOUNDARY_COLOUR_STEP.unmeasured` | part when the supplied mapping resolves a piece; otherwise rig | evidence | resolved piece for r.slot; otherwise [] | [boundarycolour.ts:222](../src/boundarycolour.ts#L222) |
11146
- | `CLOTH_SETTLES.rows` | `CLOTH_SETTLES.rows` | 'rig' | finding when speeds.length > 0 && s < speeds.length; otherwise evidence | [] | [check.ts:6340](../src/check.ts#L6340) |
11171
+ | `CLOTH_SETTLES.rows` | `CLOTH_SETTLES.rows` | 'rig' | finding when speeds.length > 0 && s < speeds.length; otherwise evidence | [] | [check.ts:6342](../src/check.ts#L6342) |
11147
11172
  | `CUT_JOINT_MATERIAL.rows` | `CUT_JOINT_MATERIAL.rows` | 'part' | finding when r.status === 'FAIL'; otherwise evidence | [r.part] | [cutmaterial.ts:280](../src/cutmaterial.ts#L280) |
11148
- | `FEET_STAY_LEVEL.feet` | `FEET_STAY_LEVEL.feet` | 'part' | finding when row.status === 'FAIL'; otherwise evidence | [row.part] | [check.ts:4089](../src/check.ts#L4089) |
11149
- | `FEET_STAY_LEVEL.feet[].worst.through` | `FEET_STAY_LEVEL.feet[].worst.through` | 'rig' | evidence | [] | [check.ts:4064](../src/check.ts#L4064) |
11150
- | `LIMB_ONE_BONE.parts` | `LIMB_ONE_BONE.parts` | 'part' | finding when fail; otherwise evidence | [p.name] | [check.ts:4382](../src/check.ts#L4382) |
11151
- | `PART_SUPPORT_REPORT.pairs` | `PART_SUPPORT_REPORT.pairs` | 'pair' | evidence; finding when length > 0; otherwise evidence | [F.name, B.name] | [coincide.ts:114](../src/coincide.ts#L114), [coincide.ts:130](../src/coincide.ts#L130) |
11152
- | `PART_SUPPORT_REPORT.raw_pairs` | `PART_SUPPORT_REPORT.raw_pairs` | 'pair' | evidence | [F.name, B.name] | [coincide.ts:110](../src/coincide.ts#L110) |
11153
- | `PART_SUPPORT_REPORT.unowned.regions` | `PART_SUPPORT_REPORT.unowned.regions` | 'rig' | finding | [] | [coincide.ts:145](../src/coincide.ts#L145) |
11173
+ | `FEET_STAY_LEVEL.feet` | `FEET_STAY_LEVEL.feet` | 'part' | finding when row.status === 'FAIL'; otherwise evidence | [row.part] | [check.ts:4091](../src/check.ts#L4091) |
11174
+ | `FEET_STAY_LEVEL.feet[].worst.through` | `FEET_STAY_LEVEL.feet[].worst.through` | 'rig' | evidence | [] | [check.ts:4066](../src/check.ts#L4066) |
11175
+ | `LIMB_ONE_BONE.parts` | `LIMB_ONE_BONE.parts` | 'part' | finding when fail; otherwise evidence | [p.name] | [check.ts:4384](../src/check.ts#L4384) |
11176
+ | `PART_SUPPORT_REPORT.pairs` | `PART_SUPPORT_REPORT.pairs` | 'pair' | evidence; finding when length > 0; otherwise evidence | [F.name, B.name] | [coincide.ts:141](../src/coincide.ts#L141), [coincide.ts:157](../src/coincide.ts#L157) |
11177
+ | `PART_SUPPORT_REPORT.raw_pairs` | `PART_SUPPORT_REPORT.raw_pairs` | 'pair' | evidence | [F.name, B.name] | [coincide.ts:137](../src/coincide.ts#L137) |
11178
+ | `PART_SUPPORT_REPORT.unowned.regions` | `PART_SUPPORT_REPORT.unowned.regions` | 'rig' | finding | [] | [coincide.ts:172](../src/coincide.ts#L172) |
11154
11179
  | `PHYSICS_CONTRIBUTES.rows` | `PHYSICS_CONTRIBUTES.rows` | 'part' | evidence; finding when !moves; otherwise evidence | [part] | [physicscontrib.ts:217](../src/physicscontrib.ts#L217), [physicscontrib.ts:220](../src/physicscontrib.ts#L220) |
11155
- | `SEAM_OVER_MOTION.pairs` | `SEAM_OVER_MOTION.pairs` | 'pair' | evidence | [p.a, p.b] | [check.ts:5737](../src/check.ts#L5737) |
11156
- | `SEAM_OVER_MOTION.required.pairs` | `SEAM_OVER_MOTION.required.pairs` | 'pair' | finding when open > 0; otherwise evidence | [p.a, p.b] | [check.ts:5052](../src/check.ts#L5052) |
11157
- | `SEAM_OVER_MOTION.required.pairs[].open_frames` | `SEAM_OVER_MOTION.required.pairs[].open_frames` | 'pair' | evidence | [p.a, p.b] | [check.ts:5044](../src/check.ts#L5044) |
11158
- | `SEAM_OVER_MOTION.roots.unmeasured` | `SEAM_OVER_MOTION.roots.unmeasured` | 'part' | evidence | [root.part] | [check.ts:5710](../src/check.ts#L5710) |
11159
- | `SEAM_OVER_MOTION.rows` | `SEAM_OVER_MOTION.rows` | 'pair'; unique ? 'pair' : 'rig' | finding when motionSeamFinding(want.root !== undefined, p.status, p.banded, opens.length); otherwise evidence; finding when motionSeamFinding(rootNames.has(r.pair), r.status, r.banded, r.opens.length); otherwise evidence | [want.a, want.b]; unique ? [pair.a, pair.b] : [] | [check.ts:5667](../src/check.ts#L5667), [check.ts:5743](../src/check.ts#L5743) |
11160
- | `SEAM_OVER_MOTION.rows[].cells` | `SEAM_OVER_MOTION.rows[].cells` | 'pair' | evidence | [want.a, want.b] | [check.ts:5680](../src/check.ts#L5680) |
11161
- | `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | 'pair' | evidence | [want.a, want.b] | [check.ts:5670](../src/check.ts#L5670) |
11180
+ | `SEAM_OVER_MOTION.pairs` | `SEAM_OVER_MOTION.pairs` | 'pair' | evidence | [p.a, p.b] | [check.ts:5739](../src/check.ts#L5739) |
11181
+ | `SEAM_OVER_MOTION.required.pairs` | `SEAM_OVER_MOTION.required.pairs` | 'pair' | finding when open > 0; otherwise evidence | [p.a, p.b] | [check.ts:5054](../src/check.ts#L5054) |
11182
+ | `SEAM_OVER_MOTION.required.pairs[].open_frames` | `SEAM_OVER_MOTION.required.pairs[].open_frames` | 'pair' | evidence | [p.a, p.b] | [check.ts:5046](../src/check.ts#L5046) |
11183
+ | `SEAM_OVER_MOTION.roots.unmeasured` | `SEAM_OVER_MOTION.roots.unmeasured` | 'part' | evidence | [root.part] | [check.ts:5712](../src/check.ts#L5712) |
11184
+ | `SEAM_OVER_MOTION.rows` | `SEAM_OVER_MOTION.rows` | 'pair'; unique ? 'pair' : 'rig' | finding when motionSeamFinding(want.root !== undefined, p.status, p.banded, opens.length); otherwise evidence; finding when motionSeamFinding(rootNames.has(r.pair), r.status, r.banded, r.opens.length); otherwise evidence | [want.a, want.b]; unique ? [pair.a, pair.b] : [] | [check.ts:5669](../src/check.ts#L5669), [check.ts:5745](../src/check.ts#L5745) |
11185
+ | `SEAM_OVER_MOTION.rows[].cells` | `SEAM_OVER_MOTION.rows[].cells` | 'pair' | evidence | [want.a, want.b] | [check.ts:5682](../src/check.ts#L5682) |
11186
+ | `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | 'pair' | evidence | [want.a, want.b] | [check.ts:5672](../src/check.ts#L5672) |
11162
11187
  | `SEAM_OVER_MOTION.rows[].pose_at_worst.joints` | `SEAM_OVER_MOTION.rows[].pose_at_worst.joints` | 'rig' | evidence | [] | [motionseampose.ts:53](../src/motionseampose.ts#L53) |
11163
- | `SEAM_OVER_MOTION.worlds.*.rows` | `SEAM_OVER_MOTION.worlds.*.rows` | 'pair' | evidence | [want.a, want.b] | [check.ts:5664](../src/check.ts#L5664) |
11164
- | `SEAM_OVER_RANGE.joints` | `SEAM_OVER_RANGE.joints` | 'part' | evidence; finding when poses.some(p => p.status === 'FAIL'); otherwise evidence | [j.part] | [check.ts:4706](../src/check.ts#L4706), [check.ts:4752](../src/check.ts#L4752) |
11165
- | `SEAM_OVER_RANGE.joints[].poses` | `SEAM_OVER_RANGE.joints[].poses` | 'part' | finding when fail; otherwise evidence | [j.part] | [check.ts:4750](../src/check.ts#L4750) |
11188
+ | `SEAM_OVER_MOTION.worlds.*.rows` | `SEAM_OVER_MOTION.worlds.*.rows` | 'pair' | evidence | [want.a, want.b] | [check.ts:5666](../src/check.ts#L5666) |
11189
+ | `SEAM_OVER_RANGE.joints` | `SEAM_OVER_RANGE.joints` | 'part' | evidence; finding when poses.some(p => p.status === 'FAIL'); otherwise evidence | [j.part] | [check.ts:4708](../src/check.ts#L4708), [check.ts:4754](../src/check.ts#L4754) |
11190
+ | `SEAM_OVER_RANGE.joints[].poses` | `SEAM_OVER_RANGE.joints[].poses` | 'part' | finding when fail; otherwise evidence | [j.part] | [check.ts:4752](../src/check.ts#L4752) |
11166
11191
  | `SETUP_MATCHES_PAINTING.regions` | `SETUP_MATCHES_PAINTING.regions` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [setuppainting.ts:175](../src/setuppainting.ts#L175) |
11167
11192
  | `SETUP_MATCHES_PAINTING.regions[].slots` | `SETUP_MATCHES_PAINTING.regions[].slots` | part when the supplied mapping resolves a piece; otherwise rig | evidence | resolved piece for slot; otherwise [] | [setuppainting.ts:176](../src/setuppainting.ts#L176) |
11193
+ | `SETUP_SEAM_TRANSMISSION.rows` | `SETUP_SEAM_TRANSMISSION.rows` | 'pair' | evidence | [under, over] | [coincide.ts:453](../src/coincide.ts#L453) |
11168
11194
  | `SOURCE_EXPOSURE.rows` | `SOURCE_EXPOSURE.rows` | 'part' | finding when declared !== undefined && r.px > declared.max_px; otherwise evidence | [r.part] | [sourceexposure.ts:292](../src/sourceexposure.ts#L292) |
11169
11195
  | `SOURCE_EXPOSURE.unmeasured` | `SOURCE_EXPOSURE.unmeasured` | part when the supplied mapping resolves a piece; otherwise rig | finding when declared !== undefined; otherwise evidence | resolved piece for u.slot; otherwise [] | [sourceexposure.ts:293](../src/sourceexposure.ts#L293) |
11170
- | `STILL_REGIONS_DARK.*.crossing` | `STILL_REGIONS_DARK.*.crossing` | part when the supplied mapping resolves a piece; otherwise rig | finding | resolved piece for sl.name; otherwise [] | [check.ts:9550](../src/check.ts#L9550) |
11171
- | `STILL_REGIONS_DARK.*.still_slots` | `STILL_REGIONS_DARK.*.still_slots` | part when the supplied mapping resolves a piece; otherwise rig | evidence; finding when r.max > tolerance; otherwise evidence | resolved piece for slot; otherwise [] | [check.ts:9536](../src/check.ts#L9536), [check.ts:9541](../src/check.ts#L9541) |
11172
- | `STRESS_OFF_CHAIN.not_read` | `STRESS_OFF_CHAIN.not_read` | 'part' | evidence | [r.part] | [check.ts:4310](../src/check.ts#L4310) |
11173
- | `STRESS_OFF_CHAIN.per_part` | `STRESS_OFF_CHAIN.per_part` | 'part' | finding when poses.some(p => typeof p.reading === 'number' && p.reading > STRESS_RIGID); otherwise evidence | [r.part] | [check.ts:4298](../src/check.ts#L4298) |
11174
- | `STRESS_OFF_CHAIN.per_part[].off_chain` | `STRESS_OFF_CHAIN.per_part[].off_chain` | 'part' | evidence | [r.part] | [check.ts:4298](../src/check.ts#L4298) |
11175
- | `STRESS_OFF_CHAIN.per_part[].poses` | `STRESS_OFF_CHAIN.per_part[].poses` | 'part' | evidence; finding when shown > STRESS_RIGID; otherwise evidence | [r.part] | [check.ts:4266](../src/check.ts#L4266), [check.ts:4284](../src/check.ts#L4284) |
11176
- | `TEXTURE_STRETCH.per_mesh` | `TEXTURE_STRETCH.per_mesh` | part when the supplied mapping resolves a piece; otherwise rig | evidence; finding when exceeds; otherwise evidence | resolved piece for m.slot; otherwise [] | [check.ts:10697](../src/check.ts#L10697), [check.ts:10704](../src/check.ts#L10704) |
11177
- | `TIP_OVER_ROOT.parts` | `TIP_OVER_ROOT.parts` | 'part' | evidence; finding when !ok && !(!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR); otherwise evidence | [p.name] | [check.ts:8925](../src/check.ts#L8925), [check.ts:8930](../src/check.ts#L8930), [check.ts:8951](../src/check.ts#L8951), [check.ts:8962](../src/check.ts#L8962) |
11178
- | `WIND_BAND.pairs` | `WIND_BAND.pairs` | 'pair' | finding when !holdsAll; otherwise evidence | [p.a, p.b] | [check.ts:6844](../src/check.ts#L6844) |
11179
- | `WIND_BAND.pairs[].steps` | `WIND_BAND.pairs[].steps` | 'pair' | finding when !s.holds; otherwise evidence | [p.a, p.b] | [check.ts:6855](../src/check.ts#L6855) |
11180
- | `figure_openings.openings` | `figure_openings.openings` | 'pair' | finding | [ps.under, ps.above] | [check.ts:6161](../src/check.ts#L6161) |
11181
- | `loop_physics` | `loop_physics` | 'rig' | evidence | [] | [check.ts:7959](../src/check.ts#L7959) |
11182
- | `requirements.lines.* (bone)` | `requirements.lines.*` | 'rig' | finding when line.status === 'FAIL'; otherwise evidence | [] | [check.ts:8293](../src/check.ts#L8293) |
11183
- | `requirements.lines.* (seam)` | `requirements.lines.*` | 'pair' | finding when line.status === 'FAIL'; otherwise evidence | [r.part, r.neighbour] | [check.ts:8293](../src/check.ts#L8293) |
11184
- | `requirements.lines.* (stretch)` | `requirements.lines.*` | part when the supplied mapping resolves a piece; otherwise rig | finding when line.status === 'FAIL'; otherwise evidence | resolved piece for r.slot; otherwise [] | [check.ts:8293](../src/check.ts#L8293) |
11185
- | `seam_cells.frames` | `frames` | 'pair' | evidence | [p.a, p.b] | [check.ts:5041](../src/check.ts#L5041) |
11186
- | `seam_cells.frames[].cells` | `frames[].cells` | part when the supplied mapping resolves a piece; otherwise rig | evidence | resolved piece for cell.setupTop ?? ''; otherwise [] | [check.ts:5001](../src/check.ts#L5001) |
11196
+ | `STILL_REGIONS_DARK.*.crossing` | `STILL_REGIONS_DARK.*.crossing` | part when the supplied mapping resolves a piece; otherwise rig | finding | resolved piece for sl.name; otherwise [] | [check.ts:9556](../src/check.ts#L9556) |
11197
+ | `STILL_REGIONS_DARK.*.still_slots` | `STILL_REGIONS_DARK.*.still_slots` | part when the supplied mapping resolves a piece; otherwise rig | evidence; finding when r.max > tolerance; otherwise evidence | resolved piece for slot; otherwise [] | [check.ts:9542](../src/check.ts#L9542), [check.ts:9547](../src/check.ts#L9547) |
11198
+ | `STRESS_OFF_CHAIN.not_read` | `STRESS_OFF_CHAIN.not_read` | 'part' | evidence | [r.part] | [check.ts:4312](../src/check.ts#L4312) |
11199
+ | `STRESS_OFF_CHAIN.per_part` | `STRESS_OFF_CHAIN.per_part` | 'part' | finding when poses.some(p => typeof p.reading === 'number' && p.reading > STRESS_RIGID); otherwise evidence | [r.part] | [check.ts:4300](../src/check.ts#L4300) |
11200
+ | `STRESS_OFF_CHAIN.per_part[].off_chain` | `STRESS_OFF_CHAIN.per_part[].off_chain` | 'part' | evidence | [r.part] | [check.ts:4300](../src/check.ts#L4300) |
11201
+ | `STRESS_OFF_CHAIN.per_part[].poses` | `STRESS_OFF_CHAIN.per_part[].poses` | 'part' | evidence; finding when shown > STRESS_RIGID; otherwise evidence | [r.part] | [check.ts:4268](../src/check.ts#L4268), [check.ts:4286](../src/check.ts#L4286) |
11202
+ | `TEXTURE_STRETCH.per_mesh` | `TEXTURE_STRETCH.per_mesh` | part when the supplied mapping resolves a piece; otherwise rig | evidence; finding when exceeds; otherwise evidence | resolved piece for m.slot; otherwise [] | [check.ts:10703](../src/check.ts#L10703), [check.ts:10710](../src/check.ts#L10710) |
11203
+ | `TIP_OVER_ROOT.parts` | `TIP_OVER_ROOT.parts` | 'part' | evidence; finding when !ok && !(!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR); otherwise evidence | [p.name] | [check.ts:8931](../src/check.ts#L8931), [check.ts:8936](../src/check.ts#L8936), [check.ts:8957](../src/check.ts#L8957), [check.ts:8968](../src/check.ts#L8968) |
11204
+ | `WIND_BAND.pairs` | `WIND_BAND.pairs` | 'pair' | finding when !holdsAll; otherwise evidence | [p.a, p.b] | [check.ts:6846](../src/check.ts#L6846) |
11205
+ | `WIND_BAND.pairs[].steps` | `WIND_BAND.pairs[].steps` | 'pair' | finding when !s.holds; otherwise evidence | [p.a, p.b] | [check.ts:6857](../src/check.ts#L6857) |
11206
+ | `figure_openings.openings` | `figure_openings.openings` | 'pair' | finding | [ps.under, ps.above] | [check.ts:6163](../src/check.ts#L6163) |
11207
+ | `loop_physics` | `loop_physics` | 'rig' | evidence | [] | [check.ts:7964](../src/check.ts#L7964) |
11208
+ | `requirements.lines.* (bone)` | `requirements.lines.*` | 'rig' | finding when line.status === 'FAIL'; otherwise evidence | [] | [check.ts:8299](../src/check.ts#L8299) |
11209
+ | `requirements.lines.* (seam)` | `requirements.lines.*` | 'pair' | finding when line.status === 'FAIL'; otherwise evidence | [r.part, r.neighbour] | [check.ts:8299](../src/check.ts#L8299) |
11210
+ | `requirements.lines.* (stretch)` | `requirements.lines.*` | part when the supplied mapping resolves a piece; otherwise rig | finding when line.status === 'FAIL'; otherwise evidence | resolved piece for r.slot; otherwise [] | [check.ts:8299](../src/check.ts#L8299) |
11211
+ | `seam_cells.frames` | `frames` | 'pair' | evidence | [p.a, p.b] | [check.ts:5043](../src/check.ts#L5043) |
11212
+ | `seam_cells.frames[].cells` | `frames[].cells` | part when the supplied mapping resolves a piece; otherwise rig | evidence | resolved piece for cell.setupTop ?? ''; otherwise [] | [check.ts:5003](../src/check.ts#L5003) |
11187
11213
  | `seam_pairs` | `seam_pairs`; `seam_scope.whole_pairs`; `sets.*.seam_pairs`; `sets.*.seam_scope.whole_pairs` | subjects.length === 0 ? 'rig' : subjects.length === 1 ? 'part' : 'pair' | evidence | subjects | [check.ts:2709](../src/check.ts#L2709) |
11188
11214
  | `seam_scope.changes` | `seam_scope.changes`; `sets.*.seam_scope.changes` | 'rig' | evidence | [] | [check.ts:2187](../src/check.ts#L2187) |
11189
11215
  | `seam_scope.domain.states` | `seam_scope.domain.states`; `sets.*.seam_scope.domain.states` | 'rig' | evidence | [] | [check.ts:2272](../src/check.ts#L2272) |
11190
- | `seam_scope.pairs` | `seam_scope.pairs`; `sets.*.seam_scope.pairs` | subjects.length === 0 ? 'rig' : subjects.length === 1 ? 'part' : 'pair' | evidence | subjects | [check.ts:7809](../src/check.ts#L7809) |
11216
+ | `seam_scope.pairs` | `seam_scope.pairs`; `sets.*.seam_scope.pairs` | subjects.length === 0 ? 'rig' : subjects.length === 1 ? 'part' : 'pair' | evidence | subjects | [check.ts:7811](../src/check.ts#L7811) |
11191
11217
  | `seam_scope.population.pairs` | `seam_scope.population.pairs`; `sets.*.seam_scope.population.pairs` | 'pair' | evidence | row.parts | [check.ts:2643](../src/check.ts#L2643) |
11192
11218
  | `seam_scope.population.single_art` | `seam_scope.population.single_art`; `sets.*.seam_scope.population.single_art` | 'part' | evidence | [row.part] | [check.ts:2644](../src/check.ts#L2644) |
11193
- | `slider_stretch.rows` | `slider_stretch.rows` | 'rig' | finding when row.status === 'FAIL'; otherwise evidence | [] | [check.ts:10640](../src/check.ts#L10640) |
11219
+ | `slider_stretch.rows` | `slider_stretch.rows` | 'rig' | finding when row.status === 'FAIL'; otherwise evidence | [] | [check.ts:10646](../src/check.ts#L10646) |
11194
11220
 
11195
11221
  | Serialized type path | Reason for schema exclusion |
11196
11222
  | --- | --- |
package/docs/STABILITY.md CHANGED
@@ -53,28 +53,58 @@ See
53
53
 
54
54
  ## Parts replacement record
55
55
 
56
- `replace-parts` (issue #1635) writes a separate parts set and adds a relative
57
- POSIX `replacement_record` path to its `parts.json`. The path is
58
- `.parts-replacements/<source-sha256>.json` within the output set.
56
+ `replace-parts` (issue #1635) and `depth-apply --source-sha256` (issue #1642)
57
+ write a separate parts set and add a relative POSIX `replacement_record` path
58
+ to its `parts.json`. The path is `.parts-replacements/<source-sha256>.json`
59
+ within the output set.
59
60
 
60
61
  | Field | Meaning |
61
62
  | --- | --- |
62
63
  | `spec` | Literal `rig-parts-replacement/1`. |
63
- | `source_sha256` | SHA-256 digest of the source set inventory, computed for every replacement. If supplied, `--source-sha256` must match this digest. |
64
+ | `source_sha256` | SHA-256 digest of the complete source set inventory, including its active receipt and any earlier receipts. If supplied, `--source-sha256` must match this digest. |
64
65
  | `result_sha256` | SHA-256 digest of the result inventory, including `parts.json` and excluding the new replacement record itself. |
65
66
  | `rig_size` | The unchanged rig grid `[width, height]` in pixels. |
66
- | `replaced` | Per-edit entries carrying `part`, `receipt`, `changed_px`, `changed_counted_px`, `changed_excluded_px`, and `removed_opaque_px`. Optional `removed_opaque_regions` describes connected removals. Optional `historical` holds superseded source measurements. A part with scalar depth also carries `depth` with its before and after SHA-256 values (`from_sha256` and `sha256`), `reseeded`, support and measured reading. Reseeding can return an identical sheet. |
67
67
  | `copied` | Sorted relative POSIX paths for files copied byte-for-byte. |
68
68
  | `rederived` | Sorted relative POSIX paths regenerated for the revised set. |
69
69
  | `omitted` | Sorted relative POSIX paths from the source set excluded from the revised set. |
70
70
 
71
71
  Both digests hash compact UTF-8 JSON with a trailing LF. The inventory is an
72
72
  array of `{path, bytes, sha256}` rows for regular files, with relative POSIX
73
- paths sorted by code unit. The `receipt` carries the edit's author declaration
74
- and the two encoded PNG hashes. `from_sha256` is required even when the caller
75
- omits `--source-sha256`. The record binds the revised set to the recorded input
76
- set. See the [authoring command](AUTHORING.md#replace-parts) for the edit
77
- file and validation rules.
73
+ paths sorted by code unit.
74
+
75
+ The colour variant omits `change` and carries `replaced`. Each edit records
76
+ `part`, `receipt`, `changed_px`, `changed_counted_px`, `changed_excluded_px`,
77
+ and `removed_opaque_px`. Optional `removed_opaque_regions` describes connected
78
+ removals and optional `historical` holds superseded source measurements.
79
+ A part with scalar depth also carries `depth` with its before and after
80
+ SHA-256 values (`from_sha256` and `sha256`), `reseeded`, support and measured
81
+ reading. Reseeding can return an identical sheet. The `receipt` carries the
82
+ edit's author declaration and both encoded PNG hashes. `from_sha256` is
83
+ required even when the caller omits `--source-sha256`. See the
84
+ [authoring command](AUTHORING.md#replace-parts) for the edit file.
85
+
86
+ The depth variant carries `change: "depth"`, `depth_changes`, and `groups`.
87
+ It omits `replaced`. `depth_changes` is sorted by base part. Each row has
88
+ `part`, `group`, `before`, and `after`. A clear has `group: null` and
89
+ `after: null`. An addition has `before: null`. Each present side has its
90
+ relative sheet `path`, encoded `bytes` and `sha256`, and the manifest's `near`
91
+ and `zScale`. A metadata-only depth change can name the same sheet bytes on
92
+ both sides, in which case the sheet path is `copied`. `groups` is sorted by
93
+ group and each row has `group`, `near`, and `zScale`. Each after side agrees
94
+ with its group's polarity and scale. Paths in `rederived` and `omitted` are
95
+ limited to `parts.json` and the changed, uniquely owned scalar depth sheets.
96
+
97
+ The depth writer verifies the source's active receipt against the source
98
+ before deriving. The result carries the source's receipt history byte for
99
+ byte and its own new active receipt. `rig` checks the active receipt against
100
+ the result alone. To prove lineage, verify the delta against both snapshots.
101
+ Their inventories must match by path, byte length and SHA-256 except for the
102
+ active result receipt, `parts.json`, and the sheets claimed by changed base
103
+ parts. In the two manifests, remove the active pointer and the changed base
104
+ parts' `depth` subtrees and require the remaining values to match. Each
105
+ declared difference must match the actual source and result depth subtrees
106
+ and the bytes of the sheets they own. The writer refuses a source carrying
107
+ `cut_material_sources.json` with [`DEPTH_RECORD_MANIFEST_BOUND`](AUTHORING.md#DEPTH_RECORD_MANIFEST_BOUND).
78
108
 
79
109
  The stable named entry `@rig-c/parts/replace-parts` exports the following
80
110
  without loading the CLI.
@@ -83,8 +113,10 @@ without loading the CLI.
83
113
  | --- | --- |
84
114
  | `replacementTreeDigest(root: string, options?: { result?: boolean }): string` | Returns the lowercase source inventory digest by default. Result mode discovers and excludes the active record through `parts.json` and requires that record to exist. |
85
115
  | `REPLACEMENT_RECORD_SPEC` | Literal `rig-parts-replacement/1`. |
86
- | `readReplacementRecord(bytes: Uint8Array): ReplacementRecord` | Parses the UTF-8 JSON record and reports all detected shape problems together. |
87
- | `ReplacementRecord` | Type of the record described above. |
116
+ | `readReplacementRecord(bytes: Uint8Array): ReplacementRecord \| DepthReplacementRecord` | Parses the UTF-8 JSON record and reports shape problems. Narrow on `change === 'depth'` to read the depth variant. |
117
+ | `verifyDepthReplacementDelta(sourceRoot: string, resultRoot: string): DepthReplacementRecord` | Verifies the active depth receipt against the complete source and result parts roots, including the exact change inventory and retained receipt history, then returns the verified receipt. Pass `--out/set` as `resultRoot`. |
118
+ | `createDepthReplacementRecord(sourceRoot: string, resultRoot: string, groups: ReadonlyMap<string, { near: DepthChangeSide['near']; zScale: number }>, partGroups: ReadonlyMap<string, string \| null>): DepthReplacementRecord` | Derives the record from a staged result with the new active pointer set and its receipt file absent. Pass each applied group's declared units and each changed base part's group or `null` for a clear. |
119
+ | `ReplacementRecord`, `DepthReplacementRecord`, `DepthChangeSide` | Exported types for the colour record, depth record, and one present side of a depth change. |
88
120
 
89
121
  ## Parts-stage integrity report
90
122
 
@@ -634,7 +666,7 @@ and do not certify visibility. See the
634
666
  | `depth-prepare` | `--parts`, `--config`, `--out`; optional `--help` (`-h`) (issue #897; separate numeric-depth recipe) |
635
667
  | `depth-map` | `--array`, `--input`, `--kind` (`depth` or `normals`), `--part`, `--out`; optional `--padding` (`LEFT,TOP,RIGHT,BOTTOM`), `--help` (`-h`) (issue #1573; NumPy array to input-frame numeric map) |
636
668
  | `depth-bind` | `--map`, `--input`, `--part`; optional `--help` (`-h`) (issue #1284; exclusive receipt creation from current file bytes) |
637
- | `depth-apply` | `--parts`, `--manifest`, `--config`, `--rig-config`, `--out`; optional `--groups` (a comma-separated list of the recipe's groups to apply, issue #1449), `--help` (`-h`) (issue #897; original character config is read-only) |
669
+ | `depth-apply` | `--parts`, `--manifest`, `--config`, `--rig-config`, `--out`; optional `--groups` (a comma-separated list of the recipe's groups to apply, issue #1449), `--source-sha256` (a recorded source digest, issue #1642), `--help` (`-h`) (issue #897; original character config is read-only) |
638
670
  | `layers` | one positional path: a wrapper directory, a `layers.json` or a `.psd` (a file literally named `-h` is reached as `./-h`); with it, optional `--export` (a directory to write the wrapper form into, issue #359); or `--template` with `--canvas` and no path; or a positional head run with `--full`, `--source`, `--config` together for `PLAN_HEAD_GARMENT_OVERLAP` (issue #826); or `--help` (`-h`) |
639
671
  | `sheet` | `--source`, `--layers` (repeatable), `--out`; optional `--cell`, `--cols`, `--help` (`-h`) |
640
672
  | `inputs` | `--source`, `--config`, `--out`; optional `--help` (`-h`) |
@@ -1230,6 +1262,7 @@ execution in historical evidence is inferred from a current export.
1230
1262
  | `rig/mesh_report.json` | `rig`, `build` | one row per mesh: `part`, `vertices`, `triangles`, `hull`, `bones` (the sorted names the attachment's weights bind in the written `rig.json`, in every mode — since 1.49.1 (issue #536) a rig with `turn` or `stops` names the twins and `<link>_d` bones there, where the row named the segment bones they replace: a fix of a wrong name, not a format change; a rig with neither writes the bytes it wrote), `max_influences`, `mean_influences`, `art_coverage`, then `grid` (a lattice); or `mode` "explicit" with `image_sha256` and `region_sha256` (the verified guards; counts and coverage are measured from the supplied mesh, no legacy generator report is adopted); `mode` "contour" with `params`, `contour`, `regions` (`params.maxEdge` and `contour.outlineCut` only when the mesh declares `contour.maxEdge`; `params.bridges` and `contour.bridges` — `islands`, `units`, `joins`, and `faint` only when an island was left out as faint — only when it declares `contour.bridges`); or `mode` "influence" with `influence` (as declared), `reach` (`farthest`, `at`, `nearest`, `capped`, `widest`) and `lattice` (rig-c's `SegmentsLatticeReport`: `cols`, `rows`, `artCells`, `keptCells`, `passes`, `islands`) (issue #378); or `mode` "auto" with `settings`, `source`, `result`, `residuals`, `worst_residual`, `worst_region`, `motion_amplitude`, `termination`, `weights`, `regions`, `deformation`, `quality_report` (rig-c's `mesh-quality-report/1` document whole), `motion_report`, and, only when they apply, `stray_cleared` (after `source`, when `source.stray` is declared), `skinning_residual` and `replay` (`AutoMeshReport` in `src/rig.ts`); in every mode, `exponent` when the mesh declares one (after `grid`, or after `mode`); `influences`, as declared, when a lattice or contour mesh declares it (after `exponent`, or where `exponent` would be); `stray` and `stray_cleared` when a lattice mesh declares `stray` (after `influences`, or where `influences` would be); `ribs` when a contour or auto mesh declares them (after `exponent`, or after `mode`), and then `contour.ribs` (`source.contour.ribs` in the automatic mode) |
1231
1263
  | `check/check.json` and the rest of `check/` | `check`, `build`, `compose` | [Check verdict spec](#check-report-rig-parts-check1) followed by the reference's fields in its order (`gate_spine_html_green`, `rigc_entry`, `pack_mode` (with `page_size` under `--page-size` only, issue #1273, additive), `environment` after it under `--environment` only (issues #538, #1554, additive: `path` relative to `check`'s `--out`, `sha256`, `steps`), `loop_max_diff`, the seam figures — `seam_mean`, `seam_px_over_40`, `seam_px_over_80` and, from issue #216, `seam_frame_scale`, the frame scale the bar divides the count by), `loop_physics` after `loop_max_diff` when the rig declares a physics constraint, `seam_border` after the seam figures when `parts.json` declares a scene (issue #242), `seam_pairs` after the seam figures when the seam bar fails or `--seam-pairs` asks (each row's picture under `check/seam/`; `--keep-stills` leaves the setup-pose still and its `frames.json` under `check/setup_still/`), then the judgement lines (`BREATH_VISIBLE`, `BLINK_NO_HOLE`, `CHAIN_LAG`, `TIP_OVER_ROOT`, `STILL_REGIONS_DARK`, `TEXTURE_STRETCH`), `ANIMATIONS_DO_NOT_FOLD` after them when `motion.json` holds an animation, the idle included — on every rig with an idle since issue #333 (issues #320, #363: `status`, `animations`, `fps`, `physics_left_out`, `folding` — each `animation`, `slot`, `attachment`, `frames`, `worst_frame`, `worst_triangles`, `triangles`, `physics_on`, `physics_off`, `physics_constraints`, `declared`, `line` — `folding_undeclared`, `declared_not_folding`, `bar`), `FEET_STAY_LEVEL` after it when a `footwear` part rides a bone that hangs from another and `motion.json` holds an animation (issue #348: `status`, `reason` on a SKIP only, `animations`, `fps`, `physics_left_out`, `bar_degrees`, `bar`, `feet` — each `part`, `bone`, `hangs_from`, `status`, `frames_posed`, `worst`), `LIMB_ONE_BONE` after it (and after `STRESS_OFF_CHAIN` where that is written) when `parts.json` holds a limb segment's part (issue #349: `status`, `parts` — each `part`, `limb`, `bone`, `status`, `others`), `SEAM_OVER_RANGE` after it when a limb record carries a `range` (issue #360: `status`, `frame_scale`, `physics_left_out`, `bar` — `mean`, `rig_px_over_40`, `level` — and `joints`, each `part`, `limb`, `segment`, `joint`, `bone`, `range`, `at`, `radius`, `under_px`, `status`, `poses` — each `degrees`, `status`, `mean`, `px_over_40`, `px_over_80`, `rig_px_over_40`, and `step_px` (`left`, `right`) only on a joint whose cap record carries `short_px` (issue #557, additive) — and `unread` on a joint not read), `SEAM_OVER_MOTION` after it when `parts.json` holds a limb segment or `--requirements` a `seam` (issue #493 retains existing pair warnings; issue #686 gates proven body-root pairs only, on gapOpen plus UNDER-owned ghost: `status` — `WARN`, `CLEAR`, `SKIP` or `FAIL` — `reason` on a SKIP only, `fps`, `floor`, `pairs` — each `pair`, `a`, `b`, `declared`, optional `root` (`limb`, `bone`, `parent`) on a proven body-root pair, and `unread` on a pair not read — `animations`, `warnings`, `rows` — each `pair`, `animation`, `status`, `drawn`, `banded`, `opens`, `px`, `max_px`, `under_floor`, and only on new-root rows stock `gapOpen` plus UNDER-owned `ghostA`/`ghostB` cells selected by resolved per-frame draw order gate their summed count against the unchanged strict one-cell floor on the original raw kind boxes (their union when both kinds contribute), never narrowed partition boxes, while `gapCovered` and OVER-owned ghost cells are excluded (issue #711); `cells` retains partition counts, UNDER owner and counted total, `worst` retains frame/count/cell/box, and `roots` retains status, mode `gap-open+under-ghost`, ghost_owner `resolved-draw-order`, pairs, failed, reason and optional unmeasured bindings; eligible candidates whose valid setup bands are all zero retain a named unmeasured root and SKIP bar, including when no pair is selected; measured root FAIL wins over SKIP, while measured PASS plus an unmeasured root remains SKIP; every eligible body drawing with stock setup `banded > 0` is selected, including both when a parent is shared; issue #708 resolves a body slot on its exact generated turn child to the same named carrier only after unique identity-bone/control/per-part-transform proof, without changing pair identity, setup selection or the direct-carrier path; setup-only observation preserves the authored motion and default drawing, root-free inputs add no setup compile/render, and no animation remains SKIP rather than a measured zero; existing internal pair warnings and their exits are unchanged; issue #941 adds optional `required` only under the requirements file's `seam_over_motion.required: true` — `status` (`PASS` or `FAIL`), `mode` `gap-open`, `bar_px` 0, `pairs` (each `pair`, `class` — `body-root`, `internal-joint` or `explicit` — `frames`, `background_frames`, `max_px`) and `failed` — and with it the key is written even when no pair is declared; issue #591 adds optional `worlds` on physics rigs with readable declared pairs and animations: `default` and `still`, each `wind`, `gravity`, `status` (`REPORTED` or `SKIP`), `reason` on SKIP, `dir` only when rendered (relative to check.json: `seam_motion/default` or `seam_motion/still`, the complete retained render with frames.json and each animation's raw seam.json), and `rows` — pair, animation, status, drawn, banded, `gap` and `ghost`, each `max_px` and `worst` only; worst carries `index`, `px`, `cell`, `box`. Per-frame hits stay in the raw sidecars. These raw reference readings add no bar or warning and leave the custom environment reading unchanged), `CLOTH_SETTLES` after it when the rig declares a physics constraint and has an idle (issue #501, a warning and not a bar: `status` — `WARN` or `CLEAR` — `fps`, `frames`, `duration`, `floor_rig_px_per_s`, `floor`, `levers`, `warnings`, `rows` — each `tip`, `root`, `links`, `point`, `settles_at`, `max_rig_px_per_s`, `min_rig_px_per_s`), `PHYSICS_CONTRIBUTES` after it when the rig declares a physics constraint and has an idle and parts (issue #1320, report-only, no bar and no threshold: `status` — `WARN` when a part under physics reads exactly 0, else `CLEAR`; a named `SKIP` writes no key — `off` (what "physics off" means: the same compiled build posed with the poser's physics off, not the spec with its constraints left out), `points`, `world`, `poser`, `fps`, `frames`, `warnings`, `rows` — each `part`, `constraints`, `external_force`, then `vertices`, `frames_read`, `max_rig_px`, `p95_rig_px`, `mean_rig_px`, `max_of_diagonal`, `moves`, or `unmeasured` with its reason), `RECOMPOSITE_HOLES` (its first figure `declared_scene` when `parts.json` declares a scene), `SETUP_POSE_VS_SOURCE`, `WIND_BAND` after it under `--wind-band` only (issues #590, #1554, additive: `status` `"REPORTED"`, `spec` `"rig-parts-wind-band/1"`, `path` relative to `check`'s `--out`, `sha256`, `steady_wind_only` `true`, `gravity` `[0, 1]`, `min`, `max`, `step`, `steps`, `fps`, `animations`, `max_gap`, `max_ghost`, `holds_from`, `holds_to`, `pairs_holding_all`, and `pairs` — each `pair`, `a`, `b`, `holds_all`, `holds_from`, `holds_to`, `first_break_below`, `first_break_above`, `worst_gap`, `worst_ghost`, `steps`), `skipped` (written when `seam` has no `parts.json`, or when `loop` has no `idle` or omitted physics constraints on a closed physics-off idle, issue #1590), `config` under `build` only (issue #607, additive: `path` as `--config` was typed, `sha256` of the bytes the build read; `check` and `compose` read no config and write none), a `requirements` block under `--requirements` (or `build`'s `config.requirements`) — `file` first from issues #556 and #1554, additive: `path` relative to `check`'s `--out`, `sha256`, `keys` — and `PASS`; `check/build/skeleton.json`, `.atlas` and `.png` are the packed artifact rig-c writes, and `check/build-report.json` (`<out>/build-report.json` under standalone `check`) is rig-c's own `build-report/1` (`--report`) for that primary packed compile, written verbatim by `rigc` beside `check/build/` (and listed in `check/build/run.json`'s `outputs[]` as `../build-report.json`) on a failing compile as on a green one (issue #1394; `rig` keeps no compile report because its gate and `--lead-in` compiles are throwaway scratch runs whose outputs are deleted). Missing stock partitions or resolved owner are named refusals, never zero. No whole-box exemption or consumer compositor remains; internal warnings and reference raw readings are unchanged. |
1232
1264
  | `part_support_domains.json` | `assemble`, `build` | optional `rig-parts-support-domains/1` independent cut masks and unavailable reasons, with per-domain config-entry provenance and parts/PNG/payload digests; additive beside parts.json, whose bytes and PNGs are unchanged. Legacy output may omit it. `PART_SUPPORT_REPORT` reads pairs in the assembly placement frame and Unowned in actual setup, never as an acceptance gate. |
1265
+ | `SETUP_SEAM_TRANSMISSION` in `check.json` | `check`, `build` | written only when a painting is registered on the setup grid (a hash-bound `painting_in_rig` or a declared `setup_painting` source), beside `PART_SUPPORT_REPORT` and before `config`, `requirements` and `PASS` (issue #1634, additive): `{ status: "REPORTED", rows }` sorted by `longest_lighter_run_px` descending, then `under`, then `over`; each row carries `under`, `over`, `longest_lighter_run_px`, `lighter_px`, `world_box`, `edge_length_px`, `sampled_px`, `painting_eligible_px`, `darker_px`, `worst_transmission`, `row_scope` (`"pair"`), `row_kind` (`"evidence"`), `row_subjects` (`[under, over]`). Outside `bar_outcomes`, the warning tally and the exit code; absent without a registered painting |
1233
1266
  | `layers.json`, `<index>_<name>.png` | `layers --export` | the wrapper form `layers` reads (issue #359): `width`, `height`, then `layers` — each `name`, `filename`, `left`, `top`, `right`, `bottom`, `depth_median` (the input's own; `null` for a PSD, the manifest's order then being the draw order) — drawn layers in draw order, then the hidden-art layers; a PNG's name is its index and its layer's name, and the manifest, not the file name, says which layer it is |
1234
1267
  | the template `.psd` | `layers --template` | one empty layer per name `templateLayerNames` (`src/layers.ts`) holds, bottom first; the same canvas writes the same bytes |
1235
1268
  | `proposal.json`, `render/landmarks*.png` | `propose` | the config's four rig sections, `constraints` with `--cloth` (issue #364: a physics constraint per tree link named `<bone>_physics`, a dangling end's `<bone>_translate`, and a skirt swing's transforms `<swing>_<tree>`), `turn` with `--full`/`--head`, `proposed_rig_scale` (issue #354), and `notes` |
@@ -1254,7 +1287,7 @@ execution in historical evidence is inferred from a current export.
1254
1287
  | keyed scene camera | `compose` | optional `camera` in `spine-parts-scene/1` (issue #1596). A camera scene writes `spine-parts-scene-report/2` at the existing `scene.json` path with its keyed camera, sampled coverage and framing verdict, and packed model SHA-256. Scenes without a camera write report /1. Both report specs include `scene_driven` on new writes. The camera path uses Core animation easing and the posed backdrop at each sampled frame. Rig, motion and stock check outputs retain their existing semantics. The compose input receipt stays `rig-compose-run/1`. See [Keyed scene camera](AUTHORING.md#keyed-scene-camera-issue-1596) |
1255
1288
  | physics clips and scene repeats | `compose` | Issue #1615 adds `characters[].with_idle` and top-level `repeats` to `spine-parts-scene/1`. Each physics-only side clip requires literal `false` at any character scale or a safe integer count of at least 1 at scale 1. Numeric declarations fold whole periods into `idle` with exact duration equality. Both values retain `<id>:<clip>` subject to the character's scale checks, and the character report row echoes `with_idle` when declared. A scene repeat count is a safe integer of at least 2 on an authored take. Its duration remains the whole take length. Its tracks, deforms and camera keys use the exact duration divided by the count as their period. Repeated camera keys are expanded in report /2, with coverage on the full take clock and per-frame figure measurements. See [Physics clips and scene repeats](AUTHORING.md#physics-clips-and-scene-repeats-issue-1615) |
1256
1289
  | `idle.png`, `idle-indexed.png`, `idle.gif` | `loop`, `build --loop` | APNG and GIF encodings of the rendered idle |
1257
- | `run.json` | `rig`, `assemble` | spec `rig-run/1` (issue #1165, additive): `spec`, `package` (`name`, `version`), `command` (`"rig"` or `"assemble"`), `started_at` and `finished_at` (UTC ISO-8601 millisecond timestamps ending in `Z`, read in the CLI layer), `config` (`path` relative to `--out`, `sha256` of the config file on disk), `parts_input` on standalone `rig` (`path`, `sha256`, issue #1636), `inputs` on `assemble` (issues #1316, #1554, additive: one `{role, path, sha256}` entry for each of `--source`, `--full` and `--head` that was given, in that order, with `path` relative to `--out` by the per-platform link rule — naming `<dir>/layers.json` when given a directory — and `sha256` of the file `path` names), and `outputs` (`path` relative to `--out`, `sha256` of each written output file on disk, sorted by `path` in code-unit order and excluding `run.json` itself); written only after the command's gate is green |
1290
+ | `run.json` | `rig`, `assemble` | spec `rig-run/1` (issue #1165, additive): `spec`, `package` (`name`, `version`), `command` (`"rig"` or `"assemble"`), `started_at` and `finished_at` (UTC ISO-8601 millisecond timestamps ending in `Z`, read in the CLI layer), `config` (`path` relative to `--out`, `sha256` of the config file on disk), `parts_input` on standalone `rig` (`path`, `sha256`, issue #1636), `inputs` on `assemble` (issues #1316, #1554), `wrapper_pngs` on standalone `assemble` with a wrapper (issue #1645), and `outputs` (`path` relative to `--out`, `sha256` of each written output file on disk, sorted by `path` in code-unit order and excluding `run.json` itself). See the [run stamp contract](#run-stamp-runjson-spec-rig-run1) for the input bindings. The stamp is written only after the command's gate is green. |
1258
1291
  | `check-run.json` | `check` | spec `rig-run/2`. Fixed keys in order are `spec`, `package`, `command`, `started_at`, `finished_at`, optional `parts_input` (`path`, `sha256`, issue #1636), `outputs` and `argv`. See the [run record contract](#run-record-check-runjson-and-build-runjson-spec-rig-run2). |
1259
1292
  | the difference inventory (`--out`) | `diff-components` | spec `rig-parts-diff-components/1` by default (issue #1005: `stack`, `painting`, `definition`, `error_px`, `uncovered_error_px`, `components` — each `id`, `px`, `box`, `coverage`, `uncovered_px`, `borders` — and `below_floor`, byte-identical to 2.38.1), and spec `rig-parts-diff-components/2` under `--owners` (issue #1291: adds `owners` — each `{part, px}`, the topmost `parts.json` part above `COVERED_ALPHA` per covered pixel, back to front — before `borders` on every component); `--verify` verifies both `/1` and `/2` reports (with `--owners`, `/2` is required), while a `/1`-only reader (`readDiffComponents(text, input, [DIFF_COMPONENTS_SPEC])`) refuses `/2` by name |
1260
1293
  | the draft comparison (`--out`) | `diff-drafts` | spec `rig-parts-draft-diff/1` (issue #1369), a stable contract as of 2.45.0: fixed keys in order `spec`, `left` and `right` (each `parts_sha256`, `part_count`, `composite_sha256`), `canvas` (`width`, `height`), `order` (`"same"` or `"changed"`), `parts` (one entry per part name in the union of both sides, sorted by `name` in code-unit order: `name`, `status`, then `left` and `right` on the sides that hold the part, each `sha256`, `box`, `index`, then `pixels_equal` and `pixels` on `changed` only), `composite` and `summary`; no clock and no file paths. The command records no threshold and judges nothing; it exits 0 whenever the report is written. [Draft-to-draft assemble comparison](AUTHORING.md#draft-to-draft-assemble-comparison-issue-1369) defines each field. |
@@ -1610,14 +1643,15 @@ additive): one `{ "role", "path", "sha256" }` entry (keys in that order) for eac
1610
1643
  `--source`, `--full` and `--head` that was given, in the fixed order `source`, `full`,
1611
1644
  `head` (an input not given is absent from the list, never `null` or guessed), with
1612
1645
  `/`-separated `path` relative to `--out` by the `rig-run/2` link rule (naming
1613
- `<dir>/layers.json` when the input is a directory, issue #1554) and `sha256` of the file
1614
- `path` names on disk; `rig` writes no `inputs` key. Standalone `rig` writes
1646
+ `<dir>/layers.json` when the input is a directory, issue #1554). For wrapper `full`
1647
+ and `head` entries, `sha256` hashes the exact manifest bytes consumed by assemble.
1648
+ The existing paths and PSD file bindings are preserved. Standalone `rig` writes
1615
1649
  `parts_input` immediately after `config` (issue #1636), with `path` and `sha256`
1616
1650
  in that order. The directory named by `--parts` is rebased relative to `--out`
1617
1651
  by the same realpath rule as `config.path`. A directory that coincides with
1618
1652
  `--out` is recorded as `.`. The digest follows the [parts input snapshot](#parts-input-snapshot)
1619
- contract. The config, assemble input and output hashes use the file bytes on disk
1620
- after writing. A refused run writes no `run.json`. By default, `started_at` and
1653
+ contract. The config, source, PSD input and output hashes use the file bytes on
1654
+ disk after writing. A refused run writes no `run.json`. By default, `started_at` and
1621
1655
  `finished_at` record wall-clock
1622
1656
  time read in `cli.ts` (`src/` remains pure). With that default, `run.json` is outside
1623
1657
  the byte-for-byte
@@ -1625,6 +1659,25 @@ determinism comparisons (`RG03`, `RG19`, `AS07`); for the same input at the same
1625
1659
  receipt-relative input layout, two `run.json` files differ only in `started_at` and
1626
1660
  `finished_at`.
1627
1661
 
1662
+ Standalone `assemble` adds the optional top-level `wrapper_pngs` after `inputs`
1663
+ and before `outputs` whenever it uses a wrapper (issue #1645). Each row is
1664
+ `{ "role", "path", "sha256" }`, in that key order. The role is `full` or `head`
1665
+ and identifies the corresponding wrapper manifest. `path` is the canonical,
1666
+ slash-separated path relative to that manifest's directory. It names the PNG
1667
+ selected for decoding, including a fallback when used. `sha256` is the lowercase
1668
+ hex SHA-256 digest of the exact PNG file bytes passed to the decoder. An edit to a PNG
1669
+ at the same path mid-run leaves the recorded digest bound to the bytes consumed.
1670
+
1671
+ Rows cover decoded drawn and hidden layer PNGs and decoded `depth_filename`
1672
+ PNGs when depth is active. Omitting `--head` yields only `full` rows when the
1673
+ full input is a wrapper. Rows sort `full` before `head`, then by `path` in
1674
+ UTF-16 code-unit order within each role. Repeated reads with the same role, path,
1675
+ and digest collapse to one row. Distinct digests for the same role and path
1676
+ refuse the run as `ASSEMBLE_WRAPPER_PNG_CONFLICT`. A selected path that cannot be
1677
+ represented in the required form refuses the run as `ASSEMBLE_WRAPPER_PNG_PATH`.
1678
+ An older wrapper stamp without `wrapper_pngs` leaves its PNGs unbound. An
1679
+ all-PSD run omits `wrapper_pngs`.
1680
+
1628
1681
  Set `SOURCE_DATE_EPOCH` to opt into a fixed clock: both timestamps equal that
1629
1682
  instant in UTC ISO format, without adding a stamp field. The value must match
1630
1683
  `^(0|[1-9][0-9]*)$` and be at most 253402300799 seconds
@@ -1644,8 +1697,8 @@ neither hashed nor listed. Before the stage starts, the command removes an earli
1644
1697
  `package.json` without a non-empty `name` and `version` refuses `RUN_STAMP_PACKAGE`
1645
1698
  and writes no stamp. `build` and the in-process stages write no `run.json`.
1646
1699
 
1647
- `rig-run/1` preserves the order and meaning of existing keys. The optional
1648
- `parts_input` is additive and older stamps may omit it.
1700
+ The optional `parts_input` and `wrapper_pngs` are additive to `rig-run/1`.
1701
+ Older stamps may omit them.
1649
1702
 
1650
1703
  ### Run record (`check-run.json` and `build-run.json`, spec `rig-run/2`)
1651
1704
 
@@ -2521,6 +2574,11 @@ groups against the same manifest and records it in the report's `selection`
2521
2574
  field (`groups`, `leftOut`), written after `cleared` and before `parts`; the
2522
2575
  field is absent without the flag, so those reports keep their bytes, and
2523
2576
  `recipeSha256` and `manifestSha256` are unchanged by a selection. A new depth stage never replaces Core's rig gate.
2577
+ `depth-apply --source-sha256` publishes an atomic bundle with the verified
2578
+ parts set in `--out/set/` and the generated `config.json` and
2579
+ `depth-report.json` beside `set/`. The set holds a depth-only
2580
+ [replacement record](#parts-replacement-record). Omit the flag to use the
2581
+ original flat output layout with the same bytes.
2524
2582
  `relief` is an explicit rig-pixel value, not an implicit width multiplier.
2525
2583
  Part-width and head-referenced calibrations are authored recipe choices;
2526
2584
  changing a calibration requires preparing its recipe again. Compare the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rig-parts",
3
- "version": "2.69.0",
3
+ "version": "2.71.0",
4
4
  "description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
5
5
  "type": "module",
6
6
  "exports": {