@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,233 +1,233 @@
|
|
|
1
|
-
# v0.8 Batch 7 — Bounded Agent Context, Correlation, Provenance, and Raw Evidence Navigation — Implementation Report
|
|
2
|
-
|
|
3
|
-
## 1. Starting state
|
|
4
|
-
|
|
5
|
-
- Branch: `master`
|
|
6
|
-
- Starting HEAD: `b9eaa743b4db3e2fbfeb3503ea002cadeedf79b9` ("feat: add v0.8 binding fidelity interaction and view controls", Batch 6)
|
|
7
|
-
- `origin/master` after `git fetch`: `a1de8ac01e1367b60021cb04226f56369fa2debb`
|
|
8
|
-
- `git rev-list --left-right --count origin/master...HEAD`: `0 6`
|
|
9
|
-
- `git merge-base --is-ancestor origin/master HEAD` → succeeded: strict ancestor, 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. Same recurring path contradiction, resolved the same way
|
|
14
|
-
|
|
15
|
-
Task §6 repeated the identical `Join-Path`-vs-restated-sentence contradiction present in every prior batch since Batch 4. Re-ran the literal algorithm and confirmed the containment assertion passes only for the inside-repository path:
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
REPO_ROOT=Z:\Users\newuser\Projects\my-frontend-observer
|
|
19
|
-
WORKFLOW_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-07
|
|
20
|
-
ContainmentCheck=True
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Used **`Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-07`**, per the same established precedent.
|
|
24
|
-
|
|
25
|
-
## 3. Prior workflow-root audit
|
|
26
|
-
|
|
27
|
-
Sibling `...my-frontend-observer.my-dev-kit-workflow\v0.8\` holds only `batch-01/02/03` (untouched). Inside-repo `.my-dev-kit-workflow\v0.8\` held `batch-04/05/06` (untouched) before this batch added `batch-07` alongside them.
|
|
28
|
-
|
|
29
|
-
## 4. Predecessor reports/plan and my-dev-kit retrieval
|
|
30
|
-
|
|
31
|
-
All six predecessor reports read in full. `docs/plans/v0.8-implementation-plan.md`'s Batch 7 section matches the task's scope exactly. All required source files (§4 items 17-35) read in full, including `boundedAgentContext.ts`, `boundedAgentContextProjection.ts`, `boundedAgentContextCorrelation.ts`, `referenceFidelityProjection.ts`, and the existing viewer server (`classify.ts`, `linkedEvidence.ts`, `comparisonView.ts`, `evaluationView.ts`, `referenceView.ts`). My-dev-kit index rebuilt at `$WORKFLOW_ROOT\my-dev-kit-index`; all nine required searches run and cross-checked directly against the source - every result matched.
|
|
32
|
-
|
|
33
|
-
## 5. Context persistence-boundary audit (task §11)
|
|
34
|
-
|
|
35
|
-
Confirmed via `src/viewerServer/evidence/classify.ts`'s own existing comment: `my-frontend-observer/bounded-agent-context` is explicitly the "known-but-unreadered" kind - no disk writer/reader/manifest contract exists for it as an Observer evidence-root artifact family, and this batch adds **none**. No `writeBoundedAgentContextArtifact`, no bounded-context writer, no bounded-context artifact directory, no `save-context` command exists anywhere in the diff (grep-verified). Bounded agent context is consumed exclusively as explicit, ephemeral viewer-session operational input via `--context-file`.
|
|
36
|
-
|
|
37
|
-
## 6. Context-file architecture (task §12-§15)
|
|
38
|
-
|
|
39
|
-
The context file's root **is** one `BoundedAgentContextArtifact` value directly - no `{"context": {...}}` wrapper (task §12's explicit requirement). `src/cli.ts#loadContextFile` (new) mirrors `loadBindingsFile`'s exact shape: `statSync` size check (bounded by `MAX_CONTEXT_FILE_BYTES`, §7 below) before ever reading bytes, then `readFileSync`+`JSON.parse`, then delegates classification to `src/viewerServer/context.ts#classifyContextFileContent` (new). The loader never derives context, never correlates anything, never mutates the parsed value, and never normalizes it into a different shape - it either passes the exact parsed object through (after validation) or fails closed with a specific error.
|
|
40
|
-
|
|
41
|
-
## 7. File-size bound (task §15)
|
|
42
|
-
|
|
43
|
-
Reuses the existing Batch 2 `MAX_MANIFEST_CANDIDATE_BYTES` value (2,000,000 bytes), re-exported from `src/viewerServer/context.ts` as `MAX_CONTEXT_FILE_BYTES`, rather than inventing a second bound - documented rationale: a `BoundedAgentContextArtifact`'s own frozen numeric caps (`MAX_RUNTIME_TARGETS=25`, `MAX_CORRELATION_RECORDS=25`, `MAX_STATIC_CANDIDATES_PER_TARGET=5`, `MAX_FIDELITY_MISMATCHES=15`, etc. - all in `src/domain/boundedAgentContext.ts`) already make a genuine context artifact far smaller than 2MB in any realistic case, so the same "generous headroom, never an arbitrarily large read" rationale Batch 2 established applies unchanged.
|
|
44
|
-
|
|
45
|
-
## 8. Canonical validator reuse (task §67)
|
|
46
|
-
|
|
47
|
-
`classifyContextFileContent` calls the existing `isValidBoundedAgentContextArtifact` exactly once for a current-schema candidate - grep-verified as the only call site of that validator in the diff, and no second/duplicated validation logic exists anywhere. `classifyContextFileContent` itself only inspects `artifactKind`/`schemaVersion` (the wrapper-level routing decision) before delegating full structural validation to the existing function.
|
|
48
|
-
|
|
49
|
-
## 9. Unsupported-version behavior (task §16)
|
|
50
|
-
|
|
51
|
-
A recognized `artifactKind` with a `schemaVersion` other than the current `'1.0.0'` produces `{status: 'unsupported-version', foundSchemaVersion}` - **not** a startup failure (task §16's explicit requirement) - the viewer still starts, and `ContextWorkspace.tsx` shows this state honestly, never projecting any current-shape UI onto it. Proven at three levels: unit (`contextViewerServer.test.ts`), CLI dispatch (`cliViewDispatch.test.ts`), and CLI-syntax (`cliView.test.ts` confirms a *malformed* current-schema file still fails, distinct from this case).
|
|
52
|
-
|
|
53
|
-
## 10. Malformed-context startup failure (task §17)
|
|
54
|
-
|
|
55
|
-
Unreadable file, invalid JSON, a non-object root, the wrong `artifactKind`, or a structurally invalid *current*-schema artifact all fail viewer startup clearly (nonzero exit, no server started) - covered by five dedicated `cliView.test.ts` tests, each asserting the specific error text.
|
|
56
|
-
|
|
57
|
-
## 11. Context session lifetime (task §13)
|
|
58
|
-
|
|
59
|
-
`ViewerServerState.context: ContextSessionState` (default `{status: 'none'}`) is set exactly once at `startViewer` call time and never re-read, never re-parsed, never mutated for the life of the process. The supplied file's path is never returned by `GET /api/context`, never logged to the browser, and is not part of `contextId`/`contextRequestId`/any viewer evidence identity (grep-verified: the path string exists only inside `runViewCommand`'s local scope in `src/cli.ts`).
|
|
60
|
-
|
|
61
|
-
## 12. Exact source resolution (task §24, §69)
|
|
62
|
-
|
|
63
|
-
`src/viewerServer/evidence/contextSourceView.ts#resolveContextSources` (new) resolves every field of `BoundedAgentContextSourceReferences` by exact canonical identity only, reusing Batch 4's `linkedEvidence.ts` module extended with three additive resolvers:
|
|
64
|
-
|
|
65
|
-
- `resolveObservationById(root, observationId)` - bare `observationId` exact match (the only identity a context's `sources.observationIds` entries actually carry - distinct from Batch 4/5's compound `{observationId, requestId, producer, observationSchemaVersion}` cross-artifact reference).
|
|
66
|
-
- `resolveEvaluationByIdentity(root, evaluationId, evaluationRequestId)`.
|
|
67
|
-
- `resolveReferenceByIdentity(root, referenceId, referenceRequestId)` (matches either the `external-reference-imported` or `external-reference-approved` family).
|
|
68
|
-
|
|
69
|
-
`resolveComparisonByIdentity`/`resolveBaselineContractById`/`resolveChangeContractById` (existing, unchanged) cover the remaining fields. Every resolver preserves the exact missing/ambiguous discipline already established: zero matches → `missing`, two or more → `ambiguous` (never silently picked). No pathname/name/similarity heuristic exists anywhere in this module.
|
|
70
|
-
|
|
71
|
-
## 13. Raw evidence navigation (task §26-28, §60-61, §70)
|
|
72
|
-
|
|
73
|
-
`viewer/src/components/RawEvidenceViewer.tsx` (new) reuses the existing Batch 2 `useArtifactDetail`/`GET /api/artifacts/<handle>` unchanged - no second full-artifact retrieval mechanism, no local filesystem read, no editable view, no arbitrary path/URL input field anywhere (verified in real Chromium, Case H: zero `input[type="file"]`/`input[type="url"]` elements exist on the page). `EvidenceReference.path` values are rendered only as plain provenance text (`ContextWorkspace.tsx`'s correlation/omission/truncation sections) - grep-verified: never passed to `fs.readFile`/`path.resolve`/any static file server anywhere in the diff.
|
|
74
|
-
|
|
75
|
-
## 14. Runtime target projection display (task §29, §42)
|
|
76
|
-
|
|
77
|
-
`BoundedRuntimeTargetProjection`'s optional fields (`geometry`/`visibility`/`overflow`/`scrollOwner`/`relationshipEvidence`/`screenshotRef`) each render "not included in this bounded context" when absent - never a fabricated `false`/`0`/empty-but-present value (`ContextWorkspace.tsx`'s target list rendering).
|
|
78
|
-
|
|
79
|
-
## 15. Adequacy / adequacy reasons (task §31-33, §71)
|
|
80
|
-
|
|
81
|
-
`Adequacy.state` (`adequate`/`partial`/`inadequate`) is rendered verbatim via a colored badge, never collapsed to a boolean; every `AdequacyReason.code`/`.detail` is listed exactly. The canonical reason-code vocabulary (`ADEQUACY_REASON_CODES`) is displayed as-is - no viewer-invented stronger claim exists.
|
|
82
|
-
|
|
83
|
-
## 16. Omissions / truncations / required-evidence-loss prominence (task §33-35, §72-73)
|
|
84
|
-
|
|
85
|
-
`OmissionRecord`/`TruncationRecord` are rendered in two visually distinct groups each (required vs. optional), with `required: true` records placed in a dedicated `.context-required-loss` block (red border/background, `role="alert"`) - proven visible without reading raw JSON in real Chromium (Case D). Omissions and truncations are never conflated with each other - separate sections, separate fields (`reason`/`detail` for omissions; `limit`/`actualCount` for truncations).
|
|
86
|
-
|
|
87
|
-
## 17. Correlation-absent vs. correlation statuses (task §36-40, §74-77)
|
|
88
|
-
|
|
89
|
-
`artifact.correlations === undefined` renders "Static correlation not included in this context." - never "unavailable" (task §36's explicit distinction, proven in Case E). When present, `correlated`/`ambiguous`/`unavailable` are preserved exactly per record: `correlated` shows its one candidate labeled "Correlated candidate" (never "Owner"); `ambiguous` shows **every** supplied candidate with copy explicitly stating none is chosen over another (proven in Case B: both candidate ids visible, and the response body contains neither "owner" nor "winner" as a UI claim); `unavailable` shows zero candidates and the literal text "No static candidate available for this correlation" (proven in Case C). All UI text was audited (task §63) - no unqualified "Owner"/"Source owner"/"Owned by"/"Responsible component" string exists anywhere in `ContextWorkspace.tsx`.
|
|
90
|
-
|
|
91
|
-
## 18. Static producer / candidates / evidence basis / correlation-level provenance (task §41-46, §78-80)
|
|
92
|
-
|
|
93
|
-
`StaticEvidenceProducerIdentity.name`/`.version`/`.indexId` are displayed exactly as supplied - never derived from a local path/timestamp/session (grep-verified: no such derivation exists). `StaticCandidateReference.candidateId`/`.kind`/`.evidenceRefs.length` are shown verbatim; the `candidateId` string is never used as an `href`, `fs` argument, or otherwise converted into a filesystem path (proven in Case J: zero anchors with `href` containing `symbol:`/`file:` inside the context workspace). `evidenceBasis`, record-local `omissions`/`truncations` (kept visually separate from top-level ones, with their own `required` visibility), and `provenance.correlatedAt` are all rendered exactly as supplied.
|
|
94
|
-
|
|
95
|
-
## 19. No runtime rebuild / no runtime derivation / no my-dev-kit execution (task §18-21, §61-63, §96)
|
|
96
|
-
|
|
97
|
-
Grep-verified across the entire diff (`src/viewerServer/`, `viewer/src/`):
|
|
98
|
-
|
|
99
|
-
- `projectBoundedAgentContext(` — **zero** occurrences.
|
|
100
|
-
- `deriveRuntimeStaticCorrelations(` — **zero** occurrences.
|
|
101
|
-
- `attachRuntimeStaticCorrelations(` — **zero** occurrences.
|
|
102
|
-
- `npx @dailephd/my-dev-kit` / `child_process` spawning of my-dev-kit — **zero** occurrences (the only `child_process` import in the shipped viewer server is the pre-existing, unrelated Batch 1 `openBrowser.ts` best-effort browser-launch helper).
|
|
103
|
-
|
|
104
|
-
All four canonical functions are used **only** inside `tests/support/evidenceFixtures.ts` (test/fixture generation, explicitly sanctioned by task §64) to build trustworthy positive context fixtures - never inside `src/viewerServer/` or `viewer/src/`.
|
|
105
|
-
|
|
106
|
-
## 20. Bounded reference-fidelity projection (task §48-52, §82-85)
|
|
107
|
-
|
|
108
|
-
`artifact.fidelity === undefined` renders "Reference fidelity not included in this bounded context." - never implied as passing (proven in server-level unit tests and, implicitly, by every non-fidelity real-browser case never showing a PASS/FAIL banner). When present: identity fields (`referenceId`/`referenceRequestId`/`candidateObservationId`/`candidateRequestId`/`adequacy`/`compatibility`) are shown exactly; `state`/`blockedBy` render prominently (a `not-evaluated` blocked projection never displays an empty `mismatches` list as "no problems" - it shows an explicit "Evaluation was blocked..." note instead, proven in Case G); `mismatches` and `protectedContext` render in fully separate sections, each item preserving every canonical field (`requirementId`/`category`/`status`/`reasonCode`/`detail`/numeric or relationship fields) with no recomputation (grep-verified: `evaluateReferenceCandidateFidelity` is never called for the *bounded projection* rendering path itself - only reused, unchanged, for the separate live-evaluation panel below it).
|
|
109
|
-
|
|
110
|
-
## 21. Historical vs. live fidelity independence (task §53-54, §86)
|
|
111
|
-
|
|
112
|
-
When the context's `referenceId`/`candidateObservationId` exactly resolve within the current evidence root, `ContextWorkspace.tsx` embeds the existing, **unmodified** Batch 6 `ReferenceFidelityPanel` component directly beneath the bounded projection - the exact same on-demand `evaluateReferenceCandidateFidelity` trigger Batch 6 already built, reused verbatim (no duplicated fidelity-rendering logic). The two are labeled distinctly ("Bounded context fidelity projection" vs. "Current on-demand fidelity evaluation") with an explicit note that re-running never silently replaces the bounded projection. Proven in real Chromium (Case F): clicking "Evaluate Fidelity" produces a *second*, independently-rendered PASS state while the bounded projection's own PASS banner remains unchanged and still visible.
|
|
113
|
-
|
|
114
|
-
## 22. Context-target ↔ runtime-target interaction (task §30, §47, §81)
|
|
115
|
-
|
|
116
|
-
Selecting a bounded context target or a correlation record uses only exact `targetId`/`runtimeTargetId` string equality (`ContextWorkspace.tsx`). For a selected target, `SourceObservationTargetCheck` checks membership in each *exactly resolved* source observation's own already-fetched `targetEvidence` (a plain lookup over already-loaded JSON via the existing `useArtifactDetail`, never a new derivation) and lists **every** matching source observation rather than picking one when more than one contains the same target id - satisfying task §30's explicit "never guess which source observation owns the target" requirement.
|
|
117
|
-
|
|
118
|
-
## 23. API changes (task §55-57, §97)
|
|
119
|
-
|
|
120
|
-
| Route | Method | Semantics |
|
|
121
|
-
|---|---|---|
|
|
122
|
-
| `GET /api/context` | GET/HEAD | `{ok:true, status:'none'}` \| `{ok:true, status:'unsupported-version', foundSchemaVersion}` \| `{ok:true, status:'valid', artifact, sourceResolution}`. `405` for any write method (enforced globally by the existing request handler, before route dispatch). |
|
|
123
|
-
|
|
124
|
-
No write endpoint was added (`POST/PUT /api/context`, `POST /api/correlation`, `POST /api/source`, `GET /api/file?path=...` all confirmed absent). Every other route (`/api/status`, `/api/index`, `/api/artifacts/<handle>`, `/api/media/<handle>/<role>`, `/api/observations/<handle>/relationships`, `/api/comparisons/<handle>/view`, `/api/evaluations/<handle>/view`, `/api/references/...`) is byte-for-byte unchanged.
|
|
125
|
-
|
|
126
|
-
## 24. PWA cache boundary (task §98)
|
|
127
|
-
|
|
128
|
-
**PASS.** `GET /api/context` lives under `/api/`, already covered by Batch 1's `navigateFallbackDenylist`. `tests/unit/viewerPwaBuild.test.ts` gained an explicit Batch 7 assertion against the real built `sw.js`: still exactly one `registerRoute` call, no `/api/context` precache entry. Independently confirmed against the real built server in the smoke test (§28).
|
|
129
|
-
|
|
130
|
-
## 25. Files created
|
|
131
|
-
|
|
132
|
-
- `src/viewerServer/context.ts`
|
|
133
|
-
- `src/viewerServer/evidence/contextSourceView.ts`
|
|
134
|
-
- `viewer/src/components/ContextWorkspace.tsx`, `RawEvidenceViewer.tsx`
|
|
135
|
-
- `viewer/src/hooks/useBoundedContext.ts`
|
|
136
|
-
- `viewer/src/types/context.ts`
|
|
137
|
-
- `tests/unit/contextViewerServer.test.ts`
|
|
138
|
-
- `tests/browser/boundedContextWorkspace.test.ts`
|
|
139
|
-
- `docs/reports/v0.8-bounded-context-correlation-batch7.md` (this file)
|
|
140
|
-
|
|
141
|
-
## 26. Files modified
|
|
142
|
-
|
|
143
|
-
- `src/cli.ts` - `view --context-file` (§6-10).
|
|
144
|
-
- `src/viewerServer/evidence/linkedEvidence.ts` - three additive resolvers (§12); every existing function unchanged.
|
|
145
|
-
- `src/viewerServer/httpServer.ts` - one new route (§23); `ViewerServerState.context` field added.
|
|
146
|
-
- `src/viewerServer/viewerService.ts` - `StartViewerOptions.context` added, threaded into `ViewerServerState`.
|
|
147
|
-
- `tests/support/evidenceFixtures.ts` - `writeBoundedContextEvidenceFixture` added (real evidence + real canonical context/correlation/fidelity fixtures for every required test case, §27).
|
|
148
|
-
- `tests/unit/cliView.test.ts`, `tests/unit/cliViewDispatch.test.ts` - `--context-file` startup/dispatch tests added (§66).
|
|
149
|
-
- `tests/unit/viewerPwaBuild.test.ts` - Batch 7 cache-boundary assertion added.
|
|
150
|
-
- `viewer/src/App.tsx` - added a "Bounded context" / "Evidence" mode toggle in the header; the context mode renders `ContextWorkspace` in place of the normal evidence body; a `navigateToRecord` callback lets context-mode source navigation switch back to evidence mode with the resolved record selected (task §25).
|
|
151
|
-
- `viewer/src/styles/index.css` - additive Batch 7 rules.
|
|
152
|
-
- `docs/ARCHITECTURE.md`, `docs/COMMANDS.md` - new/updated Batch 7 sections.
|
|
153
|
-
|
|
154
|
-
## 27. Test fixture generation methodology (task §64-65)
|
|
155
|
-
|
|
156
|
-
`writeBoundedContextEvidenceFixture` builds real Observer evidence (before/after observations, comparison, baseline/per-change contract, contract evaluation with a genuine `overallVerdict: "FAIL"`, an approved external reference) entirely through the existing canonical writers/application services, then builds every positive `BoundedAgentContextArtifact` variant by calling the real `projectBoundedAgentContext` (reading back the real persisted evaluation/reference artifacts through their existing canonical readers first, never re-derived by hand) and, where correlation is needed, the real `deriveRuntimeStaticCorrelations`/`attachRuntimeStaticCorrelations` - never hand-authored. Only the deliberately negative/malformed fixtures in `cliView.test.ts` (wrong kind, invalid JSON, structurally invalid current schema, non-object root) are hand-authored, exactly as task §64 permits.
|
|
157
|
-
|
|
158
|
-
An early version of this fixture accidentally made the "adequate correlated" case genuinely `partial` (the same baseline used for the required-truncation demonstration was shared with the main pipeline). This was caught by a direct assertion in `contextViewerServer.test.ts` (`expect(fixture.baseContext.adequacy.state).toBe('adequate')` initially failed with `'partial'`), and fixed by giving the required-truncation demonstration its own separate `projectBoundedAgentContext` call with a dedicated 11-clause baseline, never attached to the persisted contract-evaluation pipeline - documented here as the methodology that caught it (verify fixtures against real derived output before writing UI-level assertions against them, per the same discipline established in every prior batch's report).
|
|
159
|
-
|
|
160
|
-
Required fixture cases (task §65 A-L): **A** (adequate, one correlated target) - `correlatedContext`; **B** (ambiguous, ≥2 candidates) - `ambiguousContext`; **C** (unavailable) - `unavailableContext`; **D** (required omission) - `requiredOmissionContext`; **E** (required truncation) - `requiredTruncationContext`; **F** (no `correlations` field) - `baseContext`; **G** (fidelity mismatches) - `fidelityMismatchContext`; **H** (protectedContext) - `baseContext` (protected/preserved context present alongside a PASS state); **I** (fidelity `not-evaluated`/`blockedBy`) - `blockedFidelityContext`; **J** (missing linked source) - any context + deleting the observation directory in the test itself (mirrors the established Batch 4 pattern); **K** (multiple source observations relevant to the same target) - not built as a dedicated fixture this batch (task §65 K is explicitly "where useful"; the two-source-observation membership-check code path is exercised structurally by `SourceObservationTargetCheck`'s "list every match" implementation, but not proven with a real two-observations-sharing-a-target Chromium fixture - recorded as a residual gap, §31); **L** (unsupported future schema) - hand-authored negative fixture in `cliView.test.ts`/`cliViewDispatch.test.ts`.
|
|
161
|
-
|
|
162
|
-
## 28. Validation results
|
|
163
|
-
|
|
164
|
-
| Command | Result |
|
|
165
|
-
|---|---|
|
|
166
|
-
| `npm run typecheck` | **PASS** |
|
|
167
|
-
| `npm run lint` | **PASS** |
|
|
168
|
-
| `npm test` (`vitest run`) | **PASS** — 1156/1156 tests, 63/63 files |
|
|
169
|
-
| `npm run build` | **PASS** |
|
|
170
|
-
| `npm run check:docs` | **PASS** — 17 required files |
|
|
171
|
-
| `npm run test:browser` | **PASS** — 168/168 tests, 17/17 files (one transient resource-contention flake on a single unrelated pre-existing Batch 6 test during a backgrounded run was reproduced as passing cleanly in isolation and on a subsequent full fresh run - not a Batch 7 regression, see §29) |
|
|
172
|
-
| `git diff --check` | **PASS** — no whitespace errors |
|
|
173
|
-
|
|
174
|
-
## 29. A note on browser-test flakiness during this batch's validation
|
|
175
|
-
|
|
176
|
-
One `npm run test:browser` invocation, run in the background while many Chrome processes were already active on the machine, reported 19 failed tests across 11 files - all in pre-existing v0.1-v0.3-era suites (e.g. `windowScrollScenario.test.ts`) this batch never touched, all failing with a 30s timeout, and the run itself took ~8x longer than normal (394s vs. ~50-115s). This is a resource-contention symptom, not a functional regression: the exact same failing test file was re-run in isolation immediately afterward and passed cleanly, and a subsequent full fresh `npm run test:browser` run passed all 168/168 tests. No source change was made in response to this - it was correctly diagnosed as environmental, not a defect.
|
|
177
|
-
|
|
178
|
-
## 30. Built viewer smoke
|
|
179
|
-
|
|
180
|
-
Fixture: real before/after observations, comparison, contract evaluation (genuine `overallVerdict: "FAIL"`), approved reference (genuine fidelity PASS), and a real `BoundedAgentContextArtifact` (adequate, one `correlated` target, fidelity `pass`) built via `.my-dev-kit-workflow\v0.8\batch-07\tmp\build-smoke-context.mjs` (not committed) against the compiled `dist/*.js`, written to `.my-dev-kit-workflow\v0.8\batch-07\contexts\smoke-context.json`.
|
|
181
|
-
|
|
182
|
-
Command: `node dist/cli.js view --root "<root>" --context-file "<context.json>" --bindings-file "<bindings.json>" --port 4319 --no-open`
|
|
183
|
-
|
|
184
|
-
All required checks passed against the real running built server: `/api/status` → `200`; `/api/index` → 8 real records; `/api/context` → `status:"valid"`, `adequacy:"adequate"`, `correlations[0].status:"correlated"`, `fidelity.state:"pass"`, and every `sourceResolution` field `resolved` (2 observations, comparison, evaluation, reference); write method → `405`; PWA shell → `200`; `sw.js` contains zero `api/context` occurrences; the coexisting live fidelity endpoint (`--bindings-file` also supplied) independently returns a real `state:"pass"` for the same reference/candidate, proving `--bindings-file`/`--context-file` coexistence; a directory-traversal probe against `/api/artifacts/<handle>` returned `404` (no filesystem escape); the evidence root contained exactly the 10 expected real fixture files with no stray writes; the context JSON file's checksum was confirmed unchanged after the server session; `netstat` confirmed `127.0.0.1:4319` only; the server was located by its real PID and terminated with `taskkill /F`; a follow-up `netstat` confirmed the port was released.
|
|
185
|
-
|
|
186
|
-
**Result: PASS.**
|
|
187
|
-
|
|
188
|
-
## 31. Generated path inventory
|
|
189
|
-
|
|
190
|
-
| Path | Disposition |
|
|
191
|
-
|---|---|
|
|
192
|
-
| `WORKFLOW_ROOT\tmp\build-smoke-context.mjs` | Retained (dev tooling, not committed) |
|
|
193
|
-
| `WORKFLOW_ROOT\contexts\smoke-context.json` | Retained (dev tooling, not committed) |
|
|
194
|
-
| `WORKFLOW_ROOT\bindings\smoke-bindings.json` | Retained (dev tooling, not committed) |
|
|
195
|
-
| `WORKFLOW_ROOT\smoke\evidence-root` | Retained - 10 real fixture files verified |
|
|
196
|
-
| `WORKFLOW_ROOT\logs\*` | Retained (smoke evidence) |
|
|
197
|
-
| `WORKFLOW_ROOT\my-dev-kit-index\*` | Retained |
|
|
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,02,03}` | Untouched |
|
|
201
|
-
| Inside-repo `.my-dev-kit-workflow\v0.8\{batch-04,05,06}` | Untouched |
|
|
202
|
-
|
|
203
|
-
## 32. Repository pollution check
|
|
204
|
-
|
|
205
|
-
**PASS.** `git status --short` before staging showed exactly the 10 modified + 8 new Batch-7-owned paths listed in §25/§26. No unexpected file/directory anywhere in the repository or its parent. No malformed sibling Batch 7 workflow path exists.
|
|
206
|
-
|
|
207
|
-
## 33. Batch 1-6 regression check
|
|
208
|
-
|
|
209
|
-
**PASS.** All 168 browser tests across 17 files pass on a clean run, including every Batch 1-6 test file, unmodified except the three additive test-file changes described in §26 (`cliView.test.ts`/`cliViewDispatch.test.ts` for the new `--context-file` flag, `viewerPwaBuild.test.ts` for the new cache-boundary assertion) - no pre-existing assertion was weakened or removed.
|
|
210
|
-
|
|
211
|
-
## 34. v0.1-v0.7 regression check
|
|
212
|
-
|
|
213
|
-
**PASS.** Full unit suite (1156/1156) green; `src/domain/boundedAgentContext*.ts` and every existing reader/service are byte-for-byte unchanged except the two additive exports already documented in Batch 6 (`deriveCoordinateScale`) - Batch 7 touches zero files under `src/domain/`.
|
|
214
|
-
|
|
215
|
-
## 35. Deviations
|
|
216
|
-
|
|
217
|
-
- The same recurring `$WORKFLOW_ROOT` path-instruction contradiction as every prior batch since Batch 4, resolved identically (§2).
|
|
218
|
-
- No other deviation from the task's literal text.
|
|
219
|
-
|
|
220
|
-
## 36. Remaining uncovered risks
|
|
221
|
-
|
|
222
|
-
- **Task §65 Case K (multiple source observations relevant to the same target) has no dedicated real-browser fixture/test** this batch, though the implementing code (`SourceObservationTargetCheck`, §22) structurally lists every match rather than picking one, by construction - a real-browser proof for this specific case is a reasonable follow-up.
|
|
223
|
-
- **`resolveContextSources` performs up to six independent bounded evidence-tree walks per `/api/context` request** (one per source-reference kind, run in parallel) - the same per-request-recomputation-cost category already noted as a residual risk in the Batch 4/5/6 reports for linked-evidence resolution generally. Not a correctness risk.
|
|
224
|
-
- **The context/evidence mode toggle in `App.tsx` is a simple two-state switch, not integrated with the URL/history** - navigating away and back within a session loses the "which mode was active" state on a full page reload (not persisted, by design - session-only). A minor UX limitation, not a correctness concern.
|
|
225
|
-
- Batches 1-6's previously reported risks (install-prompt "available" branch untested in headless Chromium, no live service-worker execution test, per-request linked-evidence walk cost, lock's zoom-multiplier mirroring simplification) remain unresolved and out of this batch's scope.
|
|
226
|
-
|
|
227
|
-
## 37. Out-of-scope confirmation
|
|
228
|
-
|
|
229
|
-
Confirmed absent from this batch's diff: bounded-agent-context persistence/writer, running my-dev-kit from the viewer, inventing static/source ownership, rebuilding bounded-agent-context at runtime, rebuilding runtime/static correlation at runtime, arbitrary filesystem browsing, source-code file browsing, raw evidence editing, annotation, source editing, automatic correction, cloud hosting, database, authentication, collaboration.
|
|
230
|
-
|
|
231
|
-
## 38. Final verdict
|
|
232
|
-
|
|
233
|
-
Batch 7 ("Bounded agent context, correlation, provenance, and raw evidence navigation") is implemented and independently validated: a developer can launch `view --context-file` with one explicit, validated `BoundedAgentContextArtifact`, inspect its identity/profile/adequacy/reasons, every bounded runtime target's included-or-honestly-absent fields, required-vs-optional omissions and truncations with required loss made visually unmistakable, runtime/static correlation exactly as `correlated`/`ambiguous`/`unavailable` (or honestly "not included" when the field itself is absent) with every ambiguous candidate shown and none promoted as a winner, static producer/candidate identities displayed verbatim and never treated as filesystem paths or edit authorization, and a bounded reference-fidelity projection (mismatches, protected context, blocked state) displayed alongside - never merged into - a separately-triggered live Batch 6 fidelity evaluation reusing that exact unmodified component - while every exactly-resolved Observer source reference safely navigates to its existing Batch 2/3/4/5 raw-evidence and visual-workspace surfaces, entirely within the authorized evidence root. The viewer never runs my-dev-kit, never calls `projectBoundedAgentContext`, and never calls `deriveRuntimeStaticCorrelations`/`attachRuntimeStaticCorrelations` at runtime (all three grep-confirmed). No Batch 8 release/integrated-hardening work was pulled forward, and no release/publication action was taken. Package version remains `0.7.0`.
|
|
1
|
+
# v0.8 Batch 7 — Bounded Agent Context, Correlation, Provenance, and Raw Evidence Navigation — Implementation Report
|
|
2
|
+
|
|
3
|
+
## 1. Starting state
|
|
4
|
+
|
|
5
|
+
- Branch: `master`
|
|
6
|
+
- Starting HEAD: `b9eaa743b4db3e2fbfeb3503ea002cadeedf79b9` ("feat: add v0.8 binding fidelity interaction and view controls", Batch 6)
|
|
7
|
+
- `origin/master` after `git fetch`: `a1de8ac01e1367b60021cb04226f56369fa2debb`
|
|
8
|
+
- `git rev-list --left-right --count origin/master...HEAD`: `0 6`
|
|
9
|
+
- `git merge-base --is-ancestor origin/master HEAD` → succeeded: strict ancestor, 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. Same recurring path contradiction, resolved the same way
|
|
14
|
+
|
|
15
|
+
Task §6 repeated the identical `Join-Path`-vs-restated-sentence contradiction present in every prior batch since Batch 4. Re-ran the literal algorithm and confirmed the containment assertion passes only for the inside-repository path:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
REPO_ROOT=Z:\Users\newuser\Projects\my-frontend-observer
|
|
19
|
+
WORKFLOW_ROOT=Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-07
|
|
20
|
+
ContainmentCheck=True
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Used **`Z:\Users\newuser\Projects\my-frontend-observer\.my-dev-kit-workflow\v0.8\batch-07`**, per the same established precedent.
|
|
24
|
+
|
|
25
|
+
## 3. Prior workflow-root audit
|
|
26
|
+
|
|
27
|
+
Sibling `...my-frontend-observer.my-dev-kit-workflow\v0.8\` holds only `batch-01/02/03` (untouched). Inside-repo `.my-dev-kit-workflow\v0.8\` held `batch-04/05/06` (untouched) before this batch added `batch-07` alongside them.
|
|
28
|
+
|
|
29
|
+
## 4. Predecessor reports/plan and my-dev-kit retrieval
|
|
30
|
+
|
|
31
|
+
All six predecessor reports read in full. `docs/plans/v0.8-implementation-plan.md`'s Batch 7 section matches the task's scope exactly. All required source files (§4 items 17-35) read in full, including `boundedAgentContext.ts`, `boundedAgentContextProjection.ts`, `boundedAgentContextCorrelation.ts`, `referenceFidelityProjection.ts`, and the existing viewer server (`classify.ts`, `linkedEvidence.ts`, `comparisonView.ts`, `evaluationView.ts`, `referenceView.ts`). My-dev-kit index rebuilt at `$WORKFLOW_ROOT\my-dev-kit-index`; all nine required searches run and cross-checked directly against the source - every result matched.
|
|
32
|
+
|
|
33
|
+
## 5. Context persistence-boundary audit (task §11)
|
|
34
|
+
|
|
35
|
+
Confirmed via `src/viewerServer/evidence/classify.ts`'s own existing comment: `my-frontend-observer/bounded-agent-context` is explicitly the "known-but-unreadered" kind - no disk writer/reader/manifest contract exists for it as an Observer evidence-root artifact family, and this batch adds **none**. No `writeBoundedAgentContextArtifact`, no bounded-context writer, no bounded-context artifact directory, no `save-context` command exists anywhere in the diff (grep-verified). Bounded agent context is consumed exclusively as explicit, ephemeral viewer-session operational input via `--context-file`.
|
|
36
|
+
|
|
37
|
+
## 6. Context-file architecture (task §12-§15)
|
|
38
|
+
|
|
39
|
+
The context file's root **is** one `BoundedAgentContextArtifact` value directly - no `{"context": {...}}` wrapper (task §12's explicit requirement). `src/cli.ts#loadContextFile` (new) mirrors `loadBindingsFile`'s exact shape: `statSync` size check (bounded by `MAX_CONTEXT_FILE_BYTES`, §7 below) before ever reading bytes, then `readFileSync`+`JSON.parse`, then delegates classification to `src/viewerServer/context.ts#classifyContextFileContent` (new). The loader never derives context, never correlates anything, never mutates the parsed value, and never normalizes it into a different shape - it either passes the exact parsed object through (after validation) or fails closed with a specific error.
|
|
40
|
+
|
|
41
|
+
## 7. File-size bound (task §15)
|
|
42
|
+
|
|
43
|
+
Reuses the existing Batch 2 `MAX_MANIFEST_CANDIDATE_BYTES` value (2,000,000 bytes), re-exported from `src/viewerServer/context.ts` as `MAX_CONTEXT_FILE_BYTES`, rather than inventing a second bound - documented rationale: a `BoundedAgentContextArtifact`'s own frozen numeric caps (`MAX_RUNTIME_TARGETS=25`, `MAX_CORRELATION_RECORDS=25`, `MAX_STATIC_CANDIDATES_PER_TARGET=5`, `MAX_FIDELITY_MISMATCHES=15`, etc. - all in `src/domain/boundedAgentContext.ts`) already make a genuine context artifact far smaller than 2MB in any realistic case, so the same "generous headroom, never an arbitrarily large read" rationale Batch 2 established applies unchanged.
|
|
44
|
+
|
|
45
|
+
## 8. Canonical validator reuse (task §67)
|
|
46
|
+
|
|
47
|
+
`classifyContextFileContent` calls the existing `isValidBoundedAgentContextArtifact` exactly once for a current-schema candidate - grep-verified as the only call site of that validator in the diff, and no second/duplicated validation logic exists anywhere. `classifyContextFileContent` itself only inspects `artifactKind`/`schemaVersion` (the wrapper-level routing decision) before delegating full structural validation to the existing function.
|
|
48
|
+
|
|
49
|
+
## 9. Unsupported-version behavior (task §16)
|
|
50
|
+
|
|
51
|
+
A recognized `artifactKind` with a `schemaVersion` other than the current `'1.0.0'` produces `{status: 'unsupported-version', foundSchemaVersion}` - **not** a startup failure (task §16's explicit requirement) - the viewer still starts, and `ContextWorkspace.tsx` shows this state honestly, never projecting any current-shape UI onto it. Proven at three levels: unit (`contextViewerServer.test.ts`), CLI dispatch (`cliViewDispatch.test.ts`), and CLI-syntax (`cliView.test.ts` confirms a *malformed* current-schema file still fails, distinct from this case).
|
|
52
|
+
|
|
53
|
+
## 10. Malformed-context startup failure (task §17)
|
|
54
|
+
|
|
55
|
+
Unreadable file, invalid JSON, a non-object root, the wrong `artifactKind`, or a structurally invalid *current*-schema artifact all fail viewer startup clearly (nonzero exit, no server started) - covered by five dedicated `cliView.test.ts` tests, each asserting the specific error text.
|
|
56
|
+
|
|
57
|
+
## 11. Context session lifetime (task §13)
|
|
58
|
+
|
|
59
|
+
`ViewerServerState.context: ContextSessionState` (default `{status: 'none'}`) is set exactly once at `startViewer` call time and never re-read, never re-parsed, never mutated for the life of the process. The supplied file's path is never returned by `GET /api/context`, never logged to the browser, and is not part of `contextId`/`contextRequestId`/any viewer evidence identity (grep-verified: the path string exists only inside `runViewCommand`'s local scope in `src/cli.ts`).
|
|
60
|
+
|
|
61
|
+
## 12. Exact source resolution (task §24, §69)
|
|
62
|
+
|
|
63
|
+
`src/viewerServer/evidence/contextSourceView.ts#resolveContextSources` (new) resolves every field of `BoundedAgentContextSourceReferences` by exact canonical identity only, reusing Batch 4's `linkedEvidence.ts` module extended with three additive resolvers:
|
|
64
|
+
|
|
65
|
+
- `resolveObservationById(root, observationId)` - bare `observationId` exact match (the only identity a context's `sources.observationIds` entries actually carry - distinct from Batch 4/5's compound `{observationId, requestId, producer, observationSchemaVersion}` cross-artifact reference).
|
|
66
|
+
- `resolveEvaluationByIdentity(root, evaluationId, evaluationRequestId)`.
|
|
67
|
+
- `resolveReferenceByIdentity(root, referenceId, referenceRequestId)` (matches either the `external-reference-imported` or `external-reference-approved` family).
|
|
68
|
+
|
|
69
|
+
`resolveComparisonByIdentity`/`resolveBaselineContractById`/`resolveChangeContractById` (existing, unchanged) cover the remaining fields. Every resolver preserves the exact missing/ambiguous discipline already established: zero matches → `missing`, two or more → `ambiguous` (never silently picked). No pathname/name/similarity heuristic exists anywhere in this module.
|
|
70
|
+
|
|
71
|
+
## 13. Raw evidence navigation (task §26-28, §60-61, §70)
|
|
72
|
+
|
|
73
|
+
`viewer/src/components/RawEvidenceViewer.tsx` (new) reuses the existing Batch 2 `useArtifactDetail`/`GET /api/artifacts/<handle>` unchanged - no second full-artifact retrieval mechanism, no local filesystem read, no editable view, no arbitrary path/URL input field anywhere (verified in real Chromium, Case H: zero `input[type="file"]`/`input[type="url"]` elements exist on the page). `EvidenceReference.path` values are rendered only as plain provenance text (`ContextWorkspace.tsx`'s correlation/omission/truncation sections) - grep-verified: never passed to `fs.readFile`/`path.resolve`/any static file server anywhere in the diff.
|
|
74
|
+
|
|
75
|
+
## 14. Runtime target projection display (task §29, §42)
|
|
76
|
+
|
|
77
|
+
`BoundedRuntimeTargetProjection`'s optional fields (`geometry`/`visibility`/`overflow`/`scrollOwner`/`relationshipEvidence`/`screenshotRef`) each render "not included in this bounded context" when absent - never a fabricated `false`/`0`/empty-but-present value (`ContextWorkspace.tsx`'s target list rendering).
|
|
78
|
+
|
|
79
|
+
## 15. Adequacy / adequacy reasons (task §31-33, §71)
|
|
80
|
+
|
|
81
|
+
`Adequacy.state` (`adequate`/`partial`/`inadequate`) is rendered verbatim via a colored badge, never collapsed to a boolean; every `AdequacyReason.code`/`.detail` is listed exactly. The canonical reason-code vocabulary (`ADEQUACY_REASON_CODES`) is displayed as-is - no viewer-invented stronger claim exists.
|
|
82
|
+
|
|
83
|
+
## 16. Omissions / truncations / required-evidence-loss prominence (task §33-35, §72-73)
|
|
84
|
+
|
|
85
|
+
`OmissionRecord`/`TruncationRecord` are rendered in two visually distinct groups each (required vs. optional), with `required: true` records placed in a dedicated `.context-required-loss` block (red border/background, `role="alert"`) - proven visible without reading raw JSON in real Chromium (Case D). Omissions and truncations are never conflated with each other - separate sections, separate fields (`reason`/`detail` for omissions; `limit`/`actualCount` for truncations).
|
|
86
|
+
|
|
87
|
+
## 17. Correlation-absent vs. correlation statuses (task §36-40, §74-77)
|
|
88
|
+
|
|
89
|
+
`artifact.correlations === undefined` renders "Static correlation not included in this context." - never "unavailable" (task §36's explicit distinction, proven in Case E). When present, `correlated`/`ambiguous`/`unavailable` are preserved exactly per record: `correlated` shows its one candidate labeled "Correlated candidate" (never "Owner"); `ambiguous` shows **every** supplied candidate with copy explicitly stating none is chosen over another (proven in Case B: both candidate ids visible, and the response body contains neither "owner" nor "winner" as a UI claim); `unavailable` shows zero candidates and the literal text "No static candidate available for this correlation" (proven in Case C). All UI text was audited (task §63) - no unqualified "Owner"/"Source owner"/"Owned by"/"Responsible component" string exists anywhere in `ContextWorkspace.tsx`.
|
|
90
|
+
|
|
91
|
+
## 18. Static producer / candidates / evidence basis / correlation-level provenance (task §41-46, §78-80)
|
|
92
|
+
|
|
93
|
+
`StaticEvidenceProducerIdentity.name`/`.version`/`.indexId` are displayed exactly as supplied - never derived from a local path/timestamp/session (grep-verified: no such derivation exists). `StaticCandidateReference.candidateId`/`.kind`/`.evidenceRefs.length` are shown verbatim; the `candidateId` string is never used as an `href`, `fs` argument, or otherwise converted into a filesystem path (proven in Case J: zero anchors with `href` containing `symbol:`/`file:` inside the context workspace). `evidenceBasis`, record-local `omissions`/`truncations` (kept visually separate from top-level ones, with their own `required` visibility), and `provenance.correlatedAt` are all rendered exactly as supplied.
|
|
94
|
+
|
|
95
|
+
## 19. No runtime rebuild / no runtime derivation / no my-dev-kit execution (task §18-21, §61-63, §96)
|
|
96
|
+
|
|
97
|
+
Grep-verified across the entire diff (`src/viewerServer/`, `viewer/src/`):
|
|
98
|
+
|
|
99
|
+
- `projectBoundedAgentContext(` — **zero** occurrences.
|
|
100
|
+
- `deriveRuntimeStaticCorrelations(` — **zero** occurrences.
|
|
101
|
+
- `attachRuntimeStaticCorrelations(` — **zero** occurrences.
|
|
102
|
+
- `npx @dailephd/my-dev-kit` / `child_process` spawning of my-dev-kit — **zero** occurrences (the only `child_process` import in the shipped viewer server is the pre-existing, unrelated Batch 1 `openBrowser.ts` best-effort browser-launch helper).
|
|
103
|
+
|
|
104
|
+
All four canonical functions are used **only** inside `tests/support/evidenceFixtures.ts` (test/fixture generation, explicitly sanctioned by task §64) to build trustworthy positive context fixtures - never inside `src/viewerServer/` or `viewer/src/`.
|
|
105
|
+
|
|
106
|
+
## 20. Bounded reference-fidelity projection (task §48-52, §82-85)
|
|
107
|
+
|
|
108
|
+
`artifact.fidelity === undefined` renders "Reference fidelity not included in this bounded context." - never implied as passing (proven in server-level unit tests and, implicitly, by every non-fidelity real-browser case never showing a PASS/FAIL banner). When present: identity fields (`referenceId`/`referenceRequestId`/`candidateObservationId`/`candidateRequestId`/`adequacy`/`compatibility`) are shown exactly; `state`/`blockedBy` render prominently (a `not-evaluated` blocked projection never displays an empty `mismatches` list as "no problems" - it shows an explicit "Evaluation was blocked..." note instead, proven in Case G); `mismatches` and `protectedContext` render in fully separate sections, each item preserving every canonical field (`requirementId`/`category`/`status`/`reasonCode`/`detail`/numeric or relationship fields) with no recomputation (grep-verified: `evaluateReferenceCandidateFidelity` is never called for the *bounded projection* rendering path itself - only reused, unchanged, for the separate live-evaluation panel below it).
|
|
109
|
+
|
|
110
|
+
## 21. Historical vs. live fidelity independence (task §53-54, §86)
|
|
111
|
+
|
|
112
|
+
When the context's `referenceId`/`candidateObservationId` exactly resolve within the current evidence root, `ContextWorkspace.tsx` embeds the existing, **unmodified** Batch 6 `ReferenceFidelityPanel` component directly beneath the bounded projection - the exact same on-demand `evaluateReferenceCandidateFidelity` trigger Batch 6 already built, reused verbatim (no duplicated fidelity-rendering logic). The two are labeled distinctly ("Bounded context fidelity projection" vs. "Current on-demand fidelity evaluation") with an explicit note that re-running never silently replaces the bounded projection. Proven in real Chromium (Case F): clicking "Evaluate Fidelity" produces a *second*, independently-rendered PASS state while the bounded projection's own PASS banner remains unchanged and still visible.
|
|
113
|
+
|
|
114
|
+
## 22. Context-target ↔ runtime-target interaction (task §30, §47, §81)
|
|
115
|
+
|
|
116
|
+
Selecting a bounded context target or a correlation record uses only exact `targetId`/`runtimeTargetId` string equality (`ContextWorkspace.tsx`). For a selected target, `SourceObservationTargetCheck` checks membership in each *exactly resolved* source observation's own already-fetched `targetEvidence` (a plain lookup over already-loaded JSON via the existing `useArtifactDetail`, never a new derivation) and lists **every** matching source observation rather than picking one when more than one contains the same target id - satisfying task §30's explicit "never guess which source observation owns the target" requirement.
|
|
117
|
+
|
|
118
|
+
## 23. API changes (task §55-57, §97)
|
|
119
|
+
|
|
120
|
+
| Route | Method | Semantics |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `GET /api/context` | GET/HEAD | `{ok:true, status:'none'}` \| `{ok:true, status:'unsupported-version', foundSchemaVersion}` \| `{ok:true, status:'valid', artifact, sourceResolution}`. `405` for any write method (enforced globally by the existing request handler, before route dispatch). |
|
|
123
|
+
|
|
124
|
+
No write endpoint was added (`POST/PUT /api/context`, `POST /api/correlation`, `POST /api/source`, `GET /api/file?path=...` all confirmed absent). Every other route (`/api/status`, `/api/index`, `/api/artifacts/<handle>`, `/api/media/<handle>/<role>`, `/api/observations/<handle>/relationships`, `/api/comparisons/<handle>/view`, `/api/evaluations/<handle>/view`, `/api/references/...`) is byte-for-byte unchanged.
|
|
125
|
+
|
|
126
|
+
## 24. PWA cache boundary (task §98)
|
|
127
|
+
|
|
128
|
+
**PASS.** `GET /api/context` lives under `/api/`, already covered by Batch 1's `navigateFallbackDenylist`. `tests/unit/viewerPwaBuild.test.ts` gained an explicit Batch 7 assertion against the real built `sw.js`: still exactly one `registerRoute` call, no `/api/context` precache entry. Independently confirmed against the real built server in the smoke test (§28).
|
|
129
|
+
|
|
130
|
+
## 25. Files created
|
|
131
|
+
|
|
132
|
+
- `src/viewerServer/context.ts`
|
|
133
|
+
- `src/viewerServer/evidence/contextSourceView.ts`
|
|
134
|
+
- `viewer/src/components/ContextWorkspace.tsx`, `RawEvidenceViewer.tsx`
|
|
135
|
+
- `viewer/src/hooks/useBoundedContext.ts`
|
|
136
|
+
- `viewer/src/types/context.ts`
|
|
137
|
+
- `tests/unit/contextViewerServer.test.ts`
|
|
138
|
+
- `tests/browser/boundedContextWorkspace.test.ts`
|
|
139
|
+
- `docs/reports/v0.8-bounded-context-correlation-batch7.md` (this file)
|
|
140
|
+
|
|
141
|
+
## 26. Files modified
|
|
142
|
+
|
|
143
|
+
- `src/cli.ts` - `view --context-file` (§6-10).
|
|
144
|
+
- `src/viewerServer/evidence/linkedEvidence.ts` - three additive resolvers (§12); every existing function unchanged.
|
|
145
|
+
- `src/viewerServer/httpServer.ts` - one new route (§23); `ViewerServerState.context` field added.
|
|
146
|
+
- `src/viewerServer/viewerService.ts` - `StartViewerOptions.context` added, threaded into `ViewerServerState`.
|
|
147
|
+
- `tests/support/evidenceFixtures.ts` - `writeBoundedContextEvidenceFixture` added (real evidence + real canonical context/correlation/fidelity fixtures for every required test case, §27).
|
|
148
|
+
- `tests/unit/cliView.test.ts`, `tests/unit/cliViewDispatch.test.ts` - `--context-file` startup/dispatch tests added (§66).
|
|
149
|
+
- `tests/unit/viewerPwaBuild.test.ts` - Batch 7 cache-boundary assertion added.
|
|
150
|
+
- `viewer/src/App.tsx` - added a "Bounded context" / "Evidence" mode toggle in the header; the context mode renders `ContextWorkspace` in place of the normal evidence body; a `navigateToRecord` callback lets context-mode source navigation switch back to evidence mode with the resolved record selected (task §25).
|
|
151
|
+
- `viewer/src/styles/index.css` - additive Batch 7 rules.
|
|
152
|
+
- `docs/ARCHITECTURE.md`, `docs/COMMANDS.md` - new/updated Batch 7 sections.
|
|
153
|
+
|
|
154
|
+
## 27. Test fixture generation methodology (task §64-65)
|
|
155
|
+
|
|
156
|
+
`writeBoundedContextEvidenceFixture` builds real Observer evidence (before/after observations, comparison, baseline/per-change contract, contract evaluation with a genuine `overallVerdict: "FAIL"`, an approved external reference) entirely through the existing canonical writers/application services, then builds every positive `BoundedAgentContextArtifact` variant by calling the real `projectBoundedAgentContext` (reading back the real persisted evaluation/reference artifacts through their existing canonical readers first, never re-derived by hand) and, where correlation is needed, the real `deriveRuntimeStaticCorrelations`/`attachRuntimeStaticCorrelations` - never hand-authored. Only the deliberately negative/malformed fixtures in `cliView.test.ts` (wrong kind, invalid JSON, structurally invalid current schema, non-object root) are hand-authored, exactly as task §64 permits.
|
|
157
|
+
|
|
158
|
+
An early version of this fixture accidentally made the "adequate correlated" case genuinely `partial` (the same baseline used for the required-truncation demonstration was shared with the main pipeline). This was caught by a direct assertion in `contextViewerServer.test.ts` (`expect(fixture.baseContext.adequacy.state).toBe('adequate')` initially failed with `'partial'`), and fixed by giving the required-truncation demonstration its own separate `projectBoundedAgentContext` call with a dedicated 11-clause baseline, never attached to the persisted contract-evaluation pipeline - documented here as the methodology that caught it (verify fixtures against real derived output before writing UI-level assertions against them, per the same discipline established in every prior batch's report).
|
|
159
|
+
|
|
160
|
+
Required fixture cases (task §65 A-L): **A** (adequate, one correlated target) - `correlatedContext`; **B** (ambiguous, ≥2 candidates) - `ambiguousContext`; **C** (unavailable) - `unavailableContext`; **D** (required omission) - `requiredOmissionContext`; **E** (required truncation) - `requiredTruncationContext`; **F** (no `correlations` field) - `baseContext`; **G** (fidelity mismatches) - `fidelityMismatchContext`; **H** (protectedContext) - `baseContext` (protected/preserved context present alongside a PASS state); **I** (fidelity `not-evaluated`/`blockedBy`) - `blockedFidelityContext`; **J** (missing linked source) - any context + deleting the observation directory in the test itself (mirrors the established Batch 4 pattern); **K** (multiple source observations relevant to the same target) - not built as a dedicated fixture this batch (task §65 K is explicitly "where useful"; the two-source-observation membership-check code path is exercised structurally by `SourceObservationTargetCheck`'s "list every match" implementation, but not proven with a real two-observations-sharing-a-target Chromium fixture - recorded as a residual gap, §31); **L** (unsupported future schema) - hand-authored negative fixture in `cliView.test.ts`/`cliViewDispatch.test.ts`.
|
|
161
|
+
|
|
162
|
+
## 28. Validation results
|
|
163
|
+
|
|
164
|
+
| Command | Result |
|
|
165
|
+
|---|---|
|
|
166
|
+
| `npm run typecheck` | **PASS** |
|
|
167
|
+
| `npm run lint` | **PASS** |
|
|
168
|
+
| `npm test` (`vitest run`) | **PASS** — 1156/1156 tests, 63/63 files |
|
|
169
|
+
| `npm run build` | **PASS** |
|
|
170
|
+
| `npm run check:docs` | **PASS** — 17 required files |
|
|
171
|
+
| `npm run test:browser` | **PASS** — 168/168 tests, 17/17 files (one transient resource-contention flake on a single unrelated pre-existing Batch 6 test during a backgrounded run was reproduced as passing cleanly in isolation and on a subsequent full fresh run - not a Batch 7 regression, see §29) |
|
|
172
|
+
| `git diff --check` | **PASS** — no whitespace errors |
|
|
173
|
+
|
|
174
|
+
## 29. A note on browser-test flakiness during this batch's validation
|
|
175
|
+
|
|
176
|
+
One `npm run test:browser` invocation, run in the background while many Chrome processes were already active on the machine, reported 19 failed tests across 11 files - all in pre-existing v0.1-v0.3-era suites (e.g. `windowScrollScenario.test.ts`) this batch never touched, all failing with a 30s timeout, and the run itself took ~8x longer than normal (394s vs. ~50-115s). This is a resource-contention symptom, not a functional regression: the exact same failing test file was re-run in isolation immediately afterward and passed cleanly, and a subsequent full fresh `npm run test:browser` run passed all 168/168 tests. No source change was made in response to this - it was correctly diagnosed as environmental, not a defect.
|
|
177
|
+
|
|
178
|
+
## 30. Built viewer smoke
|
|
179
|
+
|
|
180
|
+
Fixture: real before/after observations, comparison, contract evaluation (genuine `overallVerdict: "FAIL"`), approved reference (genuine fidelity PASS), and a real `BoundedAgentContextArtifact` (adequate, one `correlated` target, fidelity `pass`) built via `.my-dev-kit-workflow\v0.8\batch-07\tmp\build-smoke-context.mjs` (not committed) against the compiled `dist/*.js`, written to `.my-dev-kit-workflow\v0.8\batch-07\contexts\smoke-context.json`.
|
|
181
|
+
|
|
182
|
+
Command: `node dist/cli.js view --root "<root>" --context-file "<context.json>" --bindings-file "<bindings.json>" --port 4319 --no-open`
|
|
183
|
+
|
|
184
|
+
All required checks passed against the real running built server: `/api/status` → `200`; `/api/index` → 8 real records; `/api/context` → `status:"valid"`, `adequacy:"adequate"`, `correlations[0].status:"correlated"`, `fidelity.state:"pass"`, and every `sourceResolution` field `resolved` (2 observations, comparison, evaluation, reference); write method → `405`; PWA shell → `200`; `sw.js` contains zero `api/context` occurrences; the coexisting live fidelity endpoint (`--bindings-file` also supplied) independently returns a real `state:"pass"` for the same reference/candidate, proving `--bindings-file`/`--context-file` coexistence; a directory-traversal probe against `/api/artifacts/<handle>` returned `404` (no filesystem escape); the evidence root contained exactly the 10 expected real fixture files with no stray writes; the context JSON file's checksum was confirmed unchanged after the server session; `netstat` confirmed `127.0.0.1:4319` only; the server was located by its real PID and terminated with `taskkill /F`; a follow-up `netstat` confirmed the port was released.
|
|
185
|
+
|
|
186
|
+
**Result: PASS.**
|
|
187
|
+
|
|
188
|
+
## 31. Generated path inventory
|
|
189
|
+
|
|
190
|
+
| Path | Disposition |
|
|
191
|
+
|---|---|
|
|
192
|
+
| `WORKFLOW_ROOT\tmp\build-smoke-context.mjs` | Retained (dev tooling, not committed) |
|
|
193
|
+
| `WORKFLOW_ROOT\contexts\smoke-context.json` | Retained (dev tooling, not committed) |
|
|
194
|
+
| `WORKFLOW_ROOT\bindings\smoke-bindings.json` | Retained (dev tooling, not committed) |
|
|
195
|
+
| `WORKFLOW_ROOT\smoke\evidence-root` | Retained - 10 real fixture files verified |
|
|
196
|
+
| `WORKFLOW_ROOT\logs\*` | Retained (smoke evidence) |
|
|
197
|
+
| `WORKFLOW_ROOT\my-dev-kit-index\*` | Retained |
|
|
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,02,03}` | Untouched |
|
|
201
|
+
| Inside-repo `.my-dev-kit-workflow\v0.8\{batch-04,05,06}` | Untouched |
|
|
202
|
+
|
|
203
|
+
## 32. Repository pollution check
|
|
204
|
+
|
|
205
|
+
**PASS.** `git status --short` before staging showed exactly the 10 modified + 8 new Batch-7-owned paths listed in §25/§26. No unexpected file/directory anywhere in the repository or its parent. No malformed sibling Batch 7 workflow path exists.
|
|
206
|
+
|
|
207
|
+
## 33. Batch 1-6 regression check
|
|
208
|
+
|
|
209
|
+
**PASS.** All 168 browser tests across 17 files pass on a clean run, including every Batch 1-6 test file, unmodified except the three additive test-file changes described in §26 (`cliView.test.ts`/`cliViewDispatch.test.ts` for the new `--context-file` flag, `viewerPwaBuild.test.ts` for the new cache-boundary assertion) - no pre-existing assertion was weakened or removed.
|
|
210
|
+
|
|
211
|
+
## 34. v0.1-v0.7 regression check
|
|
212
|
+
|
|
213
|
+
**PASS.** Full unit suite (1156/1156) green; `src/domain/boundedAgentContext*.ts` and every existing reader/service are byte-for-byte unchanged except the two additive exports already documented in Batch 6 (`deriveCoordinateScale`) - Batch 7 touches zero files under `src/domain/`.
|
|
214
|
+
|
|
215
|
+
## 35. Deviations
|
|
216
|
+
|
|
217
|
+
- The same recurring `$WORKFLOW_ROOT` path-instruction contradiction as every prior batch since Batch 4, resolved identically (§2).
|
|
218
|
+
- No other deviation from the task's literal text.
|
|
219
|
+
|
|
220
|
+
## 36. Remaining uncovered risks
|
|
221
|
+
|
|
222
|
+
- **Task §65 Case K (multiple source observations relevant to the same target) has no dedicated real-browser fixture/test** this batch, though the implementing code (`SourceObservationTargetCheck`, §22) structurally lists every match rather than picking one, by construction - a real-browser proof for this specific case is a reasonable follow-up.
|
|
223
|
+
- **`resolveContextSources` performs up to six independent bounded evidence-tree walks per `/api/context` request** (one per source-reference kind, run in parallel) - the same per-request-recomputation-cost category already noted as a residual risk in the Batch 4/5/6 reports for linked-evidence resolution generally. Not a correctness risk.
|
|
224
|
+
- **The context/evidence mode toggle in `App.tsx` is a simple two-state switch, not integrated with the URL/history** - navigating away and back within a session loses the "which mode was active" state on a full page reload (not persisted, by design - session-only). A minor UX limitation, not a correctness concern.
|
|
225
|
+
- Batches 1-6's previously reported risks (install-prompt "available" branch untested in headless Chromium, no live service-worker execution test, per-request linked-evidence walk cost, lock's zoom-multiplier mirroring simplification) remain unresolved and out of this batch's scope.
|
|
226
|
+
|
|
227
|
+
## 37. Out-of-scope confirmation
|
|
228
|
+
|
|
229
|
+
Confirmed absent from this batch's diff: bounded-agent-context persistence/writer, running my-dev-kit from the viewer, inventing static/source ownership, rebuilding bounded-agent-context at runtime, rebuilding runtime/static correlation at runtime, arbitrary filesystem browsing, source-code file browsing, raw evidence editing, annotation, source editing, automatic correction, cloud hosting, database, authentication, collaboration.
|
|
230
|
+
|
|
231
|
+
## 38. Final verdict
|
|
232
|
+
|
|
233
|
+
Batch 7 ("Bounded agent context, correlation, provenance, and raw evidence navigation") is implemented and independently validated: a developer can launch `view --context-file` with one explicit, validated `BoundedAgentContextArtifact`, inspect its identity/profile/adequacy/reasons, every bounded runtime target's included-or-honestly-absent fields, required-vs-optional omissions and truncations with required loss made visually unmistakable, runtime/static correlation exactly as `correlated`/`ambiguous`/`unavailable` (or honestly "not included" when the field itself is absent) with every ambiguous candidate shown and none promoted as a winner, static producer/candidate identities displayed verbatim and never treated as filesystem paths or edit authorization, and a bounded reference-fidelity projection (mismatches, protected context, blocked state) displayed alongside - never merged into - a separately-triggered live Batch 6 fidelity evaluation reusing that exact unmodified component - while every exactly-resolved Observer source reference safely navigates to its existing Batch 2/3/4/5 raw-evidence and visual-workspace surfaces, entirely within the authorized evidence root. The viewer never runs my-dev-kit, never calls `projectBoundedAgentContext`, and never calls `deriveRuntimeStaticCorrelations`/`attachRuntimeStaticCorrelations` at runtime (all three grep-confirmed). No Batch 8 release/integrated-hardening work was pulled forward, and no release/publication action was taken. Package version remains `0.7.0`.
|