@rig-c/review 4.10.0 → 4.12.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/DESIGN.md +16 -12
- package/docs/PANELS.md +3 -1
- package/docs/REVIEW_PACKAGE.md +91 -16
- package/docs/STABILITY.md +38 -0
- package/package.json +2 -2
- package/src/cloth-recipe.ts +27 -7
- package/src/job-act.ts +4 -2
- package/src/job-api.ts +21 -9
- package/src/job-checkpoint-evidence.ts +17 -0
- package/src/job-contract.ts +18 -2
- package/src/job-front.ts +34 -5
- package/src/job-source.ts +34 -9
- package/src/open-workspace-state.ts +6 -1
- package/src/open.ts +3 -3
- package/src/rebuild.ts +42 -10
- package/src/stage-comment.ts +32 -4
- package/web/catalog-en.ts +13 -2
- package/web/catalog-ko.ts +38 -27
- package/web/cloth-panel.ts +1 -1
- package/web/compare.css +1 -1
- package/web/environment-world.ts +9 -0
- package/web/inspector-blocks.ts +9 -7
- package/web/interview-panel.ts +2 -2
- package/web/job-rig-screen.ts +15 -8
- package/web/job-session.ts +39 -27
- package/web/label-placement.ts +2 -1
- package/web/main.ts +150 -90
- package/web/parts-viewport-provider.ts +2 -2
- package/web/rebuild-client.ts +1 -1
- package/web/rig-host.ts +1 -1
- package/web/rig-viewport-provider.ts +4 -5
- package/web/stage-comments.ts +7 -1
- package/web/styles.css +24 -3
- package/web/viewport-controller.ts +4 -0
- package/web/workspace-layout.ts +8 -6
- package/web/workspace-preferences.ts +10 -8
- package/web/workspace-ui.ts +53 -27
package/docs/DESIGN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
The delivery unit is an existing output folder or an optional curated review package handed from an agent to a person. This reusable app owns inspection, reference comparison, annotations and feedback export. Upstream compiler, splitter and runtime remain their respective tools. The existing producing agent needs no change to open its output here.
|
|
6
6
|
|
|
7
|
-
The person uses the existing inspection workspace. The header **Setup · Animate · Compare** is the sole mode switch (#741); the resizable bottom panel shows the current mode's blocks, the top **Comment · C** button opens the
|
|
7
|
+
The person uses the existing inspection workspace. The header **Setup · Animate · Compare** is the sole mode switch (#741); the resizable bottom panel shows the current mode's blocks, the top **Comment · C** button opens the right communication panel at Comments and starts pin capture (#835, #1041), and act controls sit in the shared act row (`#workspace-act-row`) directly beneath the top bar (#845, #1040). Parts packages use this same screen (#745). Header Compare retains its existing A/B comparison with a reference, enabled when a second build is supplied; its View, Rig, Playback and Feedback sections remain unchanged. Card D is **PARKED**, not planned. Setup already offers Difference as the fourth view item for parts (#745) and rig (#752). Setup covers setup geometry, source art, pivot/joint placement, meshes, weights and draw order; Animate covers angle coverage, frame intervals, reference video/poses, contact/deformation, audio inspection and the inspection environment (wind, gravity and impulses through the published player's `environment`/`moved`; its state is feedback context, never a model or motion edit) and the physics tuning panel (#103: constraint values edited as config patch ops and applied through the producer, never written into the model by review), and the readings block (#108: the compiler's own `rigc render` readings of the drawn animation, run on the inspected build and on the latest scratch build, shown as timeline ticks and worst-frame lines), the Environment block's *Use for readings* (#112: the controls exported as a `rigc-environment/1` schedule that readings, Apply's check and *Check under this world* — the installed producer's `rig-parts check --environment` — read, so the bars and readings are taken under the wind the person watched; the schedule is feedback context and is never authored into the rig), and the requirements block (#113: the scene's declared requirements written as a `spine-parts-requirements/1` file and measured by the installed producer's `rig-parts check --requirements`, one worst-frame line each). Time/angle controls navigate inspection. Timeline edits are six typed keyed operations on a scratch copy of `motion.animations_from`, built by the installed producer; review never writes source motion. Implemented modeling instruments send bounded changes through the installed producer into scratch, including setup-space mesh deltas.
|
|
8
8
|
|
|
9
9
|
## Core UI rules (owner, 2026-11-11)
|
|
10
10
|
|
|
@@ -43,7 +43,8 @@ change adds no screen, behavior or public contract.
|
|
|
43
43
|
Remove separate sidebar key-region checkpoint and evidence panels. Retain the
|
|
44
44
|
supported checkpoint act flow through its existing contract.
|
|
45
45
|
- **R3a** Any main view in rig, comparison, parts, job, interview or package review
|
|
46
|
-
has a resizable bottom panel directly beneath it
|
|
46
|
+
has a resizable bottom panel directly beneath it for the controllers tied to
|
|
47
|
+
that view. Use one control set in this
|
|
47
48
|
order: **Zoom in → Zoom out → Fit → 1:1 → View switch**, with the same names and
|
|
48
49
|
behavior across views. Use the shared viewport implementation and extend it
|
|
49
50
|
for missing behavior. Keep main-view code shared across screens.
|
|
@@ -52,8 +53,8 @@ change adds no screen, behavior or public contract.
|
|
|
52
53
|
- **R5** `web/index.html` is the single web entry for every screen, including rig,
|
|
53
54
|
comparison, parts, interview, package, job, hub and owner workspaces. Compose
|
|
54
55
|
these screens from a shared workspace shell, main view (viewport and controls),
|
|
55
|
-
resizable bottom and side panels
|
|
56
|
-
inspector and comments components. Do not introduce a screen through a new
|
|
56
|
+
resizable bottom and side panels (the right one is the communication panel),
|
|
57
|
+
main and secondary toolbars, view switcher, inspector and comments components. Do not introduce a screen through a new
|
|
57
58
|
HTML page or per-screen server route. Preserve existing public job, hub,
|
|
58
59
|
language and capability URLs as redirects or routes into the single entry.
|
|
59
60
|
The owner rules on the shared shell layout before implementation.
|
|
@@ -157,7 +158,9 @@ Any future modeling edit needs provenance, undo/redo, explicit units and an expo
|
|
|
157
158
|
|
|
158
159
|
## Workspace layout
|
|
159
160
|
|
|
160
|
-
The single review page is one inspection workspace: a left column, the stage, the Inspector under the stage
|
|
161
|
+
The single review page is one inspection workspace: a left column, the stage, the Inspector under the stage, the communication panel at the right and one status footer.
|
|
162
|
+
|
|
163
|
+
**Panel identity rule (#1041).** The bottom panel holds the controllers tied to the view. The right panel holds communication with the AI. Place any new element by this rule.
|
|
161
164
|
|
|
162
165
|
- **Left column.** A fixed header row (Parts title and slot search on one line; the search's name, *Find slot*, is its `aria-label`) and one scrolling body. Nothing sits above the header and it never scrolls. The body holds the reference select, the part list and browser Settings; it is the column's only scroll container. Region coverage and Difference inspection stay in the main view under R3. Settings opens and closes from its own header (`#settings-toggle`, `aria-expanded`, controlling `#settings-body`); it starts collapsed and the state is a browser preference.
|
|
163
166
|
- **Header.** **Setup · Animate · Compare** sits next to the package title and is the only mode switch (#741). Setup and Animate keep their existing `rig` / `playback` mode IDs. Compare is enabled with a second build and retains A/B with a reference; card D is parked. There is no second mode selector in the bottom panel. The pending ask is shown beside the act bar. **Historical:** numbered step chips and `stage-nav.ts` were removed; they must not be restored.
|
|
@@ -168,10 +171,11 @@ The single review page is one inspection workspace: a left column, the stage, th
|
|
|
168
171
|
- **Weights.** In Setup, after the Mesh panel: `#weights` (#107), a watch layer. **Show weights** (`#weights-show`, `aria-pressed`) draws the selected slot's setup-pose mesh on `#rig-overlay` with each vertex coloured by the picked bone's stored weight (`#weights-bone`, influencing bones first) on the ramp tokens `--rv-weight-0` / `--rv-weight-half` / `--rv-weight-1`, or by its dominant bone (`#weights-mode` Max influence, `--rv-weight-bone-1…6`); `#weights-legend` and the hover readout `#weights-hover` sit under it. Weights are read from the compiled model document (`src/weights.ts` over the shared reader `src/setup-mesh.ts`); positions, triangles and hull come directly from published Play 1.14.0's `readSetupMesh` (`web/setup-pose.ts`, shared with Edit Mesh), including selected setup-slider deform. A never-played `RigPlayer` reads only public setup identity; its active skin selection stays distinct from the supplying table, and null identities are never guessed. A package without the document refuses `WEIGHTS_MODEL_UNAVAILABLE`. No edit, Apply or record; the Mesh edit preview wins when both are on.
|
|
169
172
|
- **Bones.** In Setup, after Weights: `#bones-panel` (#109). **Edit bones on stage** (`#bones-edit`) draws the handoff config's bone anchors — `at`, chain `points`, `tip` — on `#rig-overlay` through the crop → world mapping (tokens `--rv-bone-line`, `-origin`, `-point`, `-tip`, `-pending`, `-selected`, `-ink`, `-label-bg`; the stage stays dark in both schemes, so both blocks carry the same values). A drag moves an anchor by whole rig px; each move is a `replace` op at its JSON Pointer naming the bone (`src/bone-anchors.ts`, `web/bones-panel.ts`). Check (`POST /api/bones-check`, `src/bones-check.ts`) runs `propose --from-config` and `compare` on a scratch copy of the patched config and shows their lines as printed; a LINT line blocks nothing. Apply is the generic patch runner's whole-rig `rig` op behind the reproduced baseline. Adding, removing or re-parenting bones is out of scope.
|
|
170
173
|
- **Rig fields.** In Setup, after Bones: `#rig-fields` (#110). The producer config's small fields as patch ops at their own pointers (`src/rig-fields.ts`, `web/rig-fields-panel.ts`): a rigid part's bone (`/regions/<part>`, a select), a lash's blink still row (`/motion/blink/still/<part>`, a dashed line across the part dragged in whole rig px), a stop's inward / outward bounds (`/stops/<i>`, two filled arcs at the pivot around a dashed rest aim, their ends dragged in whole degrees), an inherit mode per bone (`/bones/<i>/inherit`, a chain's `link_inherit`) and `turn`'s pivot and per-part depth (`/turn/pivot`, `/turn/depths/<part>`, sliders). Stage handles live in `#rig-fields-stage` over the rig viewport (tokens `--rv-field-still`, `-inward`, `-inward-line`, `-outward`, `-outward-line`, `-rest`, `-handle-bg`, `-ink`; the stage stays dark, so both blocks carry the same values). The turn dial holds the drawn build's `turn` bone at x through play's `adjust`, composed with the idle preview, and shows `#rig-fields-dial-label` (*preview — Apply decides*); it is never recorded. Apply is the generic runner's whole-rig `rig` op behind the reproduced baseline; the readout quotes `BLINK_NO_HOLE` and `FEET_STAY_LEVEL` before and after, and **Angle range** runs one #108 reading. Adding a stop and `turn.deform` are out of scope.
|
|
171
|
-
- **Cloth.** In Setup, after Cuts: `#cloth-panel` (#111). One form per cloth tag the installed reader accepts (`bottomwear`, `back hair`, `front hair` — its
|
|
174
|
+
- **Cloth.** In Setup, after Cuts: `#cloth-panel` (#111). One form per cloth tag the installed reader accepts (`bottomwear`, `back hair`, `front hair`, `handwear-r`, `handwear-l` — resolved from its `package.json` `exports["./cloth-targets.json"]`, schema `rig-parts/cloth-targets@1`, since `@rig-c/parts` 2.51.0, refused as `CLOTH_TARGETS_INVALID` when malformed or outside the package; when that export key is absent on an older producer, it falls back to the tags the config already declares with `read: false` and refuses adding a new tag as `CLOTH_TARGETS_UNAVAILABLE: the installed rig-parts <version> has no cloth-targets export (needs 2.51.0)`), holding the recipe's fields as the config states them; each change is a patch op at `/cloth/<tag>/…` (`src/cloth-recipe.ts`, `web/cloth-panel.ts`). **Show links** draws, in rig px of the setup pose, every chain the tag's parts are meshed on from the config's `points` and `tip`, and after an Apply the chains of the config the producer wrote (one label per set). Apply runs `rig-parts propose --cloth --write-config` on the declared parts, painting and keypoints, then builds the written config (`build` when the config declares `limbs`, else `rig --config`) and reloads it under the stage's Environment. Review never merges the producer's draft: it reads only the written config, lists where it differs from its input and refuses one that differs outside the drafted sections. Hand-editing the drafted constraints is the physics block's, after the draft.
|
|
172
175
|
- **Mesh edit.** In Setup only, the view bar's **Edit mesh** toggle (`#mesh-edit`, `aria-pressed`) opens `#mesh-editor-bar`: sub-modes Modify / Create / Delete / Edges (keys `V` / `C` / `X` / `E`, one pressed), Undo, Redo, Reset, Download JSON and **Apply · Rebuild** (#135: `rig-parts remesh --delta` through the shared runner, the revision loaded in place, the producer's refusal verbatim; while a delta revision is on the stage Reset returns to the inspected build). A package without the compiled model document refuses `MESH_EDIT_MODEL_UNAVAILABLE` and does not open; whole rig refuses `MESH_EDIT_SELECT_SLOT`; a non-mesh or linked-mesh slot `MESH_EDIT_NO_MESH <slot>`. It edits in setup space (#100): the attachment's stored provenance in the model document (`src/setup-mesh.ts`) and geometry from Play's public `readSetupMesh` (`web/setup-pose.ts`, shared with Weights) and drawn over the paused stage with the stage camera. It records a typed delta (`src/mesh-edit.ts`, `basis: "setup"`, the shape `rig-parts remesh --delta` reads) and previews it over the original triangulation on the overlay; Delete removes only constraint edges the delta added (the triangulation is the producer's); it is not a mesher and never retriangulates, writes the package or runs a producer. The chest editor and mesh edit are exclusive: turning one on turns the other off.
|
|
173
|
-
- **Inspector.** The shared bottom panel sits directly under the main view, with saved height and a resizable separator. Header mode selects its content; its tab row remains reachable when content is collapsed (#741). Setup has Part · Modeling · Chest · Mesh · Weights · Bones · Fields · Cuts · Cloth; Animate has Transport · Sound · Environment · Physics · Idle tracks · Readings · Requirements · Retarget · Report and the existing timeline. The bottom tab row has no
|
|
174
|
-
- **
|
|
176
|
+
- **Inspector.** The shared bottom panel sits directly under the main view, with saved height and a resizable separator. Header mode selects its content; its tab row remains reachable when content is collapsed (#741). Setup has Part · Modeling · Chest · Mesh · Weights · Bones · Fields · Cuts · Cloth; Animate has Transport · Sound · Environment · Physics · Idle tracks · Readings · Requirements · Retarget · Report and the existing timeline. The bottom tab row has no Comments or Question tab (#835, #1041): both live in the communication panel. Live-job act controls sit in `#workspace-act-row` beneath the top bar (#845; standalone package inspection keeps the act bar in the bottom heading). Parts use Part; rig-only blocks are disabled with a missing-rig reason. When no controller block is left (a record or interview job without a picture), the bottom panel collapses to nothing, heading and separator included, and the stage takes the height. `mountRigInspector`, `bindInspectorBlocks` and `mountBottomPanel` reuse the existing blocks and preserve their state. Block navigation does not apply or submit.
|
|
177
|
+
- **Communication panel.** The right panel (`#workspace-communication`, #1041) holds communication with the AI: the pending question (`#workspace-interview-answer`) on top, the record forms (`#job-record-asks`: checkpoint, signoff and plan approval, under **Checkpoint** or **Sign-off**) next, and Comments (`#inspector-feedback`) below, each under a one-line heading, with the comment rows above the provenance block. It is single-column by container query. Its width is the saved `communicationWidth` (280–640 px, default 360) with the shared width separator. It is laid out only while something is pending (a question, a record form or a comment) or after **Comment · C** or a pending ask opens it; otherwise the stage keeps the full width. Opening it never changes the bottom panel's state, and it lays the workspace out at once, before pin capture arms, so a pin placed right after `C` lands on the final stage. Below the stage minimum it becomes a right-side drawer that is non-modal while it holds a question.
|
|
178
|
+
- **Review dialog.** This label is historical for rig feedback: `mountRigInspector` moves its existing source context, comments, frame range, category, typed target, correction request, provenance, strip downloads and warnings into the Comments section of the communication panel (opened from the top **Comment · C** entry, #835, #1041) and removes `#review-dialog`. The decision, submit and save state live in the act bar — in `#workspace-act-row` directly beneath the top bar on live jobs (#845), or in the bottom heading on standalone package screens. Record publications separately reuse existing checkpoint, signoff, reopen and interview forms in a native dialog over this same screen (#754), including an explicitly empty workspace when no picture is supplied. That hosting has shipped; remaining interview-modal work B (#722), record-modal memo-to-Comments work C (#715), and legacy job-window owner-surface removal (#756) have not.
|
|
175
179
|
- **Footer.** Message (truncated, full text as tooltip) on the left; player, effective layout, renderer, layers, idle, remote control and draft state in the middle; the numeric view region (behind **View region**) and the source hash on the right. The View region body is a `position:fixed` popover above the 40px footer, right-aligned, its width and height clamped to the viewport and its content scrolling inside, so the footer's clipping never hides it and opening it never scrolls the page.
|
|
176
180
|
|
|
177
181
|
### Status ownership
|
|
@@ -236,9 +240,9 @@ A future optimization operation sends explicit source-bound selection/bounds to
|
|
|
236
240
|
|
|
237
241
|
Side and bottom panels have pointer and keyboard separators with separator semantics: orientation, the controlled panel, an accessible name and the actual reachable minimum/maximum/current pixels. Arrow keys act only when the separator itself has focus, so text-entry arrows are never intercepted. A drag holds pointer capture; cancel, lost capture, blur, Escape and disposal restore the previous desired size and release it.
|
|
238
242
|
|
|
239
|
-
The allocator measures the layout rectangle minus stage chrome and keeps a 240×180 CSS-pixel stage minimum. It shrinks side panels proportionally toward their own minima; when the width still cannot hold them it turns the left, then the right column, and when the height cannot hold it the Inspector, into a native
|
|
243
|
+
The allocator measures the layout rectangle minus stage chrome and keeps a 240×180 CSS-pixel stage minimum. It shrinks side panels proportionally toward their own minima; when the width still cannot hold them it turns the left, then the right column, and when the height cannot hold it the Inspector, into a native drawer opened from a trigger outside it (modal, except the communication panel while it holds a question). Showing or hiding a region above the stage (the chest editor bar) lays the workspace out before the next frame, so the stage is never drawn under its minimum with a stale allocation (#1035). Effective sizes are computed from desired sizes and never written back; a separator inverts the allocator so a clamped pixel value is not saved as the desktop desire.
|
|
240
244
|
|
|
241
|
-
Browser defaults live in one closed, versioned record: theme, default camera sync, default idle repeat, whether Settings is collapsed (`settingsCollapsed`, default `true`) and the
|
|
245
|
+
Browser defaults live in one closed, versioned record: theme, default camera sync, default idle repeat, whether Settings is collapsed (`settingsCollapsed`, default `true`) and the desired panel sizes. `communicationWidth` was added in #1041: a record saved before it (4.10.0 and earlier) loads with the default width at stamp revision 0. The bottom panel's default height is 240px since #1040 moved the act bar out of its heading; an unstamped earlier default (280, 350, 120 or 262) upgrades to it, and a height the person resized (stamped) is kept. A record saved before `settingsCollapsed` existed carries neither the value nor its stamp and loads as collapsed at stamp revision 0; the schema name is unchanged. The saved `rightWidth` is the Parts explorer's width wherever the page shows it, so the review page's left parts column keeps the width chosen before the move; `leftWidth` is the compare page's sources column. Each field carries a logical stamp, so stale whole-record writes from other tabs converge per field without wall-clock ordering; an equal-stamp disagreement quarantines only that field until an explicit edit repairs it. Denied, unavailable or corrupt storage falls back to in-page defaults. The legacy same-origin appearance key migrates once, only when no new record exists. Reset layout changes geometry only.
|
|
242
246
|
|
|
243
247
|
Content state stays source-bound. Each Inspector section's x/y scroll offset is captured before its panel hides and restored after it shows, after two frames of layout, and again when its content extent changes. Restoring clamps to the current extent without replacing the remembered offset, and intentional user scrolling supersedes a pending restore. Offsets are kept in the source draft's UI state, never in the global record or a copied view link.
|
|
244
248
|
|
|
@@ -315,8 +319,8 @@ beside the act bar. Selecting a mode never applies, approves or submits.
|
|
|
315
319
|
|
|
316
320
|
The standing Review window hosts published subjects on the existing inspection
|
|
317
321
|
screen. Rig and parts use its shared viewport and bottom panel. Record
|
|
318
|
-
checkpoint, signoff and interview asks use existing forms in
|
|
319
|
-
(#754). A record without a picture keeps that absence explicit; it does not
|
|
322
|
+
checkpoint, signoff and interview asks use existing forms in the right
|
|
323
|
+
communication panel (#754, #1041). A record without a picture keeps that absence explicit; it does not
|
|
320
324
|
manufacture a model or package. Remaining B (#722), C (#715), F (#734) and #756
|
|
321
325
|
work is tracked in [the screen specification](https://github.com/rig-c/review/blob/main/docs/SCREENS.md#4-migration-order).
|
|
322
326
|
|
package/docs/PANELS.md
CHANGED
|
@@ -179,7 +179,9 @@ repeating gust (equal to the panel's wind at every frame time; between frames
|
|
|
179
179
|
rigc holds the frame's value, and the panel states how far that can be from the
|
|
180
180
|
live wind) — and sends it with readings and with Apply, whose check then runs
|
|
181
181
|
`rig-parts check --environment`. The wind clock restarts with the clip, so what
|
|
182
|
-
you watch is the world the readings and bars are taken in.
|
|
182
|
+
you watch is the world the readings and bars are taken in.
|
|
183
|
+
A paused seek shows physics replayed from 0 to T under the wind at schedule(T), held constant over the replay, not the varying wind of a real run (#935).
|
|
184
|
+
**Export schedule**
|
|
183
185
|
downloads the same bytes; **Check under this world** runs `rig-parts check
|
|
184
186
|
--environment` on the build on the stage (needs `@rig-c/parts` 1.48.0) and shows
|
|
185
187
|
its `ANIMATIONS_DO_NOT_FOLD` and `TEXTURE_STRETCH` lines beside the same build's
|
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -191,7 +191,7 @@ Every edit card states its edit as one config patch; review applies it to a scra
|
|
|
191
191
|
- **Baseline reach (#148).** When the baseline does not reproduce, `baseline.reach` (`src/baseline-reach.ts`) reads both rig directories and states what each producer op will still take, from the producer's own holds: `{schema:"rig-review-baseline-reach/1", notWriterText[], images[], retuneHeld, remeshRefused[], meshParts[], bonesDiffer, ops:{retune, delta, version}, text}`. `notWriterText`: the inspected `rig.json`, `motion.json` and `mesh_report.json` that are not `JSON.stringify(value, null, 1)` and a closing newline (the writer, parts `rigJsonText`) — remesh and its mesh edit refuse `rig.json` / `mesh_report.json` (`REMESH_INPUT_WRITTEN`), retune `rig.json` / `motion.json` (`RETUNE_INPUT_WRITTEN`). `images`: the images the config draws differently. `retuneHeld`: retune's first held difference in its own order (stops, bones, slots, skeleton, images, invariants but `detached`, each image, motion.json outside `animations.idle`), or null when a physics or idle edit Applies. `remeshRefused`: the meshed parts (`skins.default.<part>.<part>` of type `mesh`) whose attachment, image or report row (or an `auto` row's motion) the config does not reproduce — remesh from a config entry refuses them `REMESH_BASELINE_MISMATCH` and re-fits the rest; `bonesDiffer` refuses every part. A mesh edit (`remesh --delta`) builds no config entry, so the baseline does not hold it. `ops` is the installed producer's: below 1.44.0 a physics or idle edit is whole-rig. `text` is appended to the baseline line (`baseline: not reproduced — <first differing path> · <text>`) and to `EDIT_BASELINE_MISMATCH: <path> — <text>`. It is review's reading of the producer's rules; the producer's line on Apply stays the judgment. For family/roa as committed: `out/rig/rig.json, out/rig/mesh_report.json are not the text rig writes for their values (reformatted, or written by another tool), and an op that splices a revision as text refuses such a file — use the files as rig wrote them, or re-serialise them in a copy of the package exactly as rig writes them (JSON with one space of indent and a closing newline) and open the copy; whole-rig edits refuse (EDIT_BASELINE_MISMATCH); physics and idle edits (retune) refuse out/rig/rig.json (RETUNE_INPUT_WRITTEN), and past that the config draws out/rig/images/topwear.png differently and retune holds every image (RETUNE_REQUEST_HELD); remesh and a mesh edit refuse out/rig/rig.json, out/rig/mesh_report.json (REMESH_INPUT_WRITTEN); past that, remesh: bottomwear, topwear, hair_back, hair_front are refused (REMESH_BASELINE_MISMATCH: …); handwear_r, neck, earring can be re-fit`.
|
|
192
192
|
- **Producer refusal hint (#148).** When the producer refuses with a line review can explain — `REMESH_INPUT_WRITTEN` / `RETUNE_INPUT_WRITTEN` (a file that is not the writer's text) or `RETUNE_REQUEST_HELD: images/<name>` (an image the config draws differently) — the job keeps `producerLine` as printed and adds `hint` (absent otherwise), also pushed to `lines` as `review: <hint>`; the status line reads `<producer line> · review: <hint>`. For `RETUNE_INPUT_WRITTEN` on `rig.json`: `rig.json in the inspected rig is not the text rig writes for its value (reformatted, or written by another tool); retune splices a revision as text, so it refuses the file — use the files as rig wrote them, or re-serialise them in a copy of the package exactly as rig writes them (JSON with one space of indent and a closing newline) and open the copy`.
|
|
193
193
|
- **Build (#115).** A `rig` patch with any op at or under `/assemble` or `/limbs` — or under `/bones` on a config that declares `limbs`, whose joints are their bones' origins — runs `rig-parts build` (op `build`): those sections are read by the producer's assemble stage, which `rig --config --parts` never runs (rig-parts AUTHORING §3, the `assemble.cuts`, `assemble.patches` and `limbs` rows). It needs the handoff's painting and full run (`--source <png> --full <dir> [--head <dir>]`, or the review.json block); without them it refuses before anything runs: `MODELING_INPUT_UNAVAILABLE: source painting and See-through runs — rig-parts build reassembles the parts from the painting (--source) and the runs (--full, --head) before the rig, and the handoff declares none; declare them with …`. It is a whole-rig op behind the reproduced baseline (`EDIT_BASELINE_MISMATCH`). The files assemble reads by the config's own naming (each cut's `under`, each limb segment's `cap`, each alternate's `source`, `full`, `head` and `skeleton`) are resolved against the handoff config's directory, must stay inside the package root (`BUILD_INPUT_OUTSIDE_ROOT`, `BUILD_INPUT_MISSING`) and are hashed into the build id — a named directory outside the declared runs by its contents (every regular file under it, at most 8 levels deep and 4096 files, each held inside the package root, in path order; over the bound refuses `BUILD_INPUT_TOO_LARGE`), a declared run through the handoff record (#185); a patch may not name a new one (`EDIT_PATCH_PATH_HELD` — it may keep, move or drop one the config names). `config.json` is the patched config with those paths and the two above made absolute, then `rig-parts build --config config.json --source <handoff source> --full <handoff full> [--head <handoff head>] --out out --seam-pairs [args]`; the rig spec is `out/rig`, and the shared tail diffs and compiles it (no second check: build's own check ran on the parts it assembled). A stage that refuses leaves no scratch, and its FAIL lines come back verbatim (the stage prefix `[assemble]`, `[rig]`, `[check]` stripped); a build that stopped at check with bars not met is kept, check's FAIL lines beside it. The job adds `assembled: {inputs:{source, full, head, named:[{field, path, sha256|null}]}, refusals[], checkFails[], lines[] (the cut:, limb cut:, limb cap: and uncovered-hole lines), seam[], seamPairs[] (the base set's `seam pair` lines), recomposite:{line, before, after, errorMap:{url, sha256}|null}, parts:{changed[], unchanged, partsJson:{count, paths}}|null}` (`before` is the handoff's `parts.json` recomposite block, `after` the scratch one; `errorMap` serves `out/recomposite_error_rig.png` read-only at `/rebuild/<id>/recomposite/recomposite_error_rig.png`), and `wallMs.op` is the build's own wall clock (assemble → rig → check).
|
|
194
|
-
- **Cloth (#111).** A `rig` patch whose ops all lie under `/cloth` (the Setup · Cloth block: one recipe per tag the installed reader accepts —
|
|
194
|
+
- **Cloth (#111).** A `rig` patch whose ops all lie under `/cloth` (the Setup · Cloth block: one recipe per tag the installed reader accepts — resolved from its `package.json` `exports["./cloth-targets.json"]`, schema `rig-parts/cloth-targets@1`, since `@rig-c/parts` 2.51.0, refused as `CLOTH_TARGETS_INVALID` when malformed or outside the package; when that export key is absent on an older producer, it falls back to the tags the config already declares with `read: false` and refuses adding a new tag as `CLOTH_TARGETS_UNAVAILABLE: the installed rig-parts <version> has no cloth-targets export (needs 2.51.0)` — with the reader's fields) runs op `cloth`; a patch mixing `/cloth` ops with others is refused before anything runs (`CLOTH_PATCH_MIXED`). Refused before anything runs: `CLOTH_KEYPOINTS_UNDECLARED` when the handoff declares no `--keypoints` (without them the draft moves the body bones the config states — Decision 1), `MODELING_PRODUCER_TOO_OLD <found> 1.49.1` (the first `@rig-c/parts` whose `--write-config` splices `bones`, `constraints` and `motion.tracks` entry by entry, parts#552), `MODELING_INPUT_UNAVAILABLE: source painting …` without `--source`, and, as a whole-rig op, `EDIT_BASELINE_MISMATCH`. `cloth.json` is the patched config written as `rig` writes its scratch config, with the assemble-read paths made absolute as for `build`; then `rig-parts propose --parts <handoff parts> --source <handoff source> --keypoints <handoff keypoints> --out propose --cloth cloth.json --write-config config.json` (no `--wrist-snap` or `--grid-rule`: the handoff states neither). Its refusals come back verbatim, every FAIL line in `cloth.refusals` — the reader's `CONFIG_CLOTH_*`, `PROPOSE_CLOTH_DRAFTED` (a recipe that drafts nothing), `PROPOSE_CLOTH_PART`, and the write's `PROPOSE_WRITE_CONFIG_FRESH`, `PROPOSE_WRITE_CONFIG_CONFLICT` (an entry the recipe re-drafts or removes that equals neither the draft with the recipe nor the draft without it, rig-parts AUTHORING *The config written*) and `PROPOSE_WRITE_CONFIG_SPLICE`. Review reads only the written `config.json`, never the producer's draft file: it lists every JSON Pointer at which the written config differs from `cloth.json` and refuses to build one that differs outside the sections propose splices (`bones`, `constraints`, `meshes`, `regions`, `limbs`, `motion/tracks`, `turn`, `proposed_rig_scale`): `CLOTH_WRITTEN_OUTSIDE_DRAFTED`. The written config is then built (Decision 2) as `rig-parts build --config config.json …` exactly as a `build` patch when the config declares `limbs` (the job adds `assembled`), else `rig-parts rig --config config.json --parts <handoff parts> --out rig`, and goes through the shared tail. The id adds `cloth`, the keypoint file's hash and (for the build route) the build inputs' hash. The job adds `cloth: {route:"build"|"rig", inputs:{source, keypoints:{path, sha256}}, refusals[], line (propose's `wrote config.json: …` line), written:{count, paths[≤200], outside[≤200], sections[]}|null, links[] (per tag: its parts and the written config's chains, the link preview), wallMs:{propose, build}}`. `GET /api/rebuild` adds `cloth: {targets, targetsRead, targetsReason, recipes, tags[] (per tag: its parts by See-through tag or by the recipe's `part`/`parts`, and the chains their `meshes.<part>.segments` name with `points` and `tip`), keypoints, route, reason}`.
|
|
195
195
|
- **Run.** Scratch is `<state>/rebuild/<package source hash>/<id>/`, `id = sha256([rig-review-rebuild/1, "patch", source hash, config SHA-256, the patch's canonical bytes, producer@version, compiler@version])` — no clock; the same patch again reuses its build. `rig`: `config.json` there is the patched config written as the producer's own scratch configs are (2-space JSON, every `configFileReferences` path made absolute when it names an existing entry beside the handoff config), then `rig-parts rig --config config.json --parts <handoff parts> --out rig [args]`, or for a retune-routed patch `rig-parts retune --rig <handoff rig> --config config.json --parts <handoff parts> --out rig [args]` (the same config; retune reads the inspected rig and writes only `rig/`, with `retune.json`). `remesh`: `mesh.json` is the patched `meshes.<part>` entry and `rig-parts remesh --rig <handoff rig> --config <handoff config> --parts <handoff parts> --part <part> --mesh mesh.json --out rig [args]` (remesh reads the config as written). Then `rigc build --rig rig/rig.json --motion rig/motion.json --out build --profile rig-play --pack --page-edges … --pack-shape …` (the args' values, else `free` / `polygon`; for remesh, its `remesh.json` request; for retune, its `retune.json` request) and `rig-parts check --rig rig --out check --parts <handoff parts>` with the same pack flags. A producer or compiler refusal is the first named line verbatim and leaves no scratch; a check `FAIL` is check's judgment, kept beside the build.
|
|
196
196
|
- **A retune's check (#139).** A retune-routed Apply does not run `rig-parts check` a second time: retune already gated and checked the revision it wrote (`checkStage` over that revision, the same `--parts` and pack flags review passes), and from `@rig-c/parts` 1.49.0 (`RETUNE_CHECK_SINCE`, parts#541) `retune.json`'s `check.revision` carries `line` — check's own last line, byte for byte — and `status` — every block's status as that tree's `check.json` records it, in the file's order. Review first binds it to the files: every `revision` hash row's file under `rig/` must hash to its row, none missing, and `rig/` holds no file but those rows and `retune.json`; otherwise the Apply is refused `RETUNE_CHECK_STALE: <file> sha256 <in retune.json> … <on disk>; retune's check is not this revision's, so no build is recorded` (`absent` on the side without the file) and leaves no scratch. Bound, the side becomes the same check summary a separate check gives (below): `pass` ← `pass`; `exitCode` ← 0 when it passes, else 1 (check's own exit); `line` ← `line`; `bars` ← every upper-case `status` entry (`gate`, `loop` and `seam` are read off figures and are not check.json bars); `gate` ← `status.gate` is `PASS`; plus `source:"retune"`. The job's `wallMs.check` is `null` and its lines say `review: check not run again — retune.json carries retune's check of this revision, bound to it by N revision hash row(s): <line>`. Check still runs on the revision, as before, when `retune.json` carries no `line` / `status` (an older producer; the line says so — not a refusal) or when the Apply checks under an exported world (#112; retune's check read the default one). Whole-rig `rig`, `build` and cloth keep running check.
|
|
197
197
|
- **A remesh's check (#174).** A `remesh` patch Apply (#106) reads `rig-parts remesh`'s own check of its revision the same way, with one binding shared with retune: `remesh.json`'s `check.revision` (`line` and `status` since `@rig-c/parts` 1.49.0, `REMESH_CHECK_SINCE`; the same parts#541 change) is bound by its `revision` hash rows to the files under `rig/` (none missing, none but those rows and `remesh.json`), else the Apply is refused `REMESH_CHECK_STALE: <file> sha256 <in remesh.json> … <on disk>; remesh's check is not this revision's, so no build is recorded` and leaves no scratch. remesh checked the revision with its request's `page_edges` / `pack_shape` — the flags review's own check reads from `remesh.json` — and the handoff `--parts`; a patch passes no `--requirements`. Bound, the summary is the same mapping as retune's with `source:"remesh"`; `wallMs.check` is `null` and the line says `review: check not run again — remesh.json carries remesh's check of this revision, bound to it by N revision hash row(s): <line>`. An older `remesh.json` or an Apply under an exported world runs check, and the line says why. The designation remesh (#99) and Edit Mesh's `remesh --delta` (#135) run no review check at all (remesh's own gate holds check there), so they are unchanged.
|
|
@@ -1134,12 +1134,13 @@ or establish official Create writer acceptance.
|
|
|
1134
1134
|
- **Daemon-derived source binding.** The original model branch of `JobSourceBinding` requires non-null `sourceHash` (`JobSha256`) and `package` (`id` and `revision`), and requires explicit values or explicit `null` for its typed nullable fields (`projectHash`, `selector` as `draft` / `rig` / `post`, `model`, `direction`, `optionSet`, `appliedResult`, `plan`, `parts`). Original input paths are literal project-relative or package-relative provenance only, and no public field names a Review state directory or stored document. The daemon derives `JobSourceBinding` from validated retained bytes and the actual displayed publication. Clients never provide trusted source hashes or transfer prior approval onto a new binding.
|
|
1135
1135
|
- **Display receipt and UI submission.** `JobDisplayPublication` pins same-origin `routes` (`entry`, `apiBase`, `assetsBase`) to that specific `publicationId` and `instanceKey` without a mutable current alias. All metadata, images, runtime assets, routes and pending form dependencies prepare before the visible swap; paint and the single `displayedNonce` acknowledgment precede retirement of the previous view, and failed preparation or acknowledgment restores the prior view and draft. After `ackDisplayed` validates `JobDisplayAcknowledgment` (`publicationId`, `pageId`, `sourceHash`), it returns `JobDisplayReceipt` containing the page-scoped `displayedNonce` secret (never returned by the agent or consumer API). `JobUISubmission` supplies `publicationId`, `askId`, `pageId`, `displayedNonce`, `expectedGeneration`, `submissionId`, `kind` and `value` (`JobUIActValues`). Neither `authority` nor `source` is accepted from the browser. The daemon derives both from the validated nonce and displayed publication (`JOB_DISPLAY_MISMATCH`, `JOB_ACT_SOURCE_STALE`). Retrying the same `submissionId` returns the same immutable `JobAct`, while a changed payload refuses.
|
|
1136
1136
|
- **Pinned package input recheck.** Each applicable pinned package request rechecks the full package byte binding against the publication, with no stale-response window. A removed or changed bound member, a symlink swap outside the valid package path, or a member recreated with different bytes refuses on the very next applicable request with HTTP 409 `JOB_SOURCE_MISMATCH`. Restoring identical bytes at a valid path resumes successful reads, including when the regular file was recreated.
|
|
1137
|
+
- **Cache policy ([Review #1050](https://github.com/rig-c/review/issues/1050)).** Publication JSON, `api/*` JSON, the event stream, acts and every refusal stay `Cache-Control: no-store`. A sealed snapshot file under a publication's instance route is `private, max-age=31536000, immutable` with its seal SHA-256 as `ETag`: each publish mints a new `publicationId`, so one URL names one content, and the no-store `api/review` read that starts every page load still runs the full package recheck above. The shipped `index.html`, `main.js` and `styles.css` keep one URL across Review installs, so they are `no-cache` with a content `ETag` and revalidate through the job liveness check on every load. In one page load each resource is requested once: `/api/review` once per preparation, and the compiled model once for Play, the part catalog and the physics document together.
|
|
1137
1138
|
- **Old drafts retained and flagged without rebinding.** When a new publication updates or replaces the displayed source, older local drafts remain retained in storage under their original source binding and are flagged without rebinding or transferring onto the new publication.
|
|
1138
1139
|
|
|
1139
1140
|
### Act kinds, plan identity and parts identity
|
|
1140
1141
|
|
|
1141
1142
|
- **Five enabled kinds and two reserved disabled kinds.** `JOB_ENABLED_ACT_KINDS` enables `'interview-picks'`, `'checkpoint'`, `'parts-verdict'`, `'review-verdict'` and `'signoff'`. `JOB_RESERVED_ACT_KINDS` reserves `'described-correction'` and `'mesh-edit'`. Asks and standalone acts of either kind refuse `JOB_ACT_KIND_DISABLED`. `described-correction` awaits the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist. The jointly signed mesh value rides on the rig-review verdict under [Mesh edits on Request changes (act@8)](#mesh-edits-on-request-changes-act8).
|
|
1142
|
-
- **`interview-picks`.** `JobActValues['interview-picks']` carries `questionId`, ordered `selections` (`itemId`, `optionId`, nullable `otherText`) and `note`, with non-null `source.optionSet` (`id` and `sha256`).
|
|
1143
|
+
- **`interview-picks`.** `JobActValues['interview-picks']` carries `questionId`, ordered `selections` (`itemId`, `optionId`, nullable `otherText`) and `note`, with non-null `source.optionSet` (`id` and `sha256`). A record act (`rig-review/act@4`) may add an optional last key `words`, the reviewer's comments as the `projectComments` output, exactly as checkpoint and signoff carry them ([Review #1048](https://github.com/rig-c/review/issues/1048)). It is present only when comments exist, so an act without comments keeps its earlier bytes; it is checked like checkpoint and signoff `words` (a string of at most 10,000 characters) and any other extra key still refuses `JOB_ACT_INVALID`.
|
|
1143
1144
|
- **`checkpoint`.** `JobActValues['checkpoint']` carries `checkpointId`, `planStepId`, `outcome` restricted to `'pass'` or `'fail'` and required `words` as a `string`. `pending` stays in the UI draft only and never produces a finalized act. Only `'pass'` is eligible for Create's checkpoint sign-off writer, whereas `'fail'` is feedback or a named consumer refusal and never an approval write. `words` is preserved verbatim including empty or whitespace-only strings, matching Create's writer without adding a UI gate. In `JobSubject`, `checkpointId` defaults to the Create plan step ID and optional `planStepId` is required when the displayed Review checkpoint ID differs, matching [Create #184](https://github.com/rig-c/create/issues/184) without alias inference or browser trust. The browser supplies `checkpointId`, `outcome` and `words` only (`JobUIActValues['checkpoint']`), the daemon copies resolved `planStepId` from the validated ask and requires `source.plan`, and Create derives execution stage from its authoritative step phase and order without Review stamping a stage.
|
|
1144
1145
|
- **`parts-verdict`.** `JobActValues['parts-verdict']` is `PartsVerdictValue` (`verdict` as `'approved'` or `'changes-requested'`, `issues` as `readonly PartsIssue[]` under `rig-review-parts-comment/2` — empty on `'approved'` and non-empty on `'changes-requested'`, bound to `source.sourceHash`, retained `partIds`, and `source.parts.images` hashes — and `words`), emitted in new finalized `rig-review/act@5` acts (`JobPartsVerdictAct`) and requiring non-null `source.projectHash`, a `draft` selector and `source.parts`. Historical `rig-review/act@2` `parts-verdict` acts remain in the `JobAct` union via `JobLegacyAct` with `value: JobLegacyPartsVerdictValue` (`verdict` as `'pending'`, `'approved'` or `'changes-requested'`, `parts` with `partId`, `part` outcome and note, `mesh` outcome and note with `JobPartOutcome` as `'pending'`, `'clean'` or `'flagged'`, and `words`).
|
|
1145
1146
|
- **`review-verdict`.** The original model branch carries `stage` (`'rig-review'` or `'direction-review'`), `verdict` and `words`, requiring non-null `source.model` with runtime stage, selector and direction consistency checks. A declared `rig-review` ask can also bind a `draft` selector with `source.projectHash` and null `source.direction`. It uses the existing rig screen and still capture, and its finalized act preserves the retained draft publication's source hash, model and selector. A compiled rig's Request changes can carry [chest landmarks (act@9)](#chest-landmarks-on-request-changes-act9).
|
|
@@ -1285,10 +1286,10 @@ A post-interview option set with a `rig` context can also show the accepted rig
|
|
|
1285
1286
|
| `PublishResultV3` | `{kind, path, selector}` (`package`), `{kind, questionId, setId}` or `{kind, questionId, setId, sets}` (`option-set`, `sets` 2–64 `{questionId, setId}` with `sets[0]` equal to the first set), `{kind}` (`plan`) |
|
|
1286
1287
|
| `RecordFreeze` | `{kind: 'producer-held', holdId, record: {path: 'project.json', sha256}}` |
|
|
1287
1288
|
| `RecordSubject` | `{kind: 'interview-picks', questionId, setId}`, `{kind: 'checkpoint', checkpointId}`, `{kind: 'signoff', stage}` (`plan-approved`, `rigging-interview`, `post-interview`, `direction-review`, `interview`), `{kind: 'reopen', stage}` (read only: old records parse, Review neither asks nor renders it) |
|
|
1288
|
-
| `RecordPublishedContext` | Required `['label', 'parts', 'inputs', 'files', 'plan', 'subjects']`, optional `checkpointEvidence` on plans |
|
|
1289
|
+
| `RecordPublishedContext` | Required `['label', 'parts', 'inputs', 'files', 'plan', 'subjects']`, optional `checkpointEvidence` and `planPicture` on plans |
|
|
1289
1290
|
| `RecordPartsIdentity` | `['name', 'version', 'integrity']` |
|
|
1290
|
-
| `RecordSource` | Required `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']`, optional `checkpointEvidence` on plans, optional `optionSets` (`{questionId, setId, optionSet, optionSetFile}` per set) on several-set option-set sources |
|
|
1291
|
-
| `rig-review-job-record-source/1` | Required `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']`, optional `checkpointEvidence` on plans |
|
|
1291
|
+
| `RecordSource` | Required `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']`, optional `checkpointEvidence` and `planPicture` on plans, optional `optionSets` (`{questionId, setId, optionSet, optionSetFile}` per set) on several-set option-set sources |
|
|
1292
|
+
| `rig-review-job-record-source/1` | Required `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']`, optional `checkpointEvidence` then `planPicture` on plans |
|
|
1292
1293
|
| `rig-review-job-record-instance/1` | `['schema', 'fingerprint', 'sourceHash']` |
|
|
1293
1294
|
| `JobCapabilitiesV3` | `{recordPublication: true, recordActSchema: 'rig-review/act@4', askBatch: true, progress: true}` |
|
|
1294
1295
|
| `AskBatchRequestV3` | `{schema, jobId, requestId, verb: 'ask-batch', expectedGeneration, idempotencyKey, publicationId, subjects}`, `subjects` 1–64 |
|
|
@@ -1455,6 +1456,68 @@ require the signed extended contract. Owner-screen integration,
|
|
|
1455
1456
|
EN/KO visual verification and later release serving have their own acceptance
|
|
1456
1457
|
steps.
|
|
1457
1458
|
|
|
1459
|
+
<a id="plan-picture"></a>
|
|
1460
|
+
|
|
1461
|
+
### Optional plan picture
|
|
1462
|
+
|
|
1463
|
+
A record-plan `PlanContext` may declare `planPicture: {path, sha256}`
|
|
1464
|
+
([Review #983](https://github.com/rig-c/review/issues/983)): the picture the owner
|
|
1465
|
+
signs the plan against, such as the latest post render or take the record binds.
|
|
1466
|
+
It has exactly the keys `path` and `sha256`, and must equal an entry already in
|
|
1467
|
+
`files`. The path must name a raster image Review draws, by the package page-image
|
|
1468
|
+
rule: `.png`, `.jpg`, `.jpeg` or `.webp`. Option-set publications refuse it. Any
|
|
1469
|
+
violation refuses `JOB_SOURCE_MISMATCH` with detail `PLAN_PICTURE_INVALID`.
|
|
1470
|
+
|
|
1471
|
+
The retained `RecordSource` carries the same `planPicture`. The
|
|
1472
|
+
`rig-review-job-record-source/1` digest preimage appends it after `files` and any
|
|
1473
|
+
`checkpointEvidence`, so the picture binds `sourceHash` and instance identity. An
|
|
1474
|
+
absent declaration emits and hashes nothing: existing records parse and hash
|
|
1475
|
+
exactly as before. The publication-pinned route `api/plan-picture` streams that
|
|
1476
|
+
one sealed member through the existing sealed reference route, and is 404 for
|
|
1477
|
+
records without it. The owner page checks the bytes against the declared SHA-256
|
|
1478
|
+
before drawing.
|
|
1479
|
+
|
|
1480
|
+
On the record screen a declared `planPicture` ranks first: it is drawn in the main
|
|
1481
|
+
view's reference viewport, and Review neither walks to an earlier picture
|
|
1482
|
+
publication nor draws bound parts. Without it the picture choice is unchanged: the
|
|
1483
|
+
record's own rig, then an earlier picture publication, then bound parts, then a
|
|
1484
|
+
scene-context option set.
|
|
1485
|
+
|
|
1486
|
+
#### Pins on the plan picture
|
|
1487
|
+
|
|
1488
|
+
While the plan picture or a record interview's question image is shown, stage
|
|
1489
|
+
comments pin a point or a region on it through the same pin layer as a rig view,
|
|
1490
|
+
with no new control ([Review #1048](https://github.com/rig-c/review/issues/1048)). The row is an
|
|
1491
|
+
ordinary StageComment-backed Feedback with `viewport: 'reference'`,
|
|
1492
|
+
`camera.space: 'image'` and `world` in the picture's natural pixels, Y down. Its
|
|
1493
|
+
`referenceId` and `referenceHash` name the picture, and their meaning depends on
|
|
1494
|
+
the source that carries the pin:
|
|
1495
|
+
|
|
1496
|
+
- **Record publication:** `referenceId` is the `path` of an entry in that
|
|
1497
|
+
publication's `files`: the declared `planPicture`, or the sealed file of the
|
|
1498
|
+
shown question image (`api/interview` lists it as the image's `path` and
|
|
1499
|
+
`sha256`). `referenceHash` is that entry's sealed `sha256`, copied from the
|
|
1500
|
+
source and never recomputed by the page.
|
|
1501
|
+
- **Rig package:** `referenceId` is the selected bookmark reference, and
|
|
1502
|
+
`referenceHash` is the loader's hash of it, as described under the comment
|
|
1503
|
+
context above. Nothing changes for these marks.
|
|
1504
|
+
|
|
1505
|
+
A record act carries comments only as the scalar `words` projection: checkpoint
|
|
1506
|
+
and signoff in their `words`, interview picks in their optional `words`. A picture
|
|
1507
|
+
pin therefore projects its own label, so the picture and the pixels reach the act:
|
|
1508
|
+
|
|
1509
|
+
`["rig-review-comment/1", mode, "reference", referenceId, referenceHash, x, y, w, h]`
|
|
1510
|
+
|
|
1511
|
+
Here `x`, `y`, `w` and `h` are `world` rounded to integers in natural pixels, Y
|
|
1512
|
+
down, and a point has `w` and `h` of 0. Only a pin that names one of the record's sealed
|
|
1513
|
+
pictures (the plan picture or a question image) takes this label. Rig, package and every other label keep their
|
|
1514
|
+
existing tuple byte for byte. A pin that names the picture's path with a
|
|
1515
|
+
different `sha256`, or whose label does not parse back to that path and hash,
|
|
1516
|
+
refuses `COMMENT_PICTURE_LABEL_INVALID`, both when projected and when a local
|
|
1517
|
+
draft is restored. New picture bytes give the record a new `sourceHash`, so an
|
|
1518
|
+
unsent pin is not carried to the new publication; the existing "source changed …
|
|
1519
|
+
could not be carried over" notice reports it.
|
|
1520
|
+
|
|
1458
1521
|
### Sealed plan step text
|
|
1459
1522
|
|
|
1460
1523
|
Both publication-pinned `api/review` responses append delivery-only `planText`
|
|
@@ -1462,15 +1525,24 @@ when the accepted source has a plan. The daemon authenticates `project.json`
|
|
|
1462
1525
|
from that publication's retained snapshot against its record seal and existing
|
|
1463
1526
|
`projectHash`, then projects `does`, `produces`, `bar` and `rests_on`.
|
|
1464
1527
|
|
|
1465
|
-
The projected envelope has ordered keys `schema`, `record`, `status`, `steps
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
`
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1528
|
+
The projected envelope has ordered keys `schema`, `record`, `status`, `steps`,
|
|
1529
|
+
and the additive optional key `questions` (present when at least one qualifying
|
|
1530
|
+
interview item exists). `schema` remains `rig-review/job-plan-text@1`, `record`
|
|
1531
|
+
is `{path:"project.json",sha256}`, and `status` is `projected`. Rows follow the
|
|
1532
|
+
accepted plan's exact id/hash order. Each row has `id`, `hash`, optional `does`,
|
|
1533
|
+
`produces`, `bar`, `rests_on`, then `issues`. Each field supplies exactly one
|
|
1534
|
+
value or an ordered `{field,reason:"absent"|"invalid"|"limit"}` issue. Scalar
|
|
1535
|
+
values are strings and `rests_on` is an ordered string array. Empty
|
|
1536
|
+
strings/arrays, whitespace, line endings, Unicode form, duplicate references and
|
|
1537
|
+
array order are preserved. When present, `questions` is an `id` → `text` string
|
|
1538
|
+
map collected from `interview.framing`, `interview.waypoints` and
|
|
1539
|
+
`interview.post.items` in that order (first entry wins per id), keeping only
|
|
1540
|
+
items whose `text` is a string and whose `id` is a non-empty string up to 128
|
|
1541
|
+
characters matching `/^[A-Za-z0-9][A-Za-z0-9._-]*$/` as the parser enforces. The
|
|
1542
|
+
UI uses `questions` only for `rests_on` entries that match no plan step,
|
|
1543
|
+
displaying the question's `text` with its `id` in `title` while step ids still
|
|
1544
|
+
resolve to their step and unmatched ids stay raw. Producer extras stay outside
|
|
1545
|
+
this display projection.
|
|
1474
1546
|
|
|
1475
1547
|
D1 matches only accepted ids, preserving source order and existing checkpoint
|
|
1476
1548
|
aliases (`planStepId ?? checkpointId`). D2 retains its existing whole-plan
|
|
@@ -1478,7 +1550,8 @@ count/ordered-id admission checks. Hashes are the producer's opaque accepted
|
|
|
1478
1550
|
identities. The existing reader retains responsibility for their semantic value.
|
|
1479
1551
|
|
|
1480
1552
|
The unavailable envelope has `schema`, `record` (or null),
|
|
1481
|
-
`status:"unavailable"`, `reason
|
|
1553
|
+
`status:"unavailable"`, `reason`; `questions` is never present on the
|
|
1554
|
+
unavailable envelope. Named reasons are
|
|
1482
1555
|
`PLAN_TEXT_RECORD_UNAVAILABLE`, `PLAN_TEXT_RECORD_UNSUPPORTED`,
|
|
1483
1556
|
`PLAN_TEXT_STEPS_ABSENT`, `PLAN_TEXT_STEPS_INVALID`,
|
|
1484
1557
|
`PLAN_TEXT_MAPPING_UNAVAILABLE` and `PLAN_TEXT_LIMIT`. The UI shows the named
|
|
@@ -1487,7 +1560,8 @@ their missing/invalid field labels. Existing act authority and historical
|
|
|
1487
1560
|
metadata omission retain their fallback behavior.
|
|
1488
1561
|
|
|
1489
1562
|
The server retains its 8 MiB project read bound. Display limits are 4,096 plan
|
|
1490
|
-
steps, 4,096 `rests_on` entries and 512 KiB UTF-8 for `planText
|
|
1563
|
+
steps, 4,096 `rests_on` entries and 512 KiB UTF-8 for the entire `planText`
|
|
1564
|
+
envelope (including `questions`). Whole owner
|
|
1491
1565
|
metadata retains its 2 MiB bound. A small unavailable envelope replaces an
|
|
1492
1566
|
oversized projection. If that envelope also exceeds the response budget, the
|
|
1493
1567
|
server returns `JOB_BODY_LIMIT` with `PLAN_TEXT_LIMIT`. Values remain complete
|
|
@@ -1646,6 +1720,7 @@ labels are `JSON.stringify` of these logical target tuples:
|
|
|
1646
1720
|
| Parts | `[schema, parts.map(part => part.name), view.mode]` |
|
|
1647
1721
|
| Image | `[name]` |
|
|
1648
1722
|
| StageComment-backed Feedback | `[mark.schema, mark.mode, mark.viewport, target.kind, target.name, frameStart, frameEnd]` |
|
|
1723
|
+
| StageComment-backed Feedback on a record's plan picture | `[mark.schema, mark.mode, "reference", referenceId, referenceHash, x, y, w, h]` ([pins on the plan picture](#pins-on-the-plan-picture)) |
|
|
1649
1724
|
| Other Feedback | `[target.kind, target.name, frameStart, frameEnd, side ?? null]` |
|
|
1650
1725
|
|
|
1651
1726
|
Capture IDs, hashes and crop bytes stay in the raw anchor and do not enter the
|
package/docs/STABILITY.md
CHANGED
|
@@ -872,6 +872,44 @@ while `subjects`, `optionSets` and `sourceHash` stay the publication's; an act
|
|
|
872
872
|
whose per-act fields disagree refuses `JOB_ACT_INVALID` by name. One set's act
|
|
873
873
|
bytes are unchanged. No runtime or type export is added. See the [option-set contract](REVIEW_PACKAGE.md#option-sets).
|
|
874
874
|
|
|
875
|
+
## Record plan picture
|
|
876
|
+
|
|
877
|
+
A record-plan publication context and its retained source may carry an optional
|
|
878
|
+
`planPicture: {path, sha256}` ([Review #983](https://github.com/rig-c/review/issues/983)):
|
|
879
|
+
one raster member of `files` that the record screen draws first. It is refused
|
|
880
|
+
on option sets and appended to the record digest only when present, so existing
|
|
881
|
+
sources keep their bytes and `sourceHash`. `PlanContext` and `PlanSource` gain the
|
|
882
|
+
optional field; no runtime export or error code is added. See the
|
|
883
|
+
[plan picture contract](REVIEW_PACKAGE.md#plan-picture).
|
|
884
|
+
|
|
885
|
+
A pin on the shown plan picture reuses `referenceId` and `referenceHash`
|
|
886
|
+
([Review #1048](https://github.com/rig-c/review/issues/1048)). In a record
|
|
887
|
+
publication `referenceId` is the path of an entry of that publication's `files`
|
|
888
|
+
and `referenceHash` is that entry's sealed sha256. In a rig package `referenceId`
|
|
889
|
+
stays the selected bookmark reference. `projectComments` gains an optional second
|
|
890
|
+
argument, the record's sealed pictures; with it, such a pin projects the label
|
|
891
|
+
`["rig-review-comment/1", mode, "reference", referenceId, referenceHash, x, y, w, h]`
|
|
892
|
+
with integer natural-pixel coordinates. Without the argument, and for every other
|
|
893
|
+
mark, labels are byte-identical to before. A label that does not parse back refuses
|
|
894
|
+
`COMMENT_PICTURE_LABEL_INVALID`. No act field or schema changes. See
|
|
895
|
+
[pins on the plan picture](REVIEW_PACKAGE.md#pins-on-the-plan-picture).
|
|
896
|
+
|
|
897
|
+
## Record interview comments
|
|
898
|
+
|
|
899
|
+
A record `interview-picks` act (`rig-review/act@4`) may carry an optional, additive
|
|
900
|
+
`value.words` ([Review #1048](https://github.com/rig-c/review/issues/1048)): the
|
|
901
|
+
reviewer's general and pinned comments as the `projectComments` output, the same
|
|
902
|
+
projection checkpoint and signoff carry. It is the last key and present only when
|
|
903
|
+
comments exist, so an act without comments keeps its bytes. `parseRecordAct`
|
|
904
|
+
accepts it with the checkpoint and signoff `words` check and still refuses any
|
|
905
|
+
other extra key. A pin on a sealed question image takes the same label as a plan
|
|
906
|
+
picture pin, and `api/interview` adds the image's sealed `path` and `sha256` on
|
|
907
|
+
record publications. The schema stays `rig-review/act@4`: Create decodes record
|
|
908
|
+
acts through this package's own `parseRecordAct`, so the producer and the parser
|
|
909
|
+
move together, an older parser refuses a commented act by name and drops nothing,
|
|
910
|
+
and acts without comments are unchanged. `JobActValues['interview-picks']` gains
|
|
911
|
+
the optional `words`; no runtime export or error code is added.
|
|
912
|
+
|
|
875
913
|
## Package manifest `frames` declaration
|
|
876
914
|
|
|
877
915
|
`rig-review/1` manifests accept an optional `frames` field beside `model`: a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rig-c/review",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local human rig inspection and structured feedback export",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"pngjs": "7.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rig-c/parts": "2.
|
|
29
|
+
"@rig-c/parts": "2.51.0",
|
|
30
30
|
"@types/bun": "^1.3.0",
|
|
31
31
|
"typescript": "^5.9.3"
|
|
32
32
|
},
|
package/src/cloth-recipe.ts
CHANGED
|
@@ -31,15 +31,35 @@ export function clothPatchKind(ops: readonly Pick<PatchOp, 'path'>[]): 'cloth' |
|
|
|
31
31
|
return n === 0 ? 'none' : n === ops.length ? 'cloth' : 'mixed';
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/** The producer package's typed export key for its cloth target list (#954, paired with rig-c/parts#1433). */
|
|
35
|
+
export const CLOTH_TARGETS_EXPORT = './cloth-targets.json';
|
|
36
|
+
/** The first `@rig-c/parts` release exporting `./cloth-targets.json` (rig-c/parts#1433). */
|
|
37
|
+
export const CLOTH_TARGETS_SINCE = '2.51.0';
|
|
38
|
+
/** The schema of `@rig-c/parts`' `./cloth-targets.json` export. */
|
|
39
|
+
export const CLOTH_TARGETS_SCHEMA = 'rig-parts/cloth-targets@1';
|
|
40
|
+
export const CLOTH_TARGETS_INVALID = 'CLOTH_TARGETS_INVALID';
|
|
41
|
+
export const CLOTH_TARGETS_UNAVAILABLE = 'CLOTH_TARGETS_UNAVAILABLE';
|
|
42
|
+
export const clothTargetsUnavailable = (version: string) => `${CLOTH_TARGETS_UNAVAILABLE}: the installed rig-parts ${version || 'unknown'} has no cloth-targets export (needs ${CLOTH_TARGETS_SINCE})`;
|
|
43
|
+
|
|
44
|
+
export class ClothTargetsError extends Error { constructor(detail: string) { super(`${CLOTH_TARGETS_INVALID}: ${detail}`); } }
|
|
45
|
+
|
|
46
|
+
/** The tags the config's own `cloth` block already declares. */
|
|
47
|
+
export function configClothTags(config: unknown): string[] {
|
|
48
|
+
const cloth = isObject(config) ? config.cloth : undefined;
|
|
49
|
+
return isObject(cloth) ? Object.keys(cloth).filter(k => k !== 'note' && !k.endsWith('_note') && !k.startsWith('x-')) : [];
|
|
50
|
+
}
|
|
51
|
+
|
|
34
52
|
/**
|
|
35
|
-
* The tags the installed reader accepts,
|
|
36
|
-
* when the text does not state them in that form.
|
|
53
|
+
* The tags the installed reader accepts, validated from its `./cloth-targets.json` export (`rig-parts/cloth-targets@1`).
|
|
37
54
|
*/
|
|
38
|
-
export function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
export function parseClothTargets(value: unknown): string[] {
|
|
56
|
+
if (!isObject(value) || value.schema !== CLOTH_TARGETS_SCHEMA || Object.keys(value).some(k => k !== 'schema' && k !== 'targets')) {
|
|
57
|
+
throw new ClothTargetsError(`expected {"schema":${JSON.stringify(CLOTH_TARGETS_SCHEMA)},"targets":[…]}`);
|
|
58
|
+
}
|
|
59
|
+
if (!Array.isArray(value.targets) || !value.targets.length) throw new ClothTargetsError('targets must be a non-empty array of strings');
|
|
60
|
+
const tags = value.targets.map(t => { if (typeof t !== 'string' || !t.trim()) throw new ClothTargetsError('targets must contain non-empty strings'); return t; });
|
|
61
|
+
if (new Set(tags).size !== tags.length) throw new ClothTargetsError('targets must be distinct');
|
|
62
|
+
return tags;
|
|
43
63
|
}
|
|
44
64
|
|
|
45
65
|
/** One recipe field the form edits: its pointer below `/cloth/<tag>` and how it is typed. The producer judges every value. */
|
package/src/job-act.ts
CHANGED
|
@@ -372,7 +372,7 @@ export function prepareJobRecordAct(options: {
|
|
|
372
372
|
switch (askSubject.kind) {
|
|
373
373
|
case 'interview-picks': {
|
|
374
374
|
if (boundSource.subject !== 'option-set') throw new JobError('JOB_ACT_SOURCE_STALE');
|
|
375
|
-
const value = actObject(submission.value, ['questionId', 'selections', 'note']);
|
|
375
|
+
const value = actObject(submission.value, ['questionId', 'selections', 'note', 'words']);
|
|
376
376
|
if (
|
|
377
377
|
!('questionId' in value) ||
|
|
378
378
|
!('selections' in value) ||
|
|
@@ -401,6 +401,8 @@ export function prepareJobRecordAct(options: {
|
|
|
401
401
|
};
|
|
402
402
|
});
|
|
403
403
|
const note = words(value.note);
|
|
404
|
+
// #1048: comments ride the optional `words`; with none the act keeps its pre-#1048 bytes (no key).
|
|
405
|
+
const comments = 'words' in value ? words(value.words) : '';
|
|
404
406
|
try {
|
|
405
407
|
validatePicks(
|
|
406
408
|
{
|
|
@@ -425,7 +427,7 @@ export function prepareJobRecordAct(options: {
|
|
|
425
427
|
kind: 'interview-picks',
|
|
426
428
|
// #1004: the act's singular set fields name this ask's set.
|
|
427
429
|
source: recordActSource(boundSource, askSubject),
|
|
428
|
-
value: { questionId: askSubject.questionId, selections, note },
|
|
430
|
+
value: { questionId: askSubject.questionId, selections, note, ...(comments ? { words: comments } : {}) },
|
|
429
431
|
});
|
|
430
432
|
}
|
|
431
433
|
case 'checkpoint': {
|