spine-parts 2.16.1 → 2.18.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/docs/AUTHORING.md CHANGED
@@ -5592,7 +5592,7 @@ documents do not ship). Each is an input this package built; none is an author's
5592
5592
  | <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 |
5593
5593
  | <a id="CHECK_SETUP_PAINTING_MEASURED"></a>`CHECK_SETUP_PAINTING_MEASURED` | missing native setup/ownership or unsupported clipping | supply observable textured setup geometry; an unavailable instrument never passes |
5594
5594
  | <a id="CHECK_BOUNDARY_COLOUR_STEP"></a>`CHECK_BOUNDARY_COLOUR_STEP` | the requirements file declares `boundary_colour.max_step_excess` and a part boundary's colour step in the rig's render exceeds the same boundary's step in the rig's own pieces by more than it; the part pair, the frame (`setup` or `idle frame <n> (t <s> s)`), the stage pixel, the excess, the declared allowance and both steps are quoted. Unlike [`CHECK_SETUP_MATCHES_PAINTING`](#CHECK_SETUP_MATCHES_PAINTING), which compares the painting per declared region at the setup pose, this compares against the rig's own flat pieces (`parts.json` placement at setup, each piece's rest colour through its art UVs on every idle frame), so a part drawn over its neighbour's line art is not a failure | the pair's rig image or mesh: `rig/images/<part>.png` (a texture stretched into its padded UVs, or a notch cut out of it), or that part's mesh in `config.json` `meshes` when the mesh cuts a corner off the art; see [Boundary colour step](#boundary-colour-step-issue-942) |
5595
- | <a id="CHECK_BOUNDARY_COLOUR_UNMEASURED"></a>`CHECK_BOUNDARY_COLOUR_UNMEASURED` | `boundary_colour` is declared and the step cannot be taken: no `parts.json` or no `idle` (refused before anything is built), or a drawn slot has no `parts.json` piece, is clipped, or its rig image is not its parts PNG with one even pad on every side (the slot and frame are named). Never a pass | make every drawn slot a `parts.json` piece, or drop `boundary_colour` from the requirements file (the bar then reports SKIP) |
5595
+ | <a id="CHECK_BOUNDARY_COLOUR_UNMEASURED"></a>`CHECK_BOUNDARY_COLOUR_UNMEASURED` | `boundary_colour` is declared and the step cannot be taken: no `parts.json`, no `idle`, or a default-skin region or mesh image without a sequence, with a parts record, whose rig image is not its parts PNG with one even pad on every side (refused before anything is built); otherwise a drawn slot has no `parts.json` piece, is clipped, or its rig image is not its parts PNG with one even pad on every side (the slot and frame are named). Never a pass | make every drawn slot a `parts.json` piece, or drop `boundary_colour` from the requirements file (the bar then reports SKIP) |
5596
5596
  | <a id="SETUP_PAINTING_REQUIRED_LIMIT"></a>`SETUP_PAINTING_REQUIRED_LIMIT` | `setup_painting.required` is `true` and a limit the check needs is absent: `rgb_tolerance`, `regions`, or a region's `max_pixels` (the object names the region). Refused when the requirements file is read, before anything is built (issue #943) | author the named limit; none is derived from the art. Without `required` the same region reports SKIP |
5597
5597
  | <a id="CHECK_SOURCE_GRID"></a>`CHECK_SOURCE_GRID` | the setup-pose still and its black-tinted twin (the coverage `SETUP_POSE_VS_SOURCE` reads) did not come back on one grid over one opaque background | a rigc problem; report it |
5598
5598
  | <a id="CHECK_RIGC_VERSION"></a>`CHECK_RIGC_VERSION` | `rigc --version` is below 1.4.0, or prints no version: its `render` has no `--geometry`, which `TEXTURE_STRETCH` reads. Refused before anything is built | `bun install` (this package depends on rig-c ^2.20.4), or put a newer `rigc` first on `PATH` |
@@ -7965,3 +7965,97 @@ It does not authenticate a caller's chosen threshold or floor: consumers must
7965
7965
  compare those to their own policy. The report does not choose which components
7966
7966
  a consumer accepts. The named refusals are `DIFF_COMPONENTS_INPUT`,
7967
7967
  `DIFF_COMPONENTS_BINDING` and `DIFF_COMPONENTS_REPORT` in the rule table.
7968
+
7969
+
7970
+ ### Consumer check rows (issue #1089)
7971
+
7972
+ Every object in a row-bearing array in `check.json`, including nested observation
7973
+ arrays and alternate-set seam arrays, carries `row_scope` (`part`, `pair`, `rig`),
7974
+ `row_kind` (`finding`, `evidence`) and `row_subjects` (the named parts, in producer
7975
+ order; empty for rig scope). A pair is not a per-part flag. A bone, chain or
7976
+ authored observation region has rig scope: its name does not identify a part.
7977
+ The producer applies its existing bar or warning predicate; a block FAIL does
7978
+ not turn every row into a finding. Unavailable/unmeasured readings and raw
7979
+ reference readings are evidence. Most unavailable readings explain the gap in
7980
+ an existing reason, unread or unmeasured field, or an enclosing SKIP reason.
7981
+ The exception is `SEAM_OVER_MOTION.required.pairs`: unread or unbanded rows
7982
+ carry no row-level reason; their reason is reported in problems/stdout, with
7983
+ no new JSON key. A measured
7984
+ SKIP such as an art distance without a declared limit remains evidence.
7985
+ `WIND_BAND` pairs that do not hold throughout and steps that do not hold are
7986
+ findings past the declared gap/ghost bars; holding pairs and steps are evidence.
7987
+
7988
+ All six scope/kind combinations occur in the generated CLI fixture. Existing
7989
+ `scope` and `kind` fields keep their meanings and bytes. The document has no
7990
+ top-level spec/version tag to advance; these fields are additive under its
7991
+ existing contract. Removing only the three `row_` fields recovers legacy JSON.
7992
+
7993
+ The table is generated from the actual `checkRow` calls, including their finding
7994
+ predicates, by `bun tools/check_row_reference.ts --write`; the tree suite checks
7995
+ it against the producers and rejects a planted omission. Subjects are explicit
7996
+ in `row_subjects`; existing part/slot, front/back, a/b and parts fields remain
7997
+ unchanged. `seam_scope.whole_pairs` copies the `seam_pairs` producer rows without
7998
+ the picture, and `sets.*` reuses the same seam producers.
7999
+
8000
+ Scalar/string arrays (animations, frame indices, bones, constraint names and
8001
+ formatted chain/lag strings), numeric coordinate tuples, and aggregate blocks
8002
+ are not object rows and retain their shape. Singleton summaries (`worst`,
8003
+ `physics_on/off`, wind breaks, largest hole, viewport, unowned summary and
8004
+ no-reference-art totals) are fields of their parent reading, not independent
8005
+ row collections; they retain their existing shape. Arrays inside these records
8006
+ are still labelled (for example the level worst's `through` and posed joints).
8007
+ Changed drawing identities have rig scope because generated slots need not name a part.
8008
+ Internal `SeamSupport.drawings` never enters check JSON. Named requirement
8009
+ `lines` are the one dictionary of individual rows and are also labelled;
8010
+ `sets` is a dictionary of whole check blocks.
8011
+
8012
+ <!-- check-row-table:begin -->
8013
+ | Row family | row_scope | row_kind | row_subjects (producer expression) | Producer |
8014
+ | --- | --- | --- | --- | --- |
8015
+ | `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | 'part' | finding | [e.slot] | [check.ts:3516](../src/check.ts#L3516) |
8016
+ | `ANIMATIONS_DO_NOT_FOLD.folding` | 'part' | finding when entry === undefined; otherwise evidence | [slot] | [check.ts:3478](../src/check.ts#L3478) |
8017
+ | `ART_JOINT_DISTANCE.joints` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [artjoints.ts:86](../src/artjoints.ts#L86) |
8018
+ | `BOUNDARY_COLOUR_STEP.over` | 'pair' | finding | r.parts | [boundarycolour.ts:220](../src/boundarycolour.ts#L220) |
8019
+ | `BOUNDARY_COLOUR_STEP.unmeasured` | 'part' | evidence | [r.slot] | [boundarycolour.ts:221](../src/boundarycolour.ts#L221) |
8020
+ | `CLOTH_SETTLES.rows` | 'rig' | finding when speeds.length > 0 && s < speeds.length; otherwise evidence | [] | [check.ts:5801](../src/check.ts#L5801) |
8021
+ | `CUT_JOINT_MATERIAL.rows` | 'part' | finding when r.status === 'FAIL'; otherwise evidence | [r.part] | [cutmaterial.ts:280](../src/cutmaterial.ts#L280) |
8022
+ | `FEET_STAY_LEVEL.feet` | 'part' | finding when row.status === 'FAIL'; otherwise evidence | [row.part] | [check.ts:3717](../src/check.ts#L3717) |
8023
+ | `FEET_STAY_LEVEL.feet[].worst.through` | 'rig' | evidence | [] | [check.ts:3692](../src/check.ts#L3692) |
8024
+ | `LIMB_ONE_BONE.parts` | 'part' | finding when fail; otherwise evidence | [p.name] | [check.ts:4009](../src/check.ts#L4009) |
8025
+ | `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) |
8026
+ | `PART_SUPPORT_REPORT.raw_pairs` | 'pair' | evidence | [F.name, B.name] | [coincide.ts:110](../src/coincide.ts#L110) |
8027
+ | `PART_SUPPORT_REPORT.unowned.regions` | 'rig' | finding | [] | [coincide.ts:145](../src/coincide.ts#L145) |
8028
+ | `SEAM_OVER_MOTION.pairs` | 'pair' | evidence | [p.a, p.b] | [check.ts:5202](../src/check.ts#L5202) |
8029
+ | `SEAM_OVER_MOTION.required.pairs` | 'pair' | finding when open > 0; otherwise evidence | [p.a, p.b] | [check.ts:4610](../src/check.ts#L4610) |
8030
+ | `SEAM_OVER_MOTION.roots.unmeasured` | 'part' | evidence | [root.part] | [check.ts:5179](../src/check.ts#L5179) |
8031
+ | `SEAM_OVER_MOTION.rows` | 'pair' | finding when p.status === 'read' && opens.length > 0; otherwise evidence; finding when r.status === 'read' && r.opens.length > 0; otherwise evidence | [want.a, want.b]; pairs.filter(p => p.pair === r.pair).flatMap(p => [p.a, p.b]) | [check.ts:5141](../src/check.ts#L5141), [check.ts:5205](../src/check.ts#L5205) |
8032
+ | `SEAM_OVER_MOTION.rows[].cells` | 'pair' | evidence | [want.a, want.b] | [check.ts:5154](../src/check.ts#L5154) |
8033
+ | `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | 'pair' | evidence | [want.a, want.b] | [check.ts:5144](../src/check.ts#L5144) |
8034
+ | `SEAM_OVER_MOTION.rows[].pose_at_worst.joints` | 'rig' | evidence | [] | [motionseampose.ts:53](../src/motionseampose.ts#L53) |
8035
+ | `SEAM_OVER_MOTION.worlds.*.rows` | 'pair' | evidence | [want.a, want.b] | [check.ts:5138](../src/check.ts#L5138) |
8036
+ | `SEAM_OVER_RANGE.joints` | 'part' | evidence; finding when poses.some(p => p.status === 'FAIL'); otherwise evidence | [j.part] | [check.ts:4333](../src/check.ts#L4333), [check.ts:4379](../src/check.ts#L4379) |
8037
+ | `SEAM_OVER_RANGE.joints[].poses` | 'part' | finding when fail; otherwise evidence | [j.part] | [check.ts:4377](../src/check.ts#L4377) |
8038
+ | `SETUP_MATCHES_PAINTING.regions` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [setuppainting.ts:174](../src/setuppainting.ts#L174) |
8039
+ | `SETUP_MATCHES_PAINTING.regions[].slots` | slot === '(uncovered)' ? 'rig' : 'part' | evidence | slot === '(uncovered)' ? [] : [slot] | [setuppainting.ts:175](../src/setuppainting.ts#L175) |
8040
+ | `STILL_REGIONS_DARK.*.crossing` | 'part' | finding | [sl.name] | [check.ts:8744](../src/check.ts#L8744) |
8041
+ | `STILL_REGIONS_DARK.*.still_slots` | 'part' | evidence; finding when r.max > tolerance; otherwise evidence | [slot] | [check.ts:8730](../src/check.ts#L8730), [check.ts:8735](../src/check.ts#L8735) |
8042
+ | `STRESS_OFF_CHAIN.not_read` | 'part' | evidence | [r.part] | [check.ts:3937](../src/check.ts#L3937) |
8043
+ | `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:3925](../src/check.ts#L3925) |
8044
+ | `STRESS_OFF_CHAIN.per_part[].off_chain` | 'part' | evidence | [r.part] | [check.ts:3925](../src/check.ts#L3925) |
8045
+ | `STRESS_OFF_CHAIN.per_part[].poses` | 'part' | evidence; finding when shown > STRESS_RIGID; otherwise evidence | [r.part] | [check.ts:3893](../src/check.ts#L3893), [check.ts:3911](../src/check.ts#L3911) |
8046
+ | `TEXTURE_STRETCH.per_mesh` | 'part' | evidence; finding when severity > TEXTURE_STRETCH_CEILING; otherwise evidence | [m.slot] | [check.ts:9378](../src/check.ts#L9378), [check.ts:9388](../src/check.ts#L9388) |
8047
+ | `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:8160](../src/check.ts#L8160), [check.ts:8165](../src/check.ts#L8165), [check.ts:8186](../src/check.ts#L8186), [check.ts:8197](../src/check.ts#L8197) |
8048
+ | `WIND_BAND.pairs` | 'pair' | finding when !holdsAll; otherwise evidence | [p.a, p.b] | [check.ts:6305](../src/check.ts#L6305) |
8049
+ | `WIND_BAND.pairs[].steps` | 'pair' | finding when !s.holds; otherwise evidence | [p.a, p.b] | [check.ts:6316](../src/check.ts#L6316) |
8050
+ | `figure_openings.openings` | 'pair' | finding | [ps.under, ps.above] | [check.ts:5622](../src/check.ts#L5622) |
8051
+ | `loop_physics` | 'rig' | evidence | [] | [check.ts:7283](../src/check.ts#L7283) |
8052
+ | `requirements.lines.* (bone)` | 'rig' | finding when line.status === 'FAIL'; otherwise evidence | [] | [check.ts:7579](../src/check.ts#L7579) |
8053
+ | `requirements.lines.* (seam)` | 'pair' | finding when line.status === 'FAIL'; otherwise evidence | [r.part, r.neighbour] | [check.ts:7579](../src/check.ts#L7579) |
8054
+ | `requirements.lines.* (stretch)` | 'part' | finding when line.status === 'FAIL'; otherwise evidence | [r.slot] | [check.ts:7579](../src/check.ts#L7579) |
8055
+ | `seam_pairs` | pair[0] === SEAM_NO_ART ? 'rig' : pair[1] === SEAM_NO_ART ? 'part' : 'pair' | evidence | pair.filter(p => p !== SEAM_NO_ART) | [check.ts:2479](../src/check.ts#L2479) |
8056
+ | `seam_scope.changes` | 'rig' | evidence | [] | [check.ts:1958](../src/check.ts#L1958) |
8057
+ | `seam_scope.domain.states` | 'rig' | evidence | [] | [check.ts:2043](../src/check.ts#L2043) |
8058
+ | `seam_scope.pairs` | row.parts[0] === SEAM_NO_ART ? 'rig' : row.parts[1] === SEAM_NO_ART ? 'part' : 'pair' | evidence | row.parts.filter(p => p !== SEAM_NO_ART) | [check.ts:7193](../src/check.ts#L7193) |
8059
+ | `seam_scope.population.pairs` | 'pair' | evidence | row.parts | [check.ts:2414](../src/check.ts#L2414) |
8060
+ | `seam_scope.population.single_art` | 'part' | evidence | [row.part] | [check.ts:2415](../src/check.ts#L2415) |
8061
+ <!-- check-row-table:end -->
package/docs/STABILITY.md CHANGED
@@ -719,3 +719,11 @@ A see-through `--source` with an opaque explicit painting reference was accepted
719
719
  when donor geometry followed the reference and is now refused with
720
720
  `INPUTS_PAINTING_OPAQUE` before the donor is read. The reference remains a colour
721
721
  binding. The donor continues to be bound to the opaque PNG accepted by `inputs`.
722
+
723
+
724
+ The check document's row objects additionally carry `row_scope` (`part`,
725
+ `pair`, `rig`), `row_kind` (`finding`, `evidence`), and `row_subjects` (one part,
726
+ two parts, or an empty list respectively). These are additive; legacy `scope`,
727
+ `kind`, measurements, statuses and exit decisions are unchanged. There is no
728
+ top-level check spec/version tag to bump. See [Consumer check rows](AUTHORING.md#consumer-check-rows-issue-1089)
729
+ for the producer-derived family table and the boundary between rows and summaries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-parts",
3
- "version": "2.16.1",
3
+ "version": "2.18.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
  "bin": {
package/src/artjoints.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  /** Explicit art-joint measurements on a fixed skeleton (issue #880). */
2
3
  import { refuseIfAny, type Problem } from './errors.ts';
3
4
  import { cropToSpineY } from './coords.ts';
@@ -82,7 +83,7 @@ export function artJointLine(
82
83
  if (!Number.isFinite(distance)) refuseIfAny([{ code: 'CHECK_ART_JOINT_MEASURED', object: `joint "${j.name}" (bone "${j.bone}")`, detail: 'has no finite art-to-setup distance; finite stage-pixel coordinates are required' }]);
83
84
  const status = limit === undefined ? 'SKIP' : distance > limit ? 'FAIL' : 'PASS';
84
85
  if (status === 'FAIL') problems.push({ code: 'CHECK_ART_JOINT_DISTANCE', object: `joint "${j.name}" (bone "${j.bone}")`, detail: `art at [${j.at.join(', ')}] is ${distance} stage px from setup origin [${boneAt.join(', ')}]; distance <= declared fixed_skeleton.within_px ${limit} px is required — correct the art measurement/correspondence if wrong, or supply art aligned to the fixed skeleton; bones are not moved` });
85
- return { name: j.name, bone: j.bone, at: [...j.at] as [number, number], bone_at: boneAt, distance_px: distance, status };
86
+ return { ...checkRow('ART_JOINT_DISTANCE.joints', 'rig', status === 'FAIL', []), name: j.name, bone: j.bone, at: [...j.at] as [number, number], bone_at: boneAt, distance_px: distance, status };
86
87
  });
87
88
  return { status: limit === undefined ? 'SKIP' : joints.some(j => j.status === 'FAIL') ? 'FAIL' : 'PASS', instrument: 'rigc-geometry/1 setup.bones', source: fixed.source, within_px: limit ?? null, joints,
88
89
  ...(limit === undefined ? { reason: 'fixed_skeleton.within_px is absent; distances are measured, no limit is invented and no joint passes' } : {}) };
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  /**
2
3
  * Issue #942: the colour step across part boundaries, against the rig's own pieces.
3
4
  *
@@ -32,6 +33,7 @@ import { readPng } from './raster/png.ts';
32
33
  export const BOUNDARY_COLOUR_LINE = 'BOUNDARY_COLOUR_STEP';
33
34
  export const BOUNDARY_COLOUR_CODE = 'CHECK_BOUNDARY_COLOUR_STEP';
34
35
  export const BOUNDARY_COLOUR_UNMEASURED_CODE = 'CHECK_BOUNDARY_COLOUR_UNMEASURED';
36
+ export const BOUNDARY_COLOUR_UNMEASURED_SUFFIX = "; the step against the rig's own pieces cannot be taken, and an untaken reading is never a pass — make the slot draw a parts.json piece, or drop boundary_colour from the requirements file and the bar reports SKIP";
35
37
  export const UNDECLARED_BOUNDARY_COLOUR_REASON = 'not measured, not a pass: no requirements file declares boundary_colour; declare {"boundary_colour": {"max_step_excess": <0-255>}} in the --requirements file (config.requirements under build) to hold every part boundary of the setup and every idle frame to the rig\'s own pieces';
36
38
 
37
39
  /** The one declaration: the largest step excess (0-255) the rig allows over its own pieces. No default exists. */
@@ -205,7 +207,7 @@ export function measureBoundaryColour(api: Api, input: BoundaryColourInput, decl
205
207
  readFrame(setup, 'setup', true);
206
208
  for (const frame of idle) readFrame(frame, `idle frame ${frame.index} (t ${+frame.time.toFixed(4)} s)`, false);
207
209
  const over = [...pairsWorst.entries()].sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0)).map(([, v]) => v).filter((v) => v.excess > declared.max_step_excess);
208
- for (const u of unmeasured) problems.push({ code: BOUNDARY_COLOUR_UNMEASURED_CODE, object: `slot "${u.slot}" (${u.frame})`, detail: `${u.reason}; the step against the rig's own pieces cannot be taken, and an untaken reading is never a pass — make the slot draw a parts.json piece, or drop boundary_colour from the requirements file and the bar reports SKIP` });
210
+ for (const u of unmeasured) problems.push({ code: BOUNDARY_COLOUR_UNMEASURED_CODE, object: `slot "${u.slot}" (${u.frame})`, detail: `${u.reason}${BOUNDARY_COLOUR_UNMEASURED_SUFFIX}` });
209
211
  for (const o of over) problems.push({ code: BOUNDARY_COLOUR_CODE, object: `part pair "${o.parts[0]}|${o.parts[1]}"`, detail: `${o.frame}, stage pixel (${o.at[0]}, ${o.at[1]}): step excess ${o.excess} > declared max_step_excess ${declared.max_step_excess} (rendered step ${o.rendered_step}, the rig's own pieces ${o.reference_step}); a texture stretched into its padded UVs or a notch cut out of a piece shows here — fix the rig image or mesh of that pair (AUTHORING, failure map)` });
210
212
  return {
211
213
  status: over.length === 0 && unmeasured.length === 0 ? 'PASS' : 'FAIL',
@@ -215,8 +217,8 @@ export function measureBoundaryColour(api: Api, input: BoundaryColourInput, decl
215
217
  frames: 1 + idle.length,
216
218
  boundary_pairs: boundaryPairs,
217
219
  worst,
218
- over,
219
- unmeasured,
220
+ over: over.map(r => ({ ...r, ...checkRow('BOUNDARY_COLOUR_STEP.over', 'pair', true, r.parts) })),
221
+ unmeasured: unmeasured.map(r => ({ ...r, ...checkRow('BOUNDARY_COLOUR_STEP.unmeasured', 'part', false, [r.slot]) })),
220
222
  alternates: 'not measured',
221
223
  };
222
224
  }
package/src/build.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { withoutCheckRows } from './checkrow.ts';
1
2
  import { readSetupFigureMask } from './setupfiguremask.ts';
2
3
  import { EDGE_RESIDUAL_FILE, edgeResidualLines } from './edgeresidual.ts';
3
4
  import { SUPPORT_DOMAINS_FILE, writeSupportDomains } from './supportdomains.ts';
@@ -1756,7 +1757,7 @@ export function packLines(r: CheckReport): string[] {
1756
1757
 
1757
1758
  function showFigure(v: unknown): string {
1758
1759
  if (Array.isArray(v)) return v.length === 0 ? 'none' : v.map(showFigure).join(' | ');
1759
- if (typeof v === 'object' && v !== null) return Object.entries(v).map(([k, x]) => `${k} ${showFigure(x)}`).join(', ');
1760
+ if (typeof v === 'object' && v !== null) return Object.entries(v).filter(([key]) => !['row_scope', 'row_kind', 'row_subjects'].includes(key)).map(([k, x]) => `${k} ${showFigure(x)}`).join(', ');
1760
1761
  return String(v);
1761
1762
  }
1762
1763
 
@@ -1950,7 +1951,7 @@ export function clothLines(line: ClothLine, plant: { silent?: boolean } = {}): s
1950
1951
 
1951
1952
  /** A requirement's line as the console prints it: its name and status, the reason first when NOT MEASURABLE, then its figures as check.json holds them. */
1952
1953
  export function requirementText(name: string, line: RequirementLine): string {
1953
- const rest = Object.entries(line).filter(([k]) => k !== 'status' && k !== 'reason');
1954
+ const rest = Object.entries(withoutCheckRows(line) as Record<string, unknown>).filter(([k]) => k !== 'status' && k !== 'reason');
1954
1955
  return `${name}: ${line.status} — ${[...(line.status === 'NOT MEASURABLE' ? [String(line.reason)] : []), ...rest.map(([k, v]) => `${k} ${showFigure(v)}`)].join('; ')}`;
1955
1956
  }
1956
1957
 
@@ -1995,7 +1996,7 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
1995
1996
  );
1996
1997
  if (setFig.seam_scope !== undefined) {
1997
1998
  const scope = setFig.seam_scope;
1998
- log(` seam scope (${setName}): ${scope.mode}, denominator ${scope.denominator_px} base source cells; union ${scope.domain?.viewport.pixelWidth}x${scope.domain?.viewport.pixelHeight}, numerator ${scope.domain?.numerator}; whole canonical ${scope.whole.px_over_40} px over ${SEAM_PX_LEVEL}, mean ${scope.whole.mean}; auto-frame raw ${scope.auto_frame_raw.px_over_40} at scale ${scope.auto_frame_raw.frame_scale} (diagnostic only); effects ${JSON.stringify(scope.effects)}, changes ${JSON.stringify(scope.changes)}${scope.unavailable === undefined ? '' : `; ${JSON.stringify(scope.unavailable)}`}`);
1999
+ log(` seam scope (${setName}): ${scope.mode}, denominator ${scope.denominator_px} base source cells; union ${scope.domain?.viewport.pixelWidth}x${scope.domain?.viewport.pixelHeight}, numerator ${scope.domain?.numerator}; whole canonical ${scope.whole.px_over_40} px over ${SEAM_PX_LEVEL}, mean ${scope.whole.mean}; auto-frame raw ${scope.auto_frame_raw.px_over_40} at scale ${scope.auto_frame_raw.frame_scale} (diagnostic only); effects ${JSON.stringify(scope.effects)}, changes ${JSON.stringify(withoutCheckRows(scope.changes))}${scope.unavailable === undefined ? '' : `; ${JSON.stringify(scope.unavailable)}`}`);
1999
2000
  for (const pair of scope.pairs ?? []) log(` seam inheritance (${setName}): ${JSON.stringify(pair.parts)}, whole ${pair.whole_px_over_40}, affected ${pair.affected_px_over_40}, inherited from base ${pair.inherited_px_over_40} px over ${SEAM_PX_LEVEL}`);
2000
2001
  }
2001
2002
  const setPairs = setFig.seam_pairs ?? [];
package/src/check.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  import { readSetupFigureMask } from './setupfiguremask.ts';
2
3
  import { readSetupBackdrop } from './setupbackdrop.ts';
3
4
  import { COINCIDE_LINE, type SupportReport } from './coincide.ts';
@@ -6,7 +7,7 @@ import { SETUP_PAINTING_LINE, UNDECLARED_SETUP_PAINTING_REASON, setupPaintingBou
6
7
  import { readMaterialSources } from './cutmaterialio.ts';
7
8
  import { CUT_MATERIAL_LINE, checkJointMaterial, type MaterialLine } from './cutmaterial.ts';
8
9
  import { ART_JOINT_LINE, artJointLine, type ArtJointLine } from './artjoints.ts';
9
- import { BOUNDARY_COLOUR_LINE, BOUNDARY_COLOUR_UNMEASURED_CODE, measureBoundaryColour, type BoundaryColourMeasured } from './boundarycolour.ts';
10
+ import { BOUNDARY_COLOUR_LINE, BOUNDARY_COLOUR_UNMEASURED_CODE, BOUNDARY_COLOUR_UNMEASURED_SUFFIX, measureBoundaryColour, type BoundaryColourMeasured } from './boundarycolour.ts';
10
11
  import { baseAnchorMoves, type AnchorRegion } from './baseanchor.ts';
11
12
  /**
12
13
  * The check stage: build a rig through rig-c, gate it under both
@@ -1857,6 +1858,43 @@ export function seamDrawingSignature(input: {
1857
1858
  return JSON.stringify(seamSourceValue({ slot: input.slot, attachment: input.attachment, source, image: input.image, vertices: input.vertices, color: input.color }));
1858
1859
  }
1859
1860
 
1861
+ /** File-only rig-image padding checks after the parts loader has validated each PNG against its record. */
1862
+ export function boundaryColourSizeProblems(inp: CheckInputs): Problem[] {
1863
+ if (inp.parts === null) return [];
1864
+ const records = new Set(inp.parts.parts.map(p => p.name));
1865
+ const imagesDir = typeof inp.rig.images === 'string' ? resolve(inp.rigDir, inp.rig.images) : join(inp.rigDir, 'images');
1866
+ const problems: Problem[] = [];
1867
+ const seen = new Set<string>();
1868
+ const skins = isRecord(inp.rig.skins) ? inp.rig.skins : null;
1869
+ const skin = skins !== null && isRecord(skins.default) ? skins.default : null;
1870
+ if (skin === null) return problems;
1871
+ for (const [slot, drawings] of Object.entries(skin)) {
1872
+ if (!isRecord(drawings)) continue;
1873
+ for (const source of Object.values(drawings)) {
1874
+ if (!seamImageSource(source) || seen.has(source.image)) continue;
1875
+ const image = source.image;
1876
+ seen.add(image);
1877
+ const name = image.replace(/\.png$/, '');
1878
+ const partPng = join(inp.partsDir, `${name}.png`), rigPng = join(imagesDir, image);
1879
+ if (!records.has(name) || !existsSync(partPng) || !existsSync(rigPng)) continue;
1880
+ let src: Raster, rigImg: Raster;
1881
+ try { src = readPng(partPng); rigImg = readPng(rigPng); }
1882
+ catch { continue; }
1883
+ const dx = rigImg.width - src.width, dy = rigImg.height - src.height;
1884
+ const reason = dx !== dy || dx < 0 || dx % 2 !== 0
1885
+ ? `the rig image "${image}" is ${rigImg.width}x${rigImg.height}, not parts/${name}.png's ${src.width}x${src.height} with one even pad on every side`
1886
+ : null;
1887
+ if (reason !== null) problems.push({ code: BOUNDARY_COLOUR_UNMEASURED_CODE, object: `slot "${slot}" (image "${image}")`, detail: `${reason}${BOUNDARY_COLOUR_UNMEASURED_SUFFIX}` });
1888
+ }
1889
+ }
1890
+ return problems;
1891
+ }
1892
+
1893
+ /** The image mapping supported by seam and boundary-colour source readers. */
1894
+ function seamImageSource(source: unknown): source is Record<string, unknown> & { image: string } {
1895
+ return isRecord(source) && ['region', 'mesh'].includes(typeof source.type === 'string' ? source.type : 'region') && typeof source.image === 'string' && source.image.length > 0 && source.sequence === undefined;
1896
+ }
1897
+
1860
1898
  /** Resolve only the actually selected default-skin identity, not a filename suffix. */
1861
1899
  export function seamSourceAttachment(rig: Record<string, unknown>, slot: string, attachment: string): Record<string, unknown> {
1862
1900
  const skins = isRecord(rig.skins) ? rig.skins : null;
@@ -1866,7 +1904,7 @@ export function seamSourceAttachment(rig: Record<string, unknown>, slot: string,
1866
1904
  const matches = Object.entries(drawings).filter(([key, value]) => isRecord(value) && (typeof value.name === 'string' ? value.name : key) === attachment);
1867
1905
  if (matches.length !== 1) throw new SeamSupportError({ code: matches.length === 0 ? 'SOURCE_ATTACHMENT_MISSING' : 'SOURCE_ATTACHMENT_AMBIGUOUS', slot, attachment });
1868
1906
  const source = matches[0][1];
1869
- if (!isRecord(source) || !['region', 'mesh'].includes(typeof source.type === 'string' ? source.type : 'region') || typeof source.image !== 'string' || source.image.length === 0 || source.sequence !== undefined) {
1907
+ if (!seamImageSource(source)) {
1870
1908
  throw new SeamSupportError({ code: 'SOURCE_MAPPING_UNSUPPORTED', slot, attachment, feature: 'sequence-or-non-image-attachment' });
1871
1909
  }
1872
1910
  return source;
@@ -1917,7 +1955,7 @@ export function seamEffectSelection(base: SeamSupport, selected: SeamSupport): S
1917
1955
  const b = before.find(d => d.scope === scope && d.name === name), a = after.find(d => d.scope === scope && d.name === name);
1918
1956
  const fields = b === undefined ? ['added'] : a === undefined ? ['hidden/removed'] :
1919
1957
  (['identity', 'order', 'geometry', 'art'] as const).filter(k => b[k] !== a[k]);
1920
- if (fields.length > 0) changes.push({ scope, drawing: name, reasons: fields });
1958
+ if (fields.length > 0) changes.push({ ...checkRow('seam_scope.changes', 'rig', false, []), scope, drawing: name, reasons: fields });
1921
1959
  }
1922
1960
  }
1923
1961
  return { mask, cellReasons, reasons, changes };
@@ -2002,7 +2040,7 @@ export function seamStateBounds(build: string, state: string): SeamStateBounds {
2002
2040
  }
2003
2041
  }
2004
2042
  }
2005
- return { state, frames: frames.length, pieces, bounds,
2043
+ return { ...checkRow('seam_scope.domain.states', 'rig', false, []), state, frames: frames.length, pieces, bounds,
2006
2044
  pose_sha256: digest.digest('hex') };
2007
2045
  } catch {
2008
2046
  refuseIfAny([{ code: 'CHECK_SEAM_DOMAIN', object: 'setup seam union state ' + JSON.stringify(state), detail: 'official selected candidate/still drawn-piece bounds are unavailable; no guessed or empty bounds are substituted' }]);
@@ -2373,8 +2411,8 @@ export function createSeamPopulation(parts: readonly PlacedAlpha[], rigSize: rea
2373
2411
  const rows = [...pairs.entries()].sort(([a], [b]) => a - b)
2374
2412
  .flatMap(([, lower]) => [...lower.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row })));
2375
2413
  return { basis: 'reference-alpha/top-two-of-2x2', measured_sample_px: measured,
2376
- pair_count: rows.length, pairs: rows,
2377
- single_art: [...singles.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row })),
2414
+ pair_count: rows.length, pairs: rows.map(row => ({ ...row, ...checkRow('seam_scope.population.pairs', 'pair', false, row.parts) })),
2415
+ single_art: [...singles.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row, ...checkRow('seam_scope.population.single_art', 'part', false, [row.part]) })),
2378
2416
  no_reference_art: { ...noArt } };
2379
2417
  },
2380
2418
  rows: (seam: SeamFigures) => seamPairRowsFrom(seam, parts, rigSize, vp, at),
@@ -2438,7 +2476,7 @@ function seamPairRowsFrom(seam: SeamFigures, parts: readonly PlacedAlpha[], rigS
2438
2476
  const pair: [string, string] = acc.a < 0 ? [name(acc.b), SEAM_NO_ART] : [name(acc.a), name(acc.b)];
2439
2477
  const file = `${String(i + 1).padStart(Math.max(2, width), '0')}_${pair.map((n) => (n === SEAM_NO_ART ? 'no-art' : n)).join('_')}.png`;
2440
2478
  const cut = acc.a >= 0 && parts[acc.a].from === parts[acc.b].from ? { cut: { from: parts[acc.a].from, differing_copies_px: acc.differing } } : {};
2441
- return { row: { parts: pair, px_over_40: acc.over40,
2479
+ return { row: { ...checkRow('seam_pairs', pair[0] === SEAM_NO_ART ? 'rig' : pair[1] === SEAM_NO_ART ? 'part' : 'pair', false, pair.filter(p => p !== SEAM_NO_ART)), parts: pair, px_over_40: acc.over40,
2442
2480
  ...(acc.outside > 0 ? { outside_authored_px: acc.outside } : {}), px_over_80: acc.over80, frame_box: acc.f, rig_box: acc.r, ...cut, picture: `${SEAM_DIR}/${file}` }, pixels: acc.pixels };
2443
2481
  });
2444
2482
  }
@@ -3437,6 +3475,7 @@ export function foldsLine(
3437
3475
  const onlyPhysicsOn = on !== undefined && off === undefined;
3438
3476
  const constraints = onlyPhysicsOn ? meshPhysicsConstraints(rig, slot, attachment, physicsList) : [];
3439
3477
  const row: FoldRow = {
3478
+ ...checkRow('ANIMATIONS_DO_NOT_FOLD.folding', 'part', entry === undefined, [slot]),
3440
3479
  animation: name,
3441
3480
  slot,
3442
3481
  attachment,
@@ -3474,7 +3513,7 @@ export function foldsLine(
3474
3513
  detail: `rigc render --folds at ${fps} fps${physics}${sideClause}: ${r.line}; ${foldBonesText(rig, motion, r.slot, r.attachment, r.worst_frame, worstOf.get(r) ?? [], context)}; no triangle turned over against the setup pose is required — a fold the art means is declared in the --requirements file's may_fold, { "slot": "${r.slot}", "animation": "${r.animation}", "why": … }`,
3475
3514
  });
3476
3515
  }
3477
- const declaredNotFolding = mayFold.filter((e) => !folding.some((r) => r.slot === e.slot && r.animation === e.animation)).map((e) => ({ slot: e.slot, animation: e.animation }));
3516
+ const declaredNotFolding = mayFold.filter((e) => !folding.some((r) => r.slot === e.slot && r.animation === e.animation)).map((e) => ({ ...checkRow('ANIMATIONS_DO_NOT_FOLD.declared_not_folding', 'part', true, [e.slot]), slot: e.slot, animation: e.animation }));
3478
3517
  for (const e of declaredNotFolding) {
3479
3518
  problems.push({
3480
3519
  code: `CHECK_${FOLD_LINE}`,
@@ -3650,7 +3689,7 @@ export function levelLine(feet: readonly LevelFoot[], rig: Record<string, unknow
3650
3689
  if (row.worst !== null && Math.abs(degrees) <= Math.abs(row.worst.degrees)) return;
3651
3690
  const t = track(turned);
3652
3691
  const through: Array<{ bone: string; inherit: string }> = [];
3653
- for (let b: string | null = row.bone; b !== null && b !== turned; b = parentOf(b)) through.push({ bone: b, inherit: inheritOf(b) });
3692
+ for (let b: string | null = row.bone; b !== null && b !== turned; b = parentOf(b)) through.push({ ...checkRow('FEET_STAY_LEVEL.feet[].worst.through', 'rig', false, []), bone: b, inherit: inheritOf(b) });
3654
3693
  row.worst = { animation: r.animation, frame: r.set.frames[i].index, time: t.times[i], degrees, turned, turned_degrees: round6(boneTurn(t.setup, t.frames[i])), through };
3655
3694
  });
3656
3695
  }
@@ -3675,7 +3714,7 @@ export function levelLine(feet: readonly LevelFoot[], rig: Record<string, unknow
3675
3714
  }
3676
3715
  const status: LevelLine['status'] = rows.some((r) => r.status === 'FAIL') ? 'FAIL' : rows.some((r) => r.status === 'PASS') ? 'PASS' : 'SKIP';
3677
3716
  const names = readings.map((r) => r.animation);
3678
- const line: LevelLine = { status, animations: names, fps, physics_left_out: physicsLeftOut, bar_degrees: LEVEL_BAR_DEGREES, bar: LEVEL_BAR_SOURCE, feet: rows };
3717
+ const line: LevelLine = { status, animations: names, fps, physics_left_out: physicsLeftOut, bar_degrees: LEVEL_BAR_DEGREES, bar: LEVEL_BAR_SOURCE, feet: rows.map(row => ({ ...row, ...checkRow('FEET_STAY_LEVEL.feet', 'part', row.status === 'FAIL', [row.part]) })) };
3679
3718
  if (status === 'SKIP') {
3680
3719
  line.reason = `no frame of ${names.map((n) => `"${n}"`).join(', ')} turns a bone above ${rows.map((r) => `"${r.bone}" (which "${r.part}" rides)`).join(', ')}, so no foot was seen while its leg was posed`;
3681
3720
  }
@@ -3851,7 +3890,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
3851
3890
  );
3852
3891
  const seen = m.filter((x) => x.max !== null && x.min !== null);
3853
3892
  if (seen.length === 0) {
3854
- poses.push({ turn, unmeasured: `the "${name}" render shows no mesh on slot "${r.part}"` });
3893
+ poses.push({ ...checkRow('STRESS_OFF_CHAIN.per_part[].poses', 'part', false, [r.part]), turn, unmeasured: `the "${name}" render shows no mesh on slot "${r.part}"` });
3855
3894
  failed = true;
3856
3895
  problems.push({ code: `CHECK_${STRESS_LINE}`, object: `mesh "${r.part}" with "${r.chain[0]}" turned ${turn}°`, detail: `the "${name}" render shows no mesh on slot "${r.part}", so its stretch was not read; a part not read is not a pass` });
3857
3896
  continue;
@@ -3869,7 +3908,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
3869
3908
  }
3870
3909
  const shown = roundStress(reading);
3871
3910
  const a = at as StretchAt;
3872
- poses.push({ turn, reading: shown, worst: { triangle: a.triangle, edge: a.edge, ratio: round3(a.ratio) } });
3911
+ poses.push({ ...checkRow('STRESS_OFF_CHAIN.per_part[].poses', 'part', shown > STRESS_RIGID, [r.part]), turn, reading: shown, worst: { triangle: a.triangle, edge: a.edge, ratio: round3(a.ratio) } });
3873
3912
  if (worst === null || reading > worst.reading) worst = { part: r.part, link: r.chain[0], turn, reading };
3874
3913
  if (shown > STRESS_RIGID) {
3875
3914
  failed = true;
@@ -3883,7 +3922,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
3883
3922
  });
3884
3923
  }
3885
3924
  }
3886
- rows.push({ part: r.part, link: r.chain[0], links: r.chain.length, off_chain: r.off_chain.map((o) => ({ ...o, largest_weight: round3(o.largest_weight) })), poses });
3925
+ rows.push({ ...checkRow('STRESS_OFF_CHAIN.per_part', 'part', poses.some(p => typeof p.reading === 'number' && p.reading > STRESS_RIGID), [r.part]), part: r.part, link: r.chain[0], links: r.chain.length, off_chain: r.off_chain.map((o) => ({ ...o, ...checkRow('STRESS_OFF_CHAIN.per_part[].off_chain', 'part', false, [r.part]), largest_weight: round3(o.largest_weight) })), poses });
3887
3926
  }
3888
3927
  const w = worst as { part: string; link: string; turn: number; reading: number } | null;
3889
3928
  return {
@@ -3895,7 +3934,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
3895
3934
  worst: w === null ? null : { part: w.part, link: w.link, turn: w.turn },
3896
3935
  bar: STRESS_RIGID,
3897
3936
  per_part: rows,
3898
- not_read: plan.notRead,
3937
+ not_read: plan.notRead.map(r => ({ ...r, ...checkRow('STRESS_OFF_CHAIN.not_read', 'part', false, [r.part]) })),
3899
3938
  };
3900
3939
  }
3901
3940
 
@@ -3967,7 +4006,7 @@ export function limbLine(parts: PartsFile, rig: Record<string, unknown>, problem
3967
4006
  : `is weighted to ${others.map((b) => `"${b}"`).join(', ')} besides "${l.bone}"; a limb part rides its one bone with weight 1 — a bend is a rotation at the joint, never a deformed mesh — so a region on "${l.bone}" (config.regions.${p.name}), or a mesh whose segments name "${l.bone}" alone, is required`,
3968
4007
  });
