rig-review 4.6.0 → 4.8.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 +243 -28
- package/docs/STABILITY.md +88 -12
- package/package.json +1 -1
- package/src/canonical-json.ts +14 -0
- 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 +99 -12
- package/src/job-api.ts +185 -38
- package/src/job-checkpoint-evidence.ts +19 -6
- package/src/job-cli.ts +12 -6
- package/src/job-contract.ts +91 -15
- 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 +76 -41
- 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 +10 -0
- package/web/catalog-ko.ts +10 -0
- package/web/job-rig-screen.ts +63 -21
- package/web/job-session.ts +54 -26
- package/web/main.ts +158 -50
- package/web/mesh-editor.ts +123 -13
- package/web/part-selection.ts +1 -1
- package/web/parts-viewport-provider.ts +46 -11
- 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/src/create-pin-gate.ts +0 -3
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,102 @@ 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 act keys require an admitted `previousDraft`. An older Review ignores
|
|
1237
|
+
the extra context key and treats the composite `files` rows as ordinary
|
|
1238
|
+
seals. On the pre-feature main
|
|
1239
|
+
`d82aff4`, the in-process `readPublished` seam is in
|
|
1240
|
+
`src/job-source.ts:1333–1335`, the context type at `:59–67`, and the
|
|
1241
|
+
named reads of `selector`, `files` and `plan` at `:1339–1340` and
|
|
1242
|
+
`:223–233`. `prepareJobSource` reads the known context fields without an
|
|
1243
|
+
exact-key check on the context. The nested `context.parts` check is at
|
|
1244
|
+
`:265`. [HQ compatibility and emission ruling](https://github.com/rig-c/review/issues/914#issuecomment-7001361948)
|
|
1245
|
+
|
|
1144
1246
|
### Rig verdict still backend
|
|
1145
1247
|
|
|
1146
1248
|
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 +1267,16 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1165
1267
|
|
|
1166
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.
|
|
1167
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.
|
|
1168
|
-
- **Consumer deduplication and
|
|
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).
|
|
1169
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.
|
|
1170
1272
|
|
|
1171
1273
|
### Model-free record mode and source seam
|
|
1172
1274
|
|
|
1173
1275
|
<a id="preparatory-model-free-record-contract-and-source-seam"></a>
|
|
1174
1276
|
|
|
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
|
|
1277
|
+
`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).
|
|
1278
|
+
|
|
1279
|
+
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
1280
|
|
|
1177
1281
|
`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
1282
|
|
|
@@ -1186,6 +1290,13 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1186
1290
|
| `RecordSource` | Required `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']`, optional `checkpointEvidence` on plans |
|
|
1187
1291
|
| `rig-review-job-record-source/1` | Required `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']`, optional `checkpointEvidence` on plans |
|
|
1188
1292
|
| `rig-review-job-record-instance/1` | `['schema', 'fingerprint', 'sourceHash']` |
|
|
1293
|
+
| `JobCapabilitiesV3` | `{recordPublication: true, recordActSchema: 'rig-review/act@4', askBatch: true}` |
|
|
1294
|
+
| `AskBatchRequestV3` | `{schema, jobId, requestId, verb: 'ask-batch', expectedGeneration, idempotencyKey, publicationId, subjects}`, `subjects` 1–64 |
|
|
1295
|
+
| `AskBatchValueV3` | `{asks}`, where `asks[i]` answers `subjects[i]` |
|
|
1296
|
+
|
|
1297
|
+
<a id="ask-batch"></a>
|
|
1298
|
+
|
|
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.
|
|
1189
1300
|
|
|
1190
1301
|
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
1302
|
|
|
@@ -1393,25 +1504,35 @@ strings and readers. There is no interview-picks arm or question/ask anchor in
|
|
|
1393
1504
|
this extension. Technical configuration and search controls are outside it.
|
|
1394
1505
|
|
|
1395
1506
|
The decoders and consumer projections are read-only. Since [Review #713](https://github.com/rig-c/review/issues/713)
|
|
1396
|
-
(HQ contract ruling), the UI finalizers
|
|
1397
|
-
rig and direction review-verdict and signoff
|
|
1398
|
-
keeps its existing `words` and `issues` fields.
|
|
1507
|
+
(HQ contract ruling), the UI finalizers use act@6 as the base format for
|
|
1508
|
+
fresh checkpoint, parts-verdict, rig and direction review-verdict and signoff
|
|
1509
|
+
acts. The UI submission keeps its existing `words` and `issues` fields.
|
|
1510
|
+
[Review #746](https://github.com/rig-c/review/issues/746)
|
|
1399
1511
|
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
|
-
|
|
1512
|
+
`rig-review` verdict submission. When present, including an empty list,
|
|
1513
|
+
`feedback` supplies the pinned comments and suppresses the `words` fallback.
|
|
1514
|
+
`feedbackItemComments` maps each row's `summary` to `text` and retains its
|
|
1515
|
+
`id`, frames, target, category and `anchor.context`. The decoder refuses
|
|
1516
|
+
malformed or blank rows. The act bar sends a detached feedback list when there
|
|
1517
|
+
are pinned comments and keeps `words` as their projection. It omits `feedback`
|
|
1518
|
+
when there are no pinned comments. With `feedback` absent, nonblank `words`
|
|
1519
|
+
still supplies one general comment. Direction and image verdict submissions
|
|
1520
|
+
keep their existing closed shapes.
|
|
1521
|
+
|
|
1522
|
+
Only the `rig-review` verdict and `parts-verdict` accept optional
|
|
1523
|
+
`general: readonly string[]` in their UI submission values. Each string becomes
|
|
1524
|
+
an anchorless `{text}` entry, appended verbatim in list order after the comments
|
|
1525
|
+
produced by the existing fields. For parts verdicts, nonblank `words` still
|
|
1526
|
+
produces a comment after the pinned `issues` and before `general`. Parts Request
|
|
1527
|
+
changes still requires a pinned issue, and approval still requires zero issues. The existing decoder
|
|
1528
|
+
validates the combined comment count, text, evidence and signed projection.
|
|
1529
|
+
Omitting `general` preserves the existing written bytes. Adding `general` by
|
|
1530
|
+
itself keeps the existing schema selection. Historical words-only acts retain
|
|
1531
|
+
their readers. [Review #831](https://github.com/rig-c/review/issues/831).
|
|
1410
1532
|
|
|
1411
1533
|
Pointed marks, inline crops, bookmarks and valid time-only null frames remain
|
|
1412
|
-
inside the existing `anchor.context`.
|
|
1413
|
-
`comment.context
|
|
1414
|
-
No new field or decoder rule is added to the written act.
|
|
1534
|
+
inside the existing `anchor.context`. [Comment context (act@7)](#comment-context-act7)
|
|
1535
|
+
defines the separate top-level `comment.context` field.
|
|
1415
1536
|
|
|
1416
1537
|
For the words-only mapping, the daemon maps a nonblank note
|
|
1417
1538
|
to one comment: anchored to the checkpoint for a checkpoint, general otherwise.
|
|
@@ -1421,7 +1542,7 @@ A note whose projection exceeds the 10,000-unit scalar bound refuses
|
|
|
1421
1542
|
`JOB_ACT_INVALID`. The bound counts the stored `words`, and the `[label]\n`
|
|
1422
1543
|
prefix is part of them, so a general note longer than 9,990 units refuses even
|
|
1423
1544
|
though act@5 accepted it. Feedback is many comments, not one long note.
|
|
1424
|
-
Each written act must decode through `parseCommentsAct`.
|
|
1545
|
+
Each written act@6 must decode through `parseCommentsAct`.
|
|
1425
1546
|
Image-review verdicts and interview picks stay at act@2, because Create refuses
|
|
1426
1547
|
both under act@6. Record acts stay at act@4, because Create maps only a record
|
|
1427
1548
|
checkpoint under act@6. Standalone save paths keep their existing versions.
|
|
@@ -1487,9 +1608,8 @@ Anchors use existing source-bound fields without a new kind discriminator:
|
|
|
1487
1608
|
`view.visibleLayers: {name, imageHash}[]` retains the complete visible set in
|
|
1488
1609
|
source item order, bound to `sourceHash` and each loaded source image. Entries
|
|
1489
1610
|
must be unique and source-bound before restoration replaces the hidden set.
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
`EMIT_UNPINNED_CREATE_FIELDS` gate is enabled after Create confirms its parser pin.
|
|
1611
|
+
Starting in 4.8.0, fresh assembled capture writes this field. Readers accept
|
|
1612
|
+
both forms. Absence retains the historical restore branch and recorded bytes.
|
|
1493
1613
|
- Named image: `name`, optionally the complete existing-field composition
|
|
1494
1614
|
`imageRegion, crop, nativeCrop`. Names resolve in the sealed image set. Regions
|
|
1495
1615
|
use nonnegative native-pixel integer origins, positive extents and at most
|
|
@@ -1568,7 +1688,102 @@ existing pin or restore path already carries:
|
|
|
1568
1688
|
Each key reuses the decoder of the shape it copies. A `reopen` act has no ask
|
|
1569
1689
|
subject, so its comments cannot carry `context.subject`.
|
|
1570
1690
|
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1691
|
+
Starting in 4.8.0, the rig verdict writer takes top-level `context` from pinned
|
|
1692
|
+
stage-comment evidence and the bound ask and source. It uses @7 when at least
|
|
1693
|
+
one comment carries that context and @6 when none does. A rig verdict carrying
|
|
1694
|
+
mesh edits uses @8 as described below.
|
|
1695
|
+
See [Create compatibility](STABILITY.md#mesh-edit-act-compatibility).
|
|
1696
|
+
|
|
1697
|
+
### Mesh edits on Request changes (act@8)
|
|
1698
|
+
|
|
1699
|
+
With a pending `review-verdict` ask at `stage: "rig-review"`, the existing
|
|
1700
|
+
**Request changes** control carries pending Edit Mesh operations with any review
|
|
1701
|
+
comments. `rig-review/act@8` extends the act@7 envelope and its validation with
|
|
1702
|
+
optional `value.meshEdits`, permitted only for `kind: "review-verdict"`,
|
|
1703
|
+
`stage: "rig-review"` and `verdict: "changes-requested"`. An act@8 request for
|
|
1704
|
+
changes may have `comments: []` when it carries a mesh edit. A request with
|
|
1705
|
+
neither a comment nor an edit refuses `JOB_ACT_INVALID`. Review emits @8 only
|
|
1706
|
+
when it carries edits. Rig verdicts without edits keep their act@6 or act@7
|
|
1707
|
+
format and rules. Edit Mesh remains unavailable for a `parts-verdict` subject
|
|
1708
|
+
without a compiled rig (`PARTS_RIG_UNAVAILABLE`).
|
|
1709
|
+
|
|
1710
|
+
`meshEdits` is a nonempty array of exact `{edit, sha256}` objects, ordered by the
|
|
1711
|
+
string `skin/slot/attachment` with at most one entry per `(skin, slot, attachment)`.
|
|
1712
|
+
`JobMeshEditValue` has exactly these keys:
|
|
1713
|
+
|
|
1714
|
+
- `slot`, `attachment` and `skin` are nonempty strings for the edited attachment
|
|
1715
|
+
and its supplying table, as reported by Play's public setup identity. Linked
|
|
1716
|
+
meshes are ineligible for editing.
|
|
1717
|
+
- `basis` is `"setup"`.
|
|
1718
|
+
- `source` is exactly `{vertexCount, triangleCount, hullLength, hash, frame, positions}`.
|
|
1719
|
+
The whole-number counts come from the stored entry's `uvs.length / 2`,
|
|
1720
|
+
`triangles.length / 3` and `hull`. `hash` is 64 lowercase hex characters.
|
|
1721
|
+
`frame` is exactly `{width, height}`, the positive finite model stage size.
|
|
1722
|
+
`positions` is a dense `[number, number][]` with exactly one pair per source
|
|
1723
|
+
vertex, in attachment vertex order. Each pair stores the finite, unrounded
|
|
1724
|
+
setup position before any operation.
|
|
1725
|
+
- `ops` contains 1 to 300 operations, replayed in order. Each operation has
|
|
1726
|
+
exactly the keys in its shape: `{op:"move", v, from, to}`, `{op:"add", at, onEdge?}`,
|
|
1727
|
+
`{op:"remove", v}`, `{op:"edge", a, b}` or `{op:"unedge", a, b}`. `v`, `a`, `b`
|
|
1728
|
+
and both entries of `onEdge`, when present, are nonnegative whole-number
|
|
1729
|
+
vertex IDs. `from`, `to` and `at` are finite `[x, y]` pairs. `from` is the
|
|
1730
|
+
unrounded position immediately before the move. `to` and `at` are rounded to
|
|
1731
|
+
0.01 px. Original IDs are attachment indices. An addition takes the next ID
|
|
1732
|
+
and splits `onEdge` when provided. A removed ID is never reused. `unedge` can
|
|
1733
|
+
remove only a constraint edge added by this edit. A vertex that ends a
|
|
1734
|
+
constraint edge cannot be removed.
|
|
1735
|
+
|
|
1736
|
+
**Coordinates and replay.** Positions use setup-pose crop pixels of the rig
|
|
1737
|
+
canvas, with top-left origin, x right and y down. For a stage with `x = -width/2`,
|
|
1738
|
+
`y = 0` and the drawn root at the world origin, Review maps Play's
|
|
1739
|
+
`readSetupMesh` world coordinates to `(world.x + width/2, height - world.y)`.
|
|
1740
|
+
Review reads setup identity from a fresh, never-played player at the model
|
|
1741
|
+
document's setup values with no selected skin. Playback, the page's skin,
|
|
1742
|
+
controls and other page state do not enter the setup read. The replay contract
|
|
1743
|
+
requires undeformed setup geometry, where each displayed source vertex equals
|
|
1744
|
+
`uv × size + origin`. Review records the displayed positions. Before any op,
|
|
1745
|
+
Parts checks `source.frame` against its rig size and refuses a position count
|
|
1746
|
+
that differs from its source vertex count. It compares each coordinate of
|
|
1747
|
+
`source.positions` with its own at the same vertex index, within 0.001 crop px.
|
|
1748
|
+
It refuses at the first vertex outside that tolerance and reports its index,
|
|
1749
|
+
the position found and the position required. This check applies to all
|
|
1750
|
+
edits, including edits with no `move`. The consumer can replay in either
|
|
1751
|
+
coordinate space and can reproduce the undeformed positions without Play.
|
|
1752
|
+
|
|
1753
|
+
**Attachment hash and payload digest.** `source.hash` is the SHA-256 of the
|
|
1754
|
+
UTF-8 bytes of `JSON.stringify(entry)`, where `entry` is
|
|
1755
|
+
`skins[name=skin].attachments[slot][attachment]` in the hash-verified
|
|
1756
|
+
`skeleton.model.json` named by the act's `source.model`. Use plain `JSON.parse`
|
|
1757
|
+
and preserve the entry's stored key order. The producer recomputes the hash
|
|
1758
|
+
from the model its own build writes. These are the same attachment hash bytes
|
|
1759
|
+
used by the standalone `rig-review-mesh-edit/1` delta and draft. The `sha256`
|
|
1760
|
+
beside each `edit` is the SHA-256 of the canonical UTF-8 JSON bytes of the
|
|
1761
|
+
whole `edit`, including `source.positions`. Sort all object keys by UTF-16 code
|
|
1762
|
+
units, preserve array order, omit whitespace, use `JSON.stringify` string
|
|
1763
|
+
escaping and serialize numbers as ECMAScript `Number.prototype.toString`
|
|
1764
|
+
shortest round-trip text. The value contains no integer-like keys, negative
|
|
1765
|
+
zero or non-finite numbers. For this value domain the rule is RFC 8785 (JCS).
|
|
1766
|
+
|
|
1767
|
+
**Review refusals.** Before writing the act, Review refuses with
|
|
1768
|
+
`JOB_ACT_INVALID` for invalid shape, digest mismatch, invalid ordering or
|
|
1769
|
+
duplicate identity, ineligible kind, stage or verdict, counts that differ from
|
|
1770
|
+
the stored entry, or an op that cannot replay over the stored topology. An
|
|
1771
|
+
attachment hash that differs from the retained displayed model refuses
|
|
1772
|
+
`JOB_ACT_SOURCE_STALE`. Existing browser `MESH_EDIT_*` refusals still apply.
|
|
1773
|
+
Starting in 4.8.0, eligible submissions carrying edits emit act@8. Review
|
|
1774
|
+
decoders older than 4.7.0 refuse act@8 with `JOB_ACT_INVALID`. See
|
|
1775
|
+
[Create compatibility](STABILITY.md#mesh-edit-act-compatibility).
|
|
1776
|
+
Review refuses `JOB_BODY_LIMIT` if the canonical UTF-8 JSON of
|
|
1777
|
+
`value.meshEdits` exceeds 256 KiB. Rig stills and inline comment images
|
|
1778
|
+
retain their existing request allowances. Finalized-act delivery retains its
|
|
1779
|
+
existing limit. Review does not truncate edits.
|
|
1780
|
+
|
|
1781
|
+
**Consumer relay.** Create fetches the finalized act with its existing grant
|
|
1782
|
+
and passes each `edit`, `actId`, act `source.sourceHash` and `sha256` in process
|
|
1783
|
+
to the public Parts API. The identity for deduplication is
|
|
1784
|
+
`(actId, skin, slot, attachment)`. Parts recomputes both hashes and refuses a
|
|
1785
|
+
mismatch by name before any op. During replay it holds `move.from` to `1e-3`
|
|
1786
|
+
crop px and refuses the first op that does not replay by index. The API takes
|
|
1787
|
+
the edit and replay provenance without a Create-project argument or access
|
|
1788
|
+
to Review or Create storage. A mesh edit
|
|
1789
|
+
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. Rig verdicts without edits use @7 when a comment carries top-level
|
|
424
|
+
`context` and @6 otherwise.
|
|
425
|
+
Existing @2–@7 decoder entry points, accepted shapes and historical bytes
|
|
426
|
+
retain their contracts. The API version, reviewer and consumer grant, and
|
|
427
|
+
reserved standalone `mesh-edit` kind keep their current contracts. The legacy
|
|
428
|
+
`rig-review-mesh-edit/1` export and `--delta` input keep their existing formats.
|
|
429
|
+
|
|
430
|
+
Starting in 4.8.0, Review emits @8 for eligible submissions carrying edits.
|
|
431
|
+
Create versions below 1.13.0 must not run with Review 4.8.0. Create's exact Review
|
|
432
|
+
dependency pin normally prevents this pairing. Review decoders older than 4.7.0
|
|
433
|
+
refuse @8 with `JOB_ACT_INVALID`. The consumer's required hash, frame and position
|
|
434
|
+
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).
|
|
@@ -427,14 +448,14 @@ See [Comments decoder contract](REVIEW_PACKAGE.md#comments-decoder-contract).
|
|
|
427
448
|
(`rig-review/act@7`), for thirty runtime exports total, plus the type-only
|
|
428
449
|
`JobCommentContext`, `JobContextComment` and `JobContextCommentsAct`. The change
|
|
429
450
|
is additive: `parseCommentsAct`, `JobComment` and `JobCommentsAct` keep their @6
|
|
430
|
-
shapes, and @2–@6 decode unchanged.
|
|
431
|
-
|
|
451
|
+
shapes, and @2–@6 decode unchanged. Starting in 4.8.0, the comments writer
|
|
452
|
+
uses @7 when a comment carries top-level `context`. See [Comment context (act@7)](REVIEW_PACKAGE.md#comment-context-act7).
|
|
432
453
|
|
|
433
454
|
[Review #713](https://github.com/rig-c/review/issues/713) turns on the act@6
|
|
434
455
|
writers. `JobAct` widens to `JobLegacyAct | JobRigReviewAct | JobPartsVerdictAct |
|
|
435
456
|
JobCommentsAct`, so `JobActV3`, `JobEvent`, `JobEventV3`, `JobNextValue`,
|
|
436
457
|
`JobNextValueV3` and `JobHostPorts.commitUIAct` admit fresh act@6 values. No
|
|
437
|
-
export is added or removed, and `JobComment` is unchanged.
|
|
458
|
+
export is added or removed, and `JobComment` is unchanged. With that change, fresh UI checkpoint,
|
|
438
459
|
parts-verdict, rig and direction review-verdict and signoff acts are
|
|
439
460
|
`rig-review/act@6`. Image-review verdicts and interview picks stay at act@2, and
|
|
440
461
|
record acts stay at act@4. Consumers narrow on `schema`. A consumer's
|
|
@@ -445,15 +466,55 @@ 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
|
-
|
|
453
|
-
Direction and image submissions retain their previous closed shapes.
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
472
|
+
crop, bookmark and valid time-only null-frame evidence). `words` supplies the
|
|
473
|
+
legacy general comment only when `feedback` is absent.
|
|
474
|
+
Direction and image submissions retain their previous closed shapes. Review
|
|
475
|
+
originally wrote this mapping as act@6. Starting in 4.8.0, pinned rig stage
|
|
476
|
+
comments can also carry the top-level context described above. Historical
|
|
477
|
+
words-only acts still parse.
|
|
478
|
+
See [Comments decoder contract](REVIEW_PACKAGE.md#comments-decoder-contract).
|
|
479
|
+
|
|
480
|
+
The `rig-review` verdict and `parts-verdict` accept optional
|
|
481
|
+
`general: readonly string[]` on their UI submission values. The writer appends
|
|
482
|
+
each string verbatim as `{text}` after the comments produced by the existing
|
|
483
|
+
fields. `words` remains required. On rig verdicts it supplies the legacy general
|
|
484
|
+
comment only when `feedback` is absent. On parts verdicts nonblank `words` still
|
|
485
|
+
produces one comment after the pinned `issues` and before `general`. A parts
|
|
486
|
+
Request changes verdict still requires a pinned issue, and approval still
|
|
487
|
+
requires zero issues.
|
|
488
|
+
The existing act@6 decoder checks the combined comment count, text and signed
|
|
489
|
+
projection. Omitting `general` preserves the existing mapping and serialized
|
|
490
|
+
act bytes. Adding `general` by itself keeps the existing schema selection.
|
|
491
|
+
[Review #831](https://github.com/rig-c/review/issues/831).
|
|
492
|
+
|
|
493
|
+
Starting in 4.8.0, fresh assembled Parts issues carry `view.visibleLayers`
|
|
494
|
+
with the complete source-bound visible set. Readers still accept historical
|
|
495
|
+
anchors without that field. See [Comments decoder contract](REVIEW_PACKAGE.md#comments-decoder-contract).
|
|
496
|
+
|
|
497
|
+
[Review #914](https://github.com/rig-c/review/issues/914) adds
|
|
498
|
+
`JOB_PREVIOUS_DRAFT_SCHEMA` (`rig-review-previous-draft/1`) and the
|
|
499
|
+
type-only `JobPreviousDraft`. A publisher may send the optional draft
|
|
500
|
+
context field only when installed Review exports that constant. An older
|
|
501
|
+
Review ignores the context key and handles its sealed files as ordinary
|
|
502
|
+
file identities. The finalized parts act carries the same optional
|
|
503
|
+
`source.previousDraft` binding, and a pointed parts comment in that
|
|
504
|
+
comparison carries an optional `view.comparison.operand` of
|
|
505
|
+
`'previous-draft'`. Both act keys require an admitted declaration.
|
|
506
|
+
Legacy publications, source bindings and comments
|
|
507
|
+
with the keys absent keep their existing contract. The Review-to-publisher
|
|
508
|
+
pin gate applies in its existing direction. See
|
|
509
|
+
[Previous accepted draft Difference](REVIEW_PACKAGE.md#previous-accepted-draft-difference).
|
|
510
|
+
|
|
511
|
+
[Review #914](https://github.com/rig-c/review/issues/914) adds the previous-draft
|
|
512
|
+
constant `JOB_PREVIOUS_DRAFT_SCHEMA` (`rig-review-previous-draft/1`), for twenty-nine runtime exports total after the 4.0.0 removal of `startJobHub` and `assertJobImageSetCapability`, plus the type-only `JobPreviousDraft`.
|
|
513
|
+
|
|
514
|
+
[Review #952](https://github.com/rig-c/review/issues/952) adds the act@8 decoder
|
|
515
|
+
`parseMeshEditsAct` and its constant `JOB_MESH_EDITS_ACT_SCHEMA`
|
|
516
|
+
(`rig-review/act@8`), for thirty-one runtime exports total, plus the type-only
|
|
517
|
+
`JobMeshEditValue`, `JobMeshEdit` and `JobMeshEditsAct`.
|
|
457
518
|
|
|
458
519
|
The exact runtime exports are listed below. Constants preserve their literal
|
|
459
520
|
values from the frozen semantic contract.
|
|
@@ -464,6 +525,7 @@ values from the frozen semantic contract.
|
|
|
464
525
|
- `prepareJobRecordSource`
|
|
465
526
|
- `parseCommentsAct`
|
|
466
527
|
- `parseContextCommentsAct`
|
|
528
|
+
- `parseMeshEditsAct`
|
|
467
529
|
- `projectComments`
|
|
468
530
|
- `parseCommentsSession`
|
|
469
531
|
- `parseCommentsCompareSession`
|
|
@@ -471,6 +533,7 @@ values from the frozen semantic contract.
|
|
|
471
533
|
- `projectSelectedCommentsFeedback`
|
|
472
534
|
- `JOB_COMMENTS_ACT_SCHEMA`
|
|
473
535
|
- `JOB_COMMENT_CONTEXT_ACT_SCHEMA`
|
|
536
|
+
- `JOB_MESH_EDITS_ACT_SCHEMA`
|
|
474
537
|
- `REVIEW_COMMENTS_SESSION_SCHEMA`
|
|
475
538
|
- `REVIEW_COMMENTS_COMPARE_SESSION_SCHEMA`
|
|
476
539
|
- `PARTS_COMMENTS_VERDICT_SCHEMA`
|
|
@@ -481,6 +544,7 @@ values from the frozen semantic contract.
|
|
|
481
544
|
- `JOB_RECORD_ACT_SCHEMA`
|
|
482
545
|
- `JOB_RECORD_READER_ID`
|
|
483
546
|
- `JOB_PARTS_ENUMERATOR_RANGE`
|
|
547
|
+
- `JOB_PREVIOUS_DRAFT_SCHEMA`
|
|
484
548
|
- `JOB_ENABLED_ACT_KINDS`
|
|
485
549
|
- `JOB_RESERVED_ACT_KINDS`
|
|
486
550
|
- `JOB_PLAN_BOUND_SIGNOFF_STAGES`
|
|
@@ -525,6 +589,7 @@ without aliases or copied wire shapes.
|
|
|
525
589
|
- `JobSelector`
|
|
526
590
|
- `JobSourceBinding`
|
|
527
591
|
- `JobModelSourceBinding`
|
|
592
|
+
- `JobPreviousDraft`
|
|
528
593
|
- `JobCapabilities`
|
|
529
594
|
- `JobCapabilitiesV3`
|
|
530
595
|
- `JobModelReviewValue`
|
|
@@ -565,6 +630,8 @@ without aliases or copied wire shapes.
|
|
|
565
630
|
- `JobPublishResultV3`
|
|
566
631
|
- `JobAskRequest`
|
|
567
632
|
- `JobAskRequestV3`
|
|
633
|
+
- `JobAskBatchRequestV3`
|
|
634
|
+
- `JobAskBatchValueV3`
|
|
568
635
|
- `JobNextRequest`
|
|
569
636
|
- `JobNextRequestV3`
|
|
570
637
|
- `JobCloseRequest`
|
|
@@ -638,6 +705,9 @@ without aliases or copied wire shapes.
|
|
|
638
705
|
- `JobCommentContext`
|
|
639
706
|
- `JobContextComment`
|
|
640
707
|
- `JobContextCommentsAct`
|
|
708
|
+
- `JobMeshEditValue`
|
|
709
|
+
- `JobMeshEdit`
|
|
710
|
+
- `JobMeshEditsAct`
|
|
641
711
|
- `ReviewCommentsSession`
|
|
642
712
|
- `CompareCommentsSession`
|
|
643
713
|
- `PartsCommentsVerdict`
|
|
@@ -653,12 +723,18 @@ Rows are capped at 4096, roles at 128 UTF-16 code units and literal paths at 409
|
|
|
653
723
|
## Installed acceptance
|
|
654
724
|
|
|
655
725
|
`bun run smoke` packs the package and installs that tarball into an empty project.
|
|
656
|
-
A consumer checks the thirty runtime exports and every listed type, including
|
|
726
|
+
A consumer checks the thirty-one runtime exports and every listed type, including
|
|
657
727
|
`JobHostListenerIncarnation`, `JobHostReuseBinding`, `JobHostReuseExpectation`,
|
|
658
728
|
`JobHostAttachField`, `JobHostAttachFailure`, `JobInterviewJson`,
|
|
659
729
|
`JobInterviewRecord`, `JobInterviewDiagnostic`, `JobInterviewDiagnostics` and
|
|
660
730
|
the comments decoder types and the record-mode `JobRecordAct` / `JobActV3` / `JobPlanSource` /
|
|
661
|
-
`JobFetchActRequestV3` / `JobRecordHostHooks`
|
|
731
|
+
`JobFetchActRequestV3` / `JobRecordHostHooks` / `JobCapabilitiesV3` / `JobAskBatchRequestV3` /
|
|
732
|
+
`JobAskBatchValueV3` surface, through `@rig-c/review/job-host`. The consumer also
|
|
733
|
+
proves that `JobCapabilitiesV3` carries `askBatch: true`. In `JobCapabilitiesV3`,
|
|
734
|
+
`recordPublication`, `recordActSchema` and `askBatch` describe the host rather
|
|
735
|
+
than the current head: `ask-batch` applies only to a record-retained head
|
|
736
|
+
publication and a package head refuses `JOB_REQUEST_INVALID`, so a consumer
|
|
737
|
+
checks the publication's mode as well as the flag.
|
|
662
738
|
TypeScript checks the installed consumer and the runtime checks the full owner
|
|
663
739
|
resources, retained publication, semantic ports, declared hooks, enumerator
|
|
664
740
|
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
|
+
}
|