@rig-c/review 4.5.0 → 4.7.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/REVIEW_PACKAGE.md +235 -16
- package/docs/STABILITY.md +62 -4
- package/package.json +1 -1
- package/src/canonical-json.ts +14 -0
- package/src/create-pin-gate.ts +1 -1
- package/src/direction-inspection.ts +17 -7
- package/src/feedback-export.ts +2 -2
- package/src/interview-project.ts +27 -19
- package/src/interview-scene.ts +18 -11
- package/src/job-act.ts +85 -9
- package/src/job-api.ts +182 -31
- package/src/job-checkpoint-evidence.ts +19 -6
- package/src/job-cli.ts +6 -6
- package/src/job-contract.ts +85 -14
- package/src/job-front.ts +100 -78
- package/src/job-host.ts +9 -2
- package/src/job-previous-draft.ts +37 -0
- package/src/job-session.ts +74 -40
- package/src/job-source.ts +196 -35
- package/src/manifest.ts +43 -14
- package/src/mesh-edit.ts +7 -1
- package/src/parts-comment-crops.ts +15 -3
- package/src/parts-comparison.ts +21 -8
- package/src/parts-view.ts +23 -8
- package/web/catalog-en.ts +11 -0
- package/web/catalog-ko.ts +11 -0
- package/web/direction-panel.ts +11 -7
- package/web/job-rig-screen.ts +65 -21
- package/web/job-session.ts +54 -26
- package/web/main.ts +158 -50
- package/web/mesh-editor.ts +124 -13
- package/web/part-selection.ts +1 -1
- package/web/parts-viewport-provider.ts +45 -8
- package/web/rig-host.ts +5 -3
- package/web/stage-comments.ts +77 -14
- package/web/styles.css +2 -0
- package/web/workspace-layout.ts +10 -0
- package/web/workspace-ui.ts +2 -2
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -286,6 +286,8 @@ 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.
|
|
290
|
+
|
|
289
291
|
## Historical feedback retrieval
|
|
290
292
|
|
|
291
293
|
`feedback` and `feedback compare` first return the exact current-tool stored session, including an explicitly saved pending decision. A corrupt current record is refused rather than replaced with an older approval. Current-file reads use an explicit present/missing result, and the CLI rechecks current state before returning history so a concurrently saved pending review wins without relying on its timestamp. If the current file is absent, these CLI commands search prior saved submissions for the same immutable content. HTTP session reads and all saves retain their existing strict current-tool binding; history is not approval migration.
|
|
@@ -942,7 +944,7 @@ and exact draft skin/slot/attachment address, with named refusal if absent.
|
|
|
942
944
|
|
|
943
945
|
### Correction handoff
|
|
944
946
|
|
|
945
|
-
For the active standing live-job cycle, see [Live job contract](#live-job-contract), [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184). In the active cycle, agents do not build, parse, reshape or carry Review session, picks, verdict or applied-record storage files
|
|
947
|
+
For the active standing live-job cycle, see [Live job contract](#live-job-contract), [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184). In the active cycle, agents do not build, parse, reshape or carry Review session, picks, verdict or applied-record storage files. `described-correction` and `mesh-edit` remain reserved as standalone act kinds (`JOB_ACT_KIND_DISABLED`). The live mesh handoff uses [Mesh edits on Request changes (act@8)](#mesh-edits-on-request-changes-act8). The file-based `--correction`, `--feedback-file`, reshaped feedback JSON and `--verbatim-file` flow below is retained as legacy/history documentation and is a bypass finding if used in the active cycle.
|
|
946
948
|
|
|
947
949
|
The existing feedback context may carry `correction: {path, selector}` on a
|
|
948
950
|
saved single-package item. The path is `described` or `made`. A selector names
|
|
@@ -1072,6 +1074,9 @@ Pre-cutoff currentness-only exceptions display `INTERVIEW_OPTIONS_SCENE_LEGACY`
|
|
|
1072
1074
|
without blocking the legacy interview. Full scene image and registration checks
|
|
1073
1075
|
remain producer checks.
|
|
1074
1076
|
|
|
1077
|
+
A `scenes[]` entry's `by` is the literal `agent` or a human name, and the rig
|
|
1078
|
+
signoff comparison still establishes the human acceptance the scene rests on.
|
|
1079
|
+
|
|
1075
1080
|
[Review #555](https://github.com/rig-c/review/issues/555) carries scene
|
|
1076
1081
|
interview history and legacy warnings through standing job publications under
|
|
1077
1082
|
`JobPublication.interview` (`rig-review/job-interview@1`, `null` for non-Create
|
|
@@ -1128,11 +1133,12 @@ or establish official Create writer acceptance.
|
|
|
1128
1133
|
|
|
1129
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.
|
|
1130
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
|
+
- **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.
|
|
1131
1137
|
- **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.
|
|
1132
1138
|
|
|
1133
1139
|
### Act kinds, plan identity and parts identity
|
|
1134
1140
|
|
|
1135
|
-
- **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'
|
|
1141
|
+
- **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).
|
|
1136
1142
|
- **`interview-picks`.** `JobActValues['interview-picks']` carries `questionId`, ordered `selections` (`itemId`, `optionId`, nullable `otherText`) and `note`, with non-null `source.optionSet` (`id` and `sha256`).
|
|
1137
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.
|
|
1138
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`).
|
|
@@ -1141,6 +1147,104 @@ or establish official Create writer acceptance.
|
|
|
1141
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.
|
|
1142
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.
|
|
1143
1149
|
|
|
1150
|
+
### Previous accepted draft Difference
|
|
1151
|
+
|
|
1152
|
+
A trusted reader may declare optional `previousDraft` at the top level of a
|
|
1153
|
+
`draft` publication context, alongside `checkpointEvidence`. Its closed
|
|
1154
|
+
shape is the same in the publication declaration and the finalized act's
|
|
1155
|
+
optional `source.previousDraft` binding. Review includes it in the source
|
|
1156
|
+
digest with the sealed file identities. [Review #914 HQ sign](https://github.com/rig-c/review/issues/914#issuecomment-7001341100)
|
|
1157
|
+
|
|
1158
|
+
```ts
|
|
1159
|
+
previousDraft?: {
|
|
1160
|
+
schema: 'rig-review-previous-draft/1';
|
|
1161
|
+
draft: {id: string; revision: string};
|
|
1162
|
+
composites: {
|
|
1163
|
+
current: {path: string; sha256: string};
|
|
1164
|
+
previous: {path: string; sha256: string};
|
|
1165
|
+
};
|
|
1166
|
+
diff?: {path: string; sha256: string};
|
|
1167
|
+
}
|
|
1168
|
+
```
|
|
1169
|
+
|
|
1170
|
+
The publisher selects the latest live `parts-review` signoff for the same
|
|
1171
|
+
project with a null checkpoint, a different draft ID and an approved recorded
|
|
1172
|
+
verdict. It verifies each retained Parts `assemble` recomposite against its
|
|
1173
|
+
bound hash and seals the original bytes. It omits the declaration when no
|
|
1174
|
+
qualifying draft, retained composite or bound hash is available. Review
|
|
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 and the
|
|
1177
|
+
first 12 revision characters. When that operand is selected, its title shows
|
|
1178
|
+
the ID and full revision. Resolution of the accepted draft stays with the
|
|
1179
|
+
publisher. [Publisher confirmation](https://github.com/rig-c/review/issues/914#issuecomment-7001422013)
|
|
1180
|
+
|
|
1181
|
+
Both composites are straight-alpha RGBA8 PNGs at the current `rig_size`.
|
|
1182
|
+
Every declared path is work-root-relative and matches a path and SHA-256
|
|
1183
|
+
pair in the publication's `files` closure. Existing limits apply: 4,096
|
|
1184
|
+
files, 64 MiB per raw file or decoded RGBA raster, and 256 MiB total.
|
|
1185
|
+
The declaration is limited to 4 KiB and the optional `diff` to 1 MiB.
|
|
1186
|
+
Until Parts publishes its format under [Parts #1369](https://github.com/rig-c/parts/issues/1369),
|
|
1187
|
+
the fallback validator checks the `rig-parts-draft-diff/1` schema string
|
|
1188
|
+
and the binding to both declared composite hashes. Review displays no
|
|
1189
|
+
figures for this operand.
|
|
1190
|
+
|
|
1191
|
+
In assembled Difference, Painting is the default when `painting_in_rig`
|
|
1192
|
+
is available. The Previous accepted draft operand is offered only when
|
|
1193
|
+
`previousDraft` is present. If only the previous draft is available,
|
|
1194
|
+
assembled Difference opens on that operand. Single-part Difference
|
|
1195
|
+
continues to use the painting. The existing Difference route uses
|
|
1196
|
+
`stage-parts/difference/0?threshold=<n>&footprints=false&operand=previous-draft`
|
|
1197
|
+
for the whole-canvas raster. The raster pairs native cells where either
|
|
1198
|
+
composite has nonzero alpha, using the maximum absolute channel delta over
|
|
1199
|
+
RGBA. New interactive Parts Difference comparisons use a fixed threshold of
|
|
1200
|
+
`0` for either operand. The workspace has no threshold input. The shared
|
|
1201
|
+
route and comparison record keep the integer `0–255` range, and the raster
|
|
1202
|
+
highlights deltas strictly greater than the threshold. Zoom, Fit, 1:1 and
|
|
1203
|
+
the view switch work as before. Review displays the raster as visual evidence
|
|
1204
|
+
and computes no figures for this operand. The reviewer submits their verdict
|
|
1205
|
+
through the existing act flow.
|
|
1206
|
+
The painting loop on pre-feature main `d82aff4`
|
|
1207
|
+
(`src/parts-comparison.ts:26–43`) skips cells with zero current alpha and
|
|
1208
|
+
takes the maximum RGB delta. Including either alpha and all four channels
|
|
1209
|
+
makes a removed silhouette or an alpha-only edit visible.
|
|
1210
|
+
|
|
1211
|
+
Pointed comments made in this view carry
|
|
1212
|
+
`view.comparison: {mode: 'difference', opacity, threshold, operand: 'previous-draft'}`
|
|
1213
|
+
in their parts anchor. Other comments omit `operand`. Historical comments
|
|
1214
|
+
and publications without these optional keys retain their existing readers
|
|
1215
|
+
and behavior. The absence of `previousDraft` is a valid publication.
|
|
1216
|
+
|
|
1217
|
+
Admission reports the following bounded details under `JOB_SOURCE_MISMATCH`,
|
|
1218
|
+
except for the limit refusal.
|
|
1219
|
+
|
|
1220
|
+
| Detail | Condition |
|
|
1221
|
+
| --- | --- |
|
|
1222
|
+
| `PREVIOUS_DRAFT_INVALID` | Wrong keys or schema, or a malformed ID, revision or file identity. |
|
|
1223
|
+
| `PREVIOUS_DRAFT_SELECTOR` | The declaration is on a non-draft selector or a record publication. |
|
|
1224
|
+
| `PREVIOUS_DRAFT_SELF` | The previous ID equals the current draft ID. |
|
|
1225
|
+
| `PREVIOUS_DRAFT_UNSEALED operand=<current\|previous\|diff>` | A declared path and hash are absent from the sealed file closure. |
|
|
1226
|
+
| `PREVIOUS_DRAFT_MISSING operand=… path=…` | The declared file is absent. |
|
|
1227
|
+
| `PREVIOUS_DRAFT_HASH_MISMATCH operand=…` | The bytes differ from the declared hash. |
|
|
1228
|
+
| `PREVIOUS_DRAFT_PNG_INVALID operand=…` | A composite fails RGBA8 PNG validation. |
|
|
1229
|
+
| `PREVIOUS_DRAFT_SIZE operand=… expected=WxH received=WxH` | A composite differs from `rig_size`. |
|
|
1230
|
+
| `PREVIOUS_DRAFT_LIMIT operand=…` | A file or declaration exceeds a bound. The outer code is `JOB_SOURCE_UNRETAINABLE`. |
|
|
1231
|
+
| `PREVIOUS_DRAFT_DIFF_INVALID` | The optional file fails the schema-string or two-composite hash check. |
|
|
1232
|
+
|
|
1233
|
+
The publisher emits this field only when installed Review exports
|
|
1234
|
+
`JOB_PREVIOUS_DRAFT_SCHEMA` with value `rig-review-previous-draft/1` from
|
|
1235
|
+
`@rig-c/review/job-host`. This is the publisher-to-Review capability rule.
|
|
1236
|
+
Both new act keys require an admitted `previousDraft`. That admission is
|
|
1237
|
+
their emission gate. The existing pin gate in `src/create-pin-gate.ts`
|
|
1238
|
+
governs Review-to-publisher emission separately. An older Review ignores
|
|
1239
|
+
the extra context key and treats the composite `files` rows as ordinary
|
|
1240
|
+
seals. On the pre-feature main
|
|
1241
|
+
`d82aff4`, the in-process `readPublished` seam is in
|
|
1242
|
+
`src/job-source.ts:1333–1335`, the context type at `:59–67`, and the
|
|
1243
|
+
named reads of `selector`, `files` and `plan` at `:1339–1340` and
|
|
1244
|
+
`:223–233`. `prepareJobSource` reads the known context fields without an
|
|
1245
|
+
exact-key check on the context. The nested `context.parts` check is at
|
|
1246
|
+
`:265`. [HQ compatibility and emission ruling](https://github.com/rig-c/review/issues/914#issuecomment-7001361948)
|
|
1247
|
+
|
|
1144
1248
|
### Rig verdict still backend
|
|
1145
1249
|
|
|
1146
1250
|
New rig-review verdicts use `rig-review/act@3` and a top-level `still` with `path`, `sha256`, `camera:"fixed"` and `frame`. The path is exactly `<sha256>.png`. Setup uses `frame:"setup"`. Numeric seconds require `animation` alongside the frame. Other new acts and historical rig acts retain act@2. `JOB_ACT_SCHEMA`, API@2, stored compatibility markers and the twelve public facade runtime exports retain their established values. The rig-specific revision constant is internal to the contract module. Public type exports include `JobRigReviewAct`, `JobRigStill` and `JobRigCapture`.
|
|
@@ -1165,14 +1269,16 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1165
1269
|
|
|
1166
1270
|
- **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.
|
|
1167
1271
|
- **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.
|
|
1168
|
-
- **Consumer deduplication and
|
|
1272
|
+
- **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).
|
|
1169
1273
|
- **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.
|
|
1170
1274
|
|
|
1171
1275
|
### Model-free record mode and source seam
|
|
1172
1276
|
|
|
1173
1277
|
<a id="preparatory-model-free-record-contract-and-source-seam"></a>
|
|
1174
1278
|
|
|
1175
|
-
`src/job-contract.ts`, `src/job-api.ts`, `src/job-source.ts`, `src/job-act.ts`, `src/job-session.ts`, `src/job-front.ts`, `src/job-host.ts` and `web/job-session.ts` implement and export the active model-free record mode (`rig-review/job-api@3` and `rig-review/act@4`). When a host or session is started with `readRecordPublished` and a non-empty `recordReaderId` (`publicationMode: 'record-and-package'`), `createJobHostPorts` and `JobSession` serve `option-set`, `plan` and `package` publications, `ask`, `next` (`JOB_CAPABILITIES_V3`), `fetch-act` (`rig-review/act@4` for record acts alongside `rig-review/act@2` and `rig-review/act@3` for package acts) and `close` under `rig-review/job-api@3`. On the normal owner URL (`/jobs/<jobId>/?#cap=...`), `retainedPublicationRoutes` serves retained record publications
|
|
1279
|
+
`src/job-contract.ts`, `src/job-api.ts`, `src/job-source.ts`, `src/job-act.ts`, `src/job-session.ts`, `src/job-front.ts`, `src/job-host.ts` and `web/job-session.ts` implement and export the active model-free record mode (`rig-review/job-api@3` and `rig-review/act@4`). When a host or session is started with `readRecordPublished` and a non-empty `recordReaderId` (`publicationMode: 'record-and-package'`), `createJobHostPorts` and `JobSession` serve `option-set`, `plan` and `package` publications, `ask`, `ask-batch`, `next` (`JOB_CAPABILITIES_V3`), `fetch-act` (`rig-review/act@4` for record acts alongside `rig-review/act@2` and `rig-review/act@3` for package acts) and `close` under `rig-review/job-api@3`. On the normal owner URL (`/jobs/<jobId>/?#cap=...`), `retainedPublicationRoutes` serves retained record publications with `recordSource` and the publication's `sourceHash`. `api/review` defaults to model-free metadata, and `api/interview` serves retained `option-set` questions and sealed option images. `prepareJobInspection` and `createJobWindow` render model-free `option-set` and `plan` inspection panels and submit human decisions that finalize `rig-review/act@4` acts (preserving existing `JOB_VISUAL_UNAVAILABLE` / `MODEL_UNAVAILABLE` behavior for package publications). `@rig-c/review/job-host` exports `JOB_API_V3_SCHEMA`, `JOB_RECORD_ACT_SCHEMA`, `JOB_RECORD_READER_ID`, `parseRecordAct`, `prepareJobRecordAct`, `prepareJobRecordSource` and the V3/record type surface (`JobRecordAct`, `JobActV3`, `JobPlanSource`, `JobFetchActRequestV3`, `JobRecordHostHooks`, `JobDisplayPublicationV3`, `DisplayPublicationV3` and companion types). [Review #561](https://github.com/rig-c/review/issues/561), [Review #588](https://github.com/rig-c/review/issues/588), [Review #586](https://github.com/rig-c/review/issues/586).
|
|
1280
|
+
|
|
1281
|
+
A post-interview option set with a `rig` context can also show the accepted rig as its question picture. Review resolves the version and verifies the operative human rig-review signoff's package hash from sealed `project.json`. It requires matching publication seals for every recorded `out/check/build/` row under `derived/review/v<n>/`, then opens the retained `out/check` with the folder adapter and producer handoff disabled. Only the bound compiled model and its page images are exposed through the existing assets route. On success, `api/review` includes the rig manifest and model metadata alongside the same record identity, and `api/interview` omits `missingPicture`. Historical records without this closure, including rigs signed against `outputs`, retain the model-free response and existing missing-picture message. A failed closure check uses the same fallback and leaves the question answerable. [Review #929](https://github.com/rig-c/review/issues/929).
|
|
1176
1282
|
|
|
1177
1283
|
`JOB_API_SCHEMA` (`rig-review/job-api@2`), `JOB_ACT_SCHEMA` (`rig-review/act@2`), `JOB_CAPABILITIES` (`{}`) and default hosts started without `readRecordPublished` (`publicationMode: 'package-only'`) preserve their existing package-only behavior and exact `job-ui/<jobId>.json` descriptor bytes, and reject `rig-review/job-api@3` or tagged record publish requests with HTTP 400 (`JOB_REQUEST_INVALID` / `JOB_API_SCHEMA_MISMATCH`), leaving generation and committed head unchanged. Host startup validates `readRecordPublished`, `recordReaderId` and `publicationMode` on cold start, ordinary reuse and strict `reuseOnly` attachment (`JOB_HOST_OPTION_ID_INVALID` on mismatched hook/ID pairing; `JOB_HOST_REUSE_MISMATCH` on `publicationMode`, `apiSchema`, `actSchema` or `recordReaderId` drift so a package-only listener and a record-mode listener or two different record readers never silently substitute for one another). Satisfied prerequisites are [Review #563](https://github.com/rig-c/review/issues/563) (closed), [Create #277](https://github.com/rig-c/create/issues/277) (closed), [Create #279](https://github.com/rig-c/create/issues/279) (closed), [Create #285](https://github.com/rig-c/create/issues/285) (closed), [Create #286](https://github.com/rig-c/create/issues/286) (closed) and the real Review EN/KO fixture loop proved in [Review #590](https://github.com/rig-c/review/issues/590). Remaining external and cross-repository gates are [Create #278](https://github.com/rig-c/create/issues/278) (open writer consumer fetch, ingest and freeze integration), [Create #317](https://github.com/rig-c/create/issues/317) (waiting on [Review #588](https://github.com/rig-c/review/issues/588) activation) and HQ exact-head sign-off.
|
|
1178
1284
|
|
|
@@ -1186,6 +1292,13 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1186
1292
|
| `RecordSource` | Required `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']`, optional `checkpointEvidence` on plans |
|
|
1187
1293
|
| `rig-review-job-record-source/1` | Required `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']`, optional `checkpointEvidence` on plans |
|
|
1188
1294
|
| `rig-review-job-record-instance/1` | `['schema', 'fingerprint', 'sourceHash']` |
|
|
1295
|
+
| `JobCapabilitiesV3` | `{recordPublication: true, recordActSchema: 'rig-review/act@4', askBatch: true}` |
|
|
1296
|
+
| `AskBatchRequestV3` | `{schema, jobId, requestId, verb: 'ask-batch', expectedGeneration, idempotencyKey, publicationId, subjects}`, `subjects` 1–64 |
|
|
1297
|
+
| `AskBatchValueV3` | `{asks}`, where `asks[i]` answers `subjects[i]` |
|
|
1298
|
+
|
|
1299
|
+
<a id="ask-batch"></a>
|
|
1300
|
+
|
|
1301
|
+
`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`.
|
|
1189
1302
|
|
|
1190
1303
|
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.
|
|
1191
1304
|
|
|
@@ -1397,21 +1510,30 @@ The decoders and consumer projections are read-only. Since [Review #713](https:/
|
|
|
1397
1510
|
rig and direction review-verdict and signoff acts as act@6. The UI submission
|
|
1398
1511
|
keeps its existing `words` and `issues` fields. [Review #746](https://github.com/rig-c/review/issues/746)
|
|
1399
1512
|
adds optional `feedback: Feedback[]` beside required `words` only for the
|
|
1400
|
-
`rig-review` verdict submission. When present, including an empty list,
|
|
1401
|
-
|
|
1402
|
-
`
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
act
|
|
1513
|
+
`rig-review` verdict submission. When present, including an empty list,
|
|
1514
|
+
`feedback` supplies the pinned comments and suppresses the `words` fallback.
|
|
1515
|
+
`feedbackItemComments` maps each row's `summary` to `text` and retains its
|
|
1516
|
+
`id`, frames, target, category and `anchor.context`. The decoder refuses
|
|
1517
|
+
malformed or blank rows. The act bar sends a detached feedback list when there
|
|
1518
|
+
are pinned comments and keeps `words` as their projection. It omits `feedback`
|
|
1519
|
+
when there are no pinned comments. With `feedback` absent, nonblank `words`
|
|
1520
|
+
still supplies one general comment. Direction and image verdict submissions
|
|
1521
|
+
keep their existing closed shapes. The comments mapping by itself keeps the
|
|
1522
|
+
act@6 format.
|
|
1523
|
+
|
|
1524
|
+
Only the `rig-review` verdict and `parts-verdict` accept optional
|
|
1525
|
+
`general: readonly string[]` in their UI submission values. Each string becomes
|
|
1526
|
+
an anchorless `{text}` entry, appended verbatim in list order after the comments
|
|
1527
|
+
produced by the existing fields. For parts verdicts, nonblank `words` still
|
|
1528
|
+
produces a comment after the pinned `issues` and before `general`. Parts Request
|
|
1529
|
+
changes still requires a pinned issue, and approval still requires zero issues. The existing decoder
|
|
1530
|
+
validates the combined comment count, text, evidence and signed projection.
|
|
1531
|
+
Omitting `general` preserves the existing written bytes. By itself, `general`
|
|
1532
|
+
keeps the writer at act@6, and historical words-only acts retain their readers. [Review #831](https://github.com/rig-c/review/issues/831).
|
|
1410
1533
|
|
|
1411
1534
|
Pointed marks, inline crops, bookmarks and valid time-only null frames remain
|
|
1412
1535
|
inside the existing `anchor.context`. This is distinct from act@7's top-level
|
|
1413
1536
|
`comment.context`, which remains disabled by `EMIT_UNPINNED_CREATE_FIELDS`.
|
|
1414
|
-
No new field or decoder rule is added to the written act.
|
|
1415
1537
|
|
|
1416
1538
|
For the words-only mapping, the daemon maps a nonblank note
|
|
1417
1539
|
to one comment: anchored to the checkpoint for a checkpoint, general otherwise.
|
|
@@ -1421,7 +1543,7 @@ A note whose projection exceeds the 10,000-unit scalar bound refuses
|
|
|
1421
1543
|
`JOB_ACT_INVALID`. The bound counts the stored `words`, and the `[label]\n`
|
|
1422
1544
|
prefix is part of them, so a general note longer than 9,990 units refuses even
|
|
1423
1545
|
though act@5 accepted it. Feedback is many comments, not one long note.
|
|
1424
|
-
Each written act must decode through `parseCommentsAct`.
|
|
1546
|
+
Each written act@6 must decode through `parseCommentsAct`.
|
|
1425
1547
|
Image-review verdicts and interview picks stay at act@2, because Create refuses
|
|
1426
1548
|
both under act@6. Record acts stay at act@4, because Create maps only a record
|
|
1427
1549
|
checkpoint under act@6. Standalone save paths keep their existing versions.
|
|
@@ -1572,3 +1694,100 @@ Create refuses unknown fields, so Review emits @7 only when
|
|
|
1572
1694
|
`EMIT_UNPINNED_CREATE_FIELDS` (`src/create-pin-gate.ts`) is true. It is false
|
|
1573
1695
|
until the create tower confirms Create has pinned the Review version that reads
|
|
1574
1696
|
@7. While it is false, writers drop every `context` and emit @6.
|
|
1697
|
+
|
|
1698
|
+
### Mesh edits on Request changes (act@8)
|
|
1699
|
+
|
|
1700
|
+
With a pending `review-verdict` ask at `stage: "rig-review"`, the existing
|
|
1701
|
+
**Request changes** control carries pending Edit Mesh operations with any review
|
|
1702
|
+
comments. `rig-review/act@8` extends the act@7 envelope and its validation with
|
|
1703
|
+
optional `value.meshEdits`, permitted only for `kind: "review-verdict"`,
|
|
1704
|
+
`stage: "rig-review"` and `verdict: "changes-requested"`. An act@8 request for
|
|
1705
|
+
changes may have `comments: []` when it carries a mesh edit. A request with
|
|
1706
|
+
neither a comment nor an edit refuses `JOB_ACT_INVALID`. Review emits @8 only
|
|
1707
|
+
when it carries edits. Rig verdicts without edits keep their act@6 or act@7
|
|
1708
|
+
format and rules. Edit Mesh remains unavailable for a `parts-verdict` subject
|
|
1709
|
+
without a compiled rig (`PARTS_RIG_UNAVAILABLE`).
|
|
1710
|
+
|
|
1711
|
+
`meshEdits` is a nonempty array of exact `{edit, sha256}` objects, ordered by the
|
|
1712
|
+
string `skin/slot/attachment` with at most one entry per `(skin, slot, attachment)`.
|
|
1713
|
+
`JobMeshEditValue` has exactly these keys:
|
|
1714
|
+
|
|
1715
|
+
- `slot`, `attachment` and `skin` are nonempty strings for the edited attachment
|
|
1716
|
+
and its supplying table, as reported by Play's public setup identity. Linked
|
|
1717
|
+
meshes are ineligible for editing.
|
|
1718
|
+
- `basis` is `"setup"`.
|
|
1719
|
+
- `source` is exactly `{vertexCount, triangleCount, hullLength, hash, frame, positions}`.
|
|
1720
|
+
The whole-number counts come from the stored entry's `uvs.length / 2`,
|
|
1721
|
+
`triangles.length / 3` and `hull`. `hash` is 64 lowercase hex characters.
|
|
1722
|
+
`frame` is exactly `{width, height}`, the positive finite model stage size.
|
|
1723
|
+
`positions` is a dense `[number, number][]` with exactly one pair per source
|
|
1724
|
+
vertex, in attachment vertex order. Each pair stores the finite, unrounded
|
|
1725
|
+
setup position before any operation.
|
|
1726
|
+
- `ops` contains 1 to 300 operations, replayed in order. Each operation has
|
|
1727
|
+
exactly the keys in its shape: `{op:"move", v, from, to}`, `{op:"add", at, onEdge?}`,
|
|
1728
|
+
`{op:"remove", v}`, `{op:"edge", a, b}` or `{op:"unedge", a, b}`. `v`, `a`, `b`
|
|
1729
|
+
and both entries of `onEdge`, when present, are nonnegative whole-number
|
|
1730
|
+
vertex IDs. `from`, `to` and `at` are finite `[x, y]` pairs. `from` is the
|
|
1731
|
+
unrounded position immediately before the move. `to` and `at` are rounded to
|
|
1732
|
+
0.01 px. Original IDs are attachment indices. An addition takes the next ID
|
|
1733
|
+
and splits `onEdge` when provided. A removed ID is never reused. `unedge` can
|
|
1734
|
+
remove only a constraint edge added by this edit. A vertex that ends a
|
|
1735
|
+
constraint edge cannot be removed.
|
|
1736
|
+
|
|
1737
|
+
**Coordinates and replay.** Positions use setup-pose crop pixels of the rig
|
|
1738
|
+
canvas, with top-left origin, x right and y down. For a stage with `x = -width/2`,
|
|
1739
|
+
`y = 0` and the drawn root at the world origin, Review maps Play's
|
|
1740
|
+
`readSetupMesh` world coordinates to `(world.x + width/2, height - world.y)`.
|
|
1741
|
+
Review reads setup identity from a fresh, never-played player at the model
|
|
1742
|
+
document's setup values with no selected skin. Playback, the page's skin,
|
|
1743
|
+
controls and other page state do not enter the setup read. The replay contract
|
|
1744
|
+
requires undeformed setup geometry, where each displayed source vertex equals
|
|
1745
|
+
`uv × size + origin`. Review records the displayed positions. Before any op,
|
|
1746
|
+
Parts checks `source.frame` against its rig size and refuses a position count
|
|
1747
|
+
that differs from its source vertex count. It compares each coordinate of
|
|
1748
|
+
`source.positions` with its own at the same vertex index, within 0.001 crop px.
|
|
1749
|
+
It refuses at the first vertex outside that tolerance and reports its index,
|
|
1750
|
+
the position found and the position required. This check applies to all
|
|
1751
|
+
edits, including edits with no `move`. The consumer can replay in either
|
|
1752
|
+
coordinate space and can reproduce the undeformed positions without Play.
|
|
1753
|
+
|
|
1754
|
+
**Attachment hash and payload digest.** `source.hash` is the SHA-256 of the
|
|
1755
|
+
UTF-8 bytes of `JSON.stringify(entry)`, where `entry` is
|
|
1756
|
+
`skins[name=skin].attachments[slot][attachment]` in the hash-verified
|
|
1757
|
+
`skeleton.model.json` named by the act's `source.model`. Use plain `JSON.parse`
|
|
1758
|
+
and preserve the entry's stored key order. The producer recomputes the hash
|
|
1759
|
+
from the model its own build writes. These are the same attachment hash bytes
|
|
1760
|
+
used by the standalone `rig-review-mesh-edit/1` delta and draft. The `sha256`
|
|
1761
|
+
beside each `edit` is the SHA-256 of the canonical UTF-8 JSON bytes of the
|
|
1762
|
+
whole `edit`, including `source.positions`. Sort all object keys by UTF-16 code
|
|
1763
|
+
units, preserve array order, omit whitespace, use `JSON.stringify` string
|
|
1764
|
+
escaping and serialize numbers as ECMAScript `Number.prototype.toString`
|
|
1765
|
+
shortest round-trip text. The value contains no integer-like keys, negative
|
|
1766
|
+
zero or non-finite numbers. For this value domain the rule is RFC 8785 (JCS).
|
|
1767
|
+
|
|
1768
|
+
**Review refusals and rollout.** Before writing the act, Review refuses with
|
|
1769
|
+
`JOB_ACT_INVALID` for invalid shape, digest mismatch, invalid ordering or
|
|
1770
|
+
duplicate identity, ineligible kind, stage or verdict, counts that differ from
|
|
1771
|
+
the stored entry, or an op that cannot replay over the stored topology. An
|
|
1772
|
+
attachment hash that differs from the retained displayed model refuses
|
|
1773
|
+
`JOB_ACT_SOURCE_STALE`. Existing browser `MESH_EDIT_*` refusals still apply.
|
|
1774
|
+
Review ships the decoder with act@8 emission off behind
|
|
1775
|
+
`EMIT_UNPINNED_CREATE_FIELDS` in `src/create-pin-gate.ts`.
|
|
1776
|
+
An edited submission while emission is off refuses `JOB_ACT_KIND_DISABLED`.
|
|
1777
|
+
Create must pin a Review release that reads @8 and build its relay before
|
|
1778
|
+
emission opens. The release that opens the gate will be recorded here when it
|
|
1779
|
+
is known. Older decoders refuse act@8 with `JOB_ACT_INVALID`.
|
|
1780
|
+
Review refuses `JOB_BODY_LIMIT` if the canonical UTF-8 JSON of
|
|
1781
|
+
`value.meshEdits` exceeds 256 KiB. Rig stills and inline comment images
|
|
1782
|
+
retain their existing request allowances. Finalized-act delivery retains its
|
|
1783
|
+
existing limit. Review does not truncate edits.
|
|
1784
|
+
|
|
1785
|
+
**Consumer relay.** Create fetches the finalized act with its existing grant
|
|
1786
|
+
and passes each `edit`, `actId`, act `source.sourceHash` and `sha256` in process
|
|
1787
|
+
to the public Parts API. The identity for deduplication is
|
|
1788
|
+
`(actId, skin, slot, attachment)`. Parts recomputes both hashes and refuses a
|
|
1789
|
+
mismatch by name before any op. During replay it holds `move.from` to `1e-3`
|
|
1790
|
+
crop px and refuses the first op that does not replay by index. The API takes
|
|
1791
|
+
the edit and replay provenance without a Create-project argument or access
|
|
1792
|
+
to Review or Create storage. A mesh edit
|
|
1793
|
+
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).
|
package/docs/STABILITY.md
CHANGED
|
@@ -414,6 +414,27 @@ preserve capability, origin, size, cancellation and replay checks.
|
|
|
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
416
|
|
|
417
|
+
## Mesh-edit act compatibility
|
|
418
|
+
|
|
419
|
+
`rig-review/act@8` is additive to the managed-host act contract. Consumers
|
|
420
|
+
narrow on `schema`. @8 uses the @7 envelope and comment rules, with optional
|
|
421
|
+
`value.meshEdits` restricted to a `review-verdict` at `stage: "rig-review"` with
|
|
422
|
+
`verdict: "changes-requested"`. An edited request may carry an empty comments
|
|
423
|
+
array. Acts without edits keep their existing emission and validation rules.
|
|
424
|
+
Existing @2–@7 decoder entry points, accepted shapes and historical bytes
|
|
425
|
+
retain their contracts. The API version, reviewer and consumer grant, and
|
|
426
|
+
reserved standalone `mesh-edit` kind keep their current contracts. The legacy
|
|
427
|
+
`rig-review-mesh-edit/1` export and `--delta` input keep their existing formats.
|
|
428
|
+
|
|
429
|
+
Review ships the @8 decoder with emission disabled. Create pins a Review
|
|
430
|
+
release that can decode @8 and builds its relay before Review opens the
|
|
431
|
+
emission gate. A live submission carrying edits while the gate is closed
|
|
432
|
+
refuses `JOB_ACT_KIND_DISABLED`. Older decoders refuse the new schema with
|
|
433
|
+
`JOB_ACT_INVALID`. The rollout and the consumer's required hash, frame and
|
|
434
|
+
position checks are part of the [act@8 wire contract](REVIEW_PACKAGE.md#mesh-edits-on-request-changes-act8).
|
|
435
|
+
The host facade adds `parseMeshEditsAct`, `JOB_MESH_EDITS_ACT_SCHEMA` and
|
|
436
|
+
the three mesh edit types listed below.
|
|
437
|
+
|
|
417
438
|
## Named export inventory
|
|
418
439
|
|
|
419
440
|
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).
|
|
@@ -445,16 +466,42 @@ runtime reader. Historical act@2–@5 bytes keep their readers.
|
|
|
445
466
|
[Review #746](https://github.com/rig-c/review/issues/746) adds optional
|
|
446
467
|
`feedback: readonly Feedback[]` to `JobUIActValues['review-verdict']` only when
|
|
447
468
|
`stage` is `rig-review`; `stage`, `verdict` and required `words` remain.
|
|
448
|
-
A present list, including `[]`, supplies the
|
|
469
|
+
A present list, including `[]`, supplies the pinned comments through the
|
|
449
470
|
existing `feedbackItemComments` mapper and act@6 decoder. It preserves entry
|
|
450
471
|
order, text, IDs, frames, target, category and `anchor.context` (including point,
|
|
451
|
-
crop, bookmark and valid time-only null-frame evidence). `words`
|
|
452
|
-
|
|
472
|
+
crop, bookmark and valid time-only null-frame evidence). `words` supplies the
|
|
473
|
+
legacy general comment only when `feedback` is absent.
|
|
453
474
|
Direction and image submissions retain their previous closed shapes. The
|
|
454
475
|
written act stays act@6, historical words-only acts still parse, and the
|
|
455
476
|
act@7 top-level `comment.context` emission gate remains off. There are no new
|
|
456
477
|
exports or schemas. See [Comments decoder contract](REVIEW_PACKAGE.md#comments-decoder-contract).
|
|
457
478
|
|
|
479
|
+
The `rig-review` verdict and `parts-verdict` accept optional
|
|
480
|
+
`general: readonly string[]` on their UI submission values. The writer appends
|
|
481
|
+
each string verbatim as `{text}` after the comments produced by the existing
|
|
482
|
+
fields. `words` remains required. On rig verdicts it supplies the legacy general
|
|
483
|
+
comment only when `feedback` is absent. On parts verdicts nonblank `words` still
|
|
484
|
+
produces one comment after the pinned `issues` and before `general`. A parts
|
|
485
|
+
Request changes verdict still requires a pinned issue, and approval still
|
|
486
|
+
requires zero issues.
|
|
487
|
+
The existing act@6 decoder checks the combined comment count, text and signed
|
|
488
|
+
projection. Omitting `general` preserves the existing mapping and serialized
|
|
489
|
+
act bytes. The finalized act schema and exports are unchanged. [Review #831](https://github.com/rig-c/review/issues/831).
|
|
490
|
+
|
|
491
|
+
[Review #914](https://github.com/rig-c/review/issues/914) adds
|
|
492
|
+
`JOB_PREVIOUS_DRAFT_SCHEMA` (`rig-review-previous-draft/1`) and the
|
|
493
|
+
type-only `JobPreviousDraft`. A publisher may send the optional draft
|
|
494
|
+
context field only when installed Review exports that constant. An older
|
|
495
|
+
Review ignores the context key and handles its sealed files as ordinary
|
|
496
|
+
file identities. The finalized parts act carries the same optional
|
|
497
|
+
`source.previousDraft` binding, and a pointed parts comment in that
|
|
498
|
+
comparison carries an optional `view.comparison.operand` of
|
|
499
|
+
`'previous-draft'`. Both act keys require an admitted declaration.
|
|
500
|
+
Legacy publications, source bindings and comments
|
|
501
|
+
with the keys absent keep their existing contract. The Review-to-publisher
|
|
502
|
+
pin gate applies in its existing direction. See
|
|
503
|
+
[Previous accepted draft Difference](REVIEW_PACKAGE.md#previous-accepted-draft-difference).
|
|
504
|
+
|
|
458
505
|
The exact runtime exports are listed below. Constants preserve their literal
|
|
459
506
|
values from the frozen semantic contract.
|
|
460
507
|
|
|
@@ -464,6 +511,7 @@ values from the frozen semantic contract.
|
|
|
464
511
|
- `prepareJobRecordSource`
|
|
465
512
|
- `parseCommentsAct`
|
|
466
513
|
- `parseContextCommentsAct`
|
|
514
|
+
- `parseMeshEditsAct`
|
|
467
515
|
- `projectComments`
|
|
468
516
|
- `parseCommentsSession`
|
|
469
517
|
- `parseCommentsCompareSession`
|
|
@@ -471,6 +519,7 @@ values from the frozen semantic contract.
|
|
|
471
519
|
- `projectSelectedCommentsFeedback`
|
|
472
520
|
- `JOB_COMMENTS_ACT_SCHEMA`
|
|
473
521
|
- `JOB_COMMENT_CONTEXT_ACT_SCHEMA`
|
|
522
|
+
- `JOB_MESH_EDITS_ACT_SCHEMA`
|
|
474
523
|
- `REVIEW_COMMENTS_SESSION_SCHEMA`
|
|
475
524
|
- `REVIEW_COMMENTS_COMPARE_SESSION_SCHEMA`
|
|
476
525
|
- `PARTS_COMMENTS_VERDICT_SCHEMA`
|
|
@@ -481,6 +530,7 @@ values from the frozen semantic contract.
|
|
|
481
530
|
- `JOB_RECORD_ACT_SCHEMA`
|
|
482
531
|
- `JOB_RECORD_READER_ID`
|
|
483
532
|
- `JOB_PARTS_ENUMERATOR_RANGE`
|
|
533
|
+
- `JOB_PREVIOUS_DRAFT_SCHEMA`
|
|
484
534
|
- `JOB_ENABLED_ACT_KINDS`
|
|
485
535
|
- `JOB_RESERVED_ACT_KINDS`
|
|
486
536
|
- `JOB_PLAN_BOUND_SIGNOFF_STAGES`
|
|
@@ -525,6 +575,7 @@ without aliases or copied wire shapes.
|
|
|
525
575
|
- `JobSelector`
|
|
526
576
|
- `JobSourceBinding`
|
|
527
577
|
- `JobModelSourceBinding`
|
|
578
|
+
- `JobPreviousDraft`
|
|
528
579
|
- `JobCapabilities`
|
|
529
580
|
- `JobCapabilitiesV3`
|
|
530
581
|
- `JobModelReviewValue`
|
|
@@ -565,6 +616,8 @@ without aliases or copied wire shapes.
|
|
|
565
616
|
- `JobPublishResultV3`
|
|
566
617
|
- `JobAskRequest`
|
|
567
618
|
- `JobAskRequestV3`
|
|
619
|
+
- `JobAskBatchRequestV3`
|
|
620
|
+
- `JobAskBatchValueV3`
|
|
568
621
|
- `JobNextRequest`
|
|
569
622
|
- `JobNextRequestV3`
|
|
570
623
|
- `JobCloseRequest`
|
|
@@ -638,6 +691,9 @@ without aliases or copied wire shapes.
|
|
|
638
691
|
- `JobCommentContext`
|
|
639
692
|
- `JobContextComment`
|
|
640
693
|
- `JobContextCommentsAct`
|
|
694
|
+
- `JobMeshEditValue`
|
|
695
|
+
- `JobMeshEdit`
|
|
696
|
+
- `JobMeshEditsAct`
|
|
641
697
|
- `ReviewCommentsSession`
|
|
642
698
|
- `CompareCommentsSession`
|
|
643
699
|
- `PartsCommentsVerdict`
|
|
@@ -658,7 +714,9 @@ A consumer checks the thirty runtime exports and every listed type, including
|
|
|
658
714
|
`JobHostAttachField`, `JobHostAttachFailure`, `JobInterviewJson`,
|
|
659
715
|
`JobInterviewRecord`, `JobInterviewDiagnostic`, `JobInterviewDiagnostics` and
|
|
660
716
|
the comments decoder types and the record-mode `JobRecordAct` / `JobActV3` / `JobPlanSource` /
|
|
661
|
-
`JobFetchActRequestV3` / `JobRecordHostHooks`
|
|
717
|
+
`JobFetchActRequestV3` / `JobRecordHostHooks` / `JobCapabilitiesV3` / `JobAskBatchRequestV3` /
|
|
718
|
+
`JobAskBatchValueV3` surface, through `@rig-c/review/job-host`. The consumer also
|
|
719
|
+
proves that `JobCapabilitiesV3` carries `askBatch: true`.
|
|
662
720
|
TypeScript checks the installed consumer and the runtime checks the full owner
|
|
663
721
|
resources, retained publication, semantic ports, declared hooks, enumerator
|
|
664
722
|
version/row carriage, ordinary reuse, strict `reuseOnly: {expected}` attachment
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Stable request JSON, preserving JSON.stringify's ordering of integer-like keys.
|
|
2
|
+
* The closed mesh edit grammar has no integer-like object keys.
|
|
3
|
+
*/
|
|
4
|
+
export function canonicalJson(value: unknown): string {
|
|
5
|
+
const sorted = (item: unknown): unknown => {
|
|
6
|
+
if (Array.isArray(item)) return item.map(sorted);
|
|
7
|
+
if (item !== null && typeof item === 'object') {
|
|
8
|
+
return Object.fromEntries(Object.entries(item).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)
|
|
9
|
+
.map(([key, child]) => [key, sorted(child)]));
|
|
10
|
+
}
|
|
11
|
+
return item;
|
|
12
|
+
};
|
|
13
|
+
return JSON.stringify(sorted(value));
|
|
14
|
+
}
|
package/src/create-pin-gate.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Fields Create cannot parse until it pins the Review version that reads them
|
|
2
|
-
// (act@7 comment context, #714; Parts view.visibleLayers, #652). Off until the create tower confirms that pin.
|
|
2
|
+
// (act@7 comment context, #714; act@8 mesh edits, #952; Parts view.visibleLayers, #652). Off until the create tower confirms that pin.
|
|
3
3
|
export const EMIT_UNPINNED_CREATE_FIELDS = false;
|
|
@@ -16,23 +16,32 @@ export interface DirectionInspection {
|
|
|
16
16
|
};
|
|
17
17
|
postVersion?: number;
|
|
18
18
|
rigVersion: number;
|
|
19
|
+
/**
|
|
20
|
+
* rig-create/direction@3: the take is the composed model's own `idle`, played at the model stage.
|
|
21
|
+
* @3 authors no camera, timing or scene, so its camera and timing key lists are empty.
|
|
22
|
+
*/
|
|
23
|
+
composed?: true;
|
|
19
24
|
camera: { space: 'rig-world-y-up'; keys: { time: number; easing: string; box: { x: number; y: number; width: number; height: number } }[] };
|
|
20
25
|
take: { duration: number; loop: boolean };
|
|
21
26
|
timing: { time: number; source_time: number; easing: string }[];
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
|
-
* Read the inspection subset of Create's rig-create/direction@1 or
|
|
26
|
-
* Scene bytes are inspected separately when the manifest declares them.
|
|
27
|
-
* Create validates scene, project history and citations.
|
|
30
|
+
* Read the inspection subset of Create's rig-create/direction@1, @2 or @3.
|
|
31
|
+
* Scene bytes are inspected separately when the manifest declares them; @3 has no scene.
|
|
32
|
+
* Create validates scene, compose, acceptance, project history and citations.
|
|
28
33
|
*/
|
|
29
34
|
export function readDirectionInspection(value: unknown, file: Binding, model: Binding | null): DirectionInspection {
|
|
30
35
|
const doc = object(value, 'direction');
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
const composed = doc.schema === 'rig-create/direction@3';
|
|
37
|
+
if (doc.schema !== 'rig-create/direction@1' && doc.schema !== 'rig-create/direction@2' && !composed)
|
|
38
|
+
throw new Error('DIRECTION_SCHEMA: expected rig-create/direction@1, rig-create/direction@2 or rig-create/direction@3');
|
|
33
39
|
const rig = object(doc.rig, 'direction.rig');
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
// @3 binds the compiled model at the top level; @1/@2 bind it under rig.
|
|
41
|
+
if (composed && (!doc.model || typeof doc.model !== 'object')) throw new Error('DIRECTION_SCHEMA: rig-create/direction@3 requires a top-level model');
|
|
42
|
+
const field = composed ? 'direction.model' : 'direction.rig.model';
|
|
43
|
+
const binding = object(composed ? doc.model : rig.model, field);
|
|
44
|
+
const path = packagePath(binding.path, field + '.path');
|
|
36
45
|
if (!model || path !== model.path || binding.sha256 !== model.sha256)
|
|
37
46
|
throw new Error('DIRECTION_MODEL_MISMATCH: expected the inspected model path and SHA-256');
|
|
38
47
|
const rigVersion = numberField(rig.version, 'direction.rig.version', 1);
|
|
@@ -40,6 +49,7 @@ export function readDirectionInspection(value: unknown, file: Binding, model: Bi
|
|
|
40
49
|
const take = object(doc.take, 'direction.take');
|
|
41
50
|
const duration = numberField(take.duration, 'direction.take.duration');
|
|
42
51
|
if (duration === 0 || typeof take.loop !== 'boolean') throw new Error('DIRECTION_SCHEMA: expected positive duration and loop boolean');
|
|
52
|
+
if (composed) return { file, model, rigVersion, composed: true, camera: { space: 'rig-world-y-up', keys: [] }, take: { duration, loop: take.loop }, timing: [] };
|
|
43
53
|
const camera = object(doc.camera, 'direction.camera');
|
|
44
54
|
const timing = object(doc.timing, 'direction.timing');
|
|
45
55
|
if (camera.space !== 'rig-world-y-up') throw new Error('DIRECTION_SCHEMA: expected rig-world-y-up camera');
|
package/src/feedback-export.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {parseCommentsSession} from './session.ts';
|
|
|
13
13
|
import {projectComments} from './stage-comment.ts';
|
|
14
14
|
import type {ReviewCommentsSession, JobCommentFeedbackAnchor, JobCommentPartsAnchor} from './job-contract.ts';
|
|
15
15
|
import type {PartsIssue} from './parts-comment.ts';
|
|
16
|
-
import type {JobComment, JobActValues, ActV3, JobCommentsAct} from './job-contract.ts';
|
|
16
|
+
import type {JobComment, JobActValues, ActV3, JobCommentsAct, JobMeshEditsAct} from './job-contract.ts';
|
|
17
17
|
import type {CompareFeedback} from './compare-session.ts';
|
|
18
18
|
import {parseRecordAct} from './job-api.ts';
|
|
19
19
|
|
|
@@ -51,7 +51,7 @@ export function legacyRecordActComments(raw: unknown): {text: string}[] {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/** Display projection of already-decoded @2–@5 acts, without upgrading their envelopes. */
|
|
54
|
-
export function legacyActComments(act: Exclude<ActV3, JobCommentsAct>): {text: string}[] {
|
|
54
|
+
export function legacyActComments(act: Exclude<ActV3, JobCommentsAct | JobMeshEditsAct>): {text: string}[] {
|
|
55
55
|
if (act.kind === 'interview-picks') return [];
|
|
56
56
|
const value = act.value;
|
|
57
57
|
const fields = [value.words];
|