3969
4008
  }
3970
- return { part: p.name, limb: l.name, bone: l.bone, status: fail ? 'FAIL' : 'PASS', others, ...(regionBones.length === 0 ? {} : { region_bones: regionBones }) };
4009
+ return { ...checkRow('LIMB_ONE_BONE.parts', 'part', fail, [p.name]), part: p.name, limb: l.name, bone: l.bone, status: fail ? 'FAIL' : 'PASS', others, ...(regionBones.length === 0 ? {} : { region_bones: regionBones }) };
3971
4010
  });
3972
4011
  return { status: rows.some((r) => r.status === 'FAIL') ? 'FAIL' : 'PASS', parts: rows };
3973
4012
  }
@@ -4291,7 +4330,7 @@ export function sweepLine(
4291
4330
  const why = unread[i];
4292
4331
  if (why !== null) {
4293
4332
  problems.push({ code: `CHECK_${SWEEP_LINE}`, object: object(`over its range [${j.range.join(', ')}]`), detail: `is not read: ${why}; a joint not read is not a pass` });
4294
- return { ...head, status: 'FAIL', poses: [], unread: why };
4333
+ return { ...head, ...checkRow('SEAM_OVER_RANGE.joints', 'part', false, [j.part]), status: 'FAIL', poses: [], unread: why };
4295
4334
  }
4296
4335
  const poses: SweepPose[] = sweepAngles(j.range).map((a) => {
4297
4336
  const { under, bare } = frames(sweepAnimationName(j.part, a));
@@ -4335,9 +4374,9 @@ export function sweepLine(
4335
4374
  // Issue #557: the contour step on the bent frame — a reading, recorded only where the cap is short.
4336
4375
  const st = step(j, bare);
4337
4376
  if (st !== null) printed.set(`${j.part} ${a}`, st);
4338
- return { degrees: a, status: fail ? 'FAIL' : 'PASS', mean, px_over_40: f.over40, px_over_80: f.over80, rig_px_over_40: Number(seamRigPxText(f.over40, scale)), ...(st === null || j.short === undefined ? {} : { step_px: st }) };
4377
+ return { ...checkRow('SEAM_OVER_RANGE.joints[].poses', 'part', fail, [j.part]), degrees: a, status: fail ? 'FAIL' : 'PASS', mean, px_over_40: f.over40, px_over_80: f.over80, rig_px_over_40: Number(seamRigPxText(f.over40, scale)), ...(st === null || j.short === undefined ? {} : { step_px: st }) };
4339
4378
  });
4340
- return { ...head, status: poses.some((p) => p.status === 'FAIL') ? 'FAIL' : 'PASS', poses };
4379
+ return { ...head, ...checkRow('SEAM_OVER_RANGE.joints', 'part', poses.some(p => p.status === 'FAIL'), [j.part]), status: poses.some((p) => p.status === 'FAIL') ? 'FAIL' : 'PASS', poses };
4341
4380
  });
