@dailephd/my-frontend-observer 0.9.1 → 0.10.1
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/CHANGELOG.md +490 -471
- package/LICENSE +21 -21
- package/README.md +375 -357
- package/dist/application/projectCheckService.d.ts +6 -0
- package/dist/application/projectCheckService.js +8 -1
- package/dist/application/projectCheckService.js.map +1 -1
- package/dist/application/projectWorkflowService.d.ts +7 -2
- package/dist/application/projectWorkflowService.js +10 -3
- package/dist/application/projectWorkflowService.js.map +1 -1
- package/dist/application/visualChangeAgentHandoffService.d.ts +28 -0
- package/dist/application/visualChangeAgentHandoffService.js +111 -0
- package/dist/application/visualChangeAgentHandoffService.js.map +1 -0
- package/dist/application/visualChangeProjectWorkflowService.d.ts +95 -0
- package/dist/application/visualChangeProjectWorkflowService.js +376 -0
- package/dist/application/visualChangeProjectWorkflowService.js.map +1 -0
- package/dist/application/visualChangeReviewService.d.ts +50 -0
- package/dist/application/visualChangeReviewService.js +69 -0
- package/dist/application/visualChangeReviewService.js.map +1 -0
- package/dist/application/visualChangeWorkflowPersistenceService.d.ts +26 -0
- package/dist/application/visualChangeWorkflowPersistenceService.js +15 -0
- package/dist/application/visualChangeWorkflowPersistenceService.js.map +1 -0
- package/dist/artifacts/visualChangeWorkflowArtifactReader.d.ts +9 -0
- package/dist/artifacts/visualChangeWorkflowArtifactReader.js +47 -0
- package/dist/artifacts/visualChangeWorkflowArtifactReader.js.map +1 -0
- package/dist/artifacts/visualChangeWorkflowArtifactWriter.d.ts +20 -0
- package/dist/artifacts/visualChangeWorkflowArtifactWriter.js +41 -0
- package/dist/artifacts/visualChangeWorkflowArtifactWriter.js.map +1 -0
- package/dist/cli.js +9 -7
- package/dist/cli.js.map +1 -1
- package/dist/domain/visualChangeAgentHandoff.d.ts +82 -0
- package/dist/domain/visualChangeAgentHandoff.js +80 -0
- package/dist/domain/visualChangeAgentHandoff.js.map +1 -0
- package/dist/domain/visualChangeAgentHandoffSerialization.d.ts +2 -0
- package/dist/domain/visualChangeAgentHandoffSerialization.js +11 -0
- package/dist/domain/visualChangeAgentHandoffSerialization.js.map +1 -0
- package/dist/domain/visualChangeCycle.d.ts +8 -0
- package/dist/domain/visualChangeCycle.js +7 -0
- package/dist/domain/visualChangeCycle.js.map +1 -0
- package/dist/domain/visualChangeWorkflow.d.ts +125 -0
- package/dist/domain/visualChangeWorkflow.js +109 -0
- package/dist/domain/visualChangeWorkflow.js.map +1 -0
- package/dist/domain/visualChangeWorkflowIdentity.d.ts +5 -0
- package/dist/domain/visualChangeWorkflowIdentity.js +24 -0
- package/dist/domain/visualChangeWorkflowIdentity.js.map +1 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/projectWorkflow/projectPaths.d.ts +3 -0
- package/dist/projectWorkflow/projectPaths.js +7 -0
- package/dist/projectWorkflow/projectPaths.js.map +1 -1
- package/dist/viewer/assets/index-DglJ6f28.css +1 -0
- package/dist/viewer/assets/index-DsODREY5.js +9 -0
- package/dist/viewer/index.html +15 -15
- package/dist/viewer/sw.js +1 -1
- package/dist/viewerServer/evidence/classify.d.ts +3 -1
- package/dist/viewerServer/evidence/classify.js +10 -0
- package/dist/viewerServer/evidence/classify.js.map +1 -1
- package/dist/viewerServer/evidence/handles.js +1 -0
- package/dist/viewerServer/evidence/handles.js.map +1 -1
- package/dist/viewerServer/evidence/projection.d.ts +5 -0
- package/dist/viewerServer/evidence/projection.js +19 -0
- package/dist/viewerServer/evidence/projection.js.map +1 -1
- package/dist/viewerServer/evidence/visualChangeWorkflowView.d.ts +31 -0
- package/dist/viewerServer/evidence/visualChangeWorkflowView.js +36 -0
- package/dist/viewerServer/evidence/visualChangeWorkflowView.js.map +1 -0
- package/dist/viewerServer/httpServer.js +323 -1
- package/dist/viewerServer/httpServer.js.map +1 -1
- package/dist/viewerServer/referenceApproval.d.ts +22 -0
- package/dist/viewerServer/referenceApproval.js +42 -0
- package/dist/viewerServer/referenceApproval.js.map +1 -0
- package/dist/viewerServer/referenceVisualChangeAuthoring.d.ts +28 -0
- package/dist/viewerServer/referenceVisualChangeAuthoring.js +134 -0
- package/dist/viewerServer/referenceVisualChangeAuthoring.js.map +1 -0
- package/dist/viewerServer/runtimeVisualChangeAuthoring.d.ts +33 -0
- package/dist/viewerServer/runtimeVisualChangeAuthoring.js +81 -0
- package/dist/viewerServer/runtimeVisualChangeAuthoring.js.map +1 -0
- package/dist/viewerServer/visualChangeAuthoring.d.ts +46 -0
- package/dist/viewerServer/visualChangeAuthoring.js +63 -0
- package/dist/viewerServer/visualChangeAuthoring.js.map +1 -0
- package/dist/viewerServer/visualChangeHandoff.d.ts +23 -0
- package/dist/viewerServer/visualChangeHandoff.js +31 -0
- package/dist/viewerServer/visualChangeHandoff.js.map +1 -0
- package/dist/viewerServer/visualChangeReview.d.ts +30 -0
- package/dist/viewerServer/visualChangeReview.js +46 -0
- package/dist/viewerServer/visualChangeReview.js.map +1 -0
- package/docs/ARCHITECTURE.md +1394 -1373
- package/docs/CI_CD.md +349 -327
- package/docs/COMMANDS.md +1035 -1012
- package/docs/CONTRACTS.md +1971 -1926
- package/docs/CURRENT_STATE.md +1277 -1238
- package/docs/DEVELOPMENT.md +240 -237
- package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +50 -50
- package/docs/PROJECT_DESCRIPTION.md +2248 -2224
- package/docs/PROJECT_MILESTONES.md +2681 -2558
- package/docs/PROJECT_OVERVIEW.md +200 -191
- package/docs/QUICKSTART.md +100 -96
- package/docs/RELEASE.md +37 -33
- package/docs/ROADMAP.md +1105 -1033
- package/docs/SECURITY.md +297 -275
- package/docs/WORKFLOWS.md +806 -770
- package/docs/plans/v0.10-implementation-plan.md +1509 -0
- package/docs/plans/v0.8-implementation-plan.md +655 -655
- package/docs/plans/v0.8.1-cli-usability-patch-plan.md +505 -505
- package/docs/plans/v0.9-implementation-plan.md +1529 -1529
- package/docs/plans/v0.9.1-implementation-plan.md +468 -468
- package/docs/reports/v0.10-batch1-visual-change-workflow-foundation.md +102 -0
- package/docs/reports/v0.10-batch2-project-composition-check-recording.md +103 -0
- package/docs/reports/v0.10-batch3-viewer-visual-change-workspace.md +93 -0
- package/docs/reports/v0.10-batch4-actual-frontend-entry.md +59 -0
- package/docs/reports/v0.10-batch5-reference-driven-entry.md +238 -0
- package/docs/reports/v0.10-batch6-coding-agent-handoff.md +85 -0
- package/docs/reports/v0.10-batch7-correction-review-acceptance.md +145 -0
- package/docs/reports/v0.10-batch8-integrated-acceptance.md +109 -0
- package/docs/reports/v0.10-implementation-completeness-documentation-reconciliation.md +344 -0
- package/docs/reports/v0.10-pre-release-readiness.md +120 -0
- package/docs/reports/v0.10-release-preparation.md +70 -0
- package/docs/reports/v0.10.1-project-check-baseline-context-implementation.md +86 -0
- package/docs/reports/v0.7-bounded-fidelity-context-prompt7.md +243 -243
- package/docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md +497 -497
- package/docs/reports/v0.7-pre-release-readiness.md +337 -337
- package/docs/reports/v0.7-reference-binding-prompt5.md +223 -223
- package/docs/reports/v0.7-reference-compatibility-prompt4.md +234 -234
- package/docs/reports/v0.7-reference-correction-workflow-prompt8.md +222 -222
- package/docs/reports/v0.7-reference-fidelity-prompt6.md +216 -216
- package/docs/reports/v0.7-reference-foundation-prompt1.md +151 -151
- package/docs/reports/v0.7-reference-regions-prompt2.md +195 -195
- package/docs/reports/v0.7-reference-requirements-prompt3.md +217 -217
- package/docs/reports/v0.7-release-prep.md +423 -423
- package/docs/reports/v0.8-binding-fidelity-interaction-batch6.md +279 -279
- package/docs/reports/v0.8-bounded-context-correlation-batch7.md +233 -233
- package/docs/reports/v0.8-comparison-contract-inspection-batch4.md +279 -279
- package/docs/reports/v0.8-evidence-index-readers-batch2.md +247 -247
- package/docs/reports/v0.8-implementation-completeness-documentation-reconciliation.md +741 -741
- package/docs/reports/v0.8-integrated-viewer-acceptance-batch8.md +128 -128
- package/docs/reports/v0.8-observation-svg-inspection-batch3.md +223 -223
- package/docs/reports/v0.8-prerelease-readiness-cross-platform-security-code-rot.md +687 -687
- package/docs/reports/v0.8-reference-candidate-inspection-batch5.md +232 -232
- package/docs/reports/v0.8-viewer-runtime-pwa-batch1.md +278 -278
- package/docs/reports/v0.8.1-implementation-completeness-documentation-reconciliation.md +114 -114
- package/docs/reports/v0.8.1-prerelease-readiness-cross-platform-security-code-rot.md +170 -170
- package/docs/reports/v0.9-architecture-retrieval.md +14 -37
- package/docs/reports/v0.9-final-pre-release-readiness.md +209 -209
- package/docs/reports/v0.9-final-readiness-corrections.md +530 -530
- package/docs/reports/v0.9-pre-release-readiness.md +169 -169
- package/docs/reports/v0.9.1-batch1-pwa-hard-gate-isolation.md +359 -359
- package/docs/reports/v0.9.1-batch2-hard-gate-validation-integration.md +262 -262
- package/docs/reports/v0.9.1-pre-release-readiness.md +206 -206
- package/package.json +59 -59
- package/dist/viewer/assets/index-BN41MI7m.css +0 -1
- package/dist/viewer/assets/index-CkKXnlrI.js +0 -9
|
@@ -1,232 +1,232 @@
|
|
|
1
|
-
# v0.8 Batch 5 — External Reference and Reference/Candidate Inspection — Implementation Report
|
|
2
|
-
|
|
3
|
-
## 1. Starting state
|
|
4
|
-
|
|
5
|
-
- Branch: `master`
|
|
6
|
-
- Starting HEAD: `319b7638d18edfcbba9902c8de7c68a02c377115` ("feat: add v0.8 comparison and contract inspection", Batch 4)
|
|
7
|
-
- `origin/master` after `git fetch`: `a1de8ac01e1367b60021cb04226f56369fa2debb`
|
|
8
|
-
- `git rev-list --left-right --count origin/master...HEAD`: `0 4` — local is exactly Batches 1-4 ahead of origin.
|
|
9
|
-
- `git merge-base --is-ancestor origin/master HEAD` → succeeded (exit 0): origin/master is a strict ancestor of local HEAD, no divergence. No pull/rebase/merge/reset performed.
|
|
10
|
-
- Starting `git status --short`: clean.
|
|
11
|
-
- Package version confirmed `0.7.0` throughout; never bumped.
|
|
12
|
-
|
|
13
|
-
## 2. The same path contradiction as Batch 4, resolved the same way
|
|
14
|
-
|
|
15
|
-
Task §5 gave an explicit, executable `Join-Path` algorithm with five verification assertions producing an inside-repository path, then separately restated the old Batches-1-3 sibling directory as the "Required resolved Batch 5 path" - textually inconsistent with its own algorithm (the sibling path fails assertion 1: it does not start with `$REPO_ROOT\`). Re-ran the literal algorithm:
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
REPO_ROOT=Z:\Users\newuser\Projects\my-frontend-observer
|
|
19
|
-
WORKFLOW_BASE=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow
|
|
20
|
-
WORKFLOW_VERSION_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8
|
|
21
|
-
WORKFLOW_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-05
|
|
22
|
-
TestPathRepoRoot=True
|
|
23
|
-
ContainmentCheck=True
|
|
24
|
-
ParentOfBase=Z:\Users\newuser\Projects\my-frontend-observer
|
|
25
|
-
ParentOfRoot=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
All required checks pass for the inside-repository path. Per the same precedent established and documented in the Batch 4 report (`docs/reports/v0.8-comparison-contract-inspection-batch4.md` §2) - itself cross-checked against the repository's own `.gitignore` `.my-dev-kit-workflow/` entry, which only makes sense for an inside-repository path - Batch 5 followed the executable algorithm rather than the inconsistent restated sentence, and used **`Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-05`**.
|
|
29
|
-
|
|
30
|
-
## 3. Prior workflow-root audit
|
|
31
|
-
|
|
32
|
-
- Sibling `Z:\Users\newuser\Projects\my-frontend-observer.my-dev-kit-workflow\v0.8\` contains exactly `batch-01`, `batch-02`, `batch-03` - untouched, not migrated, not reused.
|
|
33
|
-
- Inside-repo `.my-dev-kit-workflow\v0.8\` contained `batch-04` (from the prior batch) before this batch started; Batch 5 added only `batch-05` alongside it without touching `batch-04`.
|
|
34
|
-
|
|
35
|
-
## 4. Predecessor reports/plan inspected
|
|
36
|
-
|
|
37
|
-
All four predecessor reports read in full (Batch 1-4). `docs/plans/v0.8-implementation-plan.md`'s "Batch 5 — External reference and reference/candidate inspection" section (goal/in-scope/out-of-scope/gate) matches the task's own scope exactly - no material difference found. `docs/ARCHITECTURE.md`, `docs/CONTRACTS.md`, `docs/CURRENT_STATE.md`, `docs/WORKFLOWS.md`, `docs/COMMANDS.md`, `docs/PROJECT_MILESTONES.md` (Milestone 8), `docs/ROADMAP.md` (v0.8), `docs/DOCUMENTATION_PRESERVATION_POLICY.md`, `docs/PROJECT_DESCRIPTION.md` all read/re-confirmed.
|
|
38
|
-
|
|
39
|
-
## 5. my-dev-kit retrieval
|
|
40
|
-
|
|
41
|
-
Index built at `$WORKFLOW_ROOT\my-dev-kit-index`. All seven required searches were run; results were cross-checked against direct source reads of `src/domain/externalReference*.ts`, `src/artifacts/externalReferenceArtifactReader.ts`, `src/application/externalReferencePersistenceService.ts`, and `src/viewerServer/evidence/{classify,mediaResolver,index}.ts` - every result matched.
|
|
42
|
-
|
|
43
|
-
## 6. Pre-edit reference-contract audit (task §10)
|
|
44
|
-
|
|
45
|
-
Read `src/domain/externalReference.ts`, `externalReferenceRegions.ts`, `externalReferenceRegionRelationships.ts`, `externalReferenceRequirements.ts`, `externalReferenceApplicability.ts`, `externalReferenceCompatibility.ts` in full. Confirmed exactly:
|
|
46
|
-
|
|
47
|
-
- `ExternalReferenceArtifact = ImportedExternalReferenceArtifact | ApprovedExternalReferenceArtifact` - discriminated by `lifecycle.state`; imported carries `image` and never `sourceReference`; approved carries `sourceReference` and never `image` (`isValidExternalReferenceArtifact` rejects any mix).
|
|
48
|
-
- `regions?: ReferenceRegion[]`, `requirements?: ExternalReferenceRequirement[]`, `applicability?: ExternalReferenceApplicability` are additive/optional on both lifecycle variants, carried forward verbatim by `approveExternalReference` (never re-derived on approval).
|
|
49
|
-
- `ReferenceRegion = {id, rectangle:{x,y,width,height}}` in reference-image pixels; `deriveReferenceRegionGeometry` is the sole pure derivation of `right/bottom/centerX/centerY` - never persisted.
|
|
50
|
-
- `ExternalReferenceRequirement` reuses the exact v0.5 `AuthoredChangeScopeCategory` vocabulary (`requested`/`expected-dependent`/`protected`/`preserved`) - `'unexpected'` is not an authorable member.
|
|
51
|
-
- `evaluateReferenceCandidateCompatibility` is page/state-level only (viewport/theme/applicationState/authenticatedState), reuses `ComparabilityResult`/`assessOptionalComparabilityDimension` from the v0.4 comparison engine verbatim - never a second compatibility model.
|
|
52
|
-
|
|
53
|
-
## 7. Reference image ownership rule (task §11) - already built in Batch 2, verified, reused unchanged
|
|
54
|
-
|
|
55
|
-
Read `src/viewerServer/evidence/mediaResolver.ts` in full: role `'image'` requires `family === 'external-reference-imported'`, resolved from that artifact's own directory. Role `'source-image'` requires `family === 'external-reference-approved'`, resolved via `findImportedReferenceDir(root, sourceReference.referenceId)` (`src/viewerServer/evidence/index.ts`) - a bounded exact-`referenceId` walk of the current evidence root, never assuming co-location, never copying bytes. Batch 5 added **zero** changes to `mediaResolver.ts` or `index.ts` - this mechanism already existed and is reused verbatim (confirmed via real Chromium proof, §17 Cases A/B below).
|
|
56
|
-
|
|
57
|
-
## 8. Reference region coordinate model (task §12/§13)
|
|
58
|
-
|
|
59
|
-
`ReferenceRegionOverlaySvg.tsx` (new): `viewBox="0 0 <imageWidth> <imageHeight>"` where `imageWidth`/`imageHeight` come from the artifact's own `image.width/height` (imported) or `sourceReference.image.width/height` (approved) - never the candidate's runtime viewport, never devicePixelRatio-multiplied, never normalized to percentages. Each region's canonical `{x,y,width,height}` is rendered unchanged. This is a deliberately distinct, sibling component from `TargetOverlaySvg` (a genuinely different coordinate domain and data source), not a reuse/parameterization of it - reusing that component would have silently conflated reference-image pixels with runtime CSS pixels.
|
|
60
|
-
|
|
61
|
-
## 9. Reference region selection (task §14/§15)
|
|
62
|
-
|
|
63
|
-
Region list clicks and SVG rectangle clicks both call the same `setSelectedRegionId` handler in `ReferenceWorkspace.tsx`; selection identity is exact `ReferenceRegion.id` (never a runtime target name). Labels render `region.id` verbatim - no OCR, no computer vision, no name inference. Proven bidirectionally in real Chromium (`referenceCandidateWorkspace.test.ts`, Case A: clicking the SVG rectangle sets `aria-pressed="true"` and the inspector shows "Reference region: header").
|
|
64
|
-
|
|
65
|
-
## 10. Reference relationships (task §16) - server-side derivation, reused canonical function
|
|
66
|
-
|
|
67
|
-
`src/viewerServer/evidence/referenceView.ts#getReferenceView` calls the existing canonical `deriveReferenceRegionRelationships` (never a duplicated predicate set, never `deriveLayoutRelationships` over reference regions) over the artifact's own `regions`, exposed via `GET /api/references/<handle>/view`. Only the six geometry-only relationship families it already supports are ever shown; no DOM containment/scroll/visibility is fabricated for a static image.
|
|
68
|
-
|
|
69
|
-
## 11. Reference requirements / distinction from evidence (task §17/§18)
|
|
70
|
-
|
|
71
|
-
`ReferenceInspector.tsx` renders each authored `ExternalReferenceRequirement` distinctly from raw region geometry: `requirementId`, `category`, `expectedDependentMode` (when `expected-dependent`), `subject` (region-property/region-relationship/region-measurement), and `tolerance` (exact/absolute-reference-px/percent) are all shown verbatim. A region's own geometry is displayed only under "Reference region: `<id>`" when that region is explicitly selected - it is never presented as an implied requirement. No `'unexpected'` category is ever fabricated (the type does not admit it).
|
|
72
|
-
|
|
73
|
-
## 12. Reference requirement expectation / adequacy (task §19/§20)
|
|
74
|
-
|
|
75
|
-
Server-side `deriveReferenceRequirementAdequacy` (existing canonical function, never a competing derivation) computes `status`/`totalRequirements`/`evaluableRequirements`/`reasons` over the artifact's own `regions`+`requirements`, exposed via the same `GET /api/references/<handle>/view` route, rendered under "Reference requirement adequacy" - kept in its own section, visually and semantically distinct from "Reference/candidate compatibility" (task §20's required distinction between reference adequacy and reference/candidate compatibility).
|
|
76
|
-
|
|
77
|
-
## 13. Reference applicability (task §21)
|
|
78
|
-
|
|
79
|
-
`ReferenceInspector.tsx` renders `applicability.viewport`/`.theme`/`.applicationState`/`.authenticatedState` exactly as persisted, or "not declared" when absent - never inferred from image pixels, theme is never visually guessed, application/auth state are never inferred from screenshot content.
|
|
80
|
-
|
|
81
|
-
## 14. Candidate selection (task §22)
|
|
82
|
-
|
|
83
|
-
`ReferenceWorkspace.tsx` renders a `<select id="reference-candidate-select">` populated from `useEvidenceIndex()`'s `observation`-family, `supported` records only. The initial value is always empty ("(none selected)") - no default candidate is ever pre-selected based on viewport/URL/target-name/timestamp/geometry similarity. Compatibility and side-by-side candidate rendering are gated entirely on `candidateHandle !== undefined`.
|
|
84
|
-
|
|
85
|
-
## 15. Reference/candidate compatibility (task §23/§24)
|
|
86
|
-
|
|
87
|
-
`getReferenceCandidateView` (new, `src/viewerServer/evidence/referenceView.ts`) calls the existing canonical `evaluateReferenceCandidateCompatibility(reference, candidate)` unchanged - never reimplemented in React or the viewer server. `comparable`/`comparable-with-warnings`/`incomparable` and each reason's `blocking`/`warning`/`unassessed` severity are rendered exactly as returned (`.comparability-banner--<state>`, reused styling from Batch 4's comparison workspace). An `incomparable` result gets `role="alert"`. No pixel/geometry/fidelity failure is ever fabricated from an incompatible state - the side-by-side panes remain fully inspectable regardless (proven in Case D).
|
|
88
|
-
|
|
89
|
-
## 16. Side-by-side layout and candidate rendering reuse (task §25/§26)
|
|
90
|
-
|
|
91
|
-
Default layout is a two-column grid (`.reference-workspace__panes`) - reference pane (image-domain SVG) beside candidate pane. The candidate pane is `ComparisonObservationPane` (Batch 4, unchanged) fed a synthetic `LinkStatus = {status:'resolved', handle: candidateHandle}` once a candidate is explicitly chosen - **zero** new candidate screenshot/coordinate-transform/target-rendering code was written; `TargetOverlaySvg` (Batch 3) renders the runtime viewport/targets exactly as it already did. No blended/alpha image, no pixel-difference heat map.
|
|
92
|
-
|
|
93
|
-
## 17. Real-browser proof (task §51, all cases)
|
|
94
|
-
|
|
95
|
-
`tests/browser/referenceCandidateWorkspace.test.ts` - 6 tests, all real Chromium against real canonically-produced fixtures (`writeReferenceCandidateFixture`, built through the real `importExternalReference`/`approveExternalReference`/`writeObservationArtifact` — never hand-forged JSON):
|
|
96
|
-
|
|
97
|
-
- **Case A (imported)**: real decodable image loads via `/api/media/<handle>/image`; `header`/`sidebar` rectangles render at their exact canonical width/height (400/240); region selection sets `aria-pressed`; lifecycle reads "imported". **PASS.**
|
|
98
|
-
- **Case B (approved)**: image loads via `/api/media/<handle>/source-image`; body text shows "approved (" and "owned by imported source referenceId" - proving the exact-source resolution, never a duplicated image. **PASS.**
|
|
99
|
-
- **Case C (compatible)**: reference and candidate render side by side with distinct viewBoxes (`0 0 400 300` vs `0 0 1200 800`); compatibility banner is `comparable`; the "not evaluated in this batch" fidelity note is present. **PASS.**
|
|
100
|
-
- **Case D (incompatible)**: `comparability-banner--incomparable` with real `viewport-mismatch`/`theme-mismatch` reasons; both panes still render; no "fidelity ... PASS/FAIL" text ever appears. **PASS.**
|
|
101
|
-
- **Case E (equal names, no binding)**: selecting the reference region `"header"` sets its own `aria-pressed="true"`; the candidate's identically-named runtime target `"header"` remains `aria-pressed="false"`; zero `[data-binding-connector]` elements exist. **PASS.**
|
|
102
|
-
- **Reference with no regions/requirements**: honest zero-rectangle SVG plus explicit "No requirements selected on this reference." / "No design requirements selected for this reference." messages - proven with the pre-existing `writeExternalReferencePairFixture`. **PASS.**
|
|
103
|
-
|
|
104
|
-
## 18. Optional candidate contract context (task §29)
|
|
105
|
-
|
|
106
|
-
`getReferenceCandidateView` additionally lists every existing `contract-evaluation` artifact whose own persisted `after` reference exactly identifies the selected candidate (same exact-identity comparison Batch 4's `linkedEvidence.ts` uses, applied here independently since this is a *forward* lookup - candidate → evaluations, not evaluation → candidate). Verified with a dedicated unit test (`referenceViewerServer.test.ts`, "never fabricates an evaluation context") that a candidate with zero matching evaluations returns `evaluationHandles: []`. When one or more exist, `ReferenceWorkspace.tsx` requires an explicit `<select>` choice before showing any verdict; `evaluateFrontendContract` is never called - the selected evaluation's own persisted `overallVerdict` is rendered unchanged.
|
|
107
|
-
|
|
108
|
-
## 19. Binding boundary (task §31/§45/§46)
|
|
109
|
-
|
|
110
|
-
Grep-verified: `evaluateReferenceRuntimeBindings` is imported/called nowhere under `src/viewerServer/` or `viewer/src/` (only named in `referenceView.ts`'s own doc comment, explaining why it is *not* called). No binding-declaration authoring UI, no connector rendering, no name/geometry/proximity-based inference exists anywhere in this batch's diff.
|
|
111
|
-
|
|
112
|
-
## 20. Fidelity boundary (task §32/§33/§47/§48)
|
|
113
|
-
|
|
114
|
-
Grep-verified: `evaluateReferenceCandidateFidelity` is likewise imported/called nowhere in this batch. The UI always shows an explicit, static "Fidelity: not evaluated in this batch — on-demand reference/candidate fidelity evaluation is Batch 6" note beside the compatibility result - a compatibility PASS or an "adequate" reference adequacy status is never rephrased as a fidelity PASS. No pixel-diff/perceptual-hash/OCR/computer-vision mechanism exists anywhere in this batch.
|
|
115
|
-
|
|
116
|
-
## 21. API changes
|
|
117
|
-
|
|
118
|
-
| Route | Method | Semantics |
|
|
119
|
-
|---|---|---|
|
|
120
|
-
| `GET /api/references/<handle>/view` | GET/HEAD | `{ok:true, regionRelationships: ReferenceRegionRelationshipGraph \| null, requirementAdequacy: ReferenceRequirementAdequacy \| null}`. `404` unknown handle, `409` not-a-reference/not-currently-loadable, `405` write methods. |
|
|
121
|
-
| `GET /api/references/<handle>/candidate/<handle>/view` | GET/HEAD | `{ok:true, compatibility: ReferenceCandidateCompatibilityResult, evaluationHandles: string[]}`. `404` unknown reference/candidate handle, `409` wrong family/not-currently-loadable, `405` write methods. |
|
|
122
|
-
|
|
123
|
-
`/api/status`, `/api/index`, `/api/artifacts/<handle>`, `/api/media/<handle>/<role>`, `/api/observations/<handle>/relationships`, `/api/comparisons/<handle>/view`, `/api/evaluations/<handle>/view` are byte-for-byte unchanged.
|
|
124
|
-
|
|
125
|
-
## 22. PWA cache boundary
|
|
126
|
-
|
|
127
|
-
**PASS.** Both new routes live under `/api/`, already covered by Batch 1's `navigateFallbackDenylist: [/^\/api\//]`. Verified against the real built `dist/viewer/sw.js` in the built-viewer smoke test (§25): zero occurrences of `api/references`, no second `registerRoute` call.
|
|
128
|
-
|
|
129
|
-
## 23. Files created
|
|
130
|
-
|
|
131
|
-
- `src/viewerServer/evidence/referenceView.ts`
|
|
132
|
-
- `viewer/src/components/ReferenceWorkspace.tsx`, `ReferenceRegionOverlaySvg.tsx`, `ReferenceInspector.tsx`
|
|
133
|
-
- `viewer/src/hooks/useReferenceView.ts`
|
|
134
|
-
- `viewer/src/types/reference.ts`
|
|
135
|
-
- `tests/unit/referenceViewerServer.test.ts`
|
|
136
|
-
- `tests/browser/referenceCandidateWorkspace.test.ts`
|
|
137
|
-
- `docs/reports/v0.8-reference-candidate-inspection-batch5.md` (this file)
|
|
138
|
-
|
|
139
|
-
## 24. Files modified
|
|
140
|
-
|
|
141
|
-
- `src/viewerServer/httpServer.ts` - added the two new routes (§21); every existing route unchanged.
|
|
142
|
-
- `viewer/src/components/ArtifactPreview.tsx` - added the `external-reference-imported`/`external-reference-approved` branch to `ReferenceWorkspace`; every other family's branching unchanged.
|
|
143
|
-
- `viewer/src/styles/index.css` - additive rules for `.reference-workspace`/`.reference-pane`/`.reference-adequacy`/`.reference-region-overlay-svg__rect--has-requirement`.
|
|
144
|
-
- `tests/support/evidenceFixtures.ts` - added `writeReferenceCandidateFixture` (real imported+approved reference with 2 regions/4 requirements/applicability, plus one real compatible and one real incompatible candidate observation, all built through the real canonical application services - never hand-forged JSON). The pre-existing `writeExternalReferencePairFixture` (Batch 2) was reused unchanged for the no-regions negative case.
|
|
145
|
-
- `docs/ARCHITECTURE.md`, `docs/COMMANDS.md` - new/updated Batch 5 sections.
|
|
146
|
-
|
|
147
|
-
## 25. Tests added and behavior protected
|
|
148
|
-
|
|
149
|
-
| Test file | Level | Protects |
|
|
150
|
-
|---|---|---|
|
|
151
|
-
| `referenceViewerServer.test.ts` (11 tests) | unit/integration (real HTTP) | Region-relationship/adequacy derivation via real canonical functions for both imported and approved references; honest `null`/`null` for a reference with no regions/requirements; 409 for a non-reference handle; 404 unknown handle; 405 write methods; real `comparable` compatibility (with real unassessed reasons) for a matching candidate; real `incomparable` compatibility with real `viewport-mismatch`/`theme-mismatch` blocking reasons for a mismatched candidate; zero fabricated evaluation-context handles; 404 unknown candidate; 409 non-observation candidate. |
|
|
152
|
-
| `referenceCandidateWorkspace.test.ts` (6 tests, real Chromium) | browser | Cases A-E per task §51 plus the no-regions honest-empty case (§17). |
|
|
153
|
-
|
|
154
|
-
## 26. Fixture verification methodology
|
|
155
|
-
|
|
156
|
-
Before writing browser-test assertions, `writeReferenceCandidateFixture`'s actual output was verified directly against the real `getReferenceView`/`getReferenceCandidateView` server functions in `referenceViewerServer.test.ts` first (unit level, faster iteration) - this is how the initial `follows-vertically` requirement-direction mismatch was caught and fixed (the pairwise derivation loop orders `(subjectRegion, relatedRegion)` by authored-array index, not alphabetically or by geometry-obvious direction; `header` precedes `sidebar` in the array but `verticalSequenceOf` returns `sidebar` as the vertically-later, hence `subjectTarget`, region - the fixture's requirement was corrected to `subjectRegion: 'sidebar', relatedRegion: 'header'` to match the actual canonical derivation, achieving a genuine `adequate` (not `partial`) status). The `writeReferenceCandidateFixture`'s built-in call already asserts nothing on its own; correctness was established entirely by the passing assertions in `referenceViewerServer.test.ts` and the browser test, both of which read real derived output rather than assuming it.
|
|
157
|
-
|
|
158
|
-
## 27. Validation results
|
|
159
|
-
|
|
160
|
-
| Command | Result |
|
|
161
|
-
|---|---|
|
|
162
|
-
| `npm run typecheck` | **PASS** (zero errors, both `tsconfig.json` and `viewer/tsconfig.json`) |
|
|
163
|
-
| `npm run lint` | **PASS** (zero errors/warnings) |
|
|
164
|
-
| `npm test` (`vitest run`) | **PASS** — 1112/1112 tests, 61/61 files |
|
|
165
|
-
| `npm run build` | **PASS** — `dist/viewerServer/evidence/referenceView.js` plus the rebuilt `dist/viewer/**` PWA |
|
|
166
|
-
| `npm run check:docs` | **PASS** — "Documentation check passed (17 required files)." |
|
|
167
|
-
| `npm run test:browser` | **PASS** — 147/147 tests, 15/15 files (real Chromium) |
|
|
168
|
-
| `git diff --check` | **PASS** — no whitespace errors (only expected LF→CRLF notices) |
|
|
169
|
-
|
|
170
|
-
## 28. Built viewer smoke (task §54)
|
|
171
|
-
|
|
172
|
-
Fixture: one real imported+approved reference pair (2 regions, 4 requirements across all four categories, applicability) and one real compatible + one real incompatible candidate observation, built via `.my-dev-kit-workflow\v0.8\batch-05\tmp\build-smoke-reference.mjs` (not committed) against the actual compiled `dist/artifacts/artifactWriter.js`/`dist/application/externalReferencePersistenceService.js`.
|
|
173
|
-
|
|
174
|
-
Command: `node dist/cli.js view --root "<WORKFLOW_ROOT>\smoke\evidence-root" --port 4319 --no-open`
|
|
175
|
-
|
|
176
|
-
All required checks passed against the real running built server:
|
|
177
|
-
|
|
178
|
-
- `/api/index` → 4 real records (`observation` x2, `external-reference-imported`, `external-reference-approved`), all `supported`.
|
|
179
|
-
- `/api/references/<imported-handle>/view` → `200`, real `regionRelationships` (`horizontally-overlapping`/`above`/`does-not-overlap`/`wider-than`/... /`follows-vertically`) and `requirementAdequacy`.
|
|
180
|
-
- `/api/references/<approved-handle>/candidate/<compatible>/view` → `200`, `compatibility.state:"comparable"`, `evaluationHandles:[]`.
|
|
181
|
-
- `/api/references/<approved-handle>/candidate/<incompatible>/view` → `200`, `compatibility.state:"incomparable"` with real `viewport-mismatch`(1200x800 vs 800x600)/`theme-mismatch`("light" vs "dark") blocking reasons.
|
|
182
|
-
- `/api/media/<imported-handle>/image` → `200 image/png`; `/api/media/<approved-handle>/source-image` → `200 image/png` (resolved through the exact imported source, not a co-located duplicate - confirmed no `reference.png` exists under the approved artifact's own directory, §29 filesystem listing).
|
|
183
|
-
- Unknown reference handle → `404`; write method (`POST`) → `405`.
|
|
184
|
-
- `/` (PWA shell) → `200`; `sw.js` contains zero occurrences of `api/references`.
|
|
185
|
-
- `netstat` confirmed `127.0.0.1:4319` only, never `0.0.0.0`.
|
|
186
|
-
- Server located by its real PID (`2436`) and terminated with `taskkill /F`; a follow-up `netstat` confirmed the port was released.
|
|
187
|
-
|
|
188
|
-
**Result: PASS.** Logs retained under `$WORKFLOW_ROOT\logs\`.
|
|
189
|
-
|
|
190
|
-
## 29. Generated path inventory
|
|
191
|
-
|
|
192
|
-
| Path | Disposition |
|
|
193
|
-
|---|---|
|
|
194
|
-
| `WORKFLOW_ROOT\tmp\build-smoke-reference.mjs` | Retained (dev/readiness tooling only, not committed) |
|
|
195
|
-
| `WORKFLOW_ROOT\smoke\evidence-root` | Retained - listed and confirmed exactly 6 real fixture files (2 observations × manifest+screenshot, 1 imported reference's manifest+image, 1 approved reference's manifest only - **no** second image file under the approved artifact's directory, proving image ownership was never duplicated) |
|
|
196
|
-
| `WORKFLOW_ROOT\logs\*` | Retained (smoke evidence) |
|
|
197
|
-
| `WORKFLOW_ROOT\my-dev-kit-index\*` | Retained (successful index) |
|
|
198
|
-
| `WORKFLOW_ROOT\{cache,fixtures}` | Retained, empty/unused |
|
|
199
|
-
| Repo-root `dist/` | Ordinary build output (gitignored) |
|
|
200
|
-
| Sibling `...my-frontend-observer.my-dev-kit-workflow\v0.8\{batch-01,batch-02,batch-03}` | Untouched (verified, §3) |
|
|
201
|
-
| Inside-repo `.my-dev-kit-workflow\v0.8\batch-04` | Untouched (verified, §3) |
|
|
202
|
-
|
|
203
|
-
## 30. Repository pollution check
|
|
204
|
-
|
|
205
|
-
**PASS.** `git status --short` before staging showed only the 6 modified + 8 new Batch-5-owned paths listed in §23/§24. No unexpected file or directory appeared anywhere in the repository. No malformed sibling Batch 5 workflow path exists anywhere under `Z:\Users\newuser\Projects\`.
|
|
206
|
-
|
|
207
|
-
## 31. Batch 1-4 regression check
|
|
208
|
-
|
|
209
|
-
**PASS.** All 147 browser tests across all 15 browser test files (Batch 1 PWA/shell, Batch 2 evidence indexing/media, Batch 3 observation SVG workspace, Batch 4 comparison/evaluation workspace, and this batch's own 6 reference/candidate tests) pass unmodified. Zero pre-existing test files were altered this batch (unlike Batch 4, which had to update 2 Batch-2-era tests - no such conflict arose here since Batch 5 only adds a new branch to `ArtifactPreview.tsx` for a family that previously had no visual workspace at all, so no prior assertion about the raw-JSON preview for `external-reference-imported`/`external-reference-approved` existed to become stale).
|
|
210
|
-
|
|
211
|
-
## 32. v0.1-v0.7 regression check
|
|
212
|
-
|
|
213
|
-
**PASS.** Every pre-v0.8 unit and browser test suite (`observe`, `compare`, `approve-baseline`, `save-change-contract`, `evaluate-contract`, `import-reference`, `approve-reference`, `evaluate-reference-fidelity`) remains covered and passing - none was touched by this batch's diff. `src/domain/externalReference*.ts` and every existing reader/service (`importExternalReference`, `approveExternalReference`, `evaluateReferenceCandidateCompatibility`, `deriveReferenceRegionRelationships`, `deriveReferenceRequirementAdequacy`) are byte-for-byte unchanged.
|
|
214
|
-
|
|
215
|
-
## 33. Deviations
|
|
216
|
-
|
|
217
|
-
- The same `$WORKFLOW_ROOT` path-instruction contradiction as Batch 4 recurred verbatim in this task's §5; resolved identically and for the identical, previously-documented reason (§2 above). No other deviation from the task's literal text.
|
|
218
|
-
|
|
219
|
-
## 34. Remaining uncovered risks
|
|
220
|
-
|
|
221
|
-
- **`getReferenceCandidateView`'s evaluation-matching walk is a full bounded re-scan of the evidence tree per request** (same category of finding as Batch 4's linked-evidence walks) - for an evidence root near `MAX_MANIFEST_CANDIDATES`, this is more filesystem work per reference/candidate-view request than a single shared index pass would need. Not a correctness risk.
|
|
222
|
-
- **No explicit reference/candidate cross-selection or binding-driven highlight exists yet** - by design (Batch 6 scope), but a first-time viewer user may reasonably expect clicking a reference region to highlight a candidate target; the current UI relies on the "not evaluated"/independent-selection copy text to communicate this boundary rather than a stronger visual affordance.
|
|
223
|
-
- **The candidate `<select>` list is unbounded by relevance** - every `supported` `observation` record in the evidence root appears, with no viewport/applicability-based pre-filtering (deliberately, per task §22's prohibition on heuristic pre-selection) - for a very large evidence root this could become a long dropdown; not a correctness risk, a possible future usability improvement for Batch 6+.
|
|
224
|
-
- Batches 1-4's previously reported risks (install-prompt "available" branch untested in headless Chromium, no live service-worker execution test, per-request linked-evidence walk cost) remain unresolved and out of this batch's scope.
|
|
225
|
-
|
|
226
|
-
## 35. Out-of-scope confirmation
|
|
227
|
-
|
|
228
|
-
Confirmed absent from this batch's diff: explicit reference-region/runtime-target binding interaction, binding authoring UI, binding connectors, on-demand reference-fidelity evaluation, fidelity artifact persistence, candidate/reference delta computation, zoom/pan controls, synchronized/locked views, annotation, graphical region/requirement authoring, contract editing, baseline/reference approval or supersession actions through the viewer, source editing, pixel-difference scoring, computer vision, OCR, image similarity scoring, cloud hosting, database, authentication, collaboration.
|
|
229
|
-
|
|
230
|
-
## 36. Final verdict
|
|
231
|
-
|
|
232
|
-
Batch 5 ("External reference and reference/candidate inspection") is implemented and independently validated: a developer can select an existing imported or approved `ExternalReferenceArtifact`, inspect its image in the reference's own pixel coordinate domain with real SVG region overlays, inspect canonical region relationships and selected requirements/tolerances/adequacy/applicability/provenance/lifecycle/supersession exactly as persisted, explicitly select a candidate `ObservationArtifact` (never auto-selected), see the two side by side with the candidate reusing Batch 3/4's exact runtime screenshot/SVG machinery unchanged, see real canonical reference/candidate compatibility (comparable/comparable-with-warnings/incomparable, with honest reasons) via the existing `evaluateReferenceCandidateCompatibility`, and optionally select an exactly-matching existing contract-evaluation context - all while reference-region selection and runtime-target selection remain two independent, never-synchronized domains (proven with a real equal-names Chromium fixture), and while binding evaluation and fidelity evaluation are never invoked anywhere in this batch. No Batch 6 interaction (explicit binding, zoom/pan, conditional lock, on-demand fidelity) was implemented, and no release/publication action was taken. Package version remains `0.7.0`.
|
|
1
|
+
# v0.8 Batch 5 — External Reference and Reference/Candidate Inspection — Implementation Report
|
|
2
|
+
|
|
3
|
+
## 1. Starting state
|
|
4
|
+
|
|
5
|
+
- Branch: `master`
|
|
6
|
+
- Starting HEAD: `319b7638d18edfcbba9902c8de7c68a02c377115` ("feat: add v0.8 comparison and contract inspection", Batch 4)
|
|
7
|
+
- `origin/master` after `git fetch`: `a1de8ac01e1367b60021cb04226f56369fa2debb`
|
|
8
|
+
- `git rev-list --left-right --count origin/master...HEAD`: `0 4` — local is exactly Batches 1-4 ahead of origin.
|
|
9
|
+
- `git merge-base --is-ancestor origin/master HEAD` → succeeded (exit 0): origin/master is a strict ancestor of local HEAD, no divergence. No pull/rebase/merge/reset performed.
|
|
10
|
+
- Starting `git status --short`: clean.
|
|
11
|
+
- Package version confirmed `0.7.0` throughout; never bumped.
|
|
12
|
+
|
|
13
|
+
## 2. The same path contradiction as Batch 4, resolved the same way
|
|
14
|
+
|
|
15
|
+
Task §5 gave an explicit, executable `Join-Path` algorithm with five verification assertions producing an inside-repository path, then separately restated the old Batches-1-3 sibling directory as the "Required resolved Batch 5 path" - textually inconsistent with its own algorithm (the sibling path fails assertion 1: it does not start with `$REPO_ROOT\`). Re-ran the literal algorithm:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
REPO_ROOT=Z:\Users\newuser\Projects\my-frontend-observer
|
|
19
|
+
WORKFLOW_BASE=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow
|
|
20
|
+
WORKFLOW_VERSION_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8
|
|
21
|
+
WORKFLOW_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-05
|
|
22
|
+
TestPathRepoRoot=True
|
|
23
|
+
ContainmentCheck=True
|
|
24
|
+
ParentOfBase=Z:\Users\newuser\Projects\my-frontend-observer
|
|
25
|
+
ParentOfRoot=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
All required checks pass for the inside-repository path. Per the same precedent established and documented in the Batch 4 report (`docs/reports/v0.8-comparison-contract-inspection-batch4.md` §2) - itself cross-checked against the repository's own `.gitignore` `.my-dev-kit-workflow/` entry, which only makes sense for an inside-repository path - Batch 5 followed the executable algorithm rather than the inconsistent restated sentence, and used **`Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-05`**.
|
|
29
|
+
|
|
30
|
+
## 3. Prior workflow-root audit
|
|
31
|
+
|
|
32
|
+
- Sibling `Z:\Users\newuser\Projects\my-frontend-observer.my-dev-kit-workflow\v0.8\` contains exactly `batch-01`, `batch-02`, `batch-03` - untouched, not migrated, not reused.
|
|
33
|
+
- Inside-repo `.my-dev-kit-workflow\v0.8\` contained `batch-04` (from the prior batch) before this batch started; Batch 5 added only `batch-05` alongside it without touching `batch-04`.
|
|
34
|
+
|
|
35
|
+
## 4. Predecessor reports/plan inspected
|
|
36
|
+
|
|
37
|
+
All four predecessor reports read in full (Batch 1-4). `docs/plans/v0.8-implementation-plan.md`'s "Batch 5 — External reference and reference/candidate inspection" section (goal/in-scope/out-of-scope/gate) matches the task's own scope exactly - no material difference found. `docs/ARCHITECTURE.md`, `docs/CONTRACTS.md`, `docs/CURRENT_STATE.md`, `docs/WORKFLOWS.md`, `docs/COMMANDS.md`, `docs/PROJECT_MILESTONES.md` (Milestone 8), `docs/ROADMAP.md` (v0.8), `docs/DOCUMENTATION_PRESERVATION_POLICY.md`, `docs/PROJECT_DESCRIPTION.md` all read/re-confirmed.
|
|
38
|
+
|
|
39
|
+
## 5. my-dev-kit retrieval
|
|
40
|
+
|
|
41
|
+
Index built at `$WORKFLOW_ROOT\my-dev-kit-index`. All seven required searches were run; results were cross-checked against direct source reads of `src/domain/externalReference*.ts`, `src/artifacts/externalReferenceArtifactReader.ts`, `src/application/externalReferencePersistenceService.ts`, and `src/viewerServer/evidence/{classify,mediaResolver,index}.ts` - every result matched.
|
|
42
|
+
|
|
43
|
+
## 6. Pre-edit reference-contract audit (task §10)
|
|
44
|
+
|
|
45
|
+
Read `src/domain/externalReference.ts`, `externalReferenceRegions.ts`, `externalReferenceRegionRelationships.ts`, `externalReferenceRequirements.ts`, `externalReferenceApplicability.ts`, `externalReferenceCompatibility.ts` in full. Confirmed exactly:
|
|
46
|
+
|
|
47
|
+
- `ExternalReferenceArtifact = ImportedExternalReferenceArtifact | ApprovedExternalReferenceArtifact` - discriminated by `lifecycle.state`; imported carries `image` and never `sourceReference`; approved carries `sourceReference` and never `image` (`isValidExternalReferenceArtifact` rejects any mix).
|
|
48
|
+
- `regions?: ReferenceRegion[]`, `requirements?: ExternalReferenceRequirement[]`, `applicability?: ExternalReferenceApplicability` are additive/optional on both lifecycle variants, carried forward verbatim by `approveExternalReference` (never re-derived on approval).
|
|
49
|
+
- `ReferenceRegion = {id, rectangle:{x,y,width,height}}` in reference-image pixels; `deriveReferenceRegionGeometry` is the sole pure derivation of `right/bottom/centerX/centerY` - never persisted.
|
|
50
|
+
- `ExternalReferenceRequirement` reuses the exact v0.5 `AuthoredChangeScopeCategory` vocabulary (`requested`/`expected-dependent`/`protected`/`preserved`) - `'unexpected'` is not an authorable member.
|
|
51
|
+
- `evaluateReferenceCandidateCompatibility` is page/state-level only (viewport/theme/applicationState/authenticatedState), reuses `ComparabilityResult`/`assessOptionalComparabilityDimension` from the v0.4 comparison engine verbatim - never a second compatibility model.
|
|
52
|
+
|
|
53
|
+
## 7. Reference image ownership rule (task §11) - already built in Batch 2, verified, reused unchanged
|
|
54
|
+
|
|
55
|
+
Read `src/viewerServer/evidence/mediaResolver.ts` in full: role `'image'` requires `family === 'external-reference-imported'`, resolved from that artifact's own directory. Role `'source-image'` requires `family === 'external-reference-approved'`, resolved via `findImportedReferenceDir(root, sourceReference.referenceId)` (`src/viewerServer/evidence/index.ts`) - a bounded exact-`referenceId` walk of the current evidence root, never assuming co-location, never copying bytes. Batch 5 added **zero** changes to `mediaResolver.ts` or `index.ts` - this mechanism already existed and is reused verbatim (confirmed via real Chromium proof, §17 Cases A/B below).
|
|
56
|
+
|
|
57
|
+
## 8. Reference region coordinate model (task §12/§13)
|
|
58
|
+
|
|
59
|
+
`ReferenceRegionOverlaySvg.tsx` (new): `viewBox="0 0 <imageWidth> <imageHeight>"` where `imageWidth`/`imageHeight` come from the artifact's own `image.width/height` (imported) or `sourceReference.image.width/height` (approved) - never the candidate's runtime viewport, never devicePixelRatio-multiplied, never normalized to percentages. Each region's canonical `{x,y,width,height}` is rendered unchanged. This is a deliberately distinct, sibling component from `TargetOverlaySvg` (a genuinely different coordinate domain and data source), not a reuse/parameterization of it - reusing that component would have silently conflated reference-image pixels with runtime CSS pixels.
|
|
60
|
+
|
|
61
|
+
## 9. Reference region selection (task §14/§15)
|
|
62
|
+
|
|
63
|
+
Region list clicks and SVG rectangle clicks both call the same `setSelectedRegionId` handler in `ReferenceWorkspace.tsx`; selection identity is exact `ReferenceRegion.id` (never a runtime target name). Labels render `region.id` verbatim - no OCR, no computer vision, no name inference. Proven bidirectionally in real Chromium (`referenceCandidateWorkspace.test.ts`, Case A: clicking the SVG rectangle sets `aria-pressed="true"` and the inspector shows "Reference region: header").
|
|
64
|
+
|
|
65
|
+
## 10. Reference relationships (task §16) - server-side derivation, reused canonical function
|
|
66
|
+
|
|
67
|
+
`src/viewerServer/evidence/referenceView.ts#getReferenceView` calls the existing canonical `deriveReferenceRegionRelationships` (never a duplicated predicate set, never `deriveLayoutRelationships` over reference regions) over the artifact's own `regions`, exposed via `GET /api/references/<handle>/view`. Only the six geometry-only relationship families it already supports are ever shown; no DOM containment/scroll/visibility is fabricated for a static image.
|
|
68
|
+
|
|
69
|
+
## 11. Reference requirements / distinction from evidence (task §17/§18)
|
|
70
|
+
|
|
71
|
+
`ReferenceInspector.tsx` renders each authored `ExternalReferenceRequirement` distinctly from raw region geometry: `requirementId`, `category`, `expectedDependentMode` (when `expected-dependent`), `subject` (region-property/region-relationship/region-measurement), and `tolerance` (exact/absolute-reference-px/percent) are all shown verbatim. A region's own geometry is displayed only under "Reference region: `<id>`" when that region is explicitly selected - it is never presented as an implied requirement. No `'unexpected'` category is ever fabricated (the type does not admit it).
|
|
72
|
+
|
|
73
|
+
## 12. Reference requirement expectation / adequacy (task §19/§20)
|
|
74
|
+
|
|
75
|
+
Server-side `deriveReferenceRequirementAdequacy` (existing canonical function, never a competing derivation) computes `status`/`totalRequirements`/`evaluableRequirements`/`reasons` over the artifact's own `regions`+`requirements`, exposed via the same `GET /api/references/<handle>/view` route, rendered under "Reference requirement adequacy" - kept in its own section, visually and semantically distinct from "Reference/candidate compatibility" (task §20's required distinction between reference adequacy and reference/candidate compatibility).
|
|
76
|
+
|
|
77
|
+
## 13. Reference applicability (task §21)
|
|
78
|
+
|
|
79
|
+
`ReferenceInspector.tsx` renders `applicability.viewport`/`.theme`/`.applicationState`/`.authenticatedState` exactly as persisted, or "not declared" when absent - never inferred from image pixels, theme is never visually guessed, application/auth state are never inferred from screenshot content.
|
|
80
|
+
|
|
81
|
+
## 14. Candidate selection (task §22)
|
|
82
|
+
|
|
83
|
+
`ReferenceWorkspace.tsx` renders a `<select id="reference-candidate-select">` populated from `useEvidenceIndex()`'s `observation`-family, `supported` records only. The initial value is always empty ("(none selected)") - no default candidate is ever pre-selected based on viewport/URL/target-name/timestamp/geometry similarity. Compatibility and side-by-side candidate rendering are gated entirely on `candidateHandle !== undefined`.
|
|
84
|
+
|
|
85
|
+
## 15. Reference/candidate compatibility (task §23/§24)
|
|
86
|
+
|
|
87
|
+
`getReferenceCandidateView` (new, `src/viewerServer/evidence/referenceView.ts`) calls the existing canonical `evaluateReferenceCandidateCompatibility(reference, candidate)` unchanged - never reimplemented in React or the viewer server. `comparable`/`comparable-with-warnings`/`incomparable` and each reason's `blocking`/`warning`/`unassessed` severity are rendered exactly as returned (`.comparability-banner--<state>`, reused styling from Batch 4's comparison workspace). An `incomparable` result gets `role="alert"`. No pixel/geometry/fidelity failure is ever fabricated from an incompatible state - the side-by-side panes remain fully inspectable regardless (proven in Case D).
|
|
88
|
+
|
|
89
|
+
## 16. Side-by-side layout and candidate rendering reuse (task §25/§26)
|
|
90
|
+
|
|
91
|
+
Default layout is a two-column grid (`.reference-workspace__panes`) - reference pane (image-domain SVG) beside candidate pane. The candidate pane is `ComparisonObservationPane` (Batch 4, unchanged) fed a synthetic `LinkStatus = {status:'resolved', handle: candidateHandle}` once a candidate is explicitly chosen - **zero** new candidate screenshot/coordinate-transform/target-rendering code was written; `TargetOverlaySvg` (Batch 3) renders the runtime viewport/targets exactly as it already did. No blended/alpha image, no pixel-difference heat map.
|
|
92
|
+
|
|
93
|
+
## 17. Real-browser proof (task §51, all cases)
|
|
94
|
+
|
|
95
|
+
`tests/browser/referenceCandidateWorkspace.test.ts` - 6 tests, all real Chromium against real canonically-produced fixtures (`writeReferenceCandidateFixture`, built through the real `importExternalReference`/`approveExternalReference`/`writeObservationArtifact` — never hand-forged JSON):
|
|
96
|
+
|
|
97
|
+
- **Case A (imported)**: real decodable image loads via `/api/media/<handle>/image`; `header`/`sidebar` rectangles render at their exact canonical width/height (400/240); region selection sets `aria-pressed`; lifecycle reads "imported". **PASS.**
|
|
98
|
+
- **Case B (approved)**: image loads via `/api/media/<handle>/source-image`; body text shows "approved (" and "owned by imported source referenceId" - proving the exact-source resolution, never a duplicated image. **PASS.**
|
|
99
|
+
- **Case C (compatible)**: reference and candidate render side by side with distinct viewBoxes (`0 0 400 300` vs `0 0 1200 800`); compatibility banner is `comparable`; the "not evaluated in this batch" fidelity note is present. **PASS.**
|
|
100
|
+
- **Case D (incompatible)**: `comparability-banner--incomparable` with real `viewport-mismatch`/`theme-mismatch` reasons; both panes still render; no "fidelity ... PASS/FAIL" text ever appears. **PASS.**
|
|
101
|
+
- **Case E (equal names, no binding)**: selecting the reference region `"header"` sets its own `aria-pressed="true"`; the candidate's identically-named runtime target `"header"` remains `aria-pressed="false"`; zero `[data-binding-connector]` elements exist. **PASS.**
|
|
102
|
+
- **Reference with no regions/requirements**: honest zero-rectangle SVG plus explicit "No requirements selected on this reference." / "No design requirements selected for this reference." messages - proven with the pre-existing `writeExternalReferencePairFixture`. **PASS.**
|
|
103
|
+
|
|
104
|
+
## 18. Optional candidate contract context (task §29)
|
|
105
|
+
|
|
106
|
+
`getReferenceCandidateView` additionally lists every existing `contract-evaluation` artifact whose own persisted `after` reference exactly identifies the selected candidate (same exact-identity comparison Batch 4's `linkedEvidence.ts` uses, applied here independently since this is a *forward* lookup - candidate → evaluations, not evaluation → candidate). Verified with a dedicated unit test (`referenceViewerServer.test.ts`, "never fabricates an evaluation context") that a candidate with zero matching evaluations returns `evaluationHandles: []`. When one or more exist, `ReferenceWorkspace.tsx` requires an explicit `<select>` choice before showing any verdict; `evaluateFrontendContract` is never called - the selected evaluation's own persisted `overallVerdict` is rendered unchanged.
|
|
107
|
+
|
|
108
|
+
## 19. Binding boundary (task §31/§45/§46)
|
|
109
|
+
|
|
110
|
+
Grep-verified: `evaluateReferenceRuntimeBindings` is imported/called nowhere under `src/viewerServer/` or `viewer/src/` (only named in `referenceView.ts`'s own doc comment, explaining why it is *not* called). No binding-declaration authoring UI, no connector rendering, no name/geometry/proximity-based inference exists anywhere in this batch's diff.
|
|
111
|
+
|
|
112
|
+
## 20. Fidelity boundary (task §32/§33/§47/§48)
|
|
113
|
+
|
|
114
|
+
Grep-verified: `evaluateReferenceCandidateFidelity` is likewise imported/called nowhere in this batch. The UI always shows an explicit, static "Fidelity: not evaluated in this batch — on-demand reference/candidate fidelity evaluation is Batch 6" note beside the compatibility result - a compatibility PASS or an "adequate" reference adequacy status is never rephrased as a fidelity PASS. No pixel-diff/perceptual-hash/OCR/computer-vision mechanism exists anywhere in this batch.
|
|
115
|
+
|
|
116
|
+
## 21. API changes
|
|
117
|
+
|
|
118
|
+
| Route | Method | Semantics |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| `GET /api/references/<handle>/view` | GET/HEAD | `{ok:true, regionRelationships: ReferenceRegionRelationshipGraph \| null, requirementAdequacy: ReferenceRequirementAdequacy \| null}`. `404` unknown handle, `409` not-a-reference/not-currently-loadable, `405` write methods. |
|
|
121
|
+
| `GET /api/references/<handle>/candidate/<handle>/view` | GET/HEAD | `{ok:true, compatibility: ReferenceCandidateCompatibilityResult, evaluationHandles: string[]}`. `404` unknown reference/candidate handle, `409` wrong family/not-currently-loadable, `405` write methods. |
|
|
122
|
+
|
|
123
|
+
`/api/status`, `/api/index`, `/api/artifacts/<handle>`, `/api/media/<handle>/<role>`, `/api/observations/<handle>/relationships`, `/api/comparisons/<handle>/view`, `/api/evaluations/<handle>/view` are byte-for-byte unchanged.
|
|
124
|
+
|
|
125
|
+
## 22. PWA cache boundary
|
|
126
|
+
|
|
127
|
+
**PASS.** Both new routes live under `/api/`, already covered by Batch 1's `navigateFallbackDenylist: [/^\/api\//]`. Verified against the real built `dist/viewer/sw.js` in the built-viewer smoke test (§25): zero occurrences of `api/references`, no second `registerRoute` call.
|
|
128
|
+
|
|
129
|
+
## 23. Files created
|
|
130
|
+
|
|
131
|
+
- `src/viewerServer/evidence/referenceView.ts`
|
|
132
|
+
- `viewer/src/components/ReferenceWorkspace.tsx`, `ReferenceRegionOverlaySvg.tsx`, `ReferenceInspector.tsx`
|
|
133
|
+
- `viewer/src/hooks/useReferenceView.ts`
|
|
134
|
+
- `viewer/src/types/reference.ts`
|
|
135
|
+
- `tests/unit/referenceViewerServer.test.ts`
|
|
136
|
+
- `tests/browser/referenceCandidateWorkspace.test.ts`
|
|
137
|
+
- `docs/reports/v0.8-reference-candidate-inspection-batch5.md` (this file)
|
|
138
|
+
|
|
139
|
+
## 24. Files modified
|
|
140
|
+
|
|
141
|
+
- `src/viewerServer/httpServer.ts` - added the two new routes (§21); every existing route unchanged.
|
|
142
|
+
- `viewer/src/components/ArtifactPreview.tsx` - added the `external-reference-imported`/`external-reference-approved` branch to `ReferenceWorkspace`; every other family's branching unchanged.
|
|
143
|
+
- `viewer/src/styles/index.css` - additive rules for `.reference-workspace`/`.reference-pane`/`.reference-adequacy`/`.reference-region-overlay-svg__rect--has-requirement`.
|
|
144
|
+
- `tests/support/evidenceFixtures.ts` - added `writeReferenceCandidateFixture` (real imported+approved reference with 2 regions/4 requirements/applicability, plus one real compatible and one real incompatible candidate observation, all built through the real canonical application services - never hand-forged JSON). The pre-existing `writeExternalReferencePairFixture` (Batch 2) was reused unchanged for the no-regions negative case.
|
|
145
|
+
- `docs/ARCHITECTURE.md`, `docs/COMMANDS.md` - new/updated Batch 5 sections.
|
|
146
|
+
|
|
147
|
+
## 25. Tests added and behavior protected
|
|
148
|
+
|
|
149
|
+
| Test file | Level | Protects |
|
|
150
|
+
|---|---|---|
|
|
151
|
+
| `referenceViewerServer.test.ts` (11 tests) | unit/integration (real HTTP) | Region-relationship/adequacy derivation via real canonical functions for both imported and approved references; honest `null`/`null` for a reference with no regions/requirements; 409 for a non-reference handle; 404 unknown handle; 405 write methods; real `comparable` compatibility (with real unassessed reasons) for a matching candidate; real `incomparable` compatibility with real `viewport-mismatch`/`theme-mismatch` blocking reasons for a mismatched candidate; zero fabricated evaluation-context handles; 404 unknown candidate; 409 non-observation candidate. |
|
|
152
|
+
| `referenceCandidateWorkspace.test.ts` (6 tests, real Chromium) | browser | Cases A-E per task §51 plus the no-regions honest-empty case (§17). |
|
|
153
|
+
|
|
154
|
+
## 26. Fixture verification methodology
|
|
155
|
+
|
|
156
|
+
Before writing browser-test assertions, `writeReferenceCandidateFixture`'s actual output was verified directly against the real `getReferenceView`/`getReferenceCandidateView` server functions in `referenceViewerServer.test.ts` first (unit level, faster iteration) - this is how the initial `follows-vertically` requirement-direction mismatch was caught and fixed (the pairwise derivation loop orders `(subjectRegion, relatedRegion)` by authored-array index, not alphabetically or by geometry-obvious direction; `header` precedes `sidebar` in the array but `verticalSequenceOf` returns `sidebar` as the vertically-later, hence `subjectTarget`, region - the fixture's requirement was corrected to `subjectRegion: 'sidebar', relatedRegion: 'header'` to match the actual canonical derivation, achieving a genuine `adequate` (not `partial`) status). The `writeReferenceCandidateFixture`'s built-in call already asserts nothing on its own; correctness was established entirely by the passing assertions in `referenceViewerServer.test.ts` and the browser test, both of which read real derived output rather than assuming it.
|
|
157
|
+
|
|
158
|
+
## 27. Validation results
|
|
159
|
+
|
|
160
|
+
| Command | Result |
|
|
161
|
+
|---|---|
|
|
162
|
+
| `npm run typecheck` | **PASS** (zero errors, both `tsconfig.json` and `viewer/tsconfig.json`) |
|
|
163
|
+
| `npm run lint` | **PASS** (zero errors/warnings) |
|
|
164
|
+
| `npm test` (`vitest run`) | **PASS** — 1112/1112 tests, 61/61 files |
|
|
165
|
+
| `npm run build` | **PASS** — `dist/viewerServer/evidence/referenceView.js` plus the rebuilt `dist/viewer/**` PWA |
|
|
166
|
+
| `npm run check:docs` | **PASS** — "Documentation check passed (17 required files)." |
|
|
167
|
+
| `npm run test:browser` | **PASS** — 147/147 tests, 15/15 files (real Chromium) |
|
|
168
|
+
| `git diff --check` | **PASS** — no whitespace errors (only expected LF→CRLF notices) |
|
|
169
|
+
|
|
170
|
+
## 28. Built viewer smoke (task §54)
|
|
171
|
+
|
|
172
|
+
Fixture: one real imported+approved reference pair (2 regions, 4 requirements across all four categories, applicability) and one real compatible + one real incompatible candidate observation, built via `.my-dev-kit-workflow\v0.8\batch-05\tmp\build-smoke-reference.mjs` (not committed) against the actual compiled `dist/artifacts/artifactWriter.js`/`dist/application/externalReferencePersistenceService.js`.
|
|
173
|
+
|
|
174
|
+
Command: `node dist/cli.js view --root "<WORKFLOW_ROOT>\smoke\evidence-root" --port 4319 --no-open`
|
|
175
|
+
|
|
176
|
+
All required checks passed against the real running built server:
|
|
177
|
+
|
|
178
|
+
- `/api/index` → 4 real records (`observation` x2, `external-reference-imported`, `external-reference-approved`), all `supported`.
|
|
179
|
+
- `/api/references/<imported-handle>/view` → `200`, real `regionRelationships` (`horizontally-overlapping`/`above`/`does-not-overlap`/`wider-than`/... /`follows-vertically`) and `requirementAdequacy`.
|
|
180
|
+
- `/api/references/<approved-handle>/candidate/<compatible>/view` → `200`, `compatibility.state:"comparable"`, `evaluationHandles:[]`.
|
|
181
|
+
- `/api/references/<approved-handle>/candidate/<incompatible>/view` → `200`, `compatibility.state:"incomparable"` with real `viewport-mismatch`(1200x800 vs 800x600)/`theme-mismatch`("light" vs "dark") blocking reasons.
|
|
182
|
+
- `/api/media/<imported-handle>/image` → `200 image/png`; `/api/media/<approved-handle>/source-image` → `200 image/png` (resolved through the exact imported source, not a co-located duplicate - confirmed no `reference.png` exists under the approved artifact's own directory, §29 filesystem listing).
|
|
183
|
+
- Unknown reference handle → `404`; write method (`POST`) → `405`.
|
|
184
|
+
- `/` (PWA shell) → `200`; `sw.js` contains zero occurrences of `api/references`.
|
|
185
|
+
- `netstat` confirmed `127.0.0.1:4319` only, never `0.0.0.0`.
|
|
186
|
+
- Server located by its real PID (`2436`) and terminated with `taskkill /F`; a follow-up `netstat` confirmed the port was released.
|
|
187
|
+
|
|
188
|
+
**Result: PASS.** Logs retained under `$WORKFLOW_ROOT\logs\`.
|
|
189
|
+
|
|
190
|
+
## 29. Generated path inventory
|
|
191
|
+
|
|
192
|
+
| Path | Disposition |
|
|
193
|
+
|---|---|
|
|
194
|
+
| `WORKFLOW_ROOT\tmp\build-smoke-reference.mjs` | Retained (dev/readiness tooling only, not committed) |
|
|
195
|
+
| `WORKFLOW_ROOT\smoke\evidence-root` | Retained - listed and confirmed exactly 6 real fixture files (2 observations × manifest+screenshot, 1 imported reference's manifest+image, 1 approved reference's manifest only - **no** second image file under the approved artifact's directory, proving image ownership was never duplicated) |
|
|
196
|
+
| `WORKFLOW_ROOT\logs\*` | Retained (smoke evidence) |
|
|
197
|
+
| `WORKFLOW_ROOT\my-dev-kit-index\*` | Retained (successful index) |
|
|
198
|
+
| `WORKFLOW_ROOT\{cache,fixtures}` | Retained, empty/unused |
|
|
199
|
+
| Repo-root `dist/` | Ordinary build output (gitignored) |
|
|
200
|
+
| Sibling `...my-frontend-observer.my-dev-kit-workflow\v0.8\{batch-01,batch-02,batch-03}` | Untouched (verified, §3) |
|
|
201
|
+
| Inside-repo `.my-dev-kit-workflow\v0.8\batch-04` | Untouched (verified, §3) |
|
|
202
|
+
|
|
203
|
+
## 30. Repository pollution check
|
|
204
|
+
|
|
205
|
+
**PASS.** `git status --short` before staging showed only the 6 modified + 8 new Batch-5-owned paths listed in §23/§24. No unexpected file or directory appeared anywhere in the repository. No malformed sibling Batch 5 workflow path exists anywhere under `Z:\Users\newuser\Projects\`.
|
|
206
|
+
|
|
207
|
+
## 31. Batch 1-4 regression check
|
|
208
|
+
|
|
209
|
+
**PASS.** All 147 browser tests across all 15 browser test files (Batch 1 PWA/shell, Batch 2 evidence indexing/media, Batch 3 observation SVG workspace, Batch 4 comparison/evaluation workspace, and this batch's own 6 reference/candidate tests) pass unmodified. Zero pre-existing test files were altered this batch (unlike Batch 4, which had to update 2 Batch-2-era tests - no such conflict arose here since Batch 5 only adds a new branch to `ArtifactPreview.tsx` for a family that previously had no visual workspace at all, so no prior assertion about the raw-JSON preview for `external-reference-imported`/`external-reference-approved` existed to become stale).
|
|
210
|
+
|
|
211
|
+
## 32. v0.1-v0.7 regression check
|
|
212
|
+
|
|
213
|
+
**PASS.** Every pre-v0.8 unit and browser test suite (`observe`, `compare`, `approve-baseline`, `save-change-contract`, `evaluate-contract`, `import-reference`, `approve-reference`, `evaluate-reference-fidelity`) remains covered and passing - none was touched by this batch's diff. `src/domain/externalReference*.ts` and every existing reader/service (`importExternalReference`, `approveExternalReference`, `evaluateReferenceCandidateCompatibility`, `deriveReferenceRegionRelationships`, `deriveReferenceRequirementAdequacy`) are byte-for-byte unchanged.
|
|
214
|
+
|
|
215
|
+
## 33. Deviations
|
|
216
|
+
|
|
217
|
+
- The same `$WORKFLOW_ROOT` path-instruction contradiction as Batch 4 recurred verbatim in this task's §5; resolved identically and for the identical, previously-documented reason (§2 above). No other deviation from the task's literal text.
|
|
218
|
+
|
|
219
|
+
## 34. Remaining uncovered risks
|
|
220
|
+
|
|
221
|
+
- **`getReferenceCandidateView`'s evaluation-matching walk is a full bounded re-scan of the evidence tree per request** (same category of finding as Batch 4's linked-evidence walks) - for an evidence root near `MAX_MANIFEST_CANDIDATES`, this is more filesystem work per reference/candidate-view request than a single shared index pass would need. Not a correctness risk.
|
|
222
|
+
- **No explicit reference/candidate cross-selection or binding-driven highlight exists yet** - by design (Batch 6 scope), but a first-time viewer user may reasonably expect clicking a reference region to highlight a candidate target; the current UI relies on the "not evaluated"/independent-selection copy text to communicate this boundary rather than a stronger visual affordance.
|
|
223
|
+
- **The candidate `<select>` list is unbounded by relevance** - every `supported` `observation` record in the evidence root appears, with no viewport/applicability-based pre-filtering (deliberately, per task §22's prohibition on heuristic pre-selection) - for a very large evidence root this could become a long dropdown; not a correctness risk, a possible future usability improvement for Batch 6+.
|
|
224
|
+
- Batches 1-4's previously reported risks (install-prompt "available" branch untested in headless Chromium, no live service-worker execution test, per-request linked-evidence walk cost) remain unresolved and out of this batch's scope.
|
|
225
|
+
|
|
226
|
+
## 35. Out-of-scope confirmation
|
|
227
|
+
|
|
228
|
+
Confirmed absent from this batch's diff: explicit reference-region/runtime-target binding interaction, binding authoring UI, binding connectors, on-demand reference-fidelity evaluation, fidelity artifact persistence, candidate/reference delta computation, zoom/pan controls, synchronized/locked views, annotation, graphical region/requirement authoring, contract editing, baseline/reference approval or supersession actions through the viewer, source editing, pixel-difference scoring, computer vision, OCR, image similarity scoring, cloud hosting, database, authentication, collaboration.
|
|
229
|
+
|
|
230
|
+
## 36. Final verdict
|
|
231
|
+
|
|
232
|
+
Batch 5 ("External reference and reference/candidate inspection") is implemented and independently validated: a developer can select an existing imported or approved `ExternalReferenceArtifact`, inspect its image in the reference's own pixel coordinate domain with real SVG region overlays, inspect canonical region relationships and selected requirements/tolerances/adequacy/applicability/provenance/lifecycle/supersession exactly as persisted, explicitly select a candidate `ObservationArtifact` (never auto-selected), see the two side by side with the candidate reusing Batch 3/4's exact runtime screenshot/SVG machinery unchanged, see real canonical reference/candidate compatibility (comparable/comparable-with-warnings/incomparable, with honest reasons) via the existing `evaluateReferenceCandidateCompatibility`, and optionally select an exactly-matching existing contract-evaluation context - all while reference-region selection and runtime-target selection remain two independent, never-synchronized domains (proven with a real equal-names Chromium fixture), and while binding evaluation and fidelity evaluation are never invoked anywhere in this batch. No Batch 6 interaction (explicit binding, zoom/pan, conditional lock, on-demand fidelity) was implemented, and no release/publication action was taken. Package version remains `0.7.0`.
|