Skip to content

Commit 64aa257

Browse files
committed
docs(adr): repair verified replay and journal source pointers
1 parent ec8d8d7 commit 64aa257

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎docs/adr/0012-interactive-replay.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ After bounded expiry, the tombstone disappears and the key is free.
11671167
> Only provenance distinguishes authored observations from interactive diagnostics using the same command.
11681168
>
11691169
> `invokeResolvedReplayAction` stamps `internal.replayPlanStep` at the one dispatch point for every annotated or unannotated plan step.
1170-
> Its pointer is `src/daemon/handlers/session-replay-action-runtime.ts`.
1170+
> Its pointer is `packages/replay-port/src/daemon-port/session-replay-action-runtime.ts`.
11711171
> `internal` is daemon-only.
11721172
> `toDaemonRequest` in `packages/daemon/src/server/http/http-rpc-methods.ts` never copies it from the wire.
11731173
> A client therefore cannot forge authored provenance.
@@ -1238,7 +1238,7 @@ After bounded expiry, the tombstone disappears and the key is free.
12381238
> Exclusion occurs before `session.actions`, at the same point as `--no-record`.
12391239
> Excluded reads never increase `session.actions.length`.
12401240
> `describeUnperformedRecordAndHeal` already compares this count with `actionsCountAtDivergence`.
1241-
> Its pointer is `src/daemon/handlers/session-replay-runtime-plan.ts`, using R2/#1262's `pendingRecordAndHeal` watermark.
1241+
> Its pointer is `packages/ad-replay/src/internal/resume.ts`, using R2/#1262's `pendingRecordAndHeal` watermark.
12421242
> Count growth proves a corrective action before a `record-and-heal`-shaped resume.
12431243
> A segment with only excluded diagnostics fails the existing guard like an empty segment.
12441244
> No new state is necessary.

‎docs/adr/0018-unified-event-journal.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This ADR proposes these rules; full contracts and rationale follow:
3131
Each invocation suppresses its own errors without effects on other sinks or requests.
3232
Concurrent work uses forked scopes that clone mutable envelope, log-path, and routing bindings.
3333
Only concurrency-safe aggregation state is shared as mutable state.
34-
- **Progress remains transport-owned.** `src/request/progress.ts` and its typed `RequestProgressEvent` union do not change.
34+
- **Progress remains transport-owned.** `packages/host-kit/src/internal/request-progress.ts` and its typed `RequestProgressEvent` union do not change.
3535
- **Existing formats remain byte-compatible, with one exception.** Golden fixtures preserve `events.ndjson` v1, `cost.runnerRoundTrips`, per-request diagnostics ndjson, and replay-timing shapes.
3636
The currently unredacted replay-timing helper's events become redacted.
3737
This intentional security fix is a declared behavior change.
@@ -61,20 +61,20 @@ Each has separate emit calls, shapes, redaction rules, and sinks:
6161
Some appends occur outside requests.
6262
`finalizeRepairTeardown` in `packages/daemon/src/core/session-store.ts` records synthetic `close` during idle reap or shutdown.
6363
Its comment states "no live request here."
64-
3. **Progress streaming**, `src/request/progress.ts` and `src/daemon/request-progress-protocol.ts`, uses a closed typed `RequestProgressEvent` union.
64+
3. **Progress streaming**, `packages/host-kit/src/internal/request-progress.ts` and `packages/daemon-contracts/src/request-progress-protocol.ts`, uses a closed typed `RequestProgressEvent` union.
6565
Socket/HTTP transport installs single-sink `AsyncLocalStorage`.
6666
Ndjson envelopes share the final-response stream.
6767
Client disconnect feeds cancellation.
6868
`meta.requestProgress` explicitly enables the channel per request.
6969
`--json` disables it.
7070
Current wire events are **unredacted**.
71-
4. **Replay timing trace**, `src/daemon/handlers/session-replay-trace.ts` and `session-test-runtime.ts`, uses per-attempt `replay-timing.ndjson` files.
71+
4. **Replay timing trace**, `packages/replay-port/src/daemon-port/session-replay-trace.ts` and `session-test-runtime.ts`, uses per-attempt `replay-timing.ndjson` files.
7272
Each attempt creates its path dynamically.
7373
`src/cli/replay-test/trace.ts` reads them.
7474
Two helpers write them: `appendReplayTraceEvent` and `appendReplayTestTimingEvent`.
7575
Only one redacts.
7676

77-
`src/upload-progress.ts` is a fifth local callback sink for artifact uploads.
77+
`packages/remote/src/upload-progress.ts` is a fifth local callback sink for artifact uploads.
7878
It never crosses request scope and remains out of scope.
7979
Production has no `EventEmitter` usage.
8080
The proposal preserves that avoidance of implicit pub/sub.
@@ -186,7 +186,7 @@ The proposed normative semantics are:
186186
Only the sink list and concurrency-safe aggregation state remain shared.
187187
Request-global `phaseCounts` uses single-threaded atomic increments because agent-cost must include every shard.
188188

189-
Concurrent `test` attempts use `Promise.allSettled` in `runReplayTestShards` (`src/daemon/handlers/session-test.ts`).
189+
Concurrent `test` attempts use `Promise.allSettled` in `runReplayTestShards` (`packages/replay-test/src/internal/session-test.ts`).
190190
Nested dispatch invokes `createRequestExecutionScope` in `request-router.ts` child scopes.
191191
It rebinds `session` and `logPath` during execution.
192192
A shared mutable envelope could route debug and session-log events to another shard, even with frozen trace bindings.
@@ -244,7 +244,7 @@ A journal route would weaken payloads to `Record<string, unknown>` or place the
244244
Neither improves current behavior.
245245
Current progress is unredacted, so boundary redaction would also silently change wire bytes.
246246

247-
`src/request/progress.ts`, `request-progress-protocol.ts`, and both transports therefore remain unchanged.
247+
`packages/host-kit/src/internal/request-progress.ts`, `request-progress-protocol.ts`, and both transports therefore remain unchanged.
248248
If a future feature needs journal progress visibility, the progress emitter can additionally emit a cataloged journal kind.
249249
It must not route the wire path through the journal.
250250
Such **mirror emits** require a separate explicit decision.

‎docs/adr/0020-composable-recorded-fragments.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,11 @@ Audited tests are:
602602

603603
- `packages/ad-script/src/internal/__tests__/script.test.ts`
604604
- `packages/ad-replay/src/internal/__tests__/plan-digest.test.ts`
605-
- `src/commands/replay/script-source-bundle.test.ts`
605+
- `packages/replay-port/src/__tests__/script-source-bundle.test.ts`
606606
- `packages/maestro/src/internal/__tests__/replay-plan.test.ts`
607607
- `source-closure.test.ts`
608608
- `program-loader.test.ts`
609-
- `src/daemon/handlers/__tests__/session-replay-runtime.test.ts`
609+
- `packages/daemon/src/sessions/__tests__/replay-runtime/session-replay-runtime.test.ts`
610610

611611
Each implementation part owns its planted-red unit/fixture assertions below.
612612
This docs-only spike does not already have those structural gates.

0 commit comments

Comments
 (0)