4342
4381
  const g = seen.grid;
4343
4382
  return {
@@ -4568,7 +4607,7 @@ export function motionSeamRequired(line: MotionSeamLine, rows: readonly MotionBa
4568
4607
  refuse(`${label} in "${animation}" at frame ${worst.index} (t = ${worst.time}s)`,
4569
4608
  `background on ${r.hits.length} of ${r.frames} frame(s) read ${frameRuns(r.hits.map((h) => h.index))}: found ${worst.px} px (rigc gapOpen cells of ${worst.cell} world units, world box [${worst.box.join(', ')}]) on the worst frame, 0 required; ${why}`);
4570
4609
  }
4571
- out.push({ pair: p.pair, class: cls, frames, background_frames: open, max_px: max });
4610
+ out.push({ ...checkRow('SEAM_OVER_MOTION.required.pairs', 'pair', open > 0, [p.a, p.b]), pair: p.pair, class: cls, frames, background_frames: open, max_px: max });
4572
4611
  }
4573
4612
  const failed = problems.length - before;
4574
4613
  return { status: failed === 0 ? 'PASS' : 'FAIL', mode: 'gap-open', bar_px: 0, pairs: out, failed };
@@ -5096,12 +5135,13 @@ function readSeamRows(dir: string, animations: readonly string[], fps: number, p
5096
5135
  }
