rig-review 2.7.1 → 2.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 +27 -11
- package/docs/STABILITY.md +80 -4
- package/docs/WORKFLOWS.md +1 -1
- package/package.json +1 -1
- package/src/interview-project.ts +173 -10
- package/src/job-act.ts +59 -11
- package/src/job-api.ts +194 -13
- package/src/job-contract.ts +117 -7
- package/src/job-front.ts +165 -26
- package/src/job-host.ts +118 -1
- package/src/job-session.ts +193 -46
- package/src/job-source.ts +88 -16
- package/web/catalog-en.ts +1 -0
- package/web/catalog-ko.ts +1 -0
- package/web/job-session.ts +483 -84
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -1031,11 +1031,25 @@ Pre-cutoff currentness-only exceptions display `INTERVIEW_OPTIONS_SCENE_LEGACY`
|
|
|
1031
1031
|
without blocking the legacy interview. Full scene image and registration checks
|
|
1032
1032
|
remain producer checks.
|
|
1033
1033
|
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1034
|
+
[Review #555](https://github.com/rig-c/review/issues/555) carries scene
|
|
1035
|
+
interview history and legacy warnings through standing job publications under
|
|
1036
|
+
`JobPublication.interview` (`rig-review/job-interview@1`, `null` for non-Create
|
|
1037
|
+
packages) across `publish`, `next`, `readPublication` and the retained
|
|
1038
|
+
`/jobs/<jobId>/publications/<publicationId>/instances/<instanceKey>/api/interview`
|
|
1039
|
+
route. Every inspected `pending_options` row, choice-bound `answer`/`guide`/`history[i]`
|
|
1040
|
+
row and completed `answer.agent_decision` row is recorded in `interview.records`
|
|
1041
|
+
with its own evaluation timestamp (`evaluatedAt` for inspection rows, `answer.at`
|
|
1042
|
+
for answer rows, `decision.at` for completed decisions, and `at: null` with no
|
|
1043
|
+
currentness evaluation for covers-only decisions) and joined 1:1 by `(record, at)`
|
|
1044
|
+
to `interview.diagnostics` (`INTERVIEW_OPTIONS_STALE` error or
|
|
1045
|
+
`INTERVIEW_OPTIONS_SCENE_LEGACY` warning). Active editable option sets that fail
|
|
1046
|
+
currentness or codec checks still refuse standing publication with
|
|
1047
|
+
`JOB_RECORD_INCOMPLETE` before publication lookup or snapshot writes. Browser
|
|
1048
|
+
and unit probes over `tests/fixtures/scene-interview-551` alter the committed
|
|
1049
|
+
writer archives into explicit synthetic controls
|
|
1050
|
+
(`SYNTHETIC_CONTROL_OVER_WRITER_ARCHIVE`); committed writer archive provenance
|
|
1051
|
+
does not make an altered project a real-user scene (`REAL_USER_SCENE_PENDING`)
|
|
1052
|
+
or establish official Create writer acceptance.
|
|
1039
1053
|
|
|
1040
1054
|
## Live job contract
|
|
1041
1055
|
|
|
@@ -1190,23 +1204,25 @@ The manifest and complete retained image rows enter the composite source hash. L
|
|
|
1190
1204
|
- **Consumer deduplication and future in-process mesh consumption.** Consumer writers deduplicate `actId` before current-source checks, then validate each new source and atomically commit the writer result plus replay identity. Replaying an applied `actId` returns the existing record, while a new stale act refuses before mutation. Verdict, signoff and stage transition remain three separate consumer writes. Once `mesh-edit` is jointly frozen with [Parts #1159](https://github.com/rig-c/parts/issues/1159), Create will fetch a finalized mesh act and pass its typed value in process to Parts' public exported API owned by [Parts #1159](https://github.com/rig-c/parts/issues/1159), with Parts reading neither Review nor Create storage and taking no Create-project argument, while standalone `--delta` remains legacy outside this cycle.
|
|
1191
1205
|
- **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_IMAGE_SET_UNSUPPORTED`, `JOB_IMAGE_SET_INVALID`, `JOB_IMAGE_SET_DUPLICATE_NAME`, `JOB_IMAGE_SET_DUPLICATE_PATH`, `JOB_IMAGE_SET_ROLE_INVALID`, `JOB_IMAGE_SET_PATH_REFUSED`, `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.
|
|
1192
1206
|
|
|
1193
|
-
###
|
|
1207
|
+
### Model-free record mode and source seam
|
|
1194
1208
|
|
|
1195
|
-
|
|
1209
|
+
<a id="preparatory-model-free-record-contract-and-source-seam"></a>
|
|
1196
1210
|
|
|
1197
|
-
`
|
|
1211
|
+
`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 without invoking `loadReview` or synthesizing a fake `manifest` or `source.package` (`api/review` returns `{recordSource, sourceHash, capabilities, feedbackCatalog: {slots: null}}`, and `api/interview` serves retained `option-set` questions and sealed option images), while `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).
|
|
1212
|
+
|
|
1213
|
+
`JOB_API_SCHEMA` (`rig-review/job-api@2`), `JOB_ACT_SCHEMA` (`rig-review/act@2`), `JOB_CAPABILITIES` (`{imageSetVerdict: true}`) 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.
|
|
1198
1214
|
|
|
1199
1215
|
| Surface | Exact keys or closed values |
|
|
1200
1216
|
| --- | --- |
|
|
1201
1217
|
| `PublishResultV3` | `{kind, path, selector}` (`package`), `{kind, questionId, setId}` (`option-set`), `{kind}` (`plan`) |
|
|
1202
1218
|
| `RecordFreeze` | `{kind: 'producer-held', holdId, record: {path: 'project.json', sha256}}` |
|
|
1203
|
-
| `RecordSubject` | `{kind: 'interview-picks', questionId, setId}`, `{kind: 'checkpoint', checkpointId}`, `{kind: 'signoff', stage}` (`plan-approved`, `rigging-interview`, `post-interview`) |
|
|
1219
|
+
| `RecordSubject` | `{kind: 'interview-picks', questionId, setId}`, `{kind: 'checkpoint', checkpointId}`, `{kind: 'signoff', stage}` (`plan-approved`, `rigging-interview`, `post-interview`), `{kind: 'reopen', stage}` |
|
|
1204
1220
|
| `RecordPublishedContext` | `['label', 'parts', 'inputs', 'files', 'plan', 'subjects']` |
|
|
1205
1221
|
| `RecordPartsIdentity` | `['name', 'version', 'integrity']` |
|
|
1206
1222
|
| `RecordSource` | `['sourceHash', 'projectHash', 'record', 'inputs', 'files', 'subject', 'selection', 'optionSet', 'optionSetFile', 'plan', 'subjects']` |
|
|
1207
1223
|
| `rig-review-job-record-source/1` | `['schema', 'record', 'selection', 'inputs', 'optionSet', 'optionSetFile', 'plan', 'subjects', 'files']` |
|
|
1208
1224
|
| `rig-review-job-record-instance/1` | `['schema', 'fingerprint', 'sourceHash']` |
|
|
1209
1225
|
|
|
1210
|
-
The read-only official reader returns the six-key `RecordPublishedContext` with producer-sealed `parts`. `prepareJobRecordSource` runs `phase: 'inventory'` on the immutable source root 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. 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.
|
|
1226
|
+
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.
|
|
1211
1227
|
|
|
1212
|
-
`interview-picks` records carry `plan: null` and remain valid for source preparation, ask binding and `rig-review/act@4` preparation. An inspection-only plan record with `plan: {steps: []}` and `subjects: []` is valid for source preparation and freshness checks, while plan `checkpoint` and `signoff` ask binding and `rig-review/act@4` preparation require non-empty `plan.steps` and declared subjects (`JOB_ASK_INVALID` / `JOB_ACT_INVALID`). Focused unit tests
|
|
1228
|
+
`interview-picks` records carry `plan: null` and remain valid for source preparation, ask binding and `rig-review/act@4` preparation. An inspection-only plan record with `plan: {steps: []}` and `subjects: []` is valid for source preparation and freshness checks, while plan `checkpoint` and `signoff` ask binding and `rig-review/act@4` preparation require non-empty `plan.steps` and declared subjects (`JOB_ASK_INVALID` / `JOB_ACT_INVALID`), and plan `reopen` ask binding and `rig-review/act@4` `{stage, words}` preparation require a declared `{kind: 'reopen', stage}` subject on a `plan` record source ([Review #586](https://github.com/rig-c/review/issues/586)). Focused unit tests cover synthetic reader doubles, normal owner URL model-free record inspection (`retainedPublicationRoutes` + `prepareJobInspection` + `createJobWindow`), and archive-backed reader-double evidence over extracted `2-rigging-answers.tar.gz` (`rig-review/job-api@3` and `rig-review/act@4` parsed by `parseRecordAct` using a local `readRecordPublished` reader double and synthetic parts integrity, distinct from official installed Create reader/consumer conformance under [Create #278](https://github.com/rig-c/create/issues/278) and [Create #317](https://github.com/rig-c/create/issues/317)).
|
package/docs/STABILITY.md
CHANGED
|
@@ -77,6 +77,9 @@ interface JobSessionOptions {
|
|
|
77
77
|
readonly reviewer: JobReviewerBinding;
|
|
78
78
|
readonly readPublished?: JobPublicationReader;
|
|
79
79
|
readonly partsEnumerator?: JobPartsEnumerator;
|
|
80
|
+
readonly publicationMode?: JobPublicationMode;
|
|
81
|
+
readonly readRecordPublished?: RecordPublicationReader;
|
|
82
|
+
readonly recordReaderId?: string;
|
|
80
83
|
readonly afterSnapshot?: () => void | Promise<void>;
|
|
81
84
|
readonly afterDirectorySync?: (path: string) => void;
|
|
82
85
|
}
|
|
@@ -558,7 +561,7 @@ model binding nor a valid image-set binding uses `JOB_ASK_INVALID`.
|
|
|
558
561
|
|
|
559
562
|
## Named export inventory
|
|
560
563
|
|
|
561
|
-
The backend rig-still extension retains the twelve runtime exports and `JOB_ACT_SCHEMA` at act@2. `JobAct` additionally includes `JobRigReviewAct` at act@3 with top-level `JobRigStill`. The facade adds type-only `JobLegacyAct`, `JobRigReviewAct`, `JobRigStill` and `JobRigCapture` exports,
|
|
564
|
+
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`. The facade adds type-only `JobLegacyAct`, `JobRigReviewAct`, `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 revision constant, 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).
|
|
562
565
|
|
|
563
566
|
The exact runtime exports are listed below. Constants preserve their literal
|
|
564
567
|
values from the frozen semantic contract.
|
|
@@ -566,9 +569,15 @@ values from the frozen semantic contract.
|
|
|
566
569
|
- `startJobHost`
|
|
567
570
|
- `startJobHub`
|
|
568
571
|
- `assertJobImageSetCapability`
|
|
572
|
+
- `parseRecordAct`
|
|
573
|
+
- `prepareJobRecordAct`
|
|
574
|
+
- `prepareJobRecordSource`
|
|
569
575
|
- `JOB_CAPABILITIES`
|
|
570
576
|
- `JOB_API_SCHEMA`
|
|
577
|
+
- `JOB_API_V3_SCHEMA`
|
|
571
578
|
- `JOB_ACT_SCHEMA`
|
|
579
|
+
- `JOB_RECORD_ACT_SCHEMA`
|
|
580
|
+
- `JOB_RECORD_READER_ID`
|
|
572
581
|
- `JOB_PARTS_ENUMERATOR_RANGE`
|
|
573
582
|
- `JOB_ENABLED_ACT_KINDS`
|
|
574
583
|
- `JOB_RESERVED_ACT_KINDS`
|
|
@@ -577,7 +586,7 @@ values from the frozen semantic contract.
|
|
|
577
586
|
- `JOB_ERROR_CODES`
|
|
578
587
|
|
|
579
588
|
The exact type-only exports follow. Their existing definitions in
|
|
580
|
-
`src/job-contract.ts`, `src/job-source.ts`, `src/job-session.ts`,
|
|
589
|
+
`src/job-contract.ts`, `src/job-source.ts`, `src/job-act.ts`, `src/job-session.ts`,
|
|
581
590
|
`src/job-worker.ts`, `src/job-front.ts` and `src/job-hub.ts` are reexported
|
|
582
591
|
without aliases or copied wire shapes.
|
|
583
592
|
|
|
@@ -622,6 +631,7 @@ without aliases or copied wire shapes.
|
|
|
622
631
|
- `JobImageSetInput`
|
|
623
632
|
- `JobImageSet`
|
|
624
633
|
- `JobCapabilities`
|
|
634
|
+
- `JobCapabilitiesV3`
|
|
625
635
|
- `JobModelReviewValue`
|
|
626
636
|
- `JobImageReviewValue`
|
|
627
637
|
- `JobReviewerBinding`
|
|
@@ -629,33 +639,96 @@ without aliases or copied wire shapes.
|
|
|
629
639
|
- `JobVerdict`
|
|
630
640
|
- `JobPartOutcome`
|
|
631
641
|
- `JobReviewStage`
|
|
642
|
+
- `JobLegacyAct`
|
|
643
|
+
- `JobRigReviewAct`
|
|
644
|
+
- `JobRigStill`
|
|
645
|
+
- `JobRigCapture`
|
|
632
646
|
- `JobActValues`
|
|
633
647
|
- `JobUIActValues`
|
|
634
648
|
- `JobActSources`
|
|
635
649
|
- `JobAct`
|
|
650
|
+
- `JobRecordAct`
|
|
651
|
+
- `JobActV3`
|
|
636
652
|
- `JobSubject`
|
|
653
|
+
- `JobRecordSubject`
|
|
637
654
|
- `JobPendingAsk`
|
|
655
|
+
- `JobPendingAskV3`
|
|
656
|
+
- `JobInterviewJson`
|
|
657
|
+
- `JobInterviewRecord`
|
|
658
|
+
- `JobInterviewDiagnostic`
|
|
659
|
+
- `JobInterviewDiagnostics`
|
|
638
660
|
- `JobPublication`
|
|
661
|
+
- `JobPublicationV3`
|
|
639
662
|
- `JobStatus`
|
|
663
|
+
- `JobStatusV3`
|
|
640
664
|
- `JobPublishRequest`
|
|
665
|
+
- `JobPublishRequestV3`
|
|
666
|
+
- `JobPublishResultV3`
|
|
641
667
|
- `JobAskRequest`
|
|
668
|
+
- `JobAskRequestV3`
|
|
642
669
|
- `JobNextRequest`
|
|
670
|
+
- `JobNextRequestV3`
|
|
643
671
|
- `JobCloseRequest`
|
|
672
|
+
- `JobCloseRequestV3`
|
|
644
673
|
- `JobAgentRequest`
|
|
674
|
+
- `JobAgentRequestV3`
|
|
645
675
|
- `JobFetchActRequest`
|
|
676
|
+
- `JobFetchActRequestV3`
|
|
646
677
|
- `JobErrorCode`
|
|
647
678
|
- `JobFailure`
|
|
648
679
|
- `JobResult`
|
|
649
680
|
- `JobEvent`
|
|
681
|
+
- `JobEventV3`
|
|
650
682
|
- `JobNextValue`
|
|
683
|
+
- `JobNextValueV3`
|
|
651
684
|
- `JobResponseValues`
|
|
685
|
+
- `JobResponseValuesV3`
|
|
652
686
|
- `JobApiResponse`
|
|
687
|
+
- `JobApiResponseV3`
|
|
653
688
|
- `JobUISubmission`
|
|
689
|
+
- `JobUISubmissionV3`
|
|
654
690
|
- `JobDisplayAcknowledgment`
|
|
655
691
|
- `JobDisplayReceipt`
|
|
656
692
|
- `JobDisplayPublication`
|
|
693
|
+
- `JobDisplayPublicationV3`
|
|
694
|
+
- `DisplayPublicationV3`
|
|
657
695
|
- `JobHostPorts`
|
|
658
696
|
- `JobConsumerGrant`
|
|
697
|
+
- `JobPublicationMode`
|
|
698
|
+
- `JobRecordHostHooks`
|
|
699
|
+
- `JobProjectRecord`
|
|
700
|
+
- `JobRecordFreeze`
|
|
701
|
+
- `JobRecordOptionResult`
|
|
702
|
+
- `JobRecordPlanResult`
|
|
703
|
+
- `JobRecordResult`
|
|
704
|
+
- `JobRecordPartsIdentity`
|
|
705
|
+
- `JobRecordActKind`
|
|
706
|
+
- `JobRecordSignoffStage`
|
|
707
|
+
- `JobRecordPicksSubject`
|
|
708
|
+
- `JobRecordCheckpointSubject`
|
|
709
|
+
- `JobRecordSignoffSubject`
|
|
710
|
+
- `JobRecordReopenSubject`
|
|
711
|
+
- `JobRecordPlanSubject`
|
|
712
|
+
- `JobRecordSubject`
|
|
713
|
+
- `JobRecordContextBase`
|
|
714
|
+
- `JobOptionContext`
|
|
715
|
+
- `JobPlanContext`
|
|
716
|
+
- `JobRecordPublishedContext`
|
|
717
|
+
- `JobRecordReaderInput`
|
|
718
|
+
- `JobRecordPublicationReader`
|
|
719
|
+
- `JobRecordSourceBase`
|
|
720
|
+
- `JobOptionSource`
|
|
721
|
+
- `JobPlanSource`
|
|
722
|
+
- `JobRecordSource`
|
|
723
|
+
- `JobSourceV3`
|
|
724
|
+
- `JobRecordSignoffValue`
|
|
725
|
+
- `JobRecordReopenValue`
|
|
726
|
+
- `JobRecordUIActValues`
|
|
727
|
+
- `JobRecordUISubmission`
|
|
728
|
+
- `JobRetainedRecordSource`
|
|
729
|
+
- `JobRetainedSource`
|
|
730
|
+
- `JobRetainedSourceV3`
|
|
731
|
+
- `JobRootIdentity`
|
|
659
732
|
|
|
660
733
|
## Parts enumeration boundary
|
|
661
734
|
|
|
@@ -668,9 +741,12 @@ Rows are capped at 4096, roles at 128 UTF-16 code units and literal paths at 409
|
|
|
668
741
|
## Installed acceptance
|
|
669
742
|
|
|
670
743
|
`bun run smoke` packs the package and installs that tarball into an empty project.
|
|
671
|
-
A consumer imports the
|
|
744
|
+
A consumer imports the eighteen runtime exports and every listed type, including
|
|
672
745
|
`JobHostListenerIncarnation`, `JobHostReuseBinding`, `JobHostReuseExpectation`,
|
|
673
|
-
`JobHostAttachField
|
|
746
|
+
`JobHostAttachField`, `JobHostAttachFailure`, `JobInterviewJson`,
|
|
747
|
+
`JobInterviewRecord`, `JobInterviewDiagnostic`, `JobInterviewDiagnostics` and
|
|
748
|
+
the record-mode `JobRecordAct` / `JobActV3` / `JobPlanSource` /
|
|
749
|
+
`JobFetchActRequestV3` / `JobRecordHostHooks` surface, through `@rig-c/review/job-host`.
|
|
674
750
|
TypeScript checks the installed consumer and the runtime checks the full owner
|
|
675
751
|
resources, retained publication, semantic ports, declared hooks, enumerator
|
|
676
752
|
version/row carriage, ordinary reuse, strict `reuseOnly: {expected}` attachment
|
package/docs/WORKFLOWS.md
CHANGED
|
@@ -681,7 +681,7 @@ the source-bound result and deduplicate by `actId`.
|
|
|
681
681
|
- **One standing window and visual gate.** Every owner visual, question, choice, correction and verdict goes through one standing Review window/link plus one what-to-look-at line. Internal agent and HQ media stay internal and are never substituted for the owner handoff. When a required visual is missing (`visual.status` set to `'unavailable'` with a named `code`), the agent stops immediately and files a Create on-path Review card rather than falling back to chat text or images.
|
|
682
682
|
- **Human UI vs agent verbs.** People submit through the Review browser UI (`actor` set to `'human'`, `channel` set to `'review-ui'`). Trusted host bootstrap declares `reviewer` (`id` and `role` as `'owner'` or `'delegate'`), which the browser UI cannot type or override. This binding records bootstrap-declared provenance rather than keyboard-user authentication, and Create maps `role` to its existing `by` authority. Agents use only `publish`, `ask`, `next` and `close` (`JobAgentRequest`), with `expectedGeneration` compare-and-swap (CAS) and `idempotencyKey` on mutations.
|
|
683
683
|
- **Explicit producer-held freeze and explicit close.** Every `publish` request designates a root-relative `result` (`path` and `selector`, never a command) and carries an explicit producer-held freeze (`freeze.kind` set to `'producer-held'`, `holdId`, `record` as `JobFileIdentity` or `null` for a declared non-Create root) held until acknowledgment. Review validates retained bytes, detects a moved record (`JOB_RECORD_MOVED`, `JOB_RECORD_INCOMPLETE`, `JOB_FREEZE_REQUIRED`, `JOB_SOURCE_MISMATCH`, `JOB_SOURCE_UNRETAINABLE`, `JOB_ROOT_REPLACED`) and commits local generation CAS (`JOB_GENERATION_STALE`, `JOB_IDEMPOTENCY_CONFLICT`). The freeze assertion is a caller obligation rather than a lock Review can impose on independent writers. Review offers no watched-root or automatic-close guarantee, and only explicit `close` ends an active job.
|
|
684
|
-
- **Exact displayed source and retained drafts.** The daemon derives `JobSourceBinding` from validated retained bytes and the actual displayed publication (`ackDisplayed` returning a page-scoped `displayedNonce` receipt, pinned same-origin `routes` with no 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. Clients never supply trusted source hashes or transfer prior approval onto a new binding. When a new publication updates the displayed source, old local drafts
|
|
684
|
+
- **Exact displayed source and retained drafts.** The daemon derives `JobSourceBinding` from validated retained bytes and the actual displayed publication (`ackDisplayed` returning a page-scoped `displayedNonce` receipt, pinned same-origin `routes` with no 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. Clients never supply trusted source hashes or transfer prior approval onto a new binding. When a new publication updates the displayed source or a browser tab reconnects to the same job, the window shows an explicit changed-version notice, preserves compatible camera, animation, time, repeat, part/solo, reference and panel state (flagging incompatible selections explicitly), and retains old local drafts in storage for their original source binding without rebinding onto the new publication.
|
|
685
685
|
- **Finalized acts, five enabled kinds and cursor replay.** `next` (`after` cursor and bounded abortable `waitMs` that never consumes an act) and `subscribeJob` replay complete durable `JobEvent` records (`published`, `pending`, `act`, `closed`). Only five act kinds are enabled (`interview-picks`, `checkpoint`, `parts-verdict`, `review-verdict`, `signoff`). `described-correction` (awaiting the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist) and `mesh-edit` (awaiting the joint [Parts #1159](https://github.com/rig-c/parts/issues/1159) freeze) stay reserved and disabled (`JOB_ACT_KIND_DISABLED`).
|
|
686
686
|
- **Checkpoints, signoffs, plan steps and parts PNGs.** In `checkpoint` acts, `outcome` is `'pass'` or `'fail'` only (`'pending'` stays in the UI draft and never produces a finalized act), and required `words` is preserved verbatim as a string including empty or whitespace-only text. The browser sends `checkpointId`, `outcome` and `words` only while the daemon copies resolved `planStepId` from the validated ask, and Create derives execution stage from its authoritative step phase and order without Review stamping a stage. Only `'pass'` is eligible for Create's checkpoint sign-off writer, while `'fail'` is feedback or a named consumer refusal. In `signoff` acts, `decision` is `'approved'` only (changes requested are a verdict) with required `words` preserved verbatim including empty or whitespace-only text. A verdict, a signoff and a Create stage transition are three separate writes, and plan-bound signoff stages (`plan-approved`, `rigging-interview`, `post-interview`) require `source.plan` with exact displayed step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) without Review recomputing `stepHash`. 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.
|
|
687
687
|
- **No agent file carriage, writer-owned sibling fetch and public host seam.** Agents never build, parse, reshape or carry Review session, picks, verdict or applied-record storage files. [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184) own direct writer publication and act fetch through a private writer-owned sibling binding outside `project.json` (`writer-owned-sibling-fetch-capability`, pending Create #184 production reader/writer integration). That binding is never tracked in version control or unstaged project output, dies at explicit `close` with a new grant per job incarnation, and grants read-only `fetch-act` over loopback with `Authorization`. In the public managed-host startup seam (`startJobHost` from `@rig-c/review/job-host`, frozen in [Public API stability](STABILITY.md#managed-owner-host)), hook-bearing host callers declare `readerId` for `readPublished` and `bindingId` for `installWriterBinding` and `partsEnumeratorId` for `partsEnumerator`; missing or invalid IDs refuse with `JOB_HOST_OPTION_ID_INVALID`, and listener reuse requires equal `readerId`, `bindingId` and `partsEnumeratorId` or refuses with `JOB_HOST_REUSE_MISMATCH` (with no function hashes). Future mesh-edit consumption is owned by [Parts #1159](https://github.com/rig-c/parts/issues/1159), where Create fetches a finalized mesh act and passes its typed value in process to Parts' public exported API without Parts reading Review or Create storage.
|
package/package.json
CHANGED
package/src/interview-project.ts
CHANGED
|
@@ -3,6 +3,12 @@ import { closeSync, constants, fstatSync, lstatSync, openSync, readSync, realpat
|
|
|
3
3
|
import { extname, join, resolve } from 'node:path';
|
|
4
4
|
import { isDeepStrictEqual as equal } from 'node:util';
|
|
5
5
|
import {coveringChange, sceneAt} from './interview-scene.ts';
|
|
6
|
+
import type {
|
|
7
|
+
JobInterviewDiagnostic,
|
|
8
|
+
JobInterviewDiagnostics,
|
|
9
|
+
JobInterviewJson,
|
|
10
|
+
JobInterviewRecord,
|
|
11
|
+
} from './job-contract.ts';
|
|
6
12
|
|
|
7
13
|
type RecordData = Record<string, unknown>;
|
|
8
14
|
export interface SetRef {path: string; sha256: string}
|
|
@@ -234,7 +240,37 @@ function inspectContext(root: string, project: RecordData, raw: RecordData, set:
|
|
|
234
240
|
return {images, hasParts: ctx.kind !== 'inputs'};
|
|
235
241
|
}
|
|
236
242
|
|
|
243
|
+
function cloneJson(value: unknown): JobInterviewJson {
|
|
244
|
+
if (value === null || typeof value === 'boolean' || typeof value === 'string') return value;
|
|
245
|
+
if (typeof value === 'number') return Number.isFinite(value) ? value : null;
|
|
246
|
+
if (Array.isArray(value)) return value.map(cloneJson);
|
|
247
|
+
if (typeof value === 'object') {
|
|
248
|
+
return Object.fromEntries(
|
|
249
|
+
Object.entries(value as RecordData)
|
|
250
|
+
.filter(([, entry]) => entry !== undefined)
|
|
251
|
+
.map(([key, entry]) => [key, cloneJson(entry)]),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function cloneJsonObject(value: RecordData): { readonly [key: string]: JobInterviewJson } {
|
|
258
|
+
return cloneJson(value) as { readonly [key: string]: JobInterviewJson };
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function observeRetainedSet(root: string, ref: SetRef): SetRef | null {
|
|
262
|
+
try {
|
|
263
|
+
if (['derived', 'outputs', 'scratch', 'node_modules', '.git'].includes(ref.path.split('/')[0]!)) return null;
|
|
264
|
+
const bytes = readRegular(checkedPath(root, ref.path), 64 * 1024 * 1024);
|
|
265
|
+
return { path: ref.path, sha256: digest(bytes) };
|
|
266
|
+
} catch {
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
237
271
|
export function readProject(root: string, now = Date.now()) {
|
|
272
|
+
if (!Number.isFinite(now)) return invalid('Evaluation instant must be finite');
|
|
273
|
+
const evaluatedAt = new Date(now).toISOString();
|
|
238
274
|
try {
|
|
239
275
|
root = realpathSync(resolve(root));
|
|
240
276
|
if (!lstatSync(root).isDirectory()) return invalid('Project root must be a directory');
|
|
@@ -246,10 +282,13 @@ export function readProject(root: string, now = Date.now()) {
|
|
|
246
282
|
project = jsonObject(bytes);
|
|
247
283
|
} catch {return invalid('project.json must be a readable regular JSON file');}
|
|
248
284
|
if (project.schema !== 'rig-create/project@0') return invalid('Unsupported create project');
|
|
285
|
+
const hash = digest(bytes);
|
|
249
286
|
const interview = object(project.interview);
|
|
250
287
|
const questions: InterviewQuestion[] = [];
|
|
251
288
|
const historical: HistoricalInterview[] = [];
|
|
252
289
|
const diagnostics: InterviewDiagnostic[] = [];
|
|
290
|
+
const interviewRecords: JobInterviewRecord[] = [];
|
|
291
|
+
const interviewDiagnostics: JobInterviewDiagnostic[] = [];
|
|
253
292
|
let sceneAnswers = 0;
|
|
254
293
|
const seen = new Map<string, string>();
|
|
255
294
|
for (const [items, answerKey, allowed, collection] of [
|
|
@@ -290,11 +329,66 @@ export function readProject(root: string, now = Date.now()) {
|
|
|
290
329
|
} catch (error) {
|
|
291
330
|
if (editable) throw error;
|
|
292
331
|
const answer = entry.answer!;
|
|
332
|
+
const observedSet = observeRetainedSet(root, ref);
|
|
333
|
+
const answerAt = typeof answer.at === 'string' ? answer.at : null;
|
|
293
334
|
historical.push({question: String(item.id), verbatim: typeof answer.verbatim === 'string' ? answer.verbatim : '',
|
|
294
|
-
by: typeof answer.by === 'string' ? answer.by : undefined, at:
|
|
335
|
+
by: typeof answer.by === 'string' ? answer.by : undefined, at: answerAt ?? undefined,
|
|
295
336
|
ref, record: entry.record, answer});
|
|
296
337
|
diagnostics.push({code: 'INTERVIEW_OPTIONS_STALE', question: String(item.id), record: entry.record, ref,
|
|
297
|
-
...(
|
|
338
|
+
...(answerAt !== null ? {at: answerAt} : {})});
|
|
339
|
+
interviewRecords.push({
|
|
340
|
+
questionId: String(item.id),
|
|
341
|
+
record: entry.record,
|
|
342
|
+
setId: null,
|
|
343
|
+
ref,
|
|
344
|
+
observedSet,
|
|
345
|
+
timeKind: 'answer',
|
|
346
|
+
at: answerAt,
|
|
347
|
+
original: cloneJsonObject(answer),
|
|
348
|
+
});
|
|
349
|
+
interviewDiagnostics.push({
|
|
350
|
+
record: entry.record,
|
|
351
|
+
at: answerAt,
|
|
352
|
+
code: 'INTERVIEW_OPTIONS_STALE',
|
|
353
|
+
severity: 'error',
|
|
354
|
+
});
|
|
355
|
+
const rawDecision = answer.agent_decision;
|
|
356
|
+
if (rawDecision !== null && typeof rawDecision === 'object' && !Array.isArray(rawDecision)) {
|
|
357
|
+
const decision = rawDecision as RecordData;
|
|
358
|
+
const decisionRecord = entry.record + '.agent_decision';
|
|
359
|
+
if (['at', 'value', 'fragments'].some(key => Object.hasOwn(decision, key))) {
|
|
360
|
+
const decisionAt = typeof decision.at === 'string' ? decision.at : null;
|
|
361
|
+
interviewRecords.push({
|
|
362
|
+
questionId: String(item.id),
|
|
363
|
+
record: decisionRecord,
|
|
364
|
+
setId: null,
|
|
365
|
+
ref,
|
|
366
|
+
observedSet,
|
|
367
|
+
timeKind: 'decision',
|
|
368
|
+
at: decisionAt,
|
|
369
|
+
original: cloneJsonObject(decision),
|
|
370
|
+
});
|
|
371
|
+
diagnostics.push({code: 'INTERVIEW_OPTIONS_STALE', question: String(item.id), record: decisionRecord, ref,
|
|
372
|
+
...(decisionAt !== null ? {at: decisionAt} : {})});
|
|
373
|
+
interviewDiagnostics.push({
|
|
374
|
+
record: decisionRecord,
|
|
375
|
+
at: decisionAt,
|
|
376
|
+
code: 'INTERVIEW_OPTIONS_STALE',
|
|
377
|
+
severity: 'error',
|
|
378
|
+
});
|
|
379
|
+
} else {
|
|
380
|
+
interviewRecords.push({
|
|
381
|
+
questionId: String(item.id),
|
|
382
|
+
record: decisionRecord,
|
|
383
|
+
setId: null,
|
|
384
|
+
ref,
|
|
385
|
+
observedSet,
|
|
386
|
+
timeKind: 'decision',
|
|
387
|
+
at: null,
|
|
388
|
+
original: cloneJsonObject(decision),
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
}
|
|
298
392
|
continue;
|
|
299
393
|
}
|
|
300
394
|
if (editable && (set.stage === 'interview' || set.stage === 'rigging-interview') &&
|
|
@@ -304,27 +398,96 @@ export function readProject(root: string, now = Date.now()) {
|
|
|
304
398
|
if (editable && approval(project, set.stage === 'interview' ? 'plan-approved' : set.stage, now)) return invalid('Question approval is still live');
|
|
305
399
|
const sceneKind = object(raw.context).kind === 'scene';
|
|
306
400
|
if (!editable && sceneKind) sceneAnswers++;
|
|
307
|
-
const
|
|
401
|
+
const observedSet: SetRef = { path: ref.path, sha256: ref.sha256 };
|
|
402
|
+
const evaluate = (at: number, record: string, recordAt: string | null) => {
|
|
308
403
|
try {
|
|
309
404
|
const {legacy, ...context} = inspectContext(root, project, raw, set, at, editable);
|
|
310
|
-
if (legacy)
|
|
405
|
+
if (legacy) {
|
|
406
|
+
diagnostics.push({code: 'INTERVIEW_OPTIONS_SCENE_LEGACY', question: set.question, record, ref,
|
|
407
|
+
...(recordAt !== null ? {at: recordAt} : {})});
|
|
408
|
+
interviewDiagnostics.push({
|
|
409
|
+
record,
|
|
410
|
+
at: recordAt,
|
|
411
|
+
code: 'INTERVIEW_OPTIONS_SCENE_LEGACY',
|
|
412
|
+
severity: 'warning',
|
|
413
|
+
});
|
|
414
|
+
}
|
|
311
415
|
return context;
|
|
312
416
|
} catch (error) {
|
|
313
417
|
if (editable || !(error instanceof Error) || !error.message.startsWith('INTERVIEW_OPTIONS_STALE:')) throw error;
|
|
314
418
|
diagnostics.push({code: 'INTERVIEW_OPTIONS_STALE', question: set.question, record, ref,
|
|
315
|
-
...(
|
|
419
|
+
...(recordAt !== null ? {at: recordAt} : {})});
|
|
420
|
+
interviewDiagnostics.push({
|
|
421
|
+
record,
|
|
422
|
+
at: recordAt,
|
|
423
|
+
code: 'INTERVIEW_OPTIONS_STALE',
|
|
424
|
+
severity: 'error',
|
|
425
|
+
});
|
|
316
426
|
return {images: [], hasParts: false};
|
|
317
427
|
}
|
|
318
428
|
};
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
429
|
+
const recordAt = editable ? evaluatedAt : typeof entry.answer?.at === 'string' ? entry.answer.at : null;
|
|
430
|
+
interviewRecords.push({
|
|
431
|
+
questionId: String(item.id),
|
|
432
|
+
record: entry.record,
|
|
433
|
+
setId: set.id,
|
|
434
|
+
ref,
|
|
435
|
+
observedSet,
|
|
436
|
+
timeKind: editable ? 'inspection' : 'answer',
|
|
437
|
+
at: recordAt,
|
|
438
|
+
original: editable ? null : cloneJsonObject(entry.answer!),
|
|
439
|
+
});
|
|
440
|
+
const context = evaluate(editable ? now : date(entry.answer?.at), entry.record, recordAt);
|
|
441
|
+
const rawDecision = entry.answer?.agent_decision;
|
|
442
|
+
if (!editable && rawDecision !== null && typeof rawDecision === 'object' && !Array.isArray(rawDecision)) {
|
|
443
|
+
const decision = rawDecision as RecordData;
|
|
444
|
+
const decisionRecord = entry.record + '.agent_decision';
|
|
445
|
+
if (['at', 'value', 'fragments'].some(key => Object.hasOwn(decision, key))) {
|
|
446
|
+
const decisionAt = typeof decision.at === 'string' ? decision.at : null;
|
|
447
|
+
interviewRecords.push({
|
|
448
|
+
questionId: String(item.id),
|
|
449
|
+
record: decisionRecord,
|
|
450
|
+
setId: set.id,
|
|
451
|
+
ref,
|
|
452
|
+
observedSet,
|
|
453
|
+
timeKind: 'decision',
|
|
454
|
+
at: decisionAt,
|
|
455
|
+
original: cloneJsonObject(decision),
|
|
456
|
+
});
|
|
457
|
+
evaluate(date(decision.at), decisionRecord, decisionAt);
|
|
458
|
+
} else {
|
|
459
|
+
interviewRecords.push({
|
|
460
|
+
questionId: String(item.id),
|
|
461
|
+
record: decisionRecord,
|
|
462
|
+
setId: set.id,
|
|
463
|
+
ref,
|
|
464
|
+
observedSet,
|
|
465
|
+
timeKind: 'decision',
|
|
466
|
+
at: null,
|
|
467
|
+
original: cloneJsonObject(decision),
|
|
468
|
+
});
|
|
469
|
+
}
|
|
323
470
|
}
|
|
324
471
|
questions.push({ref, set, editable, answer: entry.answer, ...context});
|
|
325
472
|
seen.set(ref.sha256, ref.path);
|
|
326
473
|
}
|
|
327
474
|
}
|
|
328
475
|
}
|
|
329
|
-
|
|
476
|
+
const interviewDiagnosticsEnvelope: JobInterviewDiagnostics = {
|
|
477
|
+
schema: 'rig-review/job-interview@1',
|
|
478
|
+
project: { path: 'project.json', sha256: hash },
|
|
479
|
+
evaluatedAt,
|
|
480
|
+
records: interviewRecords,
|
|
481
|
+
diagnostics: interviewDiagnostics,
|
|
482
|
+
};
|
|
483
|
+
return {
|
|
484
|
+
root,
|
|
485
|
+
hash,
|
|
486
|
+
project,
|
|
487
|
+
questions,
|
|
488
|
+
historical,
|
|
489
|
+
diagnostics,
|
|
490
|
+
sceneAnswers,
|
|
491
|
+
interview: interviewDiagnosticsEnvelope,
|
|
492
|
+
};
|
|
330
493
|
}
|