@rig-c/review 4.9.1 → 4.10.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 +4 -4
- package/docs/REVIEW_PACKAGE.md +90 -16
- package/docs/STABILITY.md +100 -3
- package/package.json +2 -2
- package/src/chest-landmarks.ts +9 -4
- package/src/compare-html.ts +1 -1
- package/src/feedback-export.ts +2 -2
- package/src/feedback-validation.ts +11 -6
- package/src/frame-clock.ts +20 -4
- package/src/job-act.ts +60 -71
- package/src/job-api.ts +286 -40
- package/src/job-cli.ts +3 -2
- package/src/job-contract.ts +92 -5
- package/src/job-front.ts +19 -8
- package/src/job-host.ts +7 -1
- package/src/job-session.ts +136 -26
- package/src/job-source.ts +109 -14
- package/src/job-store.ts +7 -4
- package/src/manifest.ts +59 -7
- package/src/session.ts +9 -4
- package/src/stage-comment.ts +2 -1
- package/web/catalog-en.ts +26 -6
- package/web/catalog-ko.ts +49 -29
- package/web/chest-editor.ts +236 -31
- package/web/compare.css +2 -2
- package/web/i18n.ts +1 -3
- package/web/inspection-persistence.ts +19 -6
- package/web/interview-panel.ts +13 -80
- package/web/job-rig-screen.ts +59 -33
- package/web/job-session.ts +175 -40
- package/web/label-placement.ts +25 -8
- package/web/main.ts +314 -89
- package/web/part-selection.ts +2 -1
- package/web/parts-viewport-provider.ts +19 -6
- package/web/rebuild-client.ts +2 -4
- package/web/rig-host.ts +5 -4
- package/web/rig-overlays.ts +3 -2
- package/web/rig-viewport-provider.ts +6 -1
- package/web/stage-comments.ts +22 -21
- package/web/styles.css +21 -49
- package/web/workspace-layout.ts +4 -4
- package/web/workspace-ui.ts +5 -3
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; the resizable bottom panel shows the current mode's blocks
|
|
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 bottom Comments panel and pin capture without a bottom Comments tab (#835), and live-job act controls sit in the shared act row (`#workspace-act-row`) directly beneath the top bar (#845; standalone package inspection keeps the act bar in the bottom heading). 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
|
|
|
@@ -170,8 +170,8 @@ The single review page is one inspection workspace: a left column, the stage, th
|
|
|
170
170
|
- **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
171
|
- **Cloth.** In Setup, after Cuts: `#cloth-panel` (#111). One form per cloth tag the installed reader accepts (`bottomwear`, `back hair`, `front hair` — its own `CLOTH_TARGETS`), 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
172
|
- **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. 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.
|
|
174
|
-
- **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 **Comments (n)** and removes `#review-dialog`. The decision, submit and save state live in the act bar. 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.
|
|
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 visible **Comments (n)** tab (#835): the top **Comment · C** button and `C` shortcut reveal the bottom Comments panel and start pin capture when supported, while 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 and the Comments panel; rig-only blocks are disabled with a missing-rig reason. `mountRigInspector`, `bindInspectorBlocks` and `mountBottomPanel` reuse the existing blocks, preserve their state and keep one programmatic Comments selection/panel across modes. Block navigation does not apply or submit.
|
|
174
|
+
- **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 bottom Comments panel (opened from the top **Comment · C** entry rather than a bottom **Comments (n)** tab, #835) 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
175
|
- **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
176
|
|
|
177
177
|
### Status ownership
|
|
@@ -315,7 +315,7 @@ beside the act bar. Selecting a mode never applies, approves or submits.
|
|
|
315
315
|
|
|
316
316
|
The standing Review window hosts published subjects on the existing inspection
|
|
317
317
|
screen. Rig and parts use its shared viewport and bottom panel. Record
|
|
318
|
-
checkpoint, signoff
|
|
318
|
+
checkpoint, signoff and interview asks use existing forms in a dialog
|
|
319
319
|
(#754). A record without a picture keeps that absence explicit; it does not
|
|
320
320
|
manufacture a model or package. Remaining B (#722), C (#715), F (#734) and #756
|
|
321
321
|
work is tracked in [the screen specification](https://github.com/rig-c/review/blob/main/docs/SCREENS.md#4-migration-order).
|
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -37,9 +37,9 @@ The illustrative `look` animation in `axes` must also be declared in `animations
|
|
|
37
37
|
|
|
38
38
|
## Files and references
|
|
39
39
|
|
|
40
|
-
Every path is a literal relative path, including `model`, optional `direction`, `scene` and `sets`, optional read-only `motion`, each reference `path`, authoring `path`, clip `path`, and every page name in the compiled model. Manifest paths accept no absolute paths, URL schemes, colon, percent encoding, traversal, backslash, query, fragment, empty segment, or symlink escape. Compiled-model page names are resolved relative to the model directory: a page such as `../parts/page.png` is accepted only when its normalized destination remains inside the review package. This permits portable local builds without letting a page escape the package. All declared files must exist as regular files. The asset endpoint serves only declared files, the manifest, and compiled-model page images. There is no arbitrary directory endpoint. Keep a package focused on the files intended for inspection.
|
|
40
|
+
Every path is a literal relative path, including `model`, optional `frames`, `direction`, `scene` and `sets`, optional read-only `motion`, each reference `path`, authoring `path`, clip `path`, and every page name in the compiled model. Manifest paths accept no absolute paths, URL schemes, colon, percent encoding, traversal, backslash, query, fragment, empty segment, or symlink escape. Compiled-model page names are resolved relative to the model directory: a page such as `../parts/page.png` is accepted only when its normalized destination remains inside the review package. This permits portable local builds without letting a page escape the package. All declared files must exist as regular files. The asset endpoint serves only declared files, the manifest, and compiled-model page images. There is no arbitrary directory endpoint. Keep a package focused on the files intended for inspection.
|
|
41
41
|
|
|
42
|
-
`model` is optional and must point to `rigc-compiled/3` under a filename ending `.model.json`, produced by an upstream gated rigc build. Review uses the public `@rig-c/play` loader and player; Spine JSON/skel is not its input. Its pages are resolved relative to the model document. Missing model means unavailable playback, never a mock playback success. The optional `sets` path declares an attachment-set sidecar for single-package playback. Without that declaration, attachment presets are unavailable. See [Direction inspection](#direction-inspection).
|
|
42
|
+
`model` is optional and must point to `rigc-compiled/3` under a filename ending `.model.json`, produced by an upstream gated rigc build. Review uses the public `@rig-c/play` loader and player; Spine JSON/skel is not its input. Its pages are resolved relative to the model document. Missing model means unavailable playback, never a mock playback success. The optional `frames` path declares a producer `rigc-frames/1` record inside the package, read, validated and hashed only when present, added to `files`, and exposed on the loaded package as `frames: {path, sha256, sets: [{animation, fps, written, stride, duration}]} | null` (`null` when omitted, leaving older manifests unchanged); a missing declared file, unreadable JSON, non-`rigc-frames/1` `spec`, malformed set field (`sets[].animation`, `fps`, `written`, `stride`, `duration`) or duplicate animation set refuses by name (`FRAMES_MISSING`, `FRAMES_JSON`, `FRAMES_SPEC`, `FRAMES_FIELD`, `FRAMES_DUPLICATE_ANIMATION`), never falling back silently. With a compiled model, each set must be the producer's schedule for the model animation it names, as measured from `@rig-c/core` 3.8.0 `rigc render`: an animation of duration `D` samples to `round(D * fps) + 1` frames, frame `i` at `i / fps`, and `duration` is the last sample's time, not the clip length (a 0.8 s clip at 12 fps gives 11 frames and `duration` 0.8333). So `written` must equal `floor(round(D * fps) / stride) + 1` and `duration` must lie within `1e-9` s of `round(D * fps) / fps`, or the package refuses by name, naming the animation and both figures (`FRAMES_ANIMATION_UNKNOWN`, `FRAMES_COUNT_MISMATCH`, `FRAMES_DURATION_MISMATCH`); an accepted set is that animation's comment frame clock, `written` frames with frame `i` at `i * stride / fps`, unless the report's clock names the animation ([Stability: frames declaration](STABILITY.md#package-manifest-frames-declaration)). The optional `sets` path declares an attachment-set sidecar for single-package playback. Without that declaration, attachment presets are unavailable. See [Direction inspection](#direction-inspection).
|
|
43
43
|
|
|
44
44
|
Reference `type` is `image`, `video`, or `pose`. `width` and `height` optionally state image pixel dimensions. The primary animated pose input is the canonical `rig-pose-sequence/1` format documented by `@rig-c/pose`, consumed directly:
|
|
45
45
|
|
|
@@ -96,7 +96,7 @@ Audio clips contain `id`, local `path` and optional `label`. Cues require `id`,
|
|
|
96
96
|
|
|
97
97
|
New feedback requires safe integer frame indices and actual target membership. Unknown names are refused by name, such as `feedback.target.name: slot "no_such_slot" not in model`. Missing model metadata produces a named validation-unavailable refusal for bone/slot feedback. Rig feedback names the exact package id. Scan joints and point expressions are not guessed into model targets.
|
|
98
98
|
|
|
99
|
-
For a matching report/actual model animation with an explicit bounded clock, `frameEnd` cannot exceed the last declared sample at or before that model clip's end. A clip with no declared sample inside its duration has no valid feedback frames. A different animation cannot borrow the report clock; its frame bound stays unknown. Source-only explicit report clocks remain usable without inventing model animation identity. No duration/frame-count ratio or video FPS supplies a limit; unknown clocks permit manual safe integer intervals.
|
|
99
|
+
For a matching report/actual model animation with an explicit bounded clock, `frameEnd` cannot exceed the last declared sample at or before that model clip's end. A clip with no declared sample inside its duration has no valid feedback frames. A different animation cannot borrow the report clock; its frame bound stays unknown unless the declared `frames` record has a set for it, which bounds it the same way. Source-only explicit report clocks remain usable without inventing model animation identity. No duration/frame-count ratio or video FPS supplies a limit; unknown clocks permit manual safe integer intervals.
|
|
100
100
|
|
|
101
101
|
The server derives `context.interval:{frameStart,frameEnd,inclusive:true}` from the chosen top-level annotation. Contradictory supplied interval data is refused; optional inspection `time` and `frame` remain separate and do not replace it. Compare uses the selected side's catalog and the CLI's exact animation; a row cannot borrow another side's names or bypass the animation binding.
|
|
102
102
|
|
|
@@ -286,7 +286,7 @@ Edit Mesh's **Download JSON** (#80, setup space since #100) saves two files; nei
|
|
|
286
286
|
|
|
287
287
|
`mesh-edit.binding.json` (`rig-review-mesh-edit-binding/1`) binds the delta: `file {name, sha256}`, the package source hash, the model and motion SHA-256, `attachment {slot, skin, name, sha256}` (the same `hash`), `exportedAt`, the viewer and runtime versions, `mapping` (the crop mapping's basis) and an evidence note. Apply · Rebuild (#135) sends the same document as `{part, delta, configHash}` (bounded to 64 KiB, same-origin); the server writes it with the download's bytes and runs `rig-parts remesh --delta mesh-edit.json --part <part>` over the handoff rig (`@rig-c/parts` 1.43.0 or later, else `MODELING_PRODUCER_TOO_OLD <found> 1.43.0`). The producer computes `source.hash` from its own rigc build of the input and refuses a mismatch (`REMESH_DELTA_SOURCE`), a non-setup basis (`REMESH_DELTA_BASIS`) and an op that does not replay (`REMESH_DELTA_OP`); each line is shown verbatim. A built revision's `context.applied` is `rig-review-applied/3`: `{schema, buildId, part, delta, deltaSha256, configHash, producer, compiler, line, op: "remesh", files, mesh?, modelHash}`. `deltaSha256` is the SHA-256 of the bytes written, which equal the download's `mesh-edit.json`.
|
|
288
288
|
|
|
289
|
-
The live-job handoff uses [Mesh edits on Request changes (act@8)](#mesh-edits-on-request-changes-act8). Standalone `--delta` and its download format remain available for legacy callers.
|
|
289
|
+
The live-job handoff uses [Mesh edits on Request changes (act@8)](#mesh-edits-on-request-changes-act8) and [Chest landmarks on Request changes (act@9)](#chest-landmarks-on-request-changes-act9). Standalone `--delta` and its download format remain available for legacy callers.
|
|
290
290
|
|
|
291
291
|
## Historical feedback retrieval
|
|
292
292
|
|
|
@@ -1122,7 +1122,7 @@ or establish official Create writer acceptance.
|
|
|
1122
1122
|
|
|
1123
1123
|
### Publication, producer-held freeze and generation CAS
|
|
1124
1124
|
|
|
1125
|
-
- **Mutating requests and CAS.** Agent mutations (`publish`, `ask`, `close` in `JobMutation`) require `expectedGeneration` (a nonnegative safe integer) and `idempotencyKey` alongside `schema` (`rig-review/job-api@2`), `jobId` and `requestId`. Stale generations refuse with `JOB_GENERATION_STALE` and conflicting idempotency payloads refuse with `JOB_IDEMPOTENCY_CONFLICT`. When `handleJobApi` (`POST /jobs/<jobId>/api`) catches a thrown refusal, the failure envelope `generation: number` reports `session.lastObservedGeneration`, which is the last durable generation this session observed successfully in storage and is carried in memory without rereading failing storage inside `catch`. That value reports the last observed session generation while preserving the original named refusal code and message (such as `JOB_STORAGE_FAILED` when SQLite files are removed or replaced) and keeping the numeric `generation: number` response type unchanged. A failed session constructor exposes no API ports when its initial storage read fails. Success responses continue to report current `session.status().generation`.
|
|
1125
|
+
- **Mutating requests and CAS.** Agent mutations (`publish`, `ask`, `close` in `JobMutation`) require `expectedGeneration` (a nonnegative safe integer) and `idempotencyKey` alongside `schema` (`rig-review/job-api@2`), `jobId` and `requestId`. Stale generations refuse with `JOB_GENERATION_STALE` and conflicting idempotency payloads refuse with `JOB_IDEMPOTENCY_CONFLICT`. A repeated `idempotencyKey` with the same payload returns the stored result only while that result is still true ([Review #1022](https://github.com/rig-c/review/issues/1022)): a replayed `publish` whose publication is no longer the head refuses `JOB_ACT_SOURCE_STALE`, and a replayed `ask` whose ask is no longer pending and has no finalized act refuses `JOB_ASK_SUPERSEDED` (`JOB_CLOSED` once the job is closed). Each refusal message names the replayed identity and the current head (`publication <id> is superseded; head <id>`, `ask <id> is superseded; head <id>`). A replay of a still-head publication, a still-pending ask or an ask whose act was finalized returns its stored result unchanged, and a `close` replay is unchanged. When `handleJobApi` (`POST /jobs/<jobId>/api`) catches a thrown refusal, the failure envelope `generation: number` reports `session.lastObservedGeneration`, which is the last durable generation this session observed successfully in storage and is carried in memory without rereading failing storage inside `catch`. That value reports the last observed session generation while preserving the original named refusal code and message (such as `JOB_STORAGE_FAILED` when SQLite files are removed or replaced) and keeping the numeric `generation: number` response type unchanged. A failed session constructor exposes no API ports when its initial storage read fails. Success responses continue to report current `session.status().generation`.
|
|
1126
1126
|
- **Explicit producer-held freeze.** `JobPublishRequest` designates a root-relative `result` (`path` and nullable `selector`, never a command) and requires `freeze` with `kind` set to `'producer-held'`, `holdId` and `record` (`JobFileIdentity` for the exact record used for selection, or `null` for a declared non-Create root) held until acknowledgment. Review validates retained bytes, detects a moved or incomplete record (`JOB_FREEZE_REQUIRED`, `JOB_RECORD_INCOMPLETE`, `JOB_RECORD_MOVED`, `JOB_SOURCE_MISMATCH`, `JOB_SOURCE_UNRETAINABLE`, `JOB_ROOT_REPLACED`) and commits local CAS. The freeze assertion is a caller obligation on the publishing producer or agent, not a lock Review can impose on independent writers.
|
|
1127
1127
|
- **Managed-state privacy boundary.** Managed state stays behind the host ports. The canonical work root and configured managed-state directory must be disjoint. A root equal to, inside or containing that state directory refuses `JOB_SOURCE_UNRETAINABLE` before job admission, including directory aliases resolved through symlink ancestors. Existing root identity failures, including a directly symlinked source root, retain `JOB_ROOT_REPLACED`. Trusted publication handles follow the origin job's lifetime, and publishing callers must maintain their producer-held freeze.
|
|
1128
1128
|
- **Explicit close lifecycle.** Review offers no watched-root or automatic-close guarantee. Only an explicit `close` request (`JobCloseRequest` with `reason`) ends an active job (`status` transitions from `'active'` to `'closed'`, and subsequent mutations or fetches refuse with `JOB_CLOSED`).
|
|
@@ -1142,7 +1142,7 @@ or establish official Create writer acceptance.
|
|
|
1142
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
1143
|
- **`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
1144
|
- **`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
|
-
- **`review-verdict`.** The original model branch carries `stage` (`'rig-review'` or `'direction-review'`), `verdict` and `words`, requiring
|
|
1145
|
+
- **`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).
|
|
1146
1146
|
- **`signoff`.** `JobActValues['signoff']` carries `stage` (validated by Create's writer), `decision` restricted to `'approved'` only (changes requested are a verdict, never a signoff) and required `words` preserved verbatim including empty or whitespace-only strings. A verdict, a signoff and a Create stage transition are three separate writes, and `JobAct` grants no transition authority. Every stage in `JOB_PLAN_BOUND_SIGNOFF_STAGES` (`'plan-approved'`, `'rigging-interview'`, `'post-interview'`) requires non-null `source.plan` with exact displayed step IDs and hashes before act creation, while other stages keep `source.plan` nullable where appropriate.
|
|
1147
1147
|
- **Create-published step IDs and hashes.** `JobPlanIdentity` holds `steps` (`id` and `hash`) published by [Create #184](https://github.com/rig-c/create/issues/184) for the displayed plan. Review retains these values without importing or recomputing Create's internal `stepHash`. Create validates them through its existing `steps` and `step_hashes` writer logic, with no separate plan revision hash or additional revision gate in this contract.
|
|
1148
1148
|
- **C4 manifest-referenced parts PNG identity.** C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <3.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
@@ -1173,8 +1173,8 @@ verdict. It verifies each retained Parts `assemble` recomposite against its
|
|
|
1173
1173
|
bound hash and seals the original bytes. It omits the declaration when no
|
|
1174
1174
|
qualifying draft, retained composite or bound hash is available. Review
|
|
1175
1175
|
validates the declared ID with `jobId` and the revision as lowercase SHA-256.
|
|
1176
|
-
The labelled select in the secondary toolbar shows the previous ID
|
|
1177
|
-
|
|
1176
|
+
The labelled select in the secondary toolbar shows the previous ID.
|
|
1177
|
+
When that operand is selected, its title shows
|
|
1178
1178
|
the ID and full revision. Resolution of the accepted draft stays with the
|
|
1179
1179
|
publisher. [Publisher confirmation](https://github.com/rig-c/review/issues/914#issuecomment-7001422013)
|
|
1180
1180
|
|
|
@@ -1268,7 +1268,7 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1268
1268
|
- **Sibling binding ownership.** `JOB_CONSUMER_AUTH_MODE` is `'writer-owned-sibling-fetch-capability'` (`JobConsumerGrant` with `jobId`, `operation` set to `'fetch-act'`, `actKinds` and `lifetime` set to `'until-explicit-close'`). [Create #184](https://github.com/rig-c/create/issues/184) owns creation and path of a private writer-owned sibling binding outside `project.json` whose versioned record carries only the semantic job locator (Create's production reader/writer readback integration remains pending [Create #184](https://github.com/rig-c/create/issues/184)). The binding is never tracked in version control, never present in unstaged project output and never shipped in templates, public examples or fixtures.
|
|
1269
1269
|
- **Agent isolation and capability lifecycle.** The consumer writer reads its own sibling binding directly. Agents never construct, parse or carry Review session, picks, verdict, applied-record or sibling-binding files. Actual separate-UID isolation remains required for Review's distinct state unreadability test (`JOB_AGENT_ISOLATION_HOLE`), and no same-user forger-resistance claim is made. The random per-job bearer capability grants finalized act fetch (`fetch-act`) only, via exact loopback routes and `Authorization`. Neither `next` nor `status` returns it, and human metadata alone never authenticates a fetch. The capability dies at explicit `close`, old project history cannot restore it, each new job incarnation receives a new grant, invalid grants refuse with `JOB_CAPABILITY_REQUIRED` or `JOB_AUTHORITY_REFUSED` and closed-job fetches refuse with `JOB_CLOSED`. No self-service grant API exists.
|
|
1270
1270
|
- **Consumer deduplication and in-process mesh consumption.** Verdict, signoff and stage transition remain separate consumer writes. For these writes, consumers deduplicate `actId` before checking the current source, then validate each new source and atomically commit the result with its replay identity. Replaying an applied `actId` returns the existing record. A new stale act refuses before mutation. The typed mesh relay uses per-edit identity as defined in [Mesh edits on Request changes (act@8)](#mesh-edits-on-request-changes-act8).
|
|
1271
|
-
- **Error codes.** `JOB_ERROR_CODES` enumerates the closed refusal set (`JOB_REQUEST_INVALID`, `JOB_BODY_LIMIT`, `JOB_LOOPBACK_REQUIRED`, `JOB_SAME_ORIGIN_REQUIRED`, `JOB_CAPABILITY_REQUIRED`, `JOB_AUTHORITY_REFUSED`, `JOB_UNKNOWN`, `JOB_CLOSED`, `JOB_GENERATION_STALE`, `JOB_IDEMPOTENCY_CONFLICT`, `JOB_FREEZE_REQUIRED`, `JOB_RECORD_INCOMPLETE`, `JOB_RECORD_MOVED`, `JOB_SOURCE_MISMATCH`, `JOB_SOURCE_UNRETAINABLE`, `JOB_ROOT_REPLACED`, `JOB_PUBLICATION_UNKNOWN`, `JOB_SNAPSHOT_RECLAIMED`, `JOB_ASK_INVALID`, `JOB_ASK_SUPERSEDED`, `JOB_ACT_UNKNOWN`, `JOB_ACT_INVALID`, `JOB_ACT_KIND_DISABLED`, `JOB_ACT_SOURCE_STALE`, `JOB_DISPLAY_MISMATCH`, `JOB_CURSOR_INVALID`, `JOB_STORAGE_FAILED`, `JOB_AGENT_ISOLATION_HOLE`), each returning bounded safe detail with no arbitrary worker text or private paths.
|
|
1271
|
+
- **Error codes.** `JOB_ERROR_CODES` enumerates the closed refusal set (`JOB_REQUEST_INVALID`, `JOB_BODY_LIMIT`, `JOB_LOOPBACK_REQUIRED`, `JOB_SAME_ORIGIN_REQUIRED`, `JOB_CAPABILITY_REQUIRED`, `JOB_AUTHORITY_REFUSED`, `JOB_UNKNOWN`, `JOB_CLOSED`, `JOB_GENERATION_STALE`, `JOB_IDEMPOTENCY_CONFLICT`, `JOB_FREEZE_REQUIRED`, `JOB_RECORD_INCOMPLETE`, `JOB_RECORD_MOVED`, `JOB_SOURCE_MISMATCH`, `JOB_SOURCE_UNRETAINABLE`, `JOB_ROOT_REPLACED`, `JOB_PUBLICATION_UNKNOWN`, `JOB_SNAPSHOT_RECLAIMED`, `JOB_ASK_INVALID`, `JOB_ASK_SUPERSEDED`, `JOB_ACT_UNKNOWN`, `JOB_ACT_INVALID`, `JOB_ACT_KIND_DISABLED`, `JOB_ACT_SOURCE_STALE`, `JOB_DISPLAY_MISMATCH`, `JOB_CURSOR_INVALID`, `JOB_STORAGE_FAILED`, `JOB_AGENT_ISOLATION_HOLE`, `JOB_OPTION_SET_DUPLICATE`), each returning bounded safe detail with no arbitrary worker text or private paths.
|
|
1272
1272
|
|
|
1273
1273
|
### Model-free record mode and source seam
|
|
1274
1274
|
|
|
@@ -1282,21 +1282,37 @@ A post-interview option set with a `rig` context can also show the accepted rig
|
|
|
1282
1282
|
|
|
1283
1283
|
| Surface | Exact keys or closed values |
|
|
1284
1284
|
| --- | --- |
|
|
1285
|
-
| `PublishResultV3` | `{kind, path, selector}` (`package`), `{kind, questionId, setId}` (`option-set`), `{kind}` (`plan`) |
|
|
1285
|
+
| `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
1286
|
| `RecordFreeze` | `{kind: 'producer-held', holdId, record: {path: 'project.json', sha256}}` |
|
|
1287
|
-
| `RecordSubject` | `{kind: 'interview-picks', questionId, setId}`, `{kind: 'checkpoint', checkpointId}`, `{kind: 'signoff', stage}` (`plan-approved`, `rigging-interview`, `post-interview`, `direction-review`, `interview`), `{kind: 'reopen', stage}` |
|
|
1287
|
+
| `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
1288
|
| `RecordPublishedContext` | Required `['label', 'parts', 'inputs', 'files', 'plan', 'subjects']`, optional `checkpointEvidence` on plans |
|
|
1289
1289
|
| `RecordPartsIdentity` | `['name', 'version', 'integrity']` |
|
|
1290
|
-
| `RecordSource` | Required `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']`, optional `checkpointEvidence` on plans |
|
|
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
1291
|
| `rig-review-job-record-source/1` | Required `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']`, optional `checkpointEvidence` on plans |
|
|
1292
1292
|
| `rig-review-job-record-instance/1` | `['schema', 'fingerprint', 'sourceHash']` |
|
|
1293
|
-
| `JobCapabilitiesV3` | `{recordPublication: true, recordActSchema: 'rig-review/act@4', askBatch: true}` |
|
|
1293
|
+
| `JobCapabilitiesV3` | `{recordPublication: true, recordActSchema: 'rig-review/act@4', askBatch: true, progress: true}` |
|
|
1294
1294
|
| `AskBatchRequestV3` | `{schema, jobId, requestId, verb: 'ask-batch', expectedGeneration, idempotencyKey, publicationId, subjects}`, `subjects` 1–64 |
|
|
1295
1295
|
| `AskBatchValueV3` | `{asks}`, where `asks[i]` answers `subjects[i]` |
|
|
1296
|
+
| `JobProgressRequestV3` | `{schema, jobId, requestId, verb: 'progress', seq, phase, text?, step?}` |
|
|
1297
|
+
| `JobProgressValueV3` | `{status, seq, at}`, where `status` is `'accepted'` or `'ignored'` |
|
|
1298
|
+
| `JobProgressV3` | `{seq, phase, text?, step?, at, generation}` |
|
|
1299
|
+
| `JobProgressLineV3` | `{type: 'progress', jobId, progress, now}`, where `progress` is `JobProgressV3` or `null` |
|
|
1300
|
+
|
|
1301
|
+
<a id="option-sets"></a>
|
|
1302
|
+
|
|
1303
|
+
An `option-set` publication carries 1 to 64 sets ([Review #1004](https://github.com/rig-c/review/issues/1004)). One set keeps the single encoding: `{kind, questionId, setId}`, no `sets`, no `optionSets`, and source bytes and `sourceHash` identical to the one-set source before #1004. Several sets name the first set in `questionId` and `setId` and list every set in order in `sets`. The reader's context declares exactly one `interview-picks` subject per set, in the same order; any other subject list refuses with the existing code. The retained source's singular `selection`, `optionSet` and `optionSetFile` name the first set, `selection.sets` repeats `sets`, and `optionSets` carries each set's own option-set identity and file. Each ask binds its own set: `ask` or `ask-batch` takes any declared set's subject, and a set the publication does not carry refuses `JOB_ASK_INVALID`. The asks of one publication are pending at the same time and none supersedes another; publishing a new head still supersedes every pending ask of the old one, and the [Review #1022](https://github.com/rig-c/review/issues/1022) replay rule is unchanged. Each answer finalizes one `interview-picks` act (`rig-review/act@4`) for its own set and leaves the other asks pending. At K ≥ 2 an act's `source` names that act's own set: `selection` is `{kind: 'option-set', questionId, setId, sets}` with this act's `questionId` and `setId` and `sets` unchanged, `optionSet` is `{id: <this setId>, sha256: <this set's sha256>}` and `optionSetFile` is this set's file binding. `subjects`, `optionSets` and `sourceHash` stay the publication's. To re-derive `sourceHash` from an act, put set 0 back into the singular fields (`selection.questionId`/`setId` from `sets[0]`, `optionSet` and `optionSetFile` from `optionSets[0]`) and digest that publication source. An act whose per-act fields disagree refuses `JOB_ACT_INVALID` by name: a `selection` set the publication does not carry (`act set <q>/<s> is not published`), an `optionSet` that is not that set's (`act optionSet does not name set <q>/<s>`), an `optionSetFile` that is not that set's file (`act optionSetFile is not the file of set <q>/<s>`), or a `value.questionId` other than `selection.questionId` (`value.questionId <q> is not the act set <q>/<s>`). A K ≥ 2 act in the publication encoding (singular fields on set 0) for any other set therefore refuses. One set's act is unchanged. Two subjects for one set refuse `JOB_OPTION_SET_DUPLICATE` (`two subjects for set <questionId>/<setId>`), a set named twice in `sets` refuses `JOB_OPTION_SET_DUPLICATE` (`set <questionId>/<setId> is named twice`), and a `sets` of one entry or with a first entry other than the first set refuses `JOB_REQUEST_INVALID`; none of them reads the publisher or moves the generation. On the owner page the sets share one question list with one "Submit review (n/K)" at its top, where n counts the sets that are answered or fully picked. Submit sends each picked, unsubmitted set through its own form, one act each; the other sets stay pending and on the page.
|
|
1296
1304
|
|
|
1297
1305
|
<a id="ask-batch"></a>
|
|
1298
1306
|
|
|
1299
|
-
`ask-batch` asks several subjects of the head record publication in one request ([Review #963](https://github.com/rig-c/review/issues/963)). Each subject is parsed exactly like the single `ask` subject, and a repeated subject refuses the batch. A package head refuses `JOB_REQUEST_INVALID`, a non-head publication refuses `JOB_ACT_SOURCE_STALE`, and zero or more than 64 subjects refuse `JOB_REQUEST_INVALID`. The existing 256 KiB body limit still applies. Review binds every subject, runs `verifyJobRecordSourceFresh` once for the batch (one `inventory` and one `retained` reader call) and validates each subject against that one fresh source. One immediate transaction then re-checks the head, the work root and the retained snapshot once and creates every ask. Each ask writes its own `pending` event and moves the generation by 1, so a batch of N moves it by N. The batch is all or none: any refusal creates no ask, no event and no generation change. A subject's refusal keeps its existing code and prefixes the message with `subjects[<i>]: `. A freshness refusal carries no index. One idempotency key replays the whole batch without reading the publisher again. Single `ask` and finalize are unchanged. A Create detects support through `capabilities.askBatch` in `next`, never by sending `ask-batch` and reading the refusal: an older Review answers the unknown verb with `JOB_REQUEST_INVALID`. In `JobCapabilitiesV3`, `recordPublication`, `recordActSchema` and `askBatch` describe the host rather than the current head: `ask-batch` applies only to a record-retained head publication and a package head refuses `JOB_REQUEST_INVALID`, so a consumer checks the publication's mode as well as the flag.
|
|
1307
|
+
`ask-batch` asks several subjects of the head record publication in one request ([Review #963](https://github.com/rig-c/review/issues/963)). Each subject is parsed exactly like the single `ask` subject, and a repeated subject refuses the batch. A package head refuses `JOB_REQUEST_INVALID`, a non-head publication refuses `JOB_ACT_SOURCE_STALE`, and zero or more than 64 subjects refuse `JOB_REQUEST_INVALID`. The existing 256 KiB body limit still applies. Review binds every subject, runs `verifyJobRecordSourceFresh` once for the batch (one `inventory` and one `retained` reader call) and validates each subject against that one fresh source. One immediate transaction then re-checks the head, the work root and the retained snapshot once and creates every ask. Each ask writes its own `pending` event and moves the generation by 1, so a batch of N moves it by N. The batch is all or none: any refusal creates no ask, no event and no generation change. A subject's refusal keeps its existing code and prefixes the message with `subjects[<i>]: `. A freshness refusal carries no index. One idempotency key replays the whole batch without reading the publisher again. The replay follows the same rule as a single `ask`: if any ask of the stored batch is no longer pending and has no finalized act, the replay refuses `JOB_ASK_SUPERSEDED` with the message prefixed by that ask's `subjects[<i>]: `. Single `ask` and finalize are unchanged. A Create detects support through `capabilities.askBatch` in `next`, never by sending `ask-batch` and reading the refusal: an older Review answers the unknown verb with `JOB_REQUEST_INVALID`. In `JobCapabilitiesV3`, `recordPublication`, `recordActSchema` and `askBatch` describe the host rather than the current head: `ask-batch` applies only to a record-retained head publication and a package head refuses `JOB_REQUEST_INVALID`, so a consumer checks the publication's mode as well as the flag.
|
|
1308
|
+
|
|
1309
|
+
<a id="job-progress"></a>
|
|
1310
|
+
|
|
1311
|
+
**Progress between publications.** A `rig-review/job-api@3` agent checks `capabilities.progress === true` in `next`, then sends `progress` through the existing agent-authenticated `POST /jobs/<jobId>/api`. Support applies before the first publication and with either publication kind on a V3 host. The closed request allows `seq` as a positive safe integer, `phase` as one of `ingest`, `build`, `measure`, `publish` or `other`, optional single-line `text` of at most 120 characters, and optional `step: {i, n}` with safe integers satisfying `1 ≤ i ≤ n ≤ 1000`. Text is agent-authored and displayed verbatim. The raw JSON body limit is 1,024 bytes for progress. Invalid shapes and this verb's bounds refuse `JOB_REQUEST_INVALID`, and a closed job refuses `JOB_CLOSED`. The shared transport still enforces its global body limit before parsing a verb.
|
|
1312
|
+
|
|
1313
|
+
The normal V3 reply envelope contains `value: {status, seq, at}`. Review supplies the ISO receipt time `at` and stores the latest progress with the current job generation. Sequences increase across the job's lifetime. A request with a sequence at or below the last accepted sequence returns `ignored` with that sequence and receipt time, including after a clear or restart. An accepted request replaces the slot without an event, generation increment or replay entry. A committed `publish`, `ask`, `ask-batch` or `close` clears the visible slot. A retry of a committed mutation leaves subsequent progress in place.
|
|
1314
|
+
|
|
1315
|
+
The V3 owner page's existing `GET /jobs/<jobId>/events` NDJSON stream emits a cursorless `JobProgressLineV3` with the current slot on connect. `progress` is `null` when the slot is empty, and `now` is ISO host time. While connected, progress writes are coalesced per job to at most one update per second, with the latest value delivered after the interval even if writes stop. Connect snapshots and clears associated with semantic events are delivered independently of that cadence. The trusted `subscribeJob` port, semantic `next` cursors and CLI continue to use only durable job events.
|
|
1300
1316
|
|
|
1301
1317
|
The read-only official reader returns the six-key `RecordPublishedContext` with producer-sealed `parts`. `prepareJobRecordSource` runs `phase: 'inventory'` on the immutable source root (re-verifying `project.json` identity before and after each reader phase and before mapping generic reader failures so mid-read record movement reports `JOB_RECORD_MOVED` / `JOB_SOURCE_MISMATCH` rather than `JOB_RECORD_INCOMPLETE`) and retains the sorted, duplicate-free `inventory.files` closure into an owned snapshot (`project.json` within 8 MiB, at most 4,096 regular non-symlink files, 64 MiB per file and 256 MiB total bytes). It then calls `phase: 'retained'` on the snapshot root with `parts: inventory.parts` forwarded unchanged and requires `assertEqualRecordContexts(inventory, retainedContext)`. Before ask or finalize, `verifyJobRecordSourceFresh` re-runs `phase: 'inventory'`, rejects any `inventory.parts` drift against the originally sealed `retained.context.parts` (`JOB_SOURCE_MISMATCH` on ask and `JOB_ACT_SOURCE_STALE` on finalize) before invoking `phase: 'retained'`, and forwards the sealed `retained.context.parts` unchanged when equal; synchronous `store.update` commit re-verifies source and retained snapshot integrity before persisting. Missing reader or contract tokens (`CREATE_PUBLICATION_CONTRACT_UNAVAILABLE`, `CREATE_PLAN_PUBLICATION_CONTRACT_UNAVAILABLE`) refuse with `JOB_SOURCE_UNRETAINABLE`, while named producer tokens (`JOB_RECORD_CLOSURE_INCOMPLETE`, `JOB_RECORD_PARTS_MISMATCH`, `JOB_RECORD_PARTS_LOCK_MISSING`) map to `JOB_RECORD_INCOMPLETE` on publish or ask and `JOB_ACT_SOURCE_STALE` on finalize.
|
|
1302
1318
|
|
|
@@ -1582,7 +1598,7 @@ option-set sources are excluded. Source capabilities remain consumer-owned.
|
|
|
1582
1598
|
| `parts-verdict` | `verdict, comments` (`approved` or `changes-requested`) |
|
|
1583
1599
|
| `review-verdict` | `stage, verdict, comments` (existing rig/direction/image stages and verdicts) |
|
|
1584
1600
|
| `signoff` | `stage, decision, comments` (`approved`) |
|
|
1585
|
-
| `reopen` | `stage, comments` (
|
|
1601
|
+
| `reopen` | `stage, comments` (read only: old records parse, Review neither asks nor renders it) |
|
|
1586
1602
|
|
|
1587
1603
|
The declared plan/source/selector and ask eligibility checks remain applicable.
|
|
1588
1604
|
The browser never supplies authoritative checkpoint-to-plan mapping. A Parts
|
|
@@ -1685,7 +1701,8 @@ existing pin or restore path already carries:
|
|
|
1685
1701
|
| `camera` | numeric camera `{space, center, zoom, viewport, visible}` | StageComment `camera` |
|
|
1686
1702
|
| `frame` | `{index, basis}` (`producer` or `reference`) | StageComment `frame` (absent when time-only) |
|
|
1687
1703
|
|
|
1688
|
-
Each key reuses the decoder of the shape it copies. A `reopen` act
|
|
1704
|
+
Each key reuses the decoder of the shape it copies. A `reopen` act is read only
|
|
1705
|
+
(old records parse, Review neither asks nor renders it) and has no ask
|
|
1689
1706
|
subject, so its comments cannot carry `context.subject`.
|
|
1690
1707
|
|
|
1691
1708
|
Starting in 4.8.0, the rig verdict writer takes top-level `context` from pinned
|
|
@@ -1787,3 +1804,60 @@ crop px and refuses the first op that does not replay by index. The API takes
|
|
|
1787
1804
|
the edit and replay provenance without a Create-project argument or access
|
|
1788
1805
|
to Review or Create storage. A mesh edit
|
|
1789
1806
|
approves nothing. [HQ sign on Review #952](https://github.com/rig-c/review/issues/952#issuecomment-7001413869), [Parts #1159](https://github.com/rig-c/parts/issues/1159).
|
|
1807
|
+
|
|
1808
|
+
### Chest landmarks on Request changes (act@9)
|
|
1809
|
+
|
|
1810
|
+
The trusted package `readPublished` adapter can return
|
|
1811
|
+
`JobPublishedContext.chestLandmarks` for a `rig` selector. Review exposes those
|
|
1812
|
+
rows as `publication.chestLandmarks` in the publication receipt and pinned
|
|
1813
|
+
display response. Each `JobPublishedChestLandmark` row has the edit shape below
|
|
1814
|
+
with one additional required field, `source.configHash`, the lowercase SHA-256
|
|
1815
|
+
of the exact producer config bytes. If the package declares a producer handoff,
|
|
1816
|
+
Review uses that config identity. Otherwise the reader declares the config in
|
|
1817
|
+
its existing `files` array. Review hashes the retained file and checks that
|
|
1818
|
+
`meshes[slot].contour.bust` matches the published `bust` spec, including which
|
|
1819
|
+
optional keys are present. Review also checks the attachment hash and stage
|
|
1820
|
+
frame against the retained model. A bad declaration refuses
|
|
1821
|
+
`JOB_SOURCE_MISMATCH` before publication. The seed and config hash enter the
|
|
1822
|
+
publication's `source.sourceHash`; a config-only change gets a new binding.
|
|
1823
|
+
Omit the field when the draft has no published spec. Only a seeded attachment
|
|
1824
|
+
can be edited in a job.
|
|
1825
|
+
|
|
1826
|
+
The UI sends `value.chestLandmarks`, an array of one to four exact
|
|
1827
|
+
`{edit, sha256}` rows. Both arrays sort by the UTF-16 string
|
|
1828
|
+
`skin/slot/attachment` and permit each identity tuple once. Each
|
|
1829
|
+
`JobChestLandmarkValue` edit carries:
|
|
1830
|
+
|
|
1831
|
+
- `slot`, `skin` and `attachment` as nonempty strings of up to 128 characters
|
|
1832
|
+
without control characters. These identify the supplying non-linked mesh in
|
|
1833
|
+
the displayed setup model. The chest carrier's slot is the Parts part name.
|
|
1834
|
+
- `basis: "setup"` and `source: {hash, frame: {width, height}}` using the same
|
|
1835
|
+
attachment hash and model stage binding as act@8.
|
|
1836
|
+
- `bust: {apex_r, apex_l, cleavage?, alpha?, clearance?, spacing?, bone_r?, bone_l?}`.
|
|
1837
|
+
Coordinates are finite `[x, y]` in setup-pose rig pixels, in the whole figure's
|
|
1838
|
+
frame with x right and y down. They lie on the 1/256-px grid inside the
|
|
1839
|
+
inclusive stage bounds. Alpha and spacing are positive finite numbers,
|
|
1840
|
+
clearance is finite, and bone names are 1–128 characters. An omitted
|
|
1841
|
+
cleavage stays omitted.
|
|
1842
|
+
|
|
1843
|
+
Each outer `sha256` hashes the complete canonical `edit` using the same
|
|
1844
|
+
canonical JSON rules as act@8. Review validates the act shape and digest,
|
|
1845
|
+
checks that the attachment was seeded, verifies the model and attachment
|
|
1846
|
+
hashes, and compares the frame with the retained stage. With all three points
|
|
1847
|
+
present, Review runs its clearance pre-check. Shape, frame, ineligible
|
|
1848
|
+
attachment and clearance refusals use `JOB_ACT_INVALID`. A stale model or
|
|
1849
|
+
attachment hash uses `JOB_ACT_SOURCE_STALE`. The request and delivery limits
|
|
1850
|
+
still apply. The producer validates the edit before rebuilding.
|
|
1851
|
+
|
|
1852
|
+
`rig-review/act@9` is a `review-verdict` at `stage: "rig-review"` with
|
|
1853
|
+
`verdict: "changes-requested"` and at least one chest edit. It can also carry
|
|
1854
|
+
`meshEdits` and @7 comment context. Its comments array can be empty. Mesh-only
|
|
1855
|
+
edits use @8, and verdicts without edits keep their existing schemas.
|
|
1856
|
+
|
|
1857
|
+
Consumers use the authorized finalized-act fetch and verify the act's
|
|
1858
|
+
`source.sourceHash`, `source.model.sha256`, the attachment SHA-256 and the
|
|
1859
|
+
frame before relaying landmarks to Parts. The publication carries the verified
|
|
1860
|
+
config hash, and the act binds to that publication through `source.sourceHash`.
|
|
1861
|
+
Parts checks the named slot is a contour part before writing the landmarks
|
|
1862
|
+
file. See [Review compatibility](STABILITY.md#chest-landmark-act-compatibility)
|
|
1863
|
+
and [Parts #1382](https://github.com/rig-c/parts/issues/1382).
|
package/docs/STABILITY.md
CHANGED
|
@@ -413,6 +413,7 @@ preserve capability, origin, size, cancellation and replay checks.
|
|
|
413
413
|
## Changelog
|
|
414
414
|
|
|
415
415
|
- Breaking, 4.0.0 (#806): remove `startJobHub` and its `JobHubOptions`, `JobHubJobOptions`, `JobHubJob` and `JobOwnerHub` types; the uncalled semantic-job hub is deleted.
|
|
416
|
+
- Additive (#987): V3 hosts advertise `progress: true` in the `next` capabilities. The HTTP `progress` verb and optional `subscribeJobPage` port implement [job progress](REVIEW_PACKAGE.md#job-progress). `subscribeJob`, the durable event union, cursors and CLI preserve their existing contracts. The owner front opts into the page stream for V3 hosts, with the published web bundle consuming the extra line. Reload an owner page left open across a host upgrade to load the matching bundle.
|
|
416
417
|
|
|
417
418
|
## Mesh-edit act compatibility
|
|
418
419
|
|
|
@@ -435,6 +436,25 @@ checks are part of the [act@8 wire contract](REVIEW_PACKAGE.md#mesh-edits-on-req
|
|
|
435
436
|
The host facade adds `parseMeshEditsAct`, `JOB_MESH_EDITS_ACT_SCHEMA` and
|
|
436
437
|
the three mesh edit types listed below.
|
|
437
438
|
|
|
439
|
+
## Chest landmark act compatibility
|
|
440
|
+
|
|
441
|
+
`rig-review/act@9` carries one or more `value.chestLandmarks` rows on a
|
|
442
|
+
compiled rig's Request changes verdict. It accepts optional `meshEdits` and
|
|
443
|
+
@7 comment context. Older decoders refuse @9 with `JOB_ACT_INVALID`.
|
|
444
|
+
Existing decoders and historical @2–@8 bytes retain their contracts. Mesh-only
|
|
445
|
+
submissions still emit @8. See the [act@9 wire contract](REVIEW_PACKAGE.md#chest-landmarks-on-request-changes-act9).
|
|
446
|
+
|
|
447
|
+
The trusted adapter can detect support through
|
|
448
|
+
`JOB_CHEST_LANDMARKS_ACT_SCHEMA`. It supplies the draft's
|
|
449
|
+
`contour.bust` spec and required `source.configHash` for a rig publication.
|
|
450
|
+
Review verifies both against the retained config and binds them into the source
|
|
451
|
+
hash. With the declaration absent, the publication and all historical source
|
|
452
|
+
bindings keep their existing shape.
|
|
453
|
+
|
|
454
|
+
Create must pin a Review release that exports `parseChestLandmarksAct` and
|
|
455
|
+
support @9 before publishing the new declaration. Parts consumes the
|
|
456
|
+
finalized act through the existing writer grant and source checks.
|
|
457
|
+
|
|
438
458
|
## Named export inventory
|
|
439
459
|
|
|
440
460
|
The backend rig-still extension retains the original twelve runtime exports and `JOB_ACT_SCHEMA` at act@2. `JobAct` additionally includes `JobRigReviewAct` at act@3 with top-level `JobRigStill` and `JobPartsVerdictAct` at act@5 (`PartsVerdictValue` with pointed `issues` and `words`, while preserving `JobLegacyPartsVerdictValue` at act@2 for historical acts). The facade adds type-only `JobLegacyAct`, `JobRigReviewAct`, `JobPartsVerdictAct`, `JobLegacyPartsVerdictValue`, `PartsVerdictValue`, `JobPanelComposition`, `PanelComponent`, `JobRigStill` and `JobRigCapture` exports, [Review #563](https://github.com/rig-c/review/issues/563) adds five type-only exports (`JobHostListenerIncarnation`, `JobHostReuseBinding`, `JobHostReuseExpectation`, `JobHostAttachField` and `JobHostAttachFailure`), and [Review #555](https://github.com/rig-c/review/issues/555) adds four type-only interview diagnostic exports (`JobInterviewJson`, `JobInterviewRecord`, `JobInterviewDiagnostic` and `JobInterviewDiagnostics`). [Review #588](https://github.com/rig-c/review/issues/588) activates record mode when `readRecordPublished` and `recordReaderId` are supplied to a host or session (`publicationMode: 'record-and-package'`), serving `rig-review/job-api@3` (`JOB_API_V3_SCHEMA`), `rig-review/act@4` (`JOB_RECORD_ACT_SCHEMA`) and normal owner URL model-free record inspection while keeping default package-only hosts and exact `package-only` `job-ui/<jobId>.json` descriptor bytes at @2 and enforcing `publicationMode` / `recordReaderId` reuse compatibility across ordinary reuse and strict `reuseOnly` attachment. It exports six additional record-mode runtime symbols (`JOB_API_V3_SCHEMA`, `JOB_RECORD_ACT_SCHEMA`, `JOB_RECORD_READER_ID`, `parseRecordAct`, `prepareJobRecordAct` and `prepareJobRecordSource`, for eighteen runtime exports total) and the V3/record type surface listed below. The rig and parts-verdict act revision constants, transport limits and the internal `POST /jobs/<jobId>/host` helper remain internal to their modules. Consumer checks distinguish these act revisions as described in [Rig verdict still backend](REVIEW_PACKAGE.md#rig-verdict-still-backend) and [Model-free record mode and source seam](REVIEW_PACKAGE.md#model-free-record-mode-and-source-seam).
|
|
@@ -556,6 +576,12 @@ finalized act the live host commits wakes it. A write that adds no deliverable
|
|
|
556
576
|
event, such as a display receipt, keeps the wait open, and a refused save
|
|
557
577
|
commits nothing. No API verb, act field or capability changes.
|
|
558
578
|
|
|
579
|
+
[Review #990](https://github.com/rig-c/review/issues/990) then adds
|
|
580
|
+
`parseChestLandmarksAct` and `JOB_CHEST_LANDMARKS_ACT_SCHEMA`
|
|
581
|
+
(`rig-review/act@9`), for thirty-four runtime exports total, plus the type-only
|
|
582
|
+
`JobChestLandmarkValue`, `JobPublishedChestLandmark`, `JobChestLandmarkEdit`
|
|
583
|
+
and `JobChestLandmarksAct`.
|
|
584
|
+
|
|
559
585
|
The exact runtime exports are listed below. Constants preserve their literal
|
|
560
586
|
values from the frozen semantic contract.
|
|
561
587
|
|
|
@@ -566,6 +592,7 @@ values from the frozen semantic contract.
|
|
|
566
592
|
- `parseCommentsAct`
|
|
567
593
|
- `parseContextCommentsAct`
|
|
568
594
|
- `parseMeshEditsAct`
|
|
595
|
+
- `parseChestLandmarksAct`
|
|
569
596
|
- `projectComments`
|
|
570
597
|
- `parseCommentsSession`
|
|
571
598
|
- `parseCommentsCompareSession`
|
|
@@ -574,6 +601,7 @@ values from the frozen semantic contract.
|
|
|
574
601
|
- `JOB_COMMENTS_ACT_SCHEMA`
|
|
575
602
|
- `JOB_COMMENT_CONTEXT_ACT_SCHEMA`
|
|
576
603
|
- `JOB_MESH_EDITS_ACT_SCHEMA`
|
|
604
|
+
- `JOB_CHEST_LANDMARKS_ACT_SCHEMA`
|
|
577
605
|
- `REVIEW_COMMENTS_SESSION_SCHEMA`
|
|
578
606
|
- `REVIEW_COMMENTS_COMPARE_SESSION_SCHEMA`
|
|
579
607
|
- `PARTS_COMMENTS_VERDICT_SCHEMA`
|
|
@@ -675,6 +703,10 @@ without aliases or copied wire shapes.
|
|
|
675
703
|
- `JobAskRequestV3`
|
|
676
704
|
- `JobAskBatchRequestV3`
|
|
677
705
|
- `JobAskBatchValueV3`
|
|
706
|
+
- `JobProgressRequestV3`
|
|
707
|
+
- `JobProgressValueV3`
|
|
708
|
+
- `JobProgressV3`
|
|
709
|
+
- `JobProgressLineV3`
|
|
678
710
|
- `JobNextRequest`
|
|
679
711
|
- `JobNextRequestV3`
|
|
680
712
|
- `JobCloseRequest`
|
|
@@ -716,7 +748,7 @@ without aliases or copied wire shapes.
|
|
|
716
748
|
- `JobRecordPicksSubject`
|
|
717
749
|
- `JobRecordCheckpointSubject`
|
|
718
750
|
- `JobRecordSignoffSubject`
|
|
719
|
-
- `JobRecordReopenSubject`
|
|
751
|
+
- `JobRecordReopenSubject` (read-only compatibility: old records and acts parse; new `reopen` asks refuse with `JOB_ASK_INVALID` and Review neither renders nor builds `reopen`, #989)
|
|
720
752
|
- `JobRecordPlanSubject`
|
|
721
753
|
- `JobRecordSubject`
|
|
722
754
|
- `JobRecordContextBase`
|
|
@@ -731,7 +763,7 @@ without aliases or copied wire shapes.
|
|
|
731
763
|
- `JobRecordSource`
|
|
732
764
|
- `JobSourceV3`
|
|
733
765
|
- `JobRecordSignoffValue`
|
|
734
|
-
- `JobRecordReopenValue`
|
|
766
|
+
- `JobRecordReopenValue` (read-only compatibility: exported for historical record and act decoders, #989)
|
|
735
767
|
- `JobRecordUIActValues`
|
|
736
768
|
- `JobRecordUISubmission`
|
|
737
769
|
- `JobRetainedRecordSource`
|
|
@@ -751,6 +783,10 @@ without aliases or copied wire shapes.
|
|
|
751
783
|
- `JobMeshEditValue`
|
|
752
784
|
- `JobMeshEdit`
|
|
753
785
|
- `JobMeshEditsAct`
|
|
786
|
+
- `JobChestLandmarkValue`
|
|
787
|
+
- `JobPublishedChestLandmark`
|
|
788
|
+
- `JobChestLandmarkEdit`
|
|
789
|
+
- `JobChestLandmarksAct`
|
|
754
790
|
- `ReviewCommentsSession`
|
|
755
791
|
- `CompareCommentsSession`
|
|
756
792
|
- `PartsCommentsVerdict`
|
|
@@ -766,7 +802,7 @@ Rows are capped at 4096, roles at 128 UTF-16 code units and literal paths at 409
|
|
|
766
802
|
## Installed acceptance
|
|
767
803
|
|
|
768
804
|
`bun run smoke` packs the package and installs that tarball into an empty project.
|
|
769
|
-
A consumer checks the thirty-
|
|
805
|
+
A consumer checks the thirty-four runtime exports and the existing managed-host types, including
|
|
770
806
|
`JobHostListenerIncarnation`, `JobHostReuseBinding`, `JobHostReuseExpectation`,
|
|
771
807
|
`JobHostAttachField`, `JobHostAttachFailure`, `JobInterviewJson`,
|
|
772
808
|
`JobInterviewRecord`, `JobInterviewDiagnostic`, `JobInterviewDiagnostics` and
|
|
@@ -778,6 +814,8 @@ proves that `JobCapabilitiesV3` carries `askBatch: true`. In `JobCapabilitiesV3`
|
|
|
778
814
|
than the current head: `ask-batch` applies only to a record-retained head
|
|
779
815
|
publication and a package head refuses `JOB_REQUEST_INVALID`, so a consumer
|
|
780
816
|
checks the publication's mode as well as the flag.
|
|
817
|
+
The #987 contract tests cover the progress capability and the owner page stream
|
|
818
|
+
against an attached publisher sharing the persisted job.
|
|
781
819
|
TypeScript checks the installed consumer and the runtime checks the full owner
|
|
782
820
|
resources, retained publication, semantic ports, declared hooks, enumerator
|
|
783
821
|
version/row carriage, ordinary reuse, strict `reuseOnly: {expected}` attachment
|
|
@@ -816,3 +854,62 @@ the existing modal and record act shape. A declared subject and non-empty displa
|
|
|
816
854
|
plan remain required. The record stage type has five members; the public package
|
|
817
855
|
plan-bound list remains at three. Package interview signoffs and historical acts
|
|
818
856
|
retain their existing nullable-plan behavior. No schema or runtime export changes.
|
|
857
|
+
|
|
858
|
+
## Record option sets
|
|
859
|
+
|
|
860
|
+
An `option-set` publication may carry 2 to 64 sets ([Review #1004](https://github.com/rig-c/review/issues/1004)).
|
|
861
|
+
`JobPublishResultV3` gains an optional `sets` (`{questionId, setId}` in order, the
|
|
862
|
+
first equal to the result's own `questionId`/`setId`), and the retained record
|
|
863
|
+
source gains an optional `optionSets` (each set's `questionId`, `setId`,
|
|
864
|
+
`optionSet` and `optionSetFile`). Both are absent for one set, whose source bytes
|
|
865
|
+
and `sourceHash` are unchanged. `JOB_ERROR_CODES` gains
|
|
866
|
+
`JOB_OPTION_SET_DUPLICATE`, refused on publish when the reader declares two
|
|
867
|
+
subjects for one set or `sets` names a set twice. Each ask binds one set, the
|
|
868
|
+
asks of one publication stay pending together, and each answer finalizes one
|
|
869
|
+
`interview-picks` act (`rig-review/act@4`). At K ≥ 2 that act's `selection`
|
|
870
|
+
(`questionId`, `setId`), `optionSet` and `optionSetFile` name the act's own set,
|
|
871
|
+
while `subjects`, `optionSets` and `sourceHash` stay the publication's; an act
|
|
872
|
+
whose per-act fields disagree refuses `JOB_ACT_INVALID` by name. One set's act
|
|
873
|
+
bytes are unchanged. No runtime or type export is added. See the [option-set contract](REVIEW_PACKAGE.md#option-sets).
|
|
874
|
+
|
|
875
|
+
## Package manifest `frames` declaration
|
|
876
|
+
|
|
877
|
+
`rig-review/1` manifests accept an optional `frames` field beside `model`: a
|
|
878
|
+
literal package-relative path to a producer `rigc-frames/1` record inside the
|
|
879
|
+
package. Review reads, validates and hashes the file only when `frames` is
|
|
880
|
+
present, adds its path to `files`, and exposes the parsed record on the loaded
|
|
881
|
+
package as `frames: {path, sha256, sets: [{animation, fps, written, stride,
|
|
882
|
+
duration}]} | null` (`null` when the field is absent). Older manifests without
|
|
883
|
+
`frames` load unchanged with the same `sourceHash` and no runtime or type export
|
|
884
|
+
changes on `@rig-c/review/job-host`. Path validation reuses `packagePath` and
|
|
885
|
+
`safeFile` (`..`, absolute paths, symlinks escaping the package and files
|
|
886
|
+
missing from `sealedPlayback` refuse with the same messages as `model`). A
|
|
887
|
+
declared file missing from the package, unreadable JSON, a `spec` other than
|
|
888
|
+
`rigc-frames/1`, a malformed set field (`sets[].animation`, `fps`, `written`,
|
|
889
|
+
`stride`, `duration`), or two sets naming the same animation refuses by name
|
|
890
|
+
(`FRAMES_MISSING`, `FRAMES_JSON`, `FRAMES_SPEC`, `FRAMES_FIELD`,
|
|
891
|
+
`FRAMES_DUPLICATE_ANIMATION`), never falling back silently.
|
|
892
|
+
|
|
893
|
+
The record is the comment frame clock (#1018). On a package with a compiled
|
|
894
|
+
model, each set is checked against the model animation it names when the
|
|
895
|
+
package loads. The rule is measured from the producer, not from the clip length:
|
|
896
|
+
`@rig-c/core` 3.8.0 `rigc render` samples an animation of duration `D` to
|
|
897
|
+
`round(D * fps) + 1` frames, frame `i` at `i / fps`, writes every `stride`-th one
|
|
898
|
+
from frame 0 and records the last sample's time as `duration`. For example, a
|
|
899
|
+
0.8 s clip at 12 fps gives 11 frames and `duration` 0.8333, not 0.8, so a set's
|
|
900
|
+
`duration` is not compared with the clip length. A set naming no model animation, a
|
|
901
|
+
`written` other than `floor(round(D * fps) / stride) + 1`, or a `duration` more
|
|
902
|
+
than `1e-9` s from `round(D * fps) / fps` refuses the package by name
|
|
903
|
+
(`FRAMES_ANIMATION_UNKNOWN`, `FRAMES_COUNT_MISMATCH`, `FRAMES_DURATION_MISMATCH`)
|
|
904
|
+
where the other `FRAMES_*` refusals surface, and indexes nothing. The refusal
|
|
905
|
+
names the animation and both figures, the record's and the model's schedule. The tolerance
|
|
906
|
+
covers float rounding only (`i * (1 / fps)` against `i / fps` differs by at most
|
|
907
|
+
`7.3e-12` s over 100,000 frames at 1–240 fps). An accepted set becomes the clock
|
|
908
|
+
for its animation: `written` frames, frame `i` at `i * stride / fps`. The report's
|
|
909
|
+
clock keeps the animation it names; an animation with no set has no clock and its
|
|
910
|
+
comments stay time-only. The page's transport and the server's comment validation
|
|
911
|
+
read the same per-animation clocks from `feedbackCatalog.frameClocks`
|
|
912
|
+
(`[{animation, clock}]`, present only when the package declares `frames` and has a
|
|
913
|
+
compiled model), so a pinned comment on such an animation carries
|
|
914
|
+
`frame: {index, basis: "producer"}`. Packages without `frames` are unchanged, and
|
|
915
|
+
the comment act's shape is unchanged.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rig-c/review",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.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.49.1",
|
|
30
30
|
"@types/bun": "^1.3.0",
|
|
31
31
|
"typescript": "^5.9.3"
|
|
32
32
|
},
|
package/src/chest-landmarks.ts
CHANGED
|
@@ -26,8 +26,10 @@ export const PART_PAD = 4;
|
|
|
26
26
|
const GRID = 256;
|
|
27
27
|
|
|
28
28
|
export type RigPoint = [number, number];
|
|
29
|
-
/** The
|
|
30
|
-
export interface
|
|
29
|
+
/** The published job spec and the landmark reader allow cleavage to be omitted. */
|
|
30
|
+
export interface BustLandmarks { apex_r: RigPoint; apex_l: RigPoint; cleavage?: RigPoint; alpha?: number; clearance?: number; bone_r?: string; bone_l?: string; spacing?: number }
|
|
31
|
+
/** Circle derivation and standalone Apply require all three points. */
|
|
32
|
+
export interface BustSpec extends BustLandmarks { cleavage: RigPoint }
|
|
31
33
|
/** A derived region in the config's circle shape (key order as parts writes it). */
|
|
32
34
|
export interface DerivedBustRegion { name: 'bust_r' | 'bust_l'; shape: 'circle'; cx: number; cy: number; r: number; spacing: number; band: number; bone: string }
|
|
33
35
|
export interface BustDerivation {
|
|
@@ -81,10 +83,13 @@ function point(v: unknown, field: string): RigPoint {
|
|
|
81
83
|
* positive numbers, `clearance` a number, bone names non-empty strings); the geometry (`CONFIG_BUST_CLEARANCE`) and
|
|
82
84
|
* whether the bones resolve (`CONFIG_NAME_RESOLVES`) are the producer's to judge. Key order is the producer's.
|
|
83
85
|
*/
|
|
84
|
-
export function parseBustSpec(value: unknown, field
|
|
86
|
+
export function parseBustSpec(value: unknown, field?: string): BustSpec;
|
|
87
|
+
export function parseBustSpec(value: unknown, field: string, allowMissingCleavage: true): BustLandmarks;
|
|
88
|
+
export function parseBustSpec(value: unknown, field = 'bust', allowMissingCleavage = false): BustLandmarks {
|
|
85
89
|
if (!isObject(value)) return bad(`${field} must be an object`);
|
|
86
90
|
for (const key of Object.keys(value)) if (!(BUST_SPEC_FIELDS as readonly string[]).includes(key)) bad(`${field}.${key} is not a contour.bust field`);
|
|
87
|
-
const out:
|
|
91
|
+
const out: BustLandmarks = {apex_r: point(value.apex_r, `${field}.apex_r`), apex_l: point(value.apex_l, `${field}.apex_l`)};
|
|
92
|
+
if (!allowMissingCleavage || Object.hasOwn(value, 'cleavage')) out.cleavage = point(value.cleavage, `${field}.cleavage`);
|
|
88
93
|
for (const key of ['alpha', 'clearance', 'spacing'] as const) {
|
|
89
94
|
if (!(key in value)) continue;
|
|
90
95
|
const n = value[key];
|