5097
5136
  const contact = setup ? undefined : jointContactReading(p.jointContact, want.joints ?? [], set.written ?? set.sampled, at, problems);
5098
5137
  if (contact === null) return;
5099
- worldRows?.push({ pair: want.pair, animation, status: p.status, drawn: p.drawn, banded: p.banded, gap: kinds.gap, ghost: kinds.ghost });
5138
+ worldRows?.push({ ...checkRow('SEAM_OVER_MOTION.worlds.*.rows', 'pair', false, [want.a, want.b]), pair: want.pair, animation, status: p.status, drawn: p.drawn, banded: p.banded, gap: kinds.gap, ghost: kinds.ghost });
5100
5139
  const opens = [...over.keys()].sort((x, y) => x - y);
5101
5140
  rows.push({
5141
+ ...checkRow('SEAM_OVER_MOTION.rows', 'pair', p.status === 'read' && opens.length > 0, [want.a, want.b]),
5102
5142
  pair: want.pair,
5103
5143
  animation,
5104
- ...(setup ? {} : { joint_contact: contact }),
5144
+ ...(setup ? {} : { joint_contact: contact === undefined ? undefined : { ...contact, reasons: contact.reasons.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows[].joint_contact.reasons', 'pair', false, [want.a, want.b]) })) } }),
5105
5145
  status: p.status,
5106
5146
  drawn: p.drawn,
5107
5147
  banded: p.banded,
@@ -5111,7 +5151,7 @@ function readSeamRows(dir: string, animations: readonly string[], fps: number, p
5111
5151
  under_floor: (want.root === undefined ? p.opens : [...rootFrames].filter(f => cells.some(c => c.index === f && c.counted > 0))).filter((f) => !over.has(f)),
5112
5152
  ...(rootWorst === undefined ? {} : { worst: rootWorst }),
5113
5153
  ...(warnWorst === undefined || setup ? {} : { worst: warnWorst }),
5114
- ...(want.root === undefined ? {} : { cells }),
5154
+ ...(want.root === undefined ? {} : { cells: cells.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows[].cells', 'pair', false, [want.a, want.b]) })) }),
5115
5155
  });
5116
5156
  });
5117
5157
  }
@@ -5136,7 +5176,7 @@ export function motionSeamLine(pairs: MotionSeamPair[], animations: string[], fp
5136
5176
  const row = rows.find(r => r.pair === p.pair && r.animation === a);
5137
5177
  return row?.status === 'read' && row.banded > 0 ? [] : ['"' + p.pair + '" in "' + a + '": ' + (p.unread ?? (row === undefined ? 'no returned reading' : 'no band on any frame'))];
5138
5178
  }));
5139
- const unmeasured = unmeasuredRoots.map(root => ({ ...root, candidates: [...root.candidates] }));
5179
+ const unmeasured = unmeasuredRoots.map(root => ({ ...root, ...checkRow('SEAM_OVER_MOTION.roots.unmeasured', 'part', false, [root.part]), candidates: [...root.candidates] }));
5140
5180
  const rootReasons = [...missing, ...unmeasured.map(root => 'root pair for ' + root.limb + ': ' + root.reason)];
5141
5181
  const rootGate: MotionSeamLine['roots'] = roots.length === 0 && unmeasured.length === 0 ? undefined : {
5142
5182
  status: failed.length > 0 ? 'FAIL' : rootReasons.length > 0 || reason !== undefined ? 'SKIP' : 'PASS',
@@ -5159,10 +5199,10 @@ export function motionSeamLine(pairs: MotionSeamPair[], animations: string[], fp
5159
5199
  ...(skipWhy === undefined ? {} : { reason: skipWhy }),
5160
5200
  fps,
5161
5201
  floor: MOTION_SEAM_FLOOR,
5162
- pairs,
5202
+ pairs: pairs.map(p => ({ ...p, ...checkRow('SEAM_OVER_MOTION.pairs', 'pair', false, [p.a, p.b]) })),
5163
5203
  animations,
5164
5204
  warnings,
5165
- rows,
5205
+ rows: rows.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows', 'pair', r.status === 'read' && r.opens.length > 0, pairs.filter(p => p.pair === r.pair).flatMap(p => [p.a, p.b])) })),
5166
5206
  ...(rootGate === undefined ? {} : { roots: rootGate }),
5167
5207
  };
5168
5208
  }
@@ -5579,6 +5619,7 @@ export function readFigurePairOpenings(
5579
5619
  for (const ps of pairSetups) {
5580
5620
  if (ps.opens.length > 0) {
5581
5621
  openings.push({
5622
+ ...checkRow('figure_openings.openings', 'pair', true, [ps.under, ps.above]),
5582
5623
  pair: ps.pair,
5583
5624
  under: ps.under,
5584
5625
  above: ps.above,
@@ -5757,6 +5798,7 @@ export function clothRow(chain: { tip: string; root: string; links: number; leng
5757
5798
  let s = speeds.length;
5758
5799
  while (s > 0 && speeds[s - 1] < floor) s--;
5759
5800
  return {
5801
+ ...checkRow('CLOTH_SETTLES.rows', 'rig', speeds.length > 0 && s < speeds.length, []),
5760
5802
  tip: chain.tip,
5761
5803
  root: chain.root,
5762
5804
  links: chain.links,
@@ -6260,6 +6302,7 @@ export function measureWindBand(
6260
6302
  const worstGhost = perStep.reduce((best, s) => (s.ghostPx > best.ghostPx ? s : best), perStep[0]);
6261
6303
 
6262
6304
  return {
6305
+ ...checkRow('WIND_BAND.pairs', 'pair', !holdsAll, [p.a, p.b]),
6263
6306
  pair: p.pair,
6264
6307
  a: p.a,
6265
6308
  b: p.b,
@@ -6270,7 +6313,7 @@ export function measureWindBand(
6270
6313
  first_break_above: span === null ? breakAt(0) : span.end < wb.steps.length - 1 ? breakAt(span.end + 1) : null,
6271
6314
  worst_gap: { x: worstGap.x, px: worstGap.gapPx, animation: worstGap.gapAnim, frame: worstGap.gapFrame },
6272
6315
  worst_ghost: { x: worstGhost.x, px: worstGhost.ghostPx, animation: worstGhost.ghostAnim, frame: worstGhost.ghostFrame },
6273
- steps: perStep.map((s) => ({ x: s.x, holds: s.holds, gap_max_px: s.gapPx, ghost_max_px: s.ghostPx })),
6316
+ steps: perStep.map((s) => ({ ...checkRow('WIND_BAND.pairs[].steps', 'pair', !s.holds, [p.a, p.b]), x: s.x, holds: s.holds, gap_max_px: s.gapPx, ghost_max_px: s.ghostPx })),
6274
6317
  };
6275
6318
  });
6276
6319
 
@@ -6453,6 +6496,9 @@ export function runCheck(rigDir: string, outDir: string, rigc: RigcRunner, parts
6453
6496
  ...(ready.parts === null ? [{ code: BOUNDARY_COLOUR_UNMEASURED_CODE, object: 'requirements.boundary_colour', detail: `requires parts.json and its parts/ PNGs, the rig's own pieces the step is measured against: ${ready.noParts ?? 'none was read'}; an untaken reading is never a pass` }] : []),
6454
6497
  ...(ready.idleDuration === null ? [{ code: BOUNDARY_COLOUR_UNMEASURED_CODE, object: 'requirements.boundary_colour', detail: `requires an idle animation, whose every frame is measured: ${ready.noIdle ?? 'none was read'}; an untaken reading is never a pass` }] : []),
6455
6498
  ]));
6499
+ if (file.boundary_colour !== undefined && ready.parts !== null && ready.idleDuration !== null) {
6500
+ take(() => refuseIfAny(boundaryColourSizeProblems(ready)));
6501
+ }
6456
6502
  take(() => refuseIfAny(exceptionProblems(file, ready.parts, ready.noParts)));
6457
6503
  // A seam's pairs are read off parts.json's art (issue #111); both resolvers' problems are named in one refusal.
6458
6504
  if (file.requirements.some((r) => r.kind === 'seam')) {
@@ -7144,7 +7190,7 @@ export function runCheck(rigDir: string, outDir: string, rigc: RigcRunner, parts
7144
7190
  const affected = pixels.filter(q => effects.mask[q] !== 0).length;
7145
7191
  const reasons: Partial<SeamEffects['reasons']> = {};
7146
7192
  for (const q of pixels) { const reason = SEAM_EFFECT_REASONS[effects.cellReasons[q]]; reasons[reason] = (reasons[reason] ?? 0) + 1; }
7147
- return { parts: row.parts, whole_px_over_40: row.px_over_40, affected_px_over_40: affected, inherited_px_over_40: row.px_over_40 - affected, reasons };
7193
+ return { ...checkRow('seam_scope.pairs', row.parts[0] === SEAM_NO_ART ? 'rig' : row.parts[1] === SEAM_NO_ART ? 'part' : 'pair', false, row.parts.filter(p => p !== SEAM_NO_ART)), parts: row.parts, whole_px_over_40: row.px_over_40, affected_px_over_40: affected, inherited_px_over_40: row.px_over_40 - affected, reasons };
7148
7194
  }),
7149
7195
  };
7150
7196
  const altMean = round3(altSeam.mean);
@@ -7234,7 +7280,7 @@ export function runCheck(rigDir: string, outDir: string, rigc: RigcRunner, parts
7234
7280
  pack_mode: { page_edges: mode.pageEdges, pack_shape: mode.packShape },
7235
7281
  ...(env === null ? {} : { environment: env }),
7236
7282
  loop_max_diff: loop === null ? null : loop.max,
7237
- ...(loopPhysics === null ? {} : { loop_physics: loopPhysics }),
7283
+ ...(loopPhysics === null ? {} : { loop_physics: loopPhysics.map(row => ({ ...row, ...checkRow('loop_physics', 'rig', false, []) })) }),
7238
7284
  seam_mean: seam === null ? null : round3(seam.mean),
7239
7285
  seam_px_over_40: seam === null ? null : seam.over40,
7240
7286
  seam_px_over_80: seam === null ? null : seam.over80,
@@ -7530,7 +7576,7 @@ export function measureRequirements(inp: CheckInputs, file: RequirementsFile, bu
7530
7576
  }
7531
7577
  line = { ...followLine(r, d.poses, released.poses, full.poses), released_copy: door ?? 'built as forced: rig-c\'s gate passed it with no further declaration' };
7532
7578
  }
7533
- lines[r.name] = line;
7579
+ lines[r.name] = { ...line, ...(r.kind === 'seam' ? checkRow('requirements.lines.* (seam)', 'pair', line.status === 'FAIL', [r.part, r.neighbour]) : r.kind === 'stretch' ? checkRow('requirements.lines.* (stretch)', 'part', line.status === 'FAIL', [r.slot]) : checkRow('requirements.lines.* (bone)', 'rig', line.status === 'FAIL', [])) };
7534
7580
  const p = requirementProblem(r, line);
7535
7581
  if (p !== null) problems.push(p);
7536
7582
  }
@@ -8111,12 +8157,12 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
8111
8157
  let failed = false;
8112
8158
  for (const p of swing) {
8113
8159
  if (excepted.not_swinging.includes(p.name)) {
8114
- rows.push({ part: p.name, unmeasured: "declared not swinging by the scene file's not_swinging, so it is not held to the bar" });
8160
+ rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, unmeasured: "declared not swinging by the scene file's not_swinging, so it is not held to the bar" });
8115
8161
  continue;
8116
8162
  }
8117
8163
  // Issue #349: a limb segment is rigid on its one bone and turns at its joint; it does not hang, so no tip trails a root.
8118
8164
  if (p.limb !== undefined) {
8119
- rows.push({ part: p.name, unmeasured: p.limb.band !== undefined ? `a hybrid joint band (config.limbs.${p.limb.name}): it bends between adjacent carriers, does not hang, and is not held to a trailing-tip bar` : `a limb segment (config.limbs.${p.limb.name}), rigid on its one bone "${p.limb.bone}": it turns at its joint and does not hang, so it is not held to the bar` });
8165
+ rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, unmeasured: p.limb.band !== undefined ? `a hybrid joint band (config.limbs.${p.limb.name}): it bends between adjacent carriers, does not hang, and is not held to a trailing-tip bar` : `a limb segment (config.limbs.${p.limb.name}), rigid on its one bone "${p.limb.bone}": it turns at its joint and does not hang, so it is not held to the bar` });
8120
8166
  continue;
8121
8167
  }
8122
8168
  const rises = excepted.rises.includes(p.name);
@@ -8137,7 +8183,7 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
8137
8183
  const said = { ...(rests ? { declared: 'rests' } : {}), ...(rises ? { tip_half: tipHalf, tip_read: risesRead.get(p.name) as string } : {}) };
8138
8184
  if (w.root === null || w.tip === null || c.root === null || c.tip === null) {
8139
8185
  const half = w.root === null || c.root === null ? rootHalf : tipHalf;
8140
- rows.push({ part: p.name, ...said, unmeasured: shown[0] === null ? 'its slot shows no attachment on idle frame 0' : `on idle frame 0 the ${half} half of its box holds no art its attachment draws` });
8186
+ rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, ...said, unmeasured: shown[0] === null ? 'its slot shows no attachment on idle frame 0' : `on idle frame 0 the ${half} half of its box holds no art its attachment draws` });
8141
8187
  continue;
8142
8188
  }
8143
8189
  // Issue #987: a half that does not move against its carrier, read at the line's precision, is 0 and not the
@@ -8148,7 +8194,7 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
8148
8194
  // Issue #245: a resting tip is held to the opposite relation — no further than its root, at the line's precision.
8149
8195
  const rigid = t.root === 0 && t.tip === 0;
8150
8196
  const ok = !rigid && (rests ? (ratio === null ? t.tip === 0 : ratio <= TIP_REST_RATIO_CEILING) : ratio === null ? t.tip > 0 : ratio >= TIP_RATIO_FLOOR);
8151
- rows.push({ part: p.name, ...said, hang_from: hang, root_rig_px: round3(t.root), tip_rig_px: round3(t.tip), ratio, world_root_rig_px: round3(w.root), world_tip_rig_px: round3(w.tip), world_ratio: worldRatio });
8197
+ rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', !ok && !(!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR), [p.name]), part: p.name, ...said, hang_from: hang, root_rig_px: round3(t.root), tip_rig_px: round3(t.tip), ratio, world_root_rig_px: round3(w.root), world_tip_rig_px: round3(w.tip), world_ratio: worldRatio });
8152
8198
  // Structural 0 / 0 stays a failure before the link-only magnitude policy (issue #994).
8153
8199
  if (!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR) {
8154
8200
  belowGrid++;
@@ -8681,12 +8727,12 @@ export function stillLine(inp: FullInputs, idle: FrameSet, geo: IdleGeometry | n
8681
8727
  const tolerance = stillTolerance(coordMax, entryMax);
8682
8728
  for (const { slot, r } of readings) {
8683
8729
  if (r.max === null) {
8684
- rows.push({ slot, unmeasured: 'no idle frame shows it' });
8730
+ rows.push({ ...checkRow('STILL_REGIONS_DARK.*.still_slots', 'part', false, [slot]), slot, unmeasured: 'no idle frame shows it' });
8685
8731
  continue;
8686
8732
  }
8687
8733
  sumSq += r.sumSq;
8688
8734
  weight += r.weight;
8689
- rows.push({ slot, max_rig_px: sig4(r.max), rms_rig_px: sig4(r.weight > 0 ? Math.sqrt(r.sumSq / r.weight) : 0) });
8735
+ rows.push({ ...checkRow('STILL_REGIONS_DARK.*.still_slots', 'part', r.max > tolerance, [slot]), slot, max_rig_px: sig4(r.max), rms_rig_px: sig4(r.weight > 0 ? Math.sqrt(r.sumSq / r.weight) : 0) });
8690
8736
  if (worst === null || r.max > worst.max) worst = { slot, max: r.max, frame: frameIndex(r.frame) };
8691
8737
  if (r.max > tolerance) over.push({ slot, max: r.max, frame: frameIndex(r.frame) as number });
8692
8738
  }
@@ -8695,7 +8741,7 @@ export function stillLine(inp: FullInputs, idle: FrameSet, geo: IdleGeometry | n
8695
8741
  if (still.includes(sl.name) || !record.has(sl.name)) continue;
8696
8742
  const c = crossingOf(artOf(sl.name), inp.stage, shownOf(sl.name), maps, region);
8697
8743
  // Art that only touches the region within the arithmetic's tolerance has not entered it.
8698
- if (c !== null && c.depth > tolerance) crossing.push({ slot: sl.name, depth_rig_px: round3(c.depth), area_rig_px2: round3(c.area), frame: frameIndex(c.frame) });
8744
+ if (c !== null && c.depth > tolerance) crossing.push({ ...checkRow('STILL_REGIONS_DARK.*.crossing', 'part', true, [sl.name]), slot: sl.name, depth_rig_px: round3(c.depth), area_rig_px2: round3(c.area), frame: frameIndex(c.frame) });
8699
8745
  }
8700
8746
  const rms = weight > 0 ? Math.sqrt(sumSq / weight) : 0;
8701
8747
  return {
@@ -9329,7 +9375,7 @@ export function stretchLine(geo: IdleGeometry | null, path: string, problems: Pr
9329
9375
  });
9330
9376
  }
9331
9377
  if (m.max === null || m.min === null) {
9332
- rows.push({ slot: m.slot, triangles: m.triangles, unmeasured: 'no idle frame shows this attachment' });
9378
+ rows.push({ ...checkRow('TEXTURE_STRETCH.per_mesh', 'part', false, [m.slot]), slot: m.slot, triangles: m.triangles, unmeasured: 'no idle frame shows this attachment' });
9333
9379
  continue;
9334
9380
  }
9335
9381
  const sMax = stretchSeverity(m.max.ratio);
@@ -9339,7 +9385,7 @@ export function stretchLine(geo: IdleGeometry | null, path: string, problems: Pr
9339
9385
  if (worst === null || severity > worst.severity) worst = { mesh: m, at, severity };
9340
9386
  maxAll = maxAll === null ? m.max.ratio : Math.max(maxAll, m.max.ratio);
9341
9387
  minAll = minAll === null ? m.min.ratio : Math.min(minAll, m.min.ratio);
9342
- rows.push({ slot: m.slot, triangles: m.triangles, max_ratio: round3(m.max.ratio), max_at: stretchAtText(m.max), min_ratio: round3(m.min.ratio), min_at: stretchAtText(m.min), severity });
9388
+ rows.push({ ...checkRow('TEXTURE_STRETCH.per_mesh', 'part', severity > TEXTURE_STRETCH_CEILING, [m.slot]), slot: m.slot, triangles: m.triangles, max_ratio: round3(m.max.ratio), max_at: stretchAtText(m.max), min_ratio: round3(m.min.ratio), min_at: stretchAtText(m.min), severity });
9343
9389
  if (severity > TEXTURE_STRETCH_CEILING) {
9344
9390
  failed = true;
9345
9391
  const step = bound === undefined ? '' : weightStepText(bound.rig, m.slot, m.attachment, at.edge, bound);
@@ -0,0 +1,23 @@
1
+ /** Additive consumer metadata, assigned where a check row is produced (#1089).
2
+ * The family literal anchors the generated reference table; it is not serialized.
3
+ * Finding is the producer's existing bar/warning decision, never a status guess.
4
+ */
5
+ export type CheckRowScope = 'part' | 'pair' | 'rig';
6
+ export interface CheckRowLabels {
7
+ row_scope: CheckRowScope;
8
+ row_kind: 'finding' | 'evidence';
9
+ /** Actual named parts only; rig observations have no implied part attribution. */
10
+ row_subjects: string[];
11
+ }
12
+ export function checkRow(_family: string, scope: CheckRowScope, finding: boolean, subjects: readonly string[]): CheckRowLabels {
13
+ return { row_scope: scope, row_kind: finding ? 'finding' : 'evidence', row_subjects: [...subjects] };
14
+ }
15
+
16
+ /** Legacy figures for human-readable formatters and compatibility oracles. */
17
+ export function withoutCheckRows(value: unknown): unknown {
18
+ if (Array.isArray(value)) return value.map(withoutCheckRows);
19
+ if (value !== null && typeof value === 'object') return Object.fromEntries(Object.entries(value)
20
+ .filter(([key]) => !['row_scope', 'row_kind', 'row_subjects'].includes(key))
21
+ .map(([key, entry]) => [key, withoutCheckRows(entry)]));
22
+ return value;
23
+ }
package/src/coincide.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  /** Report-only missing support observations on the native setup grid (#998). */
2
3
  import { refuseIfAny } from './errors.ts';
3
4
  import { connectedComponents } from './raster/components.ts';
@@ -106,11 +107,11 @@ export function supportReport(
106
107
  if (x + 1 < width) { rawEdge(p, p + 1, x + 1, y, 0, 1); rawEdge(p + 1, p, x + 1, y, 0, 1); }
107
108
  if (y + 1 < height) { rawEdge(p, p + width, x, y + 1, 1, 0); rawEdge(p + width, p, x, y + 1, 1, 0); }
108
109
  }
109
- if (rawLength > 0 || overlap > 0) raw_pairs.push({ front: F.name, back: B.name,
110
+ if (rawLength > 0 || overlap > 0) raw_pairs.push({ ...checkRow('PART_SUPPORT_REPORT.raw_pairs', 'pair', false, [F.name, B.name]), front: F.name, back: B.name,
110
111
  boundary_length_px: rawLength, box: [rx0, ry0, rx1 - rx0, ry1 - ry0], overlap_area_px: overlap,
111
112
  classification: 'ownership unknown, unclassified' });
112
113
  if (domain === undefined || !('mask' in domain)) {
113
- pairs.push({ front: F.name, back: B.name, status: 'unavailable', reason: `${B.name}: ${domain === undefined ? unavailableReason : domain.reason}`, boundary_length_px: null, box: null, continuation_candidate_area_px: null });
114
+ pairs.push({ ...checkRow('PART_SUPPORT_REPORT.pairs', 'pair', false, [F.name, B.name]), front: F.name, back: B.name, status: 'unavailable', reason: `${B.name}: ${domain === undefined ? unavailableReason : domain.reason}`, boundary_length_px: null, box: null, continuation_candidate_area_px: null });
114
115
  continue;
115
116
  }
116
117
  let length = 0, area = 0, x0 = width, y0 = height, x1 = 0, y1 = 0;
@@ -126,7 +127,7 @@ export function supportReport(
126
127
  if (x + 1 < width) { edge(p, p + 1, x + 1, y, 0, 1); edge(p + 1, p, x + 1, y, 0, 1); }
127
128
  if (y + 1 < height) { edge(p, p + width, x, y + 1, 1, 0); edge(p + width, p, x, y + 1, 1, 0); }
128
129
  }
129
- pairs.push({ front: F.name, back: B.name, status: 'measured', boundary_length_px: length,
130
+ pairs.push({ ...checkRow('PART_SUPPORT_REPORT.pairs', 'pair', length > 0, [F.name, B.name]), front: F.name, back: B.name, status: 'measured', boundary_length_px: length,
130
131
  box: length === 0 ? null : [x0, y0, x1 - x0, y1 - y0], continuation_candidate_area_px: area });
131
132
  }
132
133
  const unowned = unownedSupport(width, height, parts, paintedFigure);
@@ -141,7 +142,7 @@ export function unownedSupport(width: number, height: number, parts: readonly Su
141
142
  if (paintedFigure !== null) {
142
143
  const missing = paintedFigure.data.slice();
143
144
  for (const part of parts) for (let p = 0; p < missing.length; p++) if (part.mask.data[p] !== 0) missing[p] = 0;
144
- const regions = connectedComponents({ width, height, data: missing }, 4).stats.slice(1).map(s => ({ box: [s.left, s.top, s.width, s.height] as SupportBox, area_px: s.area }));
145
+ const regions = connectedComponents({ width, height, data: missing }, 4).stats.slice(1).map(s => ({ ...checkRow('PART_SUPPORT_REPORT.unowned.regions', 'rig', true, []), box: [s.left, s.top, s.width, s.height] as SupportBox, area_px: s.area }));
145
146
  unowned = { status: 'measured', area_px: regions.reduce((sum, r) => sum + r.area_px, 0), regions };
146
147
  }
147
148
  return unowned;
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  import { edgeLength } from './length.ts';
2
3
  import { createHash } from 'node:crypto';
3
4
  /** Source support at declared joints (#888). Geometry is in stage pixels, y down.
@@ -276,7 +277,7 @@ export function checkJointMaterial(declarations: readonly JointMaterial[] | unde
276
277
  const read=materialRows(req.part,req,(original as MaterialSource).edges,[],piece);
277
278
  if(read.every(r=>r.rays===0))refuseIfAny([{code:'CHECK_CUT_MATERIAL_MEASURED',object,detail:'no opaque cut interface within declared reach; correct the explicit joint correspondence/reach or supply source material; no PASS is invented'}]);
278
279
  for(const r of read.filter(r=>r.rays>0)){
279
- rows.push(r);
280
+ rows.push({ ...r, ...checkRow('CUT_JOINT_MATERIAL.rows', 'part', r.status === 'FAIL', [r.part]) });
280
281
  if(r.status==='FAIL')problems.push({code:'CHECK_CUT_JOINT_MATERIAL',object,detail:`edge [${r.edge.map(p=>p.join(',')).join(' -> ')}], opaque edge length ${r.edge_length_px} px (${r.within_reach_px} px within reach): material found ${r.found_px} px, required ${r.required_px} px by bend [${req.bend_degrees.join(', ')}] degrees within reach ${req.reach_px} px; source art past the joint is required — follow AUTHORING Source before scissors; no crop or under-piece repair`});
281
282
  }
282
283
  }
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  /** Posed-axis evidence from one stock seam render, never sampled source keys. */
2
3
  import type { GeometryFile } from '@rig-c/core/render-shared';
3
4
  import type { FrameSet } from './check.ts';
@@ -49,7 +50,7 @@ const regular = (m: SeamMatrix): boolean => {
49
50
  /** World axes remain evidence even when local-range equivalence is unavailable. */
50
51
  export function seamJointPose(bone: string, parent: string | null, inherit: string, setup: SeamMatrix, posed: SeamMatrix,
51
52
  parentSetup: SeamMatrix | null, parentPosed: SeamMatrix | null, range: [number, number] | null, rangeReason?: string): SeamJointPose {
52
- const out: SeamJointPose = { bone, parent, world_x_axis_degrees: posed.a === 0 && posed.c === 0 ? null : angle(posed.a, posed.c),
53
+ const out: SeamJointPose = { ...checkRow('SEAM_OVER_MOTION.rows[].pose_at_worst.joints', 'rig', false, []), bone, parent, world_x_axis_degrees: posed.a === 0 && posed.c === 0 ? null : angle(posed.a, posed.c),
53
54
  parent_relative_setup_axis_delta_degrees_mod360: null, static_range: range, comparison: 'unavailable' };
54
55
  if (inherit !== 'normal') return { ...out, reason: `inherit ${inherit}: parent-relative local-range comparison unavailable` };
55
56
  if (parent === null || parentSetup === null || parentPosed === null) return { ...out, reason: 'no parent frame for a local-range comparison' };
@@ -1,3 +1,4 @@
1
+ import { checkRow } from './checkrow.ts';
1
2
  /** Authored source-painting limits over actual renderer setup pixels (#887). */
2
3
  import { refuseIfAny, type Problem } from './errors.ts';
3
4
  import type { Raster } from './raster/types.ts';
@@ -170,8 +171,8 @@ export function setupPaintingLine(
170
171
  else { row.pixels++; row.x0 = Math.min(row.x0, x); row.y0 = Math.min(row.y0, y); row.x1 = Math.max(row.x1, x + 1); row.y1 = Math.max(row.y1, y + 1); }
171
172
  }
172
173
  const status = r.max_pixels === undefined ? 'SKIP' : count > r.max_pixels ? 'FAIL' : 'PASS';
173
- const result: SetupPaintingReading = { ...r, status, pixel_count: count, limit: r.max_pixels ?? null,
174
- slots: [...rows].map(([slot, row]) => ({ slot, box: [row.x0, row.y0, row.x1 - row.x0, row.y1 - row.y0], pixel_count: row.pixels })) };
174
+ const result: SetupPaintingReading = { ...r, ...checkRow('SETUP_MATCHES_PAINTING.regions', 'rig', status === 'FAIL', []), status, pixel_count: count, limit: r.max_pixels ?? null,
175
+ slots: [...rows].map(([slot, row]) => ({ ...checkRow('SETUP_MATCHES_PAINTING.regions[].slots', slot === '(uncovered)' ? 'rig' : 'part', false, slot === '(uncovered)' ? [] : [slot]), slot, box: [row.x0, row.y0, row.x1 - row.x0, row.y1 - row.y0], pixel_count: row.pixels })) };
175
176
  if (status === 'FAIL') {
176
177
  for (const row of result.slots) problems.push({ code: 'CHECK_SETUP_MATCHES_PAINTING', object: `region "${r.name}" slot "${row.slot}"`, detail: `box [${row.box.join(', ')}], pixelcount ${row.pixel_count}; region pixelcount ${count} > declared limit ${r.max_pixels}, RGB tolerance ${declared.rgb_tolerance}; compare the actual setup to the source painting on the declared stage grid` });
177
178
  }