diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/context-pack.md b/.llm/runs/fix-saga-event-feed--issue-2637/context-pack.md new file mode 100644 index 0000000000..3f8c245c60 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/context-pack.md @@ -0,0 +1,13 @@ +# Context pack + +Issue2637, PR2646, branch fix/saga-event-feed, base b0eb079575968e843b781579673c9fe2ae250e07 fetched before checkout/diagnosis. Read plan/research/worklog/supervisor/drift and issue in full. Feature tier; mandatory separate PLAN-EVAL pending, no product implementation. New real HTTP/nativeDenoKV test0pass/4fail/0ignored on unchanged main: concurrent slow-reader loss, Last-Event-ID loss after resident consumes, idle4lists/350ms, unbounded300keys. All handles closed, no backend resource started. + +Plan locks portable256-slot+head CAS journal, stable UUID:sequence ids, fixed-key watch ready/reread plus per-client coalescing pump, explicit native SSE cursor/gap errors (HTTPmayalready200), count retention and legacy upgrade boundary. Canonical event types move to existing domain/saga-message.ts while preserving contract aliases, no new domain folder. @std abortable reused for waiting; no new timer/clock needed. No transports/Streams, process/scaffold/DB/CLI/publish-map or version changes. Gates include real native memory/Deno/Redis/Garnet and full package/plugin, no new diagnostic/skip; full CLI scaffold N/A under actual scope/cost policy. + +Doc baseline core7/plugin30, exact per-entrypoint private reports measured. Native oRPC lastEventId/error frame and public KV CAS/watch/getMany capabilities verified. Use Deno2.9.7 via mise, structured wrappers with allow-write for output, no rtk/rg. Public artifacts repo-relative/sanitized; no operator paths/hostnames/ports/sessionids/downstream names. No goal/merge/ready-merge/auto-merge/publication. Only independent evaluator agents. + +Checkpoint: independent PLAN-EVAL PASS, S1 canonical domain/error/quick-start contract and S2 portable journal committed. S3 native HTTP integration now validated40/40 including all4original reds and realRedis/Garnet, ready/error/filter/cancellation paths. Core targeted suite41pass before one extra post-ready-failure case (now42). Adapter318lines, focused tests175/305 and HTTP363lines below caps. Exact doclint core7/plugin30 unchanged. Two exact owned backends retained for final eval with private immutable identities/mount receipts; do not touch foreign resources. Std dependency mapping uses already locked version and four metadata-only lock mirrors required by frozen guards. No scaffold/launch/publish-map behavior change; full runtime N/A unchanged. Remaining S4 public semantics/consumer refresh, full final gates, independent IMPL-EVAL, cleanup/current-head CI/threads. + +Final evaluation checkpoint: production source0b7ca700faeaecee8965dc42e9da7a86026b4e68; later commits run-only. Full core249/0/4existing, plugin196/0/2existing; journal/subscription44/44 and HTTP9/9 with real memory/DenoKV/Redis/Garnet including separate native clients. Quality/static/JSR/docs/freshness green, exact baseline core7/plugin30 retained.4issue boxes proven, proof6935399907, body closing keyword/fenced mappings, final DoD pending independent IMPL-EVAL/headchecks/cleanup. Two owned backend containers retained; private identities/mounts/endpoints in evaluator brief, no foreign cleanup. No scaffold output diff; full smoke N/A remains approved. + +Independent implementation PASS comment6935616660 at3e5e67457; evaluator46coretarget/9HTTP plus full249/196green and all277source gates0. All2owned containers/2original volumes now removed after maintained preview and exact identity/mount/reference proof; zero survivors. Private backend receipt is stale: never reuse its endpoints. Product unchanged since evaluated source. Remaining ready transition and required head CI/threads, then all-PR audit and final report. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/drift.md b/.llm/runs/fix-saga-event-feed--issue-2637/drift.md new file mode 100644 index 0000000000..3dc5e7a5a8 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/drift.md @@ -0,0 +1,7 @@ +# Drift + +Independent feature PLAN-EVAL PASS at224e8370, comment6934760031. No design change. Epoch wording explicitly pins first-append minting and later CAS inheritance. Closing keyword/evidence remain deferred until all acceptance is proven, per close-gate policy. Native error-frame distinctions remain mandatory tests. No product implementation preceded PASS. + +S2 resolver metadata: adding the already locked std async import requires four synchronized workspace dependency snapshots, discovered by frozen-reference/private-lock guards. S2 expands from <=12 to13files including the three run records, still below30; no dependency version or product/scaffold design change. Error class stays at the existing ./domain boundary; adapters exports only the new feed and types reachable from its public entry contract, avoiding a convenience mirror of the error family. + +S4 adds two separate-native-client tests and an optional namespace fixture argument to pin the already approved multi-process CAS/fanout contract. This is coverage only. Canonical asset generation confirms zero CLI/scaffold/generated launch diff; metadata reference locks do not alter runtime output, so full scaffold.runtime N/A remains founded on actual final scope. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/evaluate.md b/.llm/runs/fix-saga-event-feed--issue-2637/evaluate.md new file mode 100644 index 0000000000..5bf71b32a3 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/evaluate.md @@ -0,0 +1,146 @@ +# Evaluation: fix-saga-event-feed--issue-2637 + +## Metadata + +| Field | Value | +| ----- | ----- | +| Run ID | `fix-saga-event-feed--issue-2637` | +| Target | issue 2637 / PR https://github.com/rickylabs/netscript/pull/2646 | +| Archetype | 3 runtime/behavior with KV integration2 / plugin5 overlays | +| Scope overlays | service (thin HTTP wiring), docs | +| Evaluator | Separate IMPL-EVAL session, 2026-11-17; requested primary Muse Spark 1.3 xhigh via OpenCode Go contributor route, observed same; fallback Opus 5 xhigh unused; generator OpenAI Codex gpt-6.1-sol xhigh separate session/vendor family; feature cycle 1 of 5; no substitution; T3 fresh-delegate rule recorded vs same-session steering, no extra delegates launched | + +Route attestation: live pinned matrix via `deno task agentic:matrix --tier feature --impl-evaluator` (Deno 2.9.7 via mise) returns feature IMPL-EVAL primary Muse Spark 1.3 xhigh, fallback Opus 5 xhigh, max 5 roundtrips, notify after 3. Requested and observed route match; fallback unused with no failure evidence. Generator/vendor separation verified via run `supervisor.md` and commit authorship; no privileged-row promotion. Exact evaluated head `3e5e6745760abac0867c5d7e87e35bb311263937`, base `b0eb079575968e843b781579673c9fe2ae250e07`, product source `0b7ca700faeaecee8965dc42e9da7a86026b4e68` with later head run-only. + +## Process Verification + +| Check | Result | Evidence | +| ----- | ------ | -------- | +| Plan-Gate passed before implementation | PASS | `.llm/runs/fix-saga-event-feed--issue-2637/plan-eval.md` VERDICT PASS at head `224e83706371a1aed813b6962a9583da1a68639a`, all 8 boxes, separate GLM session; branch diff then 7 run artifacts + 1 HTTP test only, product equal main | +| Design section exists in worklog | PASS | `.llm/runs/fix-saga-event-feed--issue-2637/worklog.md` Design checkpoint section locks journal, cursor, watch, error, filter, ownership, upgrade boundary | +| Commit slices match design plan | PASS | Plan S1-S5 map to `334f21485` contracts, `5545d55f0` journal, `5175c6f1b` HTTP, `41213d147` + `0b7ca700f` docs/consumers, `3e5e67457` gates; research `179bb70e4`, red `9959930a3`, plan `224e83706` precede implementation | +| Each slice has a passing gate | PASS | Worklog S1-S5 gates re-verified independently below; reds 0/4 on unchanged main, greens below | +| No speculative seams (unused files) | PASS | New adapter `packages/plugin-sagas-core/src/adapters/kv-saga-event-feed.ts` consumed by `plugins/sagas/services/src/routers/v1-handlers.ts` and all new tests; no orphan exports; `transports/` diff empty | +| Constants used for finite vocabularies | PASS | `SAGA_EVENT_HISTORY_LIMIT`, `HEAD_KEY`, `EPOCH`, `EVENT_TYPES` set, `format:1`, error `reason` union; no magic literals in feed | + +## Static Gates + +| Gate | Command or check | Result | Evidence | Notes | +| ---- | ---------------- | ------ | -------- | ----- | +| Narrow typecheck core | `deno run --allow-read --allow-run .llm/tools/run-deno-check.ts --root packages/plugin-sagas-core --ext ts,tsx` | PASS | 154 files, 0 findings, Deno 2.9.7 `--unstable-kv` | Independent re-run | +| Narrow typecheck plugin | same wrapper `--root plugins/sagas --ext ts,tsx` | PASS | 123 files, 0 findings | Independent re-run | +| Format core | wrapper `run-deno-fmt.ts --root packages/plugin-sagas-core --ext ts,tsx` | PASS | 154 files, 0 findings | Independent re-run | +| Format plugin | wrapper `--root plugins/sagas --ext ts,tsx` | PASS | 123 files, 0 findings | Independent re-run | +| Lint core | wrapper `run-deno-lint.ts --root packages/plugin-sagas-core` | PASS | 154 files, 0 findings | Independent re-run | +| Lint plugin | wrapper `--root plugins/sagas` | PASS | 123 files, 0 findings | Independent re-run | +| Doc lint core | `run-deno-doc-lint.ts --root packages/plugin-sagas-core` | PASS | combined 7, all private-type-ref, 0 missing; matches private baseline 7; per-entrypoint distribution unchanged | No new diagnostics | +| Doc lint plugin | `run-deno-doc-lint.ts --root plugins/sagas` | PASS | combined 30, all private-type-ref, 0 missing; matches baseline 30 | No new diagnostics | +| Publish dry-run core | `deno publish --dry-run --allow-dirty` in `packages/plugin-sagas-core` | PASS | Success, no slow-type diagnostic | Audit helper banner miscount only, see Fitness F-6 | +| Link/path check | PR body, README, guide links | PASS | Quick-start contract matches `packages/plugin-sagas-core/src/adapters/mod.ts` exports; docs reference versioned prefix only | No broken paths | + +## Fitness Gates + +| Gate | Function | Result | Evidence | Violations | +| ---- | -------- | ------ | -------- | ---------- | +| F-1 | File-size lint | PASS | New adapter 318 lines, tests 207/305/369 lines under caps; `deno task quality:gate` FAIL=0 | None new | +| F-2 | Helper-reinvention scan | PASS | Reuses `@std/async` abortable, `WatchableKv` atomic/watch/getMany, native `crypto.randomUUID`/`structuredClone`; no new bus/clock | None | +| F-3 | Layering check | PASS | `domain/saga-message.ts` domain-only, `domain/errors.ts` domain-only, `adapters/kv-saga-event-feed.ts` imports domain + external KV/std only, `v1-handlers.ts` presentation imports adapters/domain | None | +| F-4 | Inheritance audit | PASS | No base classes with behavior; `SagasError`/`SagaEventFeedError` stub-only contracts preserved | None | +| F-5 | Public surface audit | PASS | Canonical SSE types moved to existing `domain/saga-message.ts` with identity re-export at `contracts/v1`; adapters entrypoint names only feed + needed types; no root mirror or Zod export | None | +| F-6 | JSR publishability gate | PASS | Dry-run Success; `audit-jsr-package --root packages/plugin-sagas-core` exit 0, 4 findings = 3 preexisting cardinality + 1 known slow-type banner with native no diagnostic | Preexisting only | +| F-7 | Doc-score gate | PASS | Core/plugin READMEs + `docs/site/durable-workflows/sagas.md` document 256/257, live/replay, ids, gaps, filter, cancel, durability, upgrade; `docs:accuracy` PASS | None | +| F-8 | Workspace lib override check | PASS | `quality:gate` FAIL=0 | None | +| F-9 | Permission declaration check | PASS | `quality:gate` FAIL=0; KV ownership stays with host, no new permissions | None | +| F-10 | Test-shape audit | PASS | New tests use `Deno.test`, real Hono/oRPC/native KV/Redis/Garnet, bounded waits, explicit closes; no new ignores | None | +| F-11 | Forbidden-folder lint | PASS | Only `adapters/`, `domain/`, `contracts/`, `tests/`, `routers/` touched; no utils/helpers/common/lib/interfaces | None | +| F-12 | Naming-convention lint | PASS | `quality:gate` FAIL=0 | None | +| F-13 | Saga and runtime invariants | PASS | Atomic head CAS order, epoch fencing, safe-integer, 64-conflict bound, subscribe-first/ready/reread, coalescing pump, explicit gap, abort ownership all tested | None | +| F-14 | Console-log lint | PASS | No new `console.*` in feed/handler; preexisting `getInstanceHistory` catch log untouched | None | +| F-15 | Re-export-of-upstream lint | PASS | No upstream re-export; SSE identity preserved locally | None | +| F-16 | Folder-cardinality lint | PASS | No new folders; audit WARNs are preexisting src/stores/domain counts, unchanged | Preexisting only | +| F-17 | Abstract-derived co-location lint | PASS | `quality:gate` FAIL=0 | None | +| F-18 | Sub-barrel lint | PASS | Existing `domain/mod.ts`, `adapters/mod.ts` curation unchanged; no new barrels | None | +| F-19 | Scoped source gate runners | PASS | All evidence from structured wrappers above, not raw root CLI | None | + +`deno task quality:gate` independently re-run: exit 0, FAIL=0 across roots. `deno task arch:check` included: FAIL=0. `deno task release:preflight` 4 PASS. `deno task docs:accuracy` PASS. `deno task check:mcp-export-corpus`, `check:publish-assets`, `check:agent-docs-prose` PASS; only MCP prose/corpus/publish-assets carriers changed, no CLI/scaffold output diff. + +## Runtime Gates + +| Gate | Validation | Result | Evidence | +| ---- | ---------- | ------ | -------- | +| Red oracles genuine | 4 HTTP reds on unchanged main | PASS | Prior PLAN-EVAL re-ran `plugins/sagas/tests/services/event-feed-http_test.ts` 0/4 at `224e8370` with product equal main; current branch history retains red commit `9959930a3`; no need to revert current product to repeat red | +| Journal/subscription targeted | `packages/plugin-sagas-core/tests/contracts/saga-event-feed_test.ts`, `tests/stores/saga-event-feed_test.ts`, `tests/stores/saga-event-subscription_test.ts` with owned Redis/Garnet | PASS | Independent re-run 46 passed / 0 failed / 0 ignored across memory/DenoKV/Redis/Garnet with new namespaces; covers concurrent writers, independent fast/slow readers, stable replay, 257-key capacity, exact oldest boundary, foreign/reset/malformed/future/corrupt/overflow, detached 16KiB payloads, startup/coalesced/overwrite races, cancel/readiness/pump failure, unsupported capabilities, 2 separate-native-client 32-writer tests | +| HTTP integration | `plugins/sagas/tests/services/event-feed-http_test.ts` with owned Redis/Garnet | PASS | Independent re-run 9 passed / 0 failed / 0 ignored; covers paused-reader fanout with matching ids, Last-Event-ID replay after consume, idle 0 lists, 300→257 bound, malformed/future vs expired/foreign/reset errors as native frames, unavailable frame, sagaName filter with global cursor, real Redis/Garnet fanout/replay | +| Full core | `deno test --unstable-kv --allow-all packages/plugin-sagas-core` with owned endpoints | PASS | Independent re-run 249 passed / 0 failed / 4 ignored, all preexisting option ignores, no new ignore | +| Full plugin | `deno test --unstable-kv --allow-all plugins/sagas` with owned endpoints | PASS | Independent re-run 196 passed / 0 failed / 2 ignored, all preexisting option ignores, no new ignore | +| No SCAN/poll | Fixed-key watch + bounded known-key reads | PASS | Idle spy asserts `list` 0, `watchPrefix` 0, `watch` 1 with head key + initial true on all backends; HTTP idle asserts raw `list` 0 over 350ms; native Redis INFO SCAN delta 0 retained in run evidence over startup/idle/close; `transports/` untouched, no Streams dependency | +| Release-gate class | scaffold.runtime | N/A | Honest N/A: no scaffold output, plugin copy, DB wiring, Aspire helper, CLI command, or publish-map/glob changes; `deno.json` exports unchanged; 4 lock files add only already-locked std async declaration with no version/integrity change; canonical asset generation proves zero CLI/scaffold diff; no scope contradiction found so no smoke dispatched | + +Deno doc used before source digs: `WatchableKv` subscribe-first/initial/ready semantics and `ProcedureHandlerOptions.lastEventId` plus `ORPCError` code/status/data confirmed via `deno doc`. + +## Consumer Gates + +| Consumer | Validation | Result | Evidence | +| -------- | ---------- | ------ | -------- | +| MCP prose/corpus/publish assets | `check:mcp-export-corpus`, `check:publish-assets`, `check:agent-docs-prose` | PASS | Freshness PASS; only 3 MCP carriers changed | +| Docs site | `docs/site/durable-workflows/sagas.md` + core/plugin READMEs | PASS | Count, live/replay, opaque ids, gap codes, filter, cancel, durability, uncertain commit, legacy upgrade all documented; `docs:accuracy` PASS | +| Public imports | Adapters/domain/contract entrypoints | PASS | `KvSagaEventFeed`, `SAGA_EVENT_HISTORY_LIMIT`, feed option/item types, `SagaSSEEvent` identity all importable; typecheck 0 | + +## Anti-Pattern Check + +Only patterns touched by scope marked CLEAR; others N/A. No DEBT_ACCEPTED needed. + +| AP | Status | Evidence | Notes | +| -- | ------ | -------- | ----- | +| AP-1 | CLEAR | Single 318-line adapter, no bus/monolith; transports untouched | - | +| AP-3 | CLEAR | No generic registry; fixed versioned prefix only | - | +| AP-4 | CLEAR | No new abstraction without concept; epoch/sequence/head/slot from plan | - | +| AP-5 | CLEAR | No utils/helpers; cohesive adapter + existing fixtures | - | +| AP-6 | CLEAR | No base lifecycle behavior | - | +| AP-8 | CLEAR | No new folders outside vocabulary | - | +| AP-10 | CLEAR | Only `SagaEventFeedError` mapped to native codes; other errors rethrown | - | +| AP-11 | CLEAR | Per-subscription pump/controller, no process globals | - | +| AP-12 | CLEAR | No timers/clocks; retention by count | - | +| AP-13 | CLEAR | No `console.*` added | - | +| AP-16 | N/A | No helper folders | - | +| AP-17 | N/A | No co-location change | - | +| AP-19 | N/A | No new entrypoints beyond approved adapters | - | +| AP-20 | N/A | No new barrel | - | +| AP-22 | CLEAR | No sibling re-export monolith | - | +| AP-23 | CLEAR | No inline handler bodies | - | +| AP-24 | CLEAR | No kind switch; `EVENT_TYPES` set validation only | - | +| AP-25 | CLEAR | Web Platform + std only in adapter | - | +| Others | N/A | Outside scope | - | + +## Arch-Debt Delta + +| Metric | Count | Evidence | +| ------ | ----- | -------- | +| New entries | 0 | No new violations; `arch-debt.md` unchanged by run | +| Resolved entries | 0 | No debt claimed closed | +| Deepened violations | 0 | Cardinality/slow-type findings preexisting, unchanged | +| Unrecorded violations | 0 | All WARNs map to preexisting entries or non-blocking lints | + +## Findings + +| Severity | Finding | Evidence | Required action | +| -------- | ------- | -------- | --------------- | +| low | Preexisting doc-lint cardinality + slow-type banner remain | Core 7 / plugin 30 private-type-ref only, 0 missing; audit 4 findings = 3 cardinality + 1 banner with native dry-run Success and no slow-type diagnostic | None for this run; future waves own | +| low | Final parent cleanup and required-head CI remain | Draft DoD last box unchecked by design pending this verdict; `leak-report.md` states 2 owned backends retained; review-threads 0/0; checks show path-filtered skipping with one pass, parent owns readiness/current required-head CI | Parent to cleanup owned resources and run required head CI before ready-merge; not product acceptance | +| low | Full scaffold.runtime N/A stands | No scaffold/process/DB/CLI/publish-map changes; lock diffs metadata-only; asset freshness PASS | No smoke; rescope only if scope contradicts | + +No blocking product, test, doc, or debt findings. Implementation matches all 8 approved Plan-Gate decisions with no unapproved new design. All new backend cases execute with owned endpoints; no new ignores. + +## Lessons for Promotion + +| Lesson | Pattern | Applies to | Confidence | +| ------ | ------- | ---------- | ---------- | +| Fixed-head watch + wake-token-captured-before-read closes subscribe races without timers | Runtime gate | Archetype 3 | medium | +| Native SSE error frames must be asserted, not HTTP status, when streaming may already be 200 | Consumer gate | Archetype 3/5 | high | + +## Verdict + +| Field | Value | +| ----- | ----- | +| Verdict | `PASS` | +| Rationale | Approved scope complete; static/fitness/runtime/consumer gates pass or honest N/A with evidence; no new doctrine debt; docs and run artifacts resumable; remaining cleanup/CI owned by parent, not acceptance | diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/leak-report.md b/.llm/runs/fix-saga-event-feed--issue-2637/leak-report.md new file mode 100644 index 0000000000..d01ebf6231 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/leak-report.md @@ -0,0 +1,7 @@ +# Final resource state + +Maintained read-only leak report and teardown preview completed before cleanup; no broad apply operation used. Native inspection matched exactly two run-created container identities, creation labels, pinned images and original mounts to the private creation receipts. Both recorded anonymous volumes were unshared; all other report entries remained foreign or unproven and were retained. + +Removed exactly two positively owned containers (Redis and pinned Garnet) by immutable identity. Re-scanned every surviving container before removing the two original, now-unreferenced anonymous volumes by their recorded names. Final native owner and recorded-volume scans show zero survivors; maintained leak-check after cleanup exits0. Every foreign/unproven process, container, network and volume remains untouched. All in-process tests/evaluator probes close their own KV clients, SSE readers and cancellation controllers. + +Raw identities, endpoints, mounts and operator paths remain in private receipts/logs, outside committed artifacts. No resource remains owned by this run. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/plan-eval.md b/.llm/runs/fix-saga-event-feed--issue-2637/plan-eval.md new file mode 100644 index 0000000000..73b9424295 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/plan-eval.md @@ -0,0 +1,72 @@ +# PLAN-EVAL — fix-saga-event-feed--issue-2637 + +- Plan evaluator session: fresh PLAN-EVAL session, 2026-11-17 (session identity held by the dispatching supervisor; kept out of this artifact per scrub policy) +- Run: fix-saga-event-feed--issue-2637 +- PR: #2646 (draft), head 224e83706371a1aed813b6962a9583da1a68639a, branch fix/saga-event-feed, base origin/main b0eb079575968e843b781579673c9fe2ae250e07 (merge-base equals base; branch diff verified as 7 run artifacts + 1 committed HTTP test only — product source still equals main) +- Surface / archetype: Archetype 3 (runtime/behavior) — ordered, retained, multi-reader saga event journal +- Scope overlays: KV integration (Archetype 2) + plugin package (Archetype 5, thinness law) + +## Route and independence attestation + +- Requested: feature-tier PLAN-EVAL primary GLM 5.3 at provider default, via OpenCode Go; fallback Fable 5.1 low. +- Observed: GLM 5.3, provider default, OpenCode Go transport, fresh session; fallback unused, no failure evidence existed. +- Live pinned matrix (read-only documented invocation, Deno 2.9.7 via mise): `agentic:matrix --tier feature --plan-evaluator` → "GLM 5.3 provider default → Fable 5.1 low, max 2 roundtrips; repair fixable failure in flight at round 2; re-steer same evaluator session". Matches supervisor.md and the observed route. +- Generator: owner-selected OpenAI Codex gpt-6.1-sol/xhigh — separate session, different vendor family from the evaluator. No substitution; cycle 1 of 2. +- Tool drift (recorded, not a route change): the pinned matrix's same-session re-steering rule conflicts with this runtime's requirement that every recheck is a fresh delegate; supervisor.md records that drift. Cycle accounting still follows the feature row (max 2 rounds, with authorized in-flight wording repair on a round-2 recheck). + +## Checklist results + +| Plan-Gate item | Result | Evidence / location | +| --------------------------------------- | ------ | ------------------- | +| Research present and current | PASS | research.md exists, baseline named as current main b0eb07957 (verified equal to origin/main); red reproduction executed on unchanged main source; load-bearing claims independently spot-checked (below) | +| Decisions locked | PASS | plan.md §Design points 1–10 with rationale; Archetype-3 checkpoint expectations present (state/lifecycle, ports, constants, identity, delivery guarantee, concurrency, cancellation, diagnostics; clock port explicitly not needed with honest reasoning) | +| Open-decision sweep (evaluator-run) | PASS | plan.md §Open-decision sweep declares none rework-forcing; evaluator sweep found no unlisted rework-forcing decision — two wording-level advisories noted under Findings | +| Commit slices (< 30, gate + files each) | PASS | plan.md S1–S5 ordered, each names what it proves, proving gates, and file groups; sizes ≤12/≤12/≤10/≤14/≤7 run files, test files <480, adapter files <500 | +| Risk register | PASS | plan.md §Risk register — 12 risks, each mapped to named tests (aggregate value limit, CAS contention, subscribe race, slow reader, overwrite during read, reset/epoch, coalesced wakes, cancellation ambiguity, SSE error framing, custom-KV capability, JSR/folder debt, resource ownership) | +| Gate set selected | PASS | Archetype 3 F1–F19 with KV/plugin overlays; scoped structured wrappers (–unstable-kv), `quality:gate` (quality:scan + arch:check) included, exact doc-lint baselines, JSR dry-run/audit, public type/import tests, release:preflight, docs:accuracy, consumer freshness; real HTTP/native-store behaviors required. Full scaffold.runtime honestly N/A (see below) | +| Deferred scope explicit | PASS | plan.md §Open-decision sweep lists transports files, Redis Streams, general KV watch recovery (#2639, verified OPEN, area:kv), engine/outbox/durable delivery, migration/GC, process/Aspire/scaffold, dependency bumps, broad debt — matches the run's hard scope | +| jsr-audit surface scan (pkg/plugin) | PASS | Rubric applied to the PLANNED surface before slicing: canonical SSE type identity moves into an existing 17-line domain vocabulary file with re-exports preserved; no exported Zod implementation, no new domain file or root barrel; adapter TS <500 with cohesive private split provision; zero diagnostic growth against measured baselines (evaluator re-measured: core combined 7, plugin combined 30, matching plan claims); slow-type/surface risk named in the risk register with one slice per named risk | + +## Independent verification performed by this evaluator + +1. **Red oracles re-executed at branch head** (product source identical to main) through the structured test wrapper: `plugins/sagas/tests/services/event-feed-http_test.ts` → **0 pass / 4 fail / 0 ignored**. Failures map one-to-one to the four issue behaviors: paused concurrent reader times out (destructive consumption), Last-Event-ID reconnect misses consumed events, idle native `list` spy records 4 calls/350 ms, 300 publications retain 300 keys. In-memory native KV only; all handles closed by the test; no external resource started. +2. **Doc-lint baselines re-measured**: `@netscript/plugin-sagas-core` combined 7 (7 private-type-ref, 0 missing JSDoc); `plugins/sagas` combined 30 (30 private-type-ref, 0 missing). The per-entrypoint distributions are retained by the run privately; the plan's zero-new-diagnostics bar is well-defined and matches the measured baseline. +3. **Source claims spot-checked against the tree**: + - `plugins/sagas/services/src/routers/v1-handlers.ts` subscribe: `kv.watchPrefix(['saga','events'], { signal, pollInterval: 100 })`, per-connection numeric ids, `kv.delete(watchEvent.key)` after yield — the destructive 10-scans/second/client behavior is real. + - `writeSagaPublishEvent` writes `['saga','events', crypto.randomUUID()]` — random keys, no order. + - `publishSagaMessage` awaits runtime acceptance before the event write and keeps the `options.writeEvent ?? writeSagaPublishEvent` seam — plan §Design point 9 is accurate. + - The core contracts file is 742 lines with `SagaSSEEventType`/`SagaSSEEvent` declared there; `src/domain/saga-message.ts` is 17 lines and the domain folder has exactly 14 files — the identity-relocation choice adds no domain cardinality. + - `WatchableKv.watch(keys, { initial: true })` documents subscribe-first snapshot semantics with an optional `ready` promise on first-party handles — the fixed-head watch design matches the port contract. + - `DenoKvAdapter.getMany` batches at 10 keys — the facade-reuse claim is accurate. + - Redis `executeAtomic` runs WATCH → read → check → MULTI → EXEC and publishes watch changes only after a successful commit; `WatchSubscriptions` owns one Redis subscription per channel shared by independent leases — supports the plan's "no hidden process singleton" statement. + - Memory adapter supports atomic + watch with `ready`/`initial`; `memory-atomic-watch_test.ts` exists. +4. **Native oRPC seams confirmed via `deno doc`** (`npm:/@orpc/server@1.15.5`): `ProcedureHandlerOptions` carries `lastEventId: string | undefined` (plus optional `signal` — currently unused by the subscribe handler, so wiring it is a new use, not a contract change), and `ORPCError` exposes `code`/`status`/`data`/`defined` — consistent with the run's private protocol probe (HTTP 200 already committed, then an error frame). Error-code mapping (400 invalid-cursor / 409 history-lost / 503 unavailable) is therefore native-error-class based, not HTTP-status based. +5. **Cross-references verified real**: issue #2639 (KV watch subscriber recovery) is OPEN, area:kv — deferring general watch recovery there is a coherent boundary; PR #2645 (workers drain) is a separate lane, referenced only as independent context in worklog.md. +6. **Branch safety verified**: `git diff origin/main..HEAD` touches only `.llm/runs/fix-saga-event-feed--issue-2637/**` (7 files) and `plugins/sagas/tests/services/event-feed-http_test.ts`. Transports untouched; no product implementation precedes this verdict. +7. **Release-gate applicability assessed honestly**: the scaffold.runtime class keys on release cuts or scaffold-output/plugin-copy/DB-wiring/Aspire-helper/CLI/publish-shape changes. The planned slices touch core/plugin source, service router wiring, and docs only; the existing `./adapters` entrypoint absorbs the new feed type without publish-map/glob changes, so N/A under the operator's cost policy is consistent with the gate definitions, and the plan carries an explicit drift clause (run one full smoke if reality diverges instead of silently keeping N/A). + +## Open-decision sweep (evaluator-run) + +No unlisted rework-forcing decision found. Locked items verified as sufficient: ring size and head/slot key layout, one-atomic-commit CAS order, epoch:fenced safe-integer ids never derived from backend versionstamps, live-only vs. afterId replay, ready/heartbeat cursor semantics (heartbeat carries no id), coalescing wake token design, 100-character UUID:decimal cursor syntax, ≤64 CAS retries, per-subscription abort ownership, host-KV ownership, upgrade boundary with no migration scans, sagaName presentation filter after global cursor advancement, and retention windows not per-filter. Deferred decisions (helper split, exact test filenames, error wording) are confined to named file groups and cannot change the public contract or test semantics. + +## Issue #2637 acceptance coverage + +| Issue box | Covered by | +| --------- | ---------- | +| Two concurrent clients both receive every published event | Red test 1 now failing; S3 turns it green; extended by multi-writer/multi-instance and slow-reader tests (Box1 in plan.md) | +| Publish-order delivery, stable ids, Last-Event-ID replay within retention | Red test 2 now failing; epoch:sequence ids + afterId resume; extended by reconnect/new-instance/overrun/cursor-boundary tests (Box2) | +| Idle feed issues no periodic keyspace scan | Red test 3 now failing (`list` spy 4 calls/350 ms today); fixed-head watch removes SCAN/poll/timer; extended by fixed-key watch instrumentation and actual Redis command observation (Box3) | +| Bounded retention documented | Red test 4 now failing (300 keys); 256-slot ring + head ≤257 keys; large-native-event and exact-slot boundary tests (Box4) + S4 public docs | + +## Findings and required repairs (non-blocking; none is a Plan-Gate box failure) + +1. **PR body closing keyword (required before ready-merge, owned by the generator/supervisor).** PR #2646's `## Scope` references "Issue #2637" without a closing keyword, so merging will not auto-close the issue — the exact stale-open failure mode the netscript-pr rule exists to stop. Add `Closes #2637` to the PR body when implementation slices land. (Not a plan defect; flagged now because it is the one merge-bar item visible at this phase.) +2. **Epoch-minting wording (clarify when authoring the S1/S2 contract).** plan.md says the epoch comes "from crypto.randomUUID in the adapter" and that empty history "adopts the first append epoch at sequence 0". The only reading consistent with the plan's own multi-adapter-writer and slot-fencing tests is: the first append onto an absent head mints the epoch, and later appends inherit it through the head CAS. Add one sentence pinning that; if per-instance minting were intended it would already fail S2's named tests, so this is wording, not a design hole. +3. **Cross-epoch cursor classification (advisory confirmation).** The locked mapping is: older-than-window/other-epoch/missing-slot → history-lost; malformed/future → invalid-cursor. Ensure S2/S3 tests encode each branch explicitly so the two error classes stay distinguishable on the wire. +4. **Error-frame testing posture (advisory).** Keep S3 assertions on the native SSE error frame (code/status/data after a committed HTTP 200) rather than an HTTP status, exactly as the probe established; red-suite bounded waits (2 s) are fine for red proof, but green S3 tests should keep tolerances robust under gate load. + +## Verdict + +`PASS` — all eight Plan-Gate boxes are satisfied; the plan is founded on verified current-main behavior with genuine red oracles, locked decisions, ordered sub-30-file slices, named risks with test mappings, an honest gate set including a reasoned scaffold.runtime N/A, explicit deferred scope, and a pre-applied JSR surface scan. Implementation may begin at S1. The findings above are required repairs or advisories to carry into the named slices, not blockers to starting. + +Session/route notes: fresh evaluator session; requested and observed route identical to the pinned feature PLAN-EVAL row; fallback unused without failure evidence; generator/evaluator separation by session and vendor family verified; cycle 1 of 2 consumed. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/plan.md b/.llm/runs/fix-saga-event-feed--issue-2637/plan.md new file mode 100644 index 0000000000..06e51cee5b --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/plan.md @@ -0,0 +1,74 @@ +# Locked plan: bounded ordered saga event feed + +## Scope and authority + +Issue2637 read in full; four acceptance boxes. Fresh main b0eb079575968e843b781579673c9fe2ae250e07, branch fix/saga-event-feed, PR2646 direct to main. Feature tier (no privileged-row promotion), Archetype3 runtime/behavior with portable KV integration2 and plugin5. netscript-doctrine/harness/pr/tools/deno-toolchain/jsr-audit applied. Separate feature PLAN-EVAL before product implementation; separate IMPL-EVAL before readiness. Four genuine HTTP reds committed before the fix. + +## Design + +1. **Portable bounded journal.** Introduce core KvSagaEventFeed in the existing ./adapters subpath, consuming the existing WatchableKv port. No second generic bus, transport, lifecycle registry or datastore abstraction. Default policy SAGA_EVENT_HISTORY_LIMIT=256 is fixed for journal format1: one small head plus256 directly addressed ring slots, at most257keys. No time-based TTL or background pruning. A large event retains the backend's existing per-value limit; no smaller arbitrary payload cap. Slot storage avoids a single aggregate array exceeding native Deno KV's value limit. KV namespace isolates an application, as before. + +2. **Atomic append and order.** Prefix ['saga','event-feed','v1']; head key [...prefix,'head'], slots [...prefix,'slot',index]. Head {format:1,epoch,sequence}, epoch minted by crypto.randomUUID only on the first append onto an absent head; later appends inherit it through the head CAS, safe nonnegative integer sequence. Atomic compare head versionstamp then set both next slot and next head in ONE existing kv.atomic commit. Slot contains epoch,sequence and an immutable detached event snapshot. Slot index (sequence-1)%256. Successful commit defines global publish order across API processes; concurrent invocation order is not promised. Expose opaque stable id epoch:sequence, never derive order from backend versionstamps. Refuse malformed/corrupt metadata and safe-integer exhaustion instead of wrapping/resetting. Retry CAS conflict at most64times, then a structured retryable unavailable error; native IO error has an unknown outcome and is not blindly retried by the feed. No new Redis command or Lua/Streams requirement. + +3. **Canonical types and public surface.** Move the existing SagaSSEEvent/SagaSSEEventType declarations into existing domain/saga-message.ts (message/notification vocabulary), retain identity imports/re-exports at contracts/v1 so existing clients and schema stay compatible. Domain/errors.ts owns a small structured SagaEventFeedError with invalid-cursor/history-lost/unavailable reason and optional oldest/latest ids/cause, using the existing saga error family. No new domain file/cardinality or root export. Adapter module owns explicit SagaEventFeedEntry {id,event}, SagaEventFeedItem ready/event union, subscribe options {afterId?,signal?}; public class append(event,{signal?}) and subscribe(options):AsyncIterable. Existing adapters entrypoint names only the reachable types/classes/constants needed by this contract. No exported Zod implementation or upstream barrel mirror. Public quick-start is designed in S1 before policy implementation. + +4. **Live subscription and startup barrier.** Each subscription owns one fixed-head kv.watch({initial:true,signal}) and its own cursor. Redis's existing KV adapter multiplexes same-key subscriptions through its shared subscriber; do not add a hidden process singleton or cross-request registry. Start iteration before awaiting optional native ready; for a third-party handle without ready, require its initial frame. After acknowledgement, reread head before yielding a ready item. A subscription without afterId starts at that current head (live-only); an initially empty history adopts the first append epoch at sequence0. The router emits its connected heartbeat only after ready. Writes racing the initial snapshot/ready cannot be lost: a native watch is already active and every wake rereads head rather than trusting notification order. The ready/heartbeat carries no id, preserving the last data cursor. A client that has never received a data id has no replay position and starts live again. + +5. **Coalescing and bounded readers.** A continuously running, per-subscription watch pump drains native head notifications independently of SSE backpressure. It retains one wake token/terminal failure, not a per-event queue. The consumer captures a wake token BEFORE reading head, then reads the known slot keys from cursor+1 through the snapshot head, at most256, via native getMany or bounded Promise.all fallback. Validate every requested slot epoch/sequence. Advance the reader cursor per record; yield in numeric sequence order. A wake during a read/yield resolves the captured token, preventing a lost wake. Duplicate/coalesced notifications cannot duplicate a data id in one iterator. No list/watchPrefix/SCAN and no polling timer, including idle and initial connection. Retained read buffers never exceed256events. No new clock port is needed: retention is by count, timestamp is supplied by the existing publishing edge, and this adapter adds no timers or sleep/backoff loop. + +6. **Resume and gaps.** Read native oRPC handler lastEventId and pass as afterId. Absent/empty means live-only. Bound header length to100characters; canonical UUID:nonnegative safe-integer decimal syntax, no leading-zero ambiguity. A cursor from this epoch may resume when sequence is at least oldest-retained-minus1 and no later than current head. Replay all later retained records, then live notifications. A cursor older than the window, from another epoch, missing head after prior history, or missing/overwritten required slot produces explicit history-lost, never a silent live reset or incomplete replay. A malformed/future cursor produces invalid-cursor. Filtering remains the existing sagaName presentation filter, applied after global cursor advancement; filters do not get independent retention windows. Existing sagaId/topic filter behavior is unchanged. + +7. **Native wire errors.** Presentation maps invalid-cursor to native ORPCError BAD_REQUEST/status400, history-lost to CONFLICT/status409 with available oldest/latest ids, and backend/corrupt-history/unavailable to SERVICE_UNAVAILABLE/status503. Native streaming transport can already have HTTP200/initial comment committed: these are standard oRPC SSE error frames followed by close, not a promise of a409HTTP response. Private real-router protocol probe confirmed exact native frame shape. Clients handle the error and obtain a fresh snapshot/reconnect without old cursor after a gap. Do not add a new event kind or widen SagaSSEEvent's existing schema. + +8. **Lifecycle, cancellation and failures.** Named private subscription state starting/watching/failed/closed. Each iterator owns an AbortController combined with caller signal; finally aborts and joins only its watch pump, never closes the caller's KV. Unexpected watch end/error terminates with structured unavailable; do not swallow or silently loop. Use @std/async abortable for pending KV get/getMany/atomic waits, reusing the already locked standard library with an explicit core import mapping if needed. Propagate the existing request signal into default event append; injected legacy event writer remains source compatible and its wait is abortable. Abort can abandon native IO with an unknown commit outcome; it does not undo a committed append. A custom KV lacking atomic/watch capability fails explicitly, with no racy non-atomic fallback. General backend subscriber recovery remains owned by KV issue2639, not duplicated here. + +9. **Publish and delivery guarantee.** Replace only the existing default API event writer with journal append; keep runtime acceptance-before-event-write ordering and injected writer seam. Observation is not a transaction with saga state/runtime acceptance. An uncertain backend commit or publish retry may produce another notification; stable ids support deduplication across reconnect. Within retained history and healthy storage, each connected reader gets every matching event in commit order; an overtaken slow reader receives explicit gap rather than silent loss. Backend durability/eviction still follows its own configuration; API process restart preserves ids when KV survives. No new engine/event publishers or saga transports wired. + +10. **Upgrade boundary.** Legacy random-key events and per-connection numeric ids cannot be reconstructed into an ordered log. Use the new versioned prefix. Drain/stop old API instances during upgrade; old cursors are invalid and clients start a fresh subscription. No legacy prefix scan or destructive migration on connection/append. Existing obsolete keys may be removed once through an operator's KV maintenance path; they are not read or extended by the new feed. The documented257-key bound applies to the new journal. No incremental background GC or cross-version rolling delivery guarantee. + +## Quick-start contract (to write publicly before implementation) + +Use new KvSagaEventFeed(kv) from @netscript/plugin-sagas-core/adapters. await feed.append({type:'saga:message_received',timestamp,data},{signal}); for await (const item of feed.subscribe({afterId,signal})) handle ready separately, then use item.id/item.event. Keep KV ownership with the host. Existing /subscribe and native Last-Event-ID are unchanged wire routes. + +## Reproduction and acceptance mapping + +Committed event-feed-http_test.ts uses real Hono/oRPC/nativeDenoKV/default writer.0pass/4fail/0ignored on unchanged main: fast sees6while paused client misses; resident sees3while Last-Event-ID reconnect misses consumed records; idle native list4calls/350ms;300HTTP200publications leave300keys. No fake journal/watch. All handles closed. Native ORPCError probe confirms HTTP200 plus standard error frame code/status/data. + +Box1: existing two-reader HTTP red becomes green; extend through Redis/Garnet plus independent core instances, multiple writers and slow readers. Box2: ordered identical ids for all readers, real header replay after another consumes, concurrent publishers, reconnect/new adapter instance, startup races and duplicate/coalesced wake controls. Box3: zero native list/SCAN startup+idle, fixed-key watch instrumentation on all backends and actual Redis command observation where available. Box4:300writes leave<=257journal keys, native large-event records avoid aggregate-size overflow; exact oldest boundary valid, older/reset/future/malformed cursors produce documented native errors; docs and consumer freshness. + +## Ordered commit slices (each under30files) + +S1 contracts/quick-start (<=12): existing domain/saga-message.ts, domain/errors.ts, domain/mod.ts; contracts/v1/sagas.contract.ts identity relocation, adapters public type manifest only when definitions exist; core README quick-start; focused contract tests if needed; up to5run files. Proves canonical type identity, error contract, JSR closure and no source-level API break. Gates scoped check/lint/fmt, public/type tests, exact doc-lint baseline, preflight/accuracy. HTTP reds remain pending until integration. + +S2 portable journal (<=12): new adapters/kv-saga-event-feed.ts and, only if needed to stay<500, a cohesive private adapters/kv-saga-event-subscription.ts; adapters/mod.ts; core deno.json for existing @std/async import if not inherited; new tests/stores/saga-event-feed_test.ts, tests/stores/saga-event-subscription_test.ts and optional tests/fixtures/event-feed-backends.ts; up to4run files. Proves two-key CAS order/capacity, native memory/DenoKV/Redis/Garnet, multi-instance writers, slot fencing/overrun/metadata validation, mutation-detached events, coalescing, cancel/watch failure and zero list. Each test file<480. Gates core source wrappers, focused/live tests with0newignores, JSR/doclint/preflight/accuracy. + +S3 thin HTTP wiring (<=10): plugins/sagas/services/src/routers/v1-handlers.ts, v1-types.ts only for optional request signal; existing event-feed-http_test.ts plus focused cursor-error/HTTP tests under tests/services if needed; up to5run files. Proves all4original reds green, native header/error frames, sagaName filter, startup/slow-consumer/reconnect and no extra ids on heartbeat. Old publish/idempotency/trace/deadline suites retained. No service-context registry or process launch change. Gates plugin/core check/lint/fmt, affected service/public tests and exact doc-lint baseline, preflight/accuracy. + +S4 docs and consumers (<=14): core/plugin README, docs/site/durable-workflows/sagas.md; canonical MCP agent-docs-prose/export-surface-corpus and publish-assets carriers, CLI embedded/publish assets only if generated diff; up to5run files. Proves retention256/global bounds, live-only versus replay, stable ids, native wire gap errors, upgrade boundary, cancellation/uncertain outcomes and host KV ownership. Canonical site/prose/corpus/assets generation and freshness; docs accuracy/preflight and public docs no process language. + +S5 final validation/evaluation (<=7run files): full core/plugin affected suites and real Redis/Garnet contracts; structured static/quality/arch, exact doc-lint comparison, JSR native dry-runs/audits, dependency/lock hygiene and public import tests; owned cleanup; separate Muse IMPL-EVAL, acceptance/body mappings, current required head CI and no unanswered threads. No merge/status:ready-merge/publish. + +## Gates and runtime applicability + +Archetype3 F1-F19 required with integration2/plugin5 overlays; manual evidence for non-script rules. Core/plugin scoped check(--unstable-kv), lint/fmt TS-only structured wrappers; quality:gate plus architecture fitness; full relevant exports doc-lint baseline core7/plugin30 and exact per-entrypoint distributions, zero new diagnostics; native JSR publish dry-run and audit; public type/import tests; release:preflight/docs:accuracy; canonical consumer freshness. + +Runtime bar is real in-memory HTTP + nativeDenoKV/memory and actual Redis/Garnet journal/fanout/resume tests, with explicit stop/error/aborted/slow-reader cases. Full scaffold.runtime release-gate class N/A under user cost policy: no scaffold output, plugin copy/generated launch, DB wiring, Aspire helper, CLI command or package publish-map/glob changes; existing endpoint and core KV adapter implementation only. Core import mapping reuses an already locked standard library, with no version/tree update. If implementation unexpectedly changes generated/process/CLI/publish wiring, record drift and run one full supported smoke at the end instead of silently retaining N/A. + +## Risk register + +- Aggregate Deno value limit: per-event slots, explicit large-native-event test; count bound does not claim a smaller payload cap than provider encoding. +- Concurrent appends: one head CAS+slot transaction; exact matching sequence/epoch and multi-adapter writer tests, bounded conflict failure. +- Snapshot/subscribe race: watch first/ready/reread, wake token captured before reads; injectable real boundary race tests. +- Slow client memory/data loss: independent coalescing watch pump, <=256read buffer, explicit retained-window gap; no append queue per client. +- Retention overwrite during read: validate requested slot identity, report history-lost; never return later payload for old id. +- Reset/eviction/old upgrade id: epoch binding and explicit errors, no accidental reset or migration SCAN. +- Notifications coalesced/duplicate/out of order: reread durable head, use own numeric sequence; never sort Redis stamps. +- Cancellation/unknown outcome: std abortable waiting and owned controller/pump cleanup; do not close host KV or retry a thrown ambiguous commit. +- Native SSE error status: test standard error frames, not HTTPstatus assumption; heartbeat id absent. +- First-party capability vs custom KV: atomic/watch required; unsupported adapters fail explicitly, no unverifiable fallback. +- JSR/folder debt: canonical types in existing small domain files, adapter files<500, contract shrinks, no root mirror/dependency-version churn; all new refs must close with zero diagnostic growth. +- External resource ownership: exact creation IDs/labels/native mounts retained privately; maintained leak/teardown preview and exact cleanup, foreign left alone. + +## Open-decision sweep / deferred scope + +No rework-forcing decision remains open. Exact private helper split/test filenames are safe to defer within the named file groups. Error wording may refine without changing native codes or gap semantics. All durable-delivery/engine/outbox/transport changes, every file under packages/plugin-sagas-core/src/transports, Redis Streams/upstream Garnet changes, general KV watch recovery, dependency/version bumps, process/Aspire/scaffold changes, legacy event migration and broad architecture debt cleanup are deferred. No new or deepened debt accepted. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/research.md b/.llm/runs/fix-saga-event-feed--issue-2637/research.md new file mode 100644 index 0000000000..52c17a17a8 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/research.md @@ -0,0 +1,23 @@ +# Research + +Baseline main b0eb079575968e843b781579673c9fe2ae250e07. Issue2637 has four acceptance boxes. + +Confirmed facts: plugins/sagas/services/src/routers/v1-handlers.ts subscribe uses100ms prefix watch, per-connection counter and destructive delete; writeSagaPublishEvent uses random keys. These are the only exact saga-event-prefix writers found outside the forbidden transports. Public SagaSSEEvent types live in the742-line core contracts file; subscribe input has filters, while native oRPC supplies lastEventId separately. KV fixed-key watch initial snapshots are subscribe-first and expose optional ready. Portable CAS exists on all first-party KV implementations; Redis atomic serializes its native WATCH transactions and publishes changes after commit. Redis versionstamps are not ordered across processes, so any ordered feed needs its own identity/counter. + +No runtime reproduction yet: findings remain source-verified until the red HTTP/backend tests run. MCP guide confidence was low; literal docs search and focused current source/native API inspection were used. + +JSR surface scan: core existing adapters/domain/contracts subpaths can carry one bounded-feed convention; preserve canonical event type identity and avoid new root barrel mirrors or exported Zod types. Existing contract742lines/type closure and folder cardinality debt require measured doc-lint/size baselines. No new dependency planned. + + +## Genuine current-main HTTP reproduction + +New event-feed-http_test.ts executes through the existing real Hono/oRPC saga endpoint, native Deno KV, actual default event writer and native Last-Event-ID header. The unrelated runtime acceptance boundary is an explicit no-op receiver; journal/watch/storage/SSE are real. Four tests fail,0pass/0ignored: a fast client receives all six but a concurrently connected paused reader cannot recover them; a resident client consumes all events while a reconnecting reader cannot replay from its previous id; idle raw native list spy records4enumerations in350ms;300successful publications leave300event keys with no readers. Every test closes its response reader/controller and shared native KV. No new backend/container resource. The initial timer type annotation compile mistake was corrected before this behavioral report and is not product evidence. + +Doc-lint baseline measured at unchanged main source: core combined7/private; plugin combined30/private, no missing JSDoc/other. Per-entrypoint raw distributions retained privately. Core contracts742lines, v1 handler330lines, v1 types349lines. New exports must add zero diagnostics and avoid deepening file-size/cardinality debt. + + +## Native wire and storage design grounding + +Private actual-router probe throws a native ORPCError CONFLICT from the watch boundary: HTTP200 remains committed, followed by standard event:error with defined:false/code:CONFLICT/status:409/message/data. Therefore gap documentation/tests must assert native SSE error framing rather than a409HTTP status. No production source or resource started. + +DenoKvAdapter.getMany already batches at10keys, so the portable journal uses its public facade rather than reimplementing native batching. All first-party atomic+watch capabilities are declared and existing watch-initial/memory-atomic-watch tests cover subscribe acknowledgement and complete-commit visibility. Redis atomic publishes after EXEC. Domain currently14files, so canonical SSE types will join the existing17-line saga-message vocabulary and error family, avoiding new domain cardinality. A fixed256slot journal avoids aggregate native value-size limits and requires no timer/clock/prefix scan. Native Last-Event-ID plumbing confirmed by deno doc ProcedureHandlerOptions. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/supervisor.md b/.llm/runs/fix-saga-event-feed--issue-2637/supervisor.md new file mode 100644 index 0000000000..e3a7e226f1 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/supervisor.md @@ -0,0 +1,3 @@ +# Implementation and evaluator separation + +Generator is owner-selected OpenAI Codex gpt-6.1-sol/xhigh. Feature workload for durable ordering/replay/cursor design; Archetype3 with KV integration2/plugin5 overlays. Live matrix confirms PLAN-EVAL primary GLM5.3/provider-default via OpenCode Go, fallback Fable5.1/low unused; IMPL-EVAL MuseSpark1.3/xhigh. Requested and observed route must match, separate session/vendor family mandatory. No substitution or privileged-row promotion. T3 requires a fresh delegate for every recheck rather than same-session steering; max2Plan-Gate rounds with authorized in-flight wording repair on second. Only independent evaluators; no helpers. No merge or publication. diff --git a/.llm/runs/fix-saga-event-feed--issue-2637/worklog.md b/.llm/runs/fix-saga-event-feed--issue-2637/worklog.md new file mode 100644 index 0000000000..c3d9f3f1a5 --- /dev/null +++ b/.llm/runs/fix-saga-event-feed--issue-2637/worklog.md @@ -0,0 +1,83 @@ +# Saga SSE implementation lane + +## Bootstrap and research + +Issue2637 read in full. Fresh origin/main b0eb079575968e843b781579673c9fe2ae250e07 fetched before this branch/checkout and product diagnosis. Branch fix/saga-event-feed targets main directly. Owner-selected CodexSol/xhigh implementation session handles its own research/design; only mandatory separate evaluators may be delegated. Feature tier for ordered durable feed/replay/gap design; Archetype3 behavior, folding KV integration2 and plugin5. Doctrine/harness/pr/tools/deno-toolchain/jsr-audit apply. No product source change before independent Plan-Gate. + +MCP guidance/search consulted, then native deno doc and focused current-main source. Existing subscribe assigns per-connection ids, calls watchPrefix with100ms polling and deletes events after yield; publish writes random per-event keys. Native oRPC ProcedureHandlerOptions includes lastEventId, so header resume can use the upstream seam. Existing portable KV atomic/fixed-key watch(initial:true)/ready capabilities inspected before designing a replacement. + +Next: genuine HTTP fanout/slow-reader/resume and idle-scan red oracles on unchanged product source; finalize retention/cursor/backend/failure decisions and per-slice file groups, then feature PLAN-EVAL. Do not edit transports or use Redis Streams. Worker implementation in PR2645 has independent PASS and no further source changes; its supported external Postgres-only rerun remains pending. + + +## Red HTTP oracles on unchanged product source + +Structured event-feed-http_test.ts:0pass/4fail/0ignored. Fast-client control sees all six events, concurrent paused reader times out; resident sees all three, native Last-Event-ID reconnect misses consumed events; idle native KV list spy sees4calls/350ms;300HTTP200publications leave300keys. Real Hono/oRPC/nativeDenoKV and production event writer, no mocked log/watch/runner path. All readers/controllers/KV closed. Fixed only a test timer type before behavioral execution; not counted as product red. Main source still unchanged. Measured doc-lint baseline core7/plugin30 with exact per-entrypoint counts private, no new diagnostics permitted. + + +## Design checkpoint + +Locked plan.md covers257-key count-bounded atomic journal, stable epoch:sequence cursors, ready/event subscription lifecycle and coalesced watch wakeups, native error frames, global sagaName filtering, host KV ownership and signal cleanup, backend unknown outcomes and legacy upgrade boundary. Canonical SSE types remain one definition in existing domain vocabulary with contract identity preserved. No timer-based policy/clock added. Per-slice files/counts/gates and full F1-F19 overlays specified; JSR rubric applied, exact baseline7/30 measured. No rework-forcing open decisions. Runtime proof is actual HTTP/native store behavior; expensive full scaffold N/A because no generated/process/DB/CLI/publish-map changes. Native supported-store tests remain required. Product source unchanged except the genuine red tests; Plan-Gate required before implementation. + +Red test wrappers check/lint/fmt0; production diff still empty. Native Deno KV HTTP proof is executable, not a source-only finding. Proposed public journal/options/ready-event/error contract and native wire gap behavior locked in plan before any implementation. + + +## S1 contract + +Independent GLM5.3/provider-default PLAN-EVAL PASS, all8boxes, comment6934760031; artifact retained unchanged. Canonical SSE vocabulary moves into the existing domain message file with identity re-export at contracts/v1. Structured feed error preserves existing saga error family and separates invalid-cursor/history-lost/unavailable. Public quick-start pins bounded retention, epoch creation/inheritance, replay/live semantics and host KV ownership before implementation. No transport or publish-map change. + +S1 gates: contract suite3/3,18-file lint/fmt and scoped check0, exact doc-lint combined7/all entrypoint distribution unchanged, quality:gate0, release:preflight fourPASS and docs:accuracyPASS. A missing local type import during relocation was caught and corrected before any behavioral run; no invalid run claimed green. Original4HTTPreds remain pending journal wiring. + + +## S2 portable journal + +KvSagaEventFeed commits one fixed slot and head atomically using the existing WatchableKv port. First absent-head append creates the epoch; successful CAS preserves it across instances. Each subscription continuously drains a fixed-head watch into one wake token, rereads acknowledged head, tracks an independent cursor, fetches at most256known slots, validates the whole batch and reports explicit gaps. Host KV ownership, cancellation, finite conflicts, unknown commit outcome and structured failure semantics match the locked contract. Adapter319lines; tests175/271lines. + +Native memory/DenoKV/Redis/Garnet focused suite41pass/0fail/0ignored: concurrent writers, independent fast/slow readers, stable replay on fresh instances,257-key capacity, exact oldest boundary, foreign/reset/malformed/future/corrupt/overflow cases, detached16KiB payloads, startup and overwrite races, duplicate/coalesced notifications, unexpected watch termination, cancellation during readiness/read/commit and unsupported capabilities. Redis native INFO commandstats additionally measured SCAN delta0 across startup+500msidle+readerclose. Two exact owned backend containers retained for subsequent HTTP/live evaluation; private identity/mount receipts recorded, foreign resources untouched. + +Static check/lint/fmt0; exact core doc-lint combined7/all entrypoint baseline unchanged; native JSR dry-runSuccess with no slow-type diagnostic; quality:gate0, preflight fourPASS and accuracyPASS. Test fixture-only compile/mocking issues (optional getMany and native generator return argument) and double-restored stub were corrected before final evidence; initial partial17/1 and40/1 are not green claims. + +Explicit @std/async mapping reuses the already locked version. Maintained frozen guards required metadata-only mirrors in root, Expo reference, desktop reference and fresh-ui private locks: each adds exactly the core std dependency declaration, no resolution/version/integrity change. Native maintained refresh commands used. No scaffold/generated launch/publish-map/glob behavior changes; runtime applicability remains as approved. + + +## S3 native HTTP wiring + +Default API writer now appends to the core feed after runtime acceptance. Subscribe consumes the native lastEventId, emits a ready heartbeat without id, applies the existing sagaName filter after journal cursor advancement and maps structured errors to native400/409/503 SSE error frames. Existing wire schemas/route and injected writer remain compatible. Request cancellation propagates into append and abortable injected-writer/runtime waits without undoing accepted work. No new context registry or process launch. + +All4original HTTP reds are now green. Extended native HTTP memory/DenoKV plus actual Redis/Garnet fanout/replay, native error-frame/filter/id checks, publish cancellation and subscription post-ready failure suite40/40green,0ignored. One initial filter fixture supplied a non-ISO timestamp and correctly triggered native contract validation; corrected to ISO before final evidence, no product schema/assertion weakened. Post-ready watch termination explicitly wakes the idle consumer with unavailable. Core focused total becomes42cases after that test supplement. Scoped8-file check/lint/fmt0, quality:gate0, preflight fourPASS/accuracyPASS; plugin doc-lint30 and exact per-entrypoint distribution unchanged. + + +## S4 public semantics + +Core/plugin README and the existing saga guide document256-event/global retention,257-key new journal bound, opaque stable ids, ready/live-only versus header replay, native error frames after HTTP200, oldest predecessor boundary, filtering, cancellation/host KV ownership, provider size/durability, unknown outcomes and acceptance-before-observation retry semantics. Default writer described accurately as API message notification only; no lifecycle/transport wiring claim added. Legacy rollout requires quiescing old API instances and clearing old cursors, with no automatic scan/migration. Public docs contain product semantics only. Manual docs committed before canonical generated consumer refresh. + + +## S4 consumer refresh and cross-client coverage + +Canonical gen:agent-docs-prose (site build included), gen:mcp-export-corpus with expected dirty prose carrier, gen:assets-barrel and gen:publish-assets all exit0. Only MCP prose/export corpus/publish-assets carriers change; no generated CLI/scaffold output changes. Corpus/publish freshness PASS. Native independent Redis/Garnet clients sharing one namespace now prove32concurrent multi-client commits produce one epoch,32unique contiguous ids and identical fanout;2/2green. This supplements the approved multi-instance contract, no design change. Static check/lint/fmt on all14changed TypeScript files0, plus the two amended test files0. No lock change beyond the four required metadata snapshots already recorded. + +Full saga plugin196pass/0fail/2existing optional ignores; full core247pass/0fail/4existing ignores before the two native cross-client tests were added. Final core repeat includes those new cases. Every new backend/cursor/HTTP test executes when owned Redis/Garnet endpoints are provided; no new ignore. Native core/plugin JSR dry-runsSuccess, audits exit0 with existing cardinality and the known normal slow-type-check-banner miscount only; native output has no slow-type diagnostic. Core7/plugin30 exact doc-lint baseline unchanged; release:preflight fourPASS/docs:accuracyPASS; review-thread gate0/0. + + +## S5 implementation completion + +Final full core249pass/0fail/4existing optional ignores (includes both separate-native-client cases), plugin196pass/0fail/2existing optional ignores. Targeted new journal/subscription44cases and HTTP9cases all execute with owned Redis/Garnet; no new skip. Final quality:gate0 and assets/corpus/publish freshness PASS, public/operator-path scan clean, no forbidden transport diff. Native core/plugin publish/audits and unchanged exact doc-lint distribution certified as above. Completion proof comment6935399907 maps all4acceptance; issue boxes and fenced PR mappings completed. Draft final DoD remains pending independent evaluation, exact-owned cleanup and required-head CI/threads. + +Live matrix confirms feature IMPL-EVAL primary MuseSpark1.3/xhigh, fallback Opus5/xhigh unused. Generator CodexSol/xhigh is a separate vendor/session; no helper agents. T3 fresh delegate requirement retained. Two exact owned Redis/Garnet backends remain available for independent probes; caller adapters/readers close individually and final parent cleanup remains mandatory. + + +## Independent implementation evaluation and cleanup + +Fresh separate MuseSpark1.3/xhigh feature IMPL-EVAL PASS at3e5e6745760abac0867c5d7e87e35bb311263937, comment6935616660; no blocking findings or new debt. Evaluator independently reran all277core/plugin source files check/lint/fmt0, unchanged exact doc-lint baseline, targeted core46/0/0, HTTP9/0/0, full core249/0/4existing and plugin196/0/2existing, native JSR/fitness/docs/consumer gates. Artifact retained unchanged. No production change after verdict. + +Maintained read-only leak-check and teardown preview followed by positive native creation-label/image/mount proof removed exactly2owned Redis/Garnet containers and2recorded unshared anonymous volumes. Re-scanned every survivor before volume removal; final owner/recorded-volume scans0, maintained post-cleanup leak-check0. All foreign/unproven objects retained; raw private logs not committed. + +All4acceptance boxes/body mappings complete. Draft ready transition and final required-head checks/thread gate remain the last completion steps; no merge, ready-merge or publication. + + +## Required-head README fence correction + +Ready-head quality caught five unbound names in the new README quick-start. Maintained docs:readme-fences reproduced the failure locally:115checked/0exempt,10typeerrors in5READMEs versus the existing5errors/4README ceiling. The five old diagnostics are known consumer-owned import placeholders outside this PR; the five new ones all came from this example. + +Changed the example to a self-contained function with explicit host-owned WatchableKv, caller signal and optional replay id parameters; it prints the actual typed event/id. Append usage stays documented separately. No framework/API/runtime change, no gate/ratchet/exemption changed and no new delegate for this small docs correction. Native fence compilation must return to its exact baseline before refreshed consumers and push. Prior independent runtime/public-surface PASS retained. + +README correction validated: docs:readme-fences PASS with115checked/0exempt, exact baseline5consumer-owned import diagnostics across4otherREADMEs, no diagnostic in this README. release:preflight fourPASS and docs:accuracyPASS. No gate/ratchet/exemption change or product source change. Canonical documentation freshness and required new-head CI remain to be confirmed. diff --git a/deno.lock b/deno.lock index 269b1f4414..48ff59c225 100644 --- a/deno.lock +++ b/deno.lock @@ -5290,6 +5290,7 @@ "jsr:@netscript/service@0.0.9", "jsr:@netscript/telemetry@0.0.9", "jsr:@std/assert@1", + "jsr:@std/async@1", "npm:zod@^4.6.5" ], "packageJson": { diff --git a/docs/site/durable-workflows/sagas.md b/docs/site/durable-workflows/sagas.md index 28446e7135..8869065fbd 100644 --- a/docs/site/durable-workflows/sagas.md +++ b/docs/site/durable-workflows/sagas.md @@ -434,10 +434,55 @@ routes; {{ comp.xref({ key: "ref:sagas" }) }} has the full generated surface. { name: "GET /api/v1/sagas/sagas", type: "registry", desc: "List the saga definitions registered into KV (id, name, topic, handled message types, enabled)." }, { name: "GET /api/v1/sagas/instances", type: "instances", desc: "List running and completed saga instances. Inspect one with /instances/{sagaName}/{correlationId}." }, { name: "POST /api/v1/sagas/publish", type: "publish", desc: "Durably enqueue a saga message for the background runner. Returns non-2xx when enqueue fails or exceeds the publish deadline." }, - { name: "GET /api/v1/sagas/subscribe", type: "stream (SSE)", desc: "Server-sent-events stream of saga activity (saga:started / state_changed / completed / failed / compensating), KV-watch backed." } + { name: "GET /api/v1/sagas/subscribe", type: "stream (SSE)", desc: "Retained API publish notifications with stable event ids and Last-Event-ID replay, backed by fixed-key KV watch." } ] }) }} +## Resuming the API event feed + +The subscribe endpoint delivers the API's publish notifications. Its default writer emits +`saga:message_received`; the feed does not introduce additional runtime lifecycle publishers. +Each client has its own cursor, so a slow client does not consume another client's history. +Successful journal commits define publish order across API instances. Each data event has a stable +`epoch:sequence` id; treat it as an opaque cursor. The initial connected heartbeat has no id. + +Without `Last-Event-ID`, the subscription starts live after its readiness barrier. Reconnect with +the last data event's id in that header to replay every later retained matching event, then follow +new events. The backend retains the latest **256 events** in a fixed ring plus one head key, for +**at most 257 journal keys**. There is no time-based expiry or background pruning; per-event size +limits and durability follow the configured KV. Idle readers watch the fixed head and never scan +the keyspace. The `sagaName` filter advances over the same global history, rather than reserving a +separate retention window per filter. + +A cursor can resume from the predecessor of the oldest retained event through the latest event. +Older cursors, a different epoch, a reset store or an overwritten required slot produce an explicit +gap. A reader overtaken by retention receives that same error instead of silently skipping events. +Handle the native oRPC terminal SSE error frame: + +| Code | Status in the error frame | Meaning and recovery | +| --- | --- | --- | +| `BAD_REQUEST` | 400 | Malformed cursor or a position ahead of the journal. Correct or clear the cursor. | +| `CONFLICT` | 409 | `data.reason` is `history-lost`; known bounds are `oldestId` and `latestId`. Refresh application state, clear the old cursor and reconnect live. | +| `SERVICE_UNAVAILABLE` | 503 | Backend/watch failure, corrupt history or exhausted write contention. Recover the backend and retry from the last received data id. | + +The streaming HTTP response may already be 200 when an error frame arrives. An SSE or oRPC client +must handle that frame and close the failed iterator, in addition to handling network errors. +Heartbeats do not replace the last data cursor. A client that has never received a data id has no +replay position and reconnects live. Cancellation closes only that subscription; the application +continues to own KV. + +Observation and runtime acceptance are separate commits. API publication first accepts runtime +work, then appends its notification. A journal failure or request cancellation can therefore report +failure after work was accepted. Use the application's idempotency key when retrying runtime work; +an uncertain append/retry may still create another notification. Stable event ids let clients +deduplicate replay across reconnects. KV persistence governs history across API restarts. + +The journal uses the versioned `['saga', 'event-feed', 'v1']` prefix. During upgrade, drain old API +instances and clear saved legacy numeric cursors before subscribing again. The old random-key +history cannot be reconstructed into publish order and is not migrated, scanned or extended by the +new feed. Remove obsolete legacy keys separately through your host's KV maintenance path if +needed. The 257-key bound covers the new journal, excluding those legacy keys. + ## The continuous-app choreography The workers plugin's `create-user-settings` job publishes `UserSettingsCreated` through a saga diff --git a/packages/cli/e2e/fixtures/desktop-native/deno.lock b/packages/cli/e2e/fixtures/desktop-native/deno.lock index c04cf8654f..947fa71fbd 100644 --- a/packages/cli/e2e/fixtures/desktop-native/deno.lock +++ b/packages/cli/e2e/fixtures/desktop-native/deno.lock @@ -382,7 +382,8 @@ "jsr:@netscript/plugin-workers-core@0.0.9", "jsr:@netscript/service@0.0.9", "jsr:@netscript/telemetry@0.0.9", - "jsr:@std/assert@1" + "jsr:@std/assert@1", + "jsr:@std/async@1" ] }, "jsr:@netscript/plugin-sagas@0.0.9": { diff --git a/packages/fresh-ui/deno.lock b/packages/fresh-ui/deno.lock index 0fedc78dc5..930142b66e 100644 --- a/packages/fresh-ui/deno.lock +++ b/packages/fresh-ui/deno.lock @@ -4762,6 +4762,7 @@ "jsr:@netscript/service@0.0.9", "jsr:@netscript/telemetry@0.0.9", "jsr:@std/assert@1", + "jsr:@std/async@1", "npm:zod@^4.6.5" ], "packageJson": { diff --git a/packages/mcp/src/infrastructure/docs/agent-docs-prose.generated.ts b/packages/mcp/src/infrastructure/docs/agent-docs-prose.generated.ts index cc25160844..cd7eb6779c 100644 --- a/packages/mcp/src/infrastructure/docs/agent-docs-prose.generated.ts +++ b/packages/mcp/src/infrastructure/docs/agent-docs-prose.generated.ts @@ -265,7 +265,7 @@ export const EMBEDDED_AGENT_DOCS_PAGES: readonly AgentDocsPage[] = [ ["pages/durable-workflows/index.md","H4sIAAAAAAAA/61WTW/cNhC961cM4EsD7EcPPfnUIAnQAkERxHaLYlFgKWokMaY4yszQ8gL744uhJH80F6fxZbGrFYdv3rz3yAt4n9nVEWEivm0jTVJV130QEPQaKIGnO2Qpf4P2TmHIokBZY7hDcMD4NaMouNSAg5HJo8gO3sJBXOf++alXHeVyv+fgb0/R1bLrgva53gXaJ1TxHEbdNzOK7QOKva2W/RvwjjmgwJCjhq0ojiDqFMF5JhHw7KRH2YCDg3LoOuT/v+lSwPbVzEkgpJpyagDvMKn9VIJlWaFks/R9EGV0ww+0W9bbxmOuY7CWwGdmTLr0qwSFck9J8oAsO/jgfA+UEIKAAz2N2ECDbUihjC4kOFHmAlRG53EDQvYIvEvA6BqYbKLuYfjQEAq0TAMElSe1dqYKhNaFmBlBexQEzknDgAKuaRhFDIan5BkVTQG+R39LWcH3jjt7z6bZbGz5qhRobLg1tsQIbY5tiHGwpj2lNvBgg00NkOEVdayQqKbmBLeJJoGpR+2RjRzGNqfG9mVUPkEkGq3RRCZOmeyt3ukGavQuS2liobZGnRBTeaITgalMCtu2czwZkwMOxKcdGA0HUWJsmQzn2uT3yF2zEgcXbe5rpf3Pv2zXYlsrVkQ4v2fM1jlEBcdFj8WJ4jE5DrQMR7xrW4oNSB9GKc343oVkc0ohdUbNhHVPdAvRpUaM1dLyonoQ5LvgsTCO6WvGXIZ2MHkgy0u7q52/7QrO7TLlkLr9UmT/Br5QPfP4heoncndwvBHkK1QNqZN3jE6xOcKAIq7D1WpGzWoCgTAnD6Mnbkx+wxhxVb81t7q1ED2LvyfBxTyLhAHvRxLDkOC36+tPIJnb/xpmUeTMvVthQYkhbACtnilnV1UXF/CuJ5ISkPMWVXWGv82NI1MdcYAz3AjCuTrDdruF5bM6w9UzSc5SLJkrme/mzC2Zt4EpaF86xiSu9Dz1mIwiS0nzqsAZDmvCl0T98UA2jDY8yiqhKTFomjNvzqKzJZer0mQDDdNoydSGaDntmZLB+mCR+qC9V8lsg/ZujUdIiGYUhOjUTqjZ60aa2XWkGEPqnhE0Z/BrhPi5qg4f0XGCq8eoeHCz0fcsN8yooyLDQA1Gs8KT464E8zez3r1y1lTV4T3BZ/RhRIE/XQyN2Q9C6lCKuOY82DxxVOm2+G/+bsmL6bvQfUtiT9NWqQD6aFGVRzj++rhgjLkLqYCWo4U+MiaP8PbT74+/dvAZbeoN5BRULuG4quS4geMC/PhikA91VxNU1eEmNcii1nzRT4hBT/P84K/+tKjt2WXpybE3h1lPE2DborezNrQt8nz22q1qPcJeDBLvx+hS0cbMakG0LYgM8cUF/IH3ZgMcpaquymFaZPXaCaG08FBuH21g0TmytuJa3DzV9npfrP4FQsqCQokKAAA=","17f0b9aed3d32a048a5c92938bf5478c98127f9518634bff218c668cce55b0bd",2697], - ["pages/durable-workflows/sagas/index.md","H4sIAAAAAAAA/7V96XLjSJLmfz5FdPXa8GgSrKvNZqQ8Vp2p6lZXHmpJ2WVjOWWJIBAU0QIRLAQgJSszzfYh9l32/z7KPsna5+4RCJCUMrtm5k8eIBCI8PDw83PH79XzttaL0iinr7UbDK5WhVMbfW1UZm9N7VQe/36k1sY5fW1meV3cmkq5RjdGrXW2Kirj1N3KOiMXXVvfFrfGKa02tc2McyqrtVsl6t9tq3TbrGytNI2r7opmpWxl1LJsTdWoRVuUuamnqlkZVbdVU6yN2pjaFa5xqmhUY5XuptbY2kyVrnK6fzKhuapN2V4X1WSinKkxj6JRtlJF45R2rriuTK42tm6SweCZrVyRm5oef0vDLWtbNSpbmezGtg3N8ufRqmk27mg+r4vsZlvqhUuui2bVLpLCzivTuKwuNs28aRtbF7p0826k+dffz/xgMww2HyfqRG30do31Fk5letO0tcmnatmWy6Is6YelLkrXLc0Tsjau0TVIUamFae6MqTAc0fLGmI1TzUo3qqhm8qvsiacYxrumzcGobZVbIbVZtlU+BW1NVuoaJCp1ZvA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882d1f70a23fca7abe114c5bbaff159d29ce2e022ee",33586], + ["pages/durable-workflows/sagas/index.md","H4sIAAAAAAAA/7V923IbSZLlO74iunttAKKBhOq2M01KqmVLrG526cImqWob05QpA8gAkcVEBiojkxRKktl+xP7Lvu+n7JesHXePS4IgS12z86ILkIiM8PDw63GPP6jnXaPnlVFOX2k3GFyuSqc2+sqohb0xjVNF+v2hWhvn9JWZFk15Y2rlWt0atdaLVVkbp25X1hn50HXNTXljnNJq09iFcU4tGu1Wmfp32yndtSvbKE3jqtuyXSlbG7WsOlO3at6VVWGaiWpXRjVd3ZZrozamcaVrnSpb1Vql49Ra25iJ0nVBz4/HNFe1qbqrsh6PlTMN5lG2ytaqbJ3SzpVXtSnUxjZtNhg8s7UrC9PQz9/ScMvG1q1arMzi2nYtzfLH0aptN+5wNmvKxfW20nOXXZXtqptnpZ3VpnWLpty0s7ZrbVPqys3iSLNHX0/9YFMMNjvI1LHa6O0a6y2dWuhN2zWmmKhlVy3LqqIvlrqsXFyaJ2RjXKsbkKJWc9PeGlNjOKLltTEbp9qVblVZT+Vb2RNPMYx3RZuDUbu6sEJqs+zqYgLamkWlG5Co0guD9+D7wizLumxLW2fq3BCHbPFFrdZG15iXLsr6it82UbVtVWMWtnZt0y1afFPWralB89+9vcBsewx0qHStzA0WrosbXS9kgrSudtXY7mql2u3GFPw7UEYt7HpjaqcxKzVvdL1Yqa6+LesCrAcC0uNmw2Q0POdG144Wwnu8sWXdOmar6xtlG7VpSrfG/Gxjss/deu2cad2sKPVVo9duholPaapTWWLmbq4OBoOxbFaJOfZokKkTvVipsp7bri78ecMhwKMrXRcVMapu1bojIqQUoSU2pu0aPF4rs1yaRasqU1yZRo2EqhMiWmWwRyDQJBLRHBz1Dl1KHX6D5yiZGRGNeCM9jWqUUvFAOYvZlLVr8f5UNrBMGA8Gf/iD+gcxLY7DYJASKF2gnf+EFW2qzpHE8BTZmCYQC88LHf3XfX76VVJl6nKf5NlPgcnu8vjwObUui+myKq9WrbrFId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YYug/0LHddgV79kFsHQMVun0wtkPvd+TdZfk7HNdD6WjKSRp3lML9kR0W4TYpDzFvNcLGDBosi7yJO2PKcFpafhKraWCS3J8V9JwKAfalpZhCrY6Qi+juBA+4whSWRikAfaVI2QpFjYgBHIktSKUGHTMXVoEUx3tWr97/eYVrvy9QaObJSUsKpnGDq04OkawP2RDnhPRKLcVJaeoLfLGuJ+yU7hnClE59KaXk8qr8YFMsAZZt4P/BwX0wU05kAAA","46114c72ae5c105dd5f6e897362968f92137fa0f30f1e6b3803b0556561a7083",36921], ["pages/durable-workflows/streams/index.md","H4sIAAAAAAAA/71963IbR5bmfzxFNt0bBDBAgXJftoNsuYcS6W6OZUlBUfbMOjpUiaoEUGahEp2ZRQqWFLG/9gE29l32/z7KPMnGd87JrAIIym5vxE5MuCmgKq/nfr5z8IW6aJ2e10b54Ixe+8HgZlV5tdFLowp7Z5xX5e4TpypsN6ZUxUo3S6Nqu/QqrHRQG2fLtsAb964KRummVH+7uXk9e/PmUhW28e0aXzqjSxWsujVmo8LKqFoH44O603Vr1MY4dWu2mdL1ZqUHg9/8cJ4GVqVZVI3xSssSeEXKFyuz1jQfzexVu/HGhVlpahOMshvjdKhs41XVBEuTyqamcQjj7oxTtlFV8Ep7Xy0bU6qNdeGMnpfnartUC914ZdugcDzdDoNVXzvjV72t0rGsdTCu0nX1k3l8u38frkLY+NPZzFXF7bbWc58tq7Bq51llZ40JvnDVJsy09yb4WVnppdNrP5M7mW6qjamrxmT+bjkaDMZv+HMVPz/tDnHIp8hPvOGj+xdVOKODEWLg70bqP//H/+xv/NDp0DPpDPCP/UMYHtrwKBsPBnGRreeTiaSYFu9ssIWtM/UftpXL7+6eV35fhZX6IX+4p/yXHqkzC+NMU5h4mLPRBCTTKN0dGk2THzikXFnHBGLcXVWY6UIXVbOMz77hT/nZ1zJaPiFazZlK84nKmVBz/nhRt36VK9OEKmyVDxokjNUcpNlM3cjsxinXNrgfpRt17jeVM8oZb1tXmIOXl6nvrbs1zk+U10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YAAA==","d73b1ffe4015cf4321669adbff494f2c2474b8e83e2bc33acec82aa456ad41ae",30335], diff --git a/packages/mcp/src/infrastructure/export-surfaces/export-surface-corpus.generated.ts b/packages/mcp/src/infrastructure/export-surfaces/export-surface-corpus.generated.ts index ae75389e05..175d9c6483 100644 --- a/packages/mcp/src/infrastructure/export-surfaces/export-surface-corpus.generated.ts +++ b/packages/mcp/src/infrastructure/export-surfaces/export-surface-corpus.generated.ts @@ -329,7 +329,7 @@ export const EXPORT_SURFACE_ROWS: readonly (readonly [string, string, string, st ["plugin-sagas-core","./abstracts","tBlrb9s48q8Q/pQAaoD7dnATF07i3TNySXO2i+LQFgktjW3CMqklKSfaYv/7gU+ReiRKegsUqT3kDOf98rdvo+laSI5TOd0ClYuSSnKAUeLBS7zFl6VoQJaS8eatFcdUFIzLUTK6mi6vptez64fb2XI5/X32cDO/u16qAyxSnEF2C0LgLbQhN4RmbejnQhJGRftghfkW1Iv/KYFX17AhlKiro2S0AMmre5aTtBolo+X09+nD9ZfF9HL+7/nqvw+r+WyxdPD53XI1vbuaPSxX09WX5Uwf4C3WOrli9AhcYEV2noUnjW+0KGUIsMq8NyppgpcSSwjhSwnFAkSZu9uXpQhwr3KW7sPv7FAANWzNOGfcw2lacg40DYQ3cAnPNTbnkGvkNmROM3ieUcmr9tkNdAAXZe5EiUygASXHa5ITWa0IOCb/hWmW+29ej/MMDgWThncvaQBdgAB+DNkODr0vaDgVEtMUatoWoPSu/VkBazcMvnmU+3KdE7GrnU8BjaMRUWCZ7kJYLNOSbCnOoy8NJANsYOUARfxe6Cf684weIWdFBLsFiTMssYcxHvqd/v6VExkEkg/Z0Fg1YLbZQCpb4JjdGr6AlHGnN58Jpum+CeogoMCxITw4kMHDluVapJxoQdSZ0W3odl8/L25mi4erz7e307vrh9lvv82uVj4FfWV8D/yKHQ6YZlbMH8m3UZpjoRTT9z+HDaiwgr/p8xFzgtc6kGRVwDQnWLzwmVAJfIM16pA7ffeHsPbW+0M+D+H/rTy8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UbW3jBdHoo37Rklgdk/T7TJ+IZ6FiDkQpeAVnTsCKLpdMFFgGZdyWc73Cl96Kqd31xlLAeOroahvsotz6KxxnFktB3K6Tm6h5UA42EwdMAiOHRn3Luoxz+una0prLqfjTdaYaiC3QrXSiNcvvneIVCt1+SiLich/AcYWwgptU7evoCGFVIyM8BLt07HR+bNcB7uSDW+ukWrA7DIZvSMvRFrzA4Z2fD9LYWJd8y6UFW2TeyZkpKOTPusFJrIkH54Mtu3IJH9cKUJ/iI30aXWaEtNSFtrtXMwbLy53hPc+vuOOuyDUaqtZ/kbSEcSUEoT5siFAaO0Rf7MoB3Tg79cvhm7AoVZtmIm9l0F0S01/iyIsdLPqAZJ7zBglQfqsqD6n9Uv2q2qM/VOUPUVTXTgcJNR70V2BFrp88sv/wU=","fwpWy1NnS47IygFHE2hYYy9tWVfTlhLFHjmZ/ADgE+M=",10729,83], ["plugin-sagas-core","./agent","lJBha8IwEIb/ypFPG8T9ABlCVysWUaEW9qGWEppLF1Yv45LK9u9HpWCGczAIXHL35E3et6qERmMJkw4pCCkOqlMvg+018nQqWZG3wTrKjME23LTXinR/wV/3xSYrmnS/3Sa7ZZOtVllaNpt8tzyMU8fvyKk7nRTpSauWlTADtaOOkILRICO1+O99LASRpecy14CfAUl78IEtdYsHq+dQ5vpxDpHdkZRwFJZssKo/CgmEZ+SpLOLn4ns3/V8Cuwdco7sSf4cYcXfiLNAjn1GDGv3P1BDe3GgbkAJ/fThLAYxjMEMYGCHJZxcQvOoUWArYsRr/5p+EFD9WXX8DAAD//wMA","No+at38tLidiURUYBiR3cUHzM/1J43dAuRzl05RHTFc=",559,6], @@ -337,11 +337,11 @@ export const EXPORT_SURFACE_ROWS: readonly (readonly [string, string, string, st ["plugin-sagas-core","./config","rFZLb+M2EP4rhE5ewDF6dhwHaVwUuWyCxLckwI7FkUKEIgU+vOsu+t8LknqQFpVN0d6kefGb9zw/F7dSVKx+Kt+wgWKZ/D6ittwUy4JixQQ+QQ2BXSyLmZ/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aKgz8Gai9j+IXZ5nBKlUEOwyvBy5euTHlwNCLPKgQK2YTZYOvcG+xZ5sGgfYFUUfUT/j4c2nRRVUSauIdpi9FSM83Hll8LuQql2NNRg06O259WU1Iq/Kmb15GhMaohYROvZ2CCs3f1VkzwbA1L2TlHN4MnybCk0R7jogPTS9vFSrIImeHjlnzqvHkcT8218cenTaUxK2ZoO2KWox/91KzXCqh3siKWpBmahKDCvFY+Adh1+98F3Utk8NEeESLF7ak6Psenq8vUBPOhMgMzYl9yW8EuO2nhfDhxk0RZWtUfiA/l9XDUKT9slUzLC2Ba4HhNMpBAYGan0UlinVosrsA/vSIpIoSnTgz1nsOp6eI4WVrFoGluUgsVDdtH52nJBRpsB7TMQMnZIJYs974ca8/m0EKR2pa5xBFkNtn89QqFcPVhzHbzfdmhYzAwb9h4f/wc=","3o5jmIr6aPVaFloOByw/UT7/3JWA/8zFSZDPdhvq03U=",5495,31], ["plugin-sagas-core","./discovery","hJHNbiJBDIRfpcSFSyD3RStFJDmgjUgE5MSgTDNtZqztcU/abn4U7buvmmi1R462XGXX5+12tHzerB9Xi7fNx+PrcrNazN83i9flx/x98fL0vFqPdnfb0dEldvtA16KJooYbsh/I8lviSa6SFbWsli5wZ1IcYgKdh5iMPA6usZiYdAbJIYDOTcieFEcXMilObF3MBocmiiXeZ+MoYD+t5IHOrh8Coa5r00q4L6b4unUc/uCQYo/xg5Bpk3iw+yHklmWirnU6aWKie8/axCOly3hWyXfowZlREsXPWytmldR1XUklb04V1pESuO+zFY7/jaxLMbddGcD3CVg//Rorauc9l6guzDMHT0lrxKF0ppWsXeug3IoLCicen5kKRLhEBZTmnjz2l+LLCfEkLC1KOHg6sFyddVaJdXS5iiQaWDwNJJ7EwH6yd0oe6d/vqOAnnY52u78AAAD//wMA","pKj/L/j4uZ9bXUB1qIQvGp2lt3UTyoZbmked1S3nAHs=",567,1], - ["plugin-sagas-core","./domain","xFZtb6M4EP4ro3zalaL7Ad22Jy7QXtTm5YCqV1UVdfAksR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k6tM2U2KpfMXXG76WF/BMK9WVcJOeG2NbngmnGDsJWiBKYVSPzToLL1qJN8E5S8koKavC4WPmNutMVu3/B9fVcGyhE/a0lyrUDv8TRJ4B4mymxOJeNEC1ln4b15M++txhILAypI4lv7srlWpQ5ojLTFcVv0XtqXcnN0XhXkQiJEdws3Em6zN7S+faFPaHUCJ1f080g/+n39+g8=","iEfv5yfT4R3yaoN3Njnu8op8iz0CwAS2kdQULpqN6Ho=",5050,54], ["plugin-sagas-core","./integration/commands","rFbdb9s2EP9XDnlpEyTOw97iJm2Wdli3NQkSF3uoC5gmzzYX6qgeqTha0f99OFKSFX8kKTDADzLFO97d74P68mXvwheFIvNH8LR32P67quLUP5xrjWVUpHH9zXt09h65Xl+/tXS3Whux0njhKeJD3Dvc04wq4q2aq20xvXVZuSqj9RS6F8zolCz9iXWz+AlDUHN8/O+jaf5fV1NnwwL5VxX14pM3uP7iA5nSW4rvrZqTD9Hq9R3XnuPGWn74pKh+XOP6jh1vb1CjLTfS3uA/qCNuVH+DoXJx7+vhl71Yl3jurJKUu54tReSZSoj112cVaSlnbZlxhowZ4F3PP3vUzz23jUGPh3AKFd2RX7blwg5awincoDKeXP2miTjbGtLydUdA18rjKOEhfAduIsCaEwiRLc2HUGaAXheZdifbzzuEYOek3NsTOJ96jrfp3/4JXLMvbMCuCPixVndfOzuqbjGFJ4T12mcWnsB2fe2vFd6IMVWyPWJHMR1jYKteH79eKXfretJwV8KmkDf58Yyun4V9Q/VvRk0tgA8RyYR+fXDa/3f2DEXejC7xIa6na/OfrRjU33cIDXBvM3I7zKXHpC2u0fV61hUjtvXCgsJJO+Xniul54ZPUfib2KTU/MYMXhzXO20E7kh1t+xk0OG0ezn4iazbu/z1tQvClSVs9iJ1+PPrj9uoSjIoKlClsjGhgWoPOWgbtDeoAahaRgSuKtkC4V86aJNiBXOAL1HdoILKiUHqOoFamS54L5ey/aMCSwRLJIEVXg5+BohqWnu+Qj4OaKwh6gYWSlO9RzjWgFXmyWjkwj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He1+//gcAAP//AwA=","vGuJPbwD7Pa2nnCf2MLpJS3Ur6Cfd4TcVG+geEvG6oU=",4137,18], diff --git a/packages/mcp/src/publish-assets.generated.ts b/packages/mcp/src/publish-assets.generated.ts index b39c304b7c..c523f2f325 100644 --- a/packages/mcp/src/publish-assets.generated.ts +++ b/packages/mcp/src/publish-assets.generated.ts @@ -307,7 +307,7 @@ export const MCP_EMBEDDED_DOCS_PROVENANCE: 'pages/web-layer/vite/index.md', 'pages/why/index.md', ], - sourceBytes: 3263753, + sourceBytes: 3267088, documentCount: 286, - sha256: '5911c05bb9d56fef9285fdd13ca60ba4bfdcfa6c5c25928d065fb961297b2012', + sha256: '0c7b053b313d755f0334a51da5005b4d796e83beabd32dd55a5a9c35d8327574', }; diff --git a/packages/plugin-sagas-core/README.md b/packages/plugin-sagas-core/README.md index fefff5586f..0904ceecbe 100644 --- a/packages/plugin-sagas-core/README.md +++ b/packages/plugin-sagas-core/README.md @@ -414,3 +414,66 @@ delegate's exact guarantees. Scheduled and cascaded effects still dispatch after the transition commit. Recovery across a crash in that later window requires the separate `SagaOutboxPort` dispatcher follow-up tracked by #2159. This state/replay change does not claim recoverable delivery of those effects. + +## Ordered observation feed + +`KvSagaEventFeed` from `@netscript/plugin-sagas-core/adapters` provides the API's portable KV +observation journal. It retains the latest 256 events in 256 slots plus one head key. The first +append onto an absent head creates an epoch; later appends inherit that epoch through an atomic +compare-and-set. Successful commits define order, and stable `epoch:sequence` ids survive API +restarts while KV survives. + +Publish observations with `feed.append(event, { signal })`. A subscription uses the host's KV and +cancellation signal; save each printed data id if you need to resume later: + +```typescript +import type { WatchableKv } from '@netscript/kv'; +import { KvSagaEventFeed } from '@netscript/plugin-sagas-core/adapters'; + +async function printSagaEvents( + kv: WatchableKv, + signal: AbortSignal, + afterId?: string, +): Promise { + const feed = new KvSagaEventFeed(kv); + for await (const item of feed.subscribe({ afterId, signal })) { + if (item.type === 'event') { + console.log(item.id, item.event); + } + } +} +``` + +Without `afterId`, subscriptions start live after their ready barrier. With a retained id, they +replay later events then continue live. Ready items carry no event id. Each reader has its own +cursor; reading never removes another reader's history. Falling behind the global 256-event window +raises `SagaEventFeedError` with reason `history-lost`; malformed or future ids raise +`invalid-cursor`. Obtain a fresh application snapshot before subscribing without the old cursor. +Cancellation closes only the subscription, leaving the host's KV open. This observation journal +is separate from durable saga runtime acceptance and follows the configured KV's durability. + +The feed requires native atomic compare-and-set and fixed-key watch support. It reads directly +addressed slots and performs no keyspace scan or polling loop. Concurrent successful commits define +publish order across feed instances; invocation start order is not guaranteed. A slow reader keeps +at most 256 records locally and receives an explicit gap if it is overtaken. + +Import `SagaEventFeedError` from `@netscript/plugin-sagas-core/domain`. Its `reason` is +`invalid-cursor`, `history-lost`, or retryable `unavailable`; known history bounds are returned as +`oldestId` and `latestId`. A cursor from another epoch or a reset store is a history gap. An id +beyond the current head is invalid. The oldest retained event's predecessor remains a valid replay +cursor. The fixed retention count covers all events, including those filtered out by an HTTP +subscription, and adds no TTL or background pruning. Each event follows the backend's per-value +size limit. + +Only explicit CAS conflicts retry, up to 64 attempts. A failed or aborted native commit may already +have succeeded, so append does not blindly retry it. Runtime acceptance precedes the API's event +append; observation and saga execution are separate commits. A failed HTTP publication may therefore +have accepted work already. Retrying with the application's idempotency key can deduplicate runtime +work, while a separate notification can still be appended. Readers can deduplicate replayed +notifications by their stable event id. + +The journal uses the versioned `['saga', 'event-feed', 'v1']` prefix. Legacy random-key history and +per-connection numeric ids have no reconstructible global order. During upgrade, drain old API +instances and clear saved subscription cursors; start a fresh subscription. The feed neither scans +nor migrates the legacy prefix. Obsolete legacy keys can be removed separately through the host's +KV maintenance path; the 257-key bound applies to the new journal only. diff --git a/packages/plugin-sagas-core/deno.json b/packages/plugin-sagas-core/deno.json index 0ba362506a..9846d6852d 100644 --- a/packages/plugin-sagas-core/deno.json +++ b/packages/plugin-sagas-core/deno.json @@ -29,6 +29,7 @@ }, "imports": { "@std/assert": "jsr:@std/assert@^1", + "@std/async": "jsr:@std/async@^1", "hono": "jsr:@hono/hono@4.13.13", "@netscript/kv": "jsr:@netscript/kv@0.0.9", "@netscript/plugin-streams-core": "jsr:@netscript/plugin-streams-core@0.0.9", diff --git a/packages/plugin-sagas-core/src/adapters/kv-saga-event-feed.ts b/packages/plugin-sagas-core/src/adapters/kv-saga-event-feed.ts new file mode 100644 index 0000000000..33481f162e --- /dev/null +++ b/packages/plugin-sagas-core/src/adapters/kv-saga-event-feed.ts @@ -0,0 +1,318 @@ +import { abortable } from '@std/async'; +import type { KvKey, WatchableKv } from '@netscript/kv'; +import { SagaEventFeedError } from '../domain/errors.ts'; +import type { SagaSSEEvent } from '../domain/saga-message.ts'; + +/** Number of retained events in journal format 1; one additional key stores the head. */ +export const SAGA_EVENT_HISTORY_LIMIT = 256; + +/** Stable journal position and detached event payload. */ +export type SagaEventFeedEntry = Readonly<{ + /** Opaque epoch:sequence cursor, stable across readers and API restarts. */ + id: string; + /** Committed observation payload. */ + event: SagaSSEEvent; +}>; + +/** Ready barrier followed by ordered journal entries. Ready never advances a data cursor. */ +export type SagaEventFeedItem = + | Readonly<{ type: 'ready' }> + | (SagaEventFeedEntry & Readonly<{ type: 'event' }>); + +/** Cancellation for an append; abort does not undo an already committed write. */ +export type SagaEventFeedAppendOptions = Readonly<{ + /** Signal limiting the caller's wait for backend IO. */ + signal?: AbortSignal; +}>; + +/** Replay position and cancellation for one independently owned reader. */ +export type SagaEventFeedSubscribeOptions = Readonly<{ + /** Replay after this retained id; absent or empty starts live at readiness. */ + afterId?: string; + /** Aborts the subscription without closing the host's KV. */ + signal?: AbortSignal; +}>; + +type Head = { format: 1; epoch: string; sequence: number }; +type Cursor = { epoch?: string; sequence: number }; +type Slot = { epoch: string; sequence: number; event: SagaSSEEvent }; +const HEAD_KEY: KvKey = ['saga', 'event-feed', 'v1', 'head']; +const EPOCH = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/; +const EVENT_TYPES = new Set([ + 'saga:started', + 'saga:message_received', + 'saga:state_changed', + 'saga:completed', + 'saga:failed', + 'saga:compensating', + 'heartbeat', +]); + +/** + * Bounded, portable observation journal over a host-owned atomic/watchable KV. + * + * A successful head CAS orders each append across processes. The first append + * creates an epoch; later appends inherit it. Readers use fixed-key notifications + * and their own cursor, never keyspace scans or destructive consumption. Retention + * is global, including events excluded by presentation filters. Storage durability + * and per-event value limits follow the supplied KV backend. + */ +export class KvSagaEventFeed { + /** Construct a journal without opening, owning, or closing the supplied KV. */ + constructor(private readonly kv: WatchableKv) {} + + /** + * Commit one detached event and return its stable id. Only CAS conflicts retry + * (at most 64 attempts); a thrown native commit has an unknown outcome. + */ + async append( + event: SagaSSEEvent, + options: SagaEventFeedAppendOptions = {}, + ): Promise { + const { signal } = options; + try { + signal?.throwIfAborted(); + this.assertCapabilities(); + const snapshot = structuredClone(event); + for (let attempt = 0; attempt < 64; attempt++) { + const entry = await wait(this.kv.get(HEAD_KEY), signal); + const previous = entry ? parseHead(entry.value) : null; + if (previous?.sequence === Number.MAX_SAFE_INTEGER) { + throw unavailable('Saga event sequence exhausted.'); + } + const head: Head = { + format: 1, + epoch: previous?.epoch ?? crypto.randomUUID(), + sequence: (previous?.sequence ?? 0) + 1, + }; + signal?.throwIfAborted(); + const result = await wait( + this.kv.atomic!( + [{ key: HEAD_KEY, versionstamp: entry?.versionstamp ?? null }], + [ + { type: 'set', key: slotKey(head.sequence), value: { ...head, event: snapshot } }, + { type: 'set', key: HEAD_KEY, value: head }, + ], + ), + signal, + ); + if (result.ok) return { id: id(head), event: structuredClone(snapshot) }; + } + throw unavailable('Saga event journal remained busy after 64 conflicts.'); + } catch (error) { + signal?.throwIfAborted(); + throw asFeedError(error); + } + } + + /** + * Subscribe live or resume after a retained id. Each reader buffers at most 256 + * records and coalesces head notifications independently of consumer speed. + * A replay gap fails explicitly. Abort or iterator return releases only this + * subscription; the host retains ownership of KV. + */ + async *subscribe( + options: SagaEventFeedSubscribeOptions = {}, + ): AsyncGenerator { + const controller = new AbortController(); + const signal = options.signal + ? AbortSignal.any([options.signal, controller.signal]) + : controller.signal; + let pump: ReturnType | undefined; + try { + signal.throwIfAborted(); + this.assertCapabilities(); + const requested = options.afterId ? parseCursor(options.afterId) : undefined; + pump = watchHead(this.kv, signal); + await wait(pump.ready, signal); + pump.check(); + const initial = await this.readHead(signal); + const cursor: Cursor = requested ?? { + epoch: initial?.epoch, + sequence: initial?.sequence ?? 0, + }; + validateCursor(cursor, initial); + yield { type: 'ready' }; + while (!signal.aborted) { + // Capture before IO/yields: a concurrent wake must survive a slow reader. + const wake = pump.token(); + pump.check(); + const head = await this.readHead(signal); + pump.check(); + if (head && !cursor.epoch) cursor.epoch = head.epoch; + validateCursor(cursor, head); + if (head && cursor.sequence < head.sequence) { + const keys = Array.from( + { length: head.sequence - cursor.sequence }, + (_, offset) => slotKey(cursor.sequence + offset + 1), + ); + const entries = await wait( + this.kv.getMany + ? this.kv.getMany(keys) + : Promise.all(keys.map((key) => this.kv.get(key))), + signal, + ); + const start = cursor.sequence + 1; + // Validate the whole snapshot before yielding any potentially torn batch. + if ( + entries.length !== keys.length || + entries.some((entry, offset) => + !entry || !isRecord(entry.value) || entry.value.epoch !== head.epoch || + entry.value.sequence !== start + offset || !isEvent(entry.value.event) + ) + ) { + throw gap(head); + } + for (const [offset, entry] of entries.entries()) { + signal.throwIfAborted(); + pump.check(); + cursor.sequence = start + offset; + yield { + type: 'event', + id: id({ epoch: head.epoch, sequence: cursor.sequence }), + event: structuredClone(entry!.value.event), + }; + } + } + await wait(wake, signal); + } + } catch (error) { + signal.throwIfAborted(); + throw asFeedError(error); + } finally { + controller.abort(); + await pump?.done; + } + } + + /** Read and validate the fixed journal head. */ + private async readHead(signal: AbortSignal): Promise { + const entry = await wait(this.kv.get(HEAD_KEY), signal); + return entry ? parseHead(entry.value) : null; + } + + /** Reject unsupported custom stores instead of using a racy fallback. */ + private assertCapabilities(): void { + if (!this.kv.atomic || !this.kv.supportsWatch || typeof this.kv.watch !== 'function') { + throw unavailable('Saga event feed requires atomic and fixed-key watch support.'); + } + } +} + +function slotKey(sequence: number): KvKey { + return ['saga', 'event-feed', 'v1', 'slot', (sequence - 1) % SAGA_EVENT_HISTORY_LIMIT]; +} + +function id(cursor: { epoch: string; sequence: number }): string { + return `${cursor.epoch}:${cursor.sequence}`; +} + +function isRecord(value: unknown): value is Record { + return value !== null && typeof value === 'object' && !Array.isArray(value); +} + +function isEvent(value: unknown): value is SagaSSEEvent { + return isRecord(value) && typeof value.type === 'string' && EVENT_TYPES.has(value.type) && + typeof value.timestamp === 'string' && + ['sagaName', 'sagaId', 'instanceId', 'correlationId', 'correlationKey'].every((key) => + value[key] === undefined || typeof value[key] === 'string' + ) && (value.data === undefined || isRecord(value.data)); +} + +function parseHead(value: unknown): Head { + if ( + !isRecord(value) || value.format !== 1 || typeof value.epoch !== 'string' || + !EPOCH.test(value.epoch) || typeof value.sequence !== 'number' || + !Number.isSafeInteger(value.sequence) || value.sequence < 1 + ) throw unavailable('Saga event journal head is corrupt.'); + return { format: 1, epoch: value.epoch, sequence: value.sequence }; +} + +function parseCursor(value: string): Cursor { + if (value.length > 100) { + throw new SagaEventFeedError('Invalid saga event cursor.', { reason: 'invalid-cursor' }); + } + const [epoch, decimal, extra] = value.split(':'); + const sequence = Number(decimal); + if ( + value.length > 100 || extra !== undefined || !EPOCH.test(epoch) || + !/^(0|[1-9][0-9]*)$/.test(decimal ?? '') || !Number.isSafeInteger(sequence) + ) throw new SagaEventFeedError('Invalid saga event cursor.', { reason: 'invalid-cursor' }); + return { epoch, sequence }; +} + +function validateCursor(cursor: Cursor, head: Head | null): void { + if (!cursor.epoch) return; + if (!head || head.epoch !== cursor.epoch) throw gap(head); + if (cursor.sequence > head.sequence) { + throw new SagaEventFeedError('Saga event cursor is ahead of the journal.', { + reason: 'invalid-cursor', + }); + } + if (cursor.sequence < Math.max(0, head.sequence - SAGA_EVENT_HISTORY_LIMIT)) throw gap(head); +} + +function gap(head: Head | null): SagaEventFeedError { + return new SagaEventFeedError( + 'Saga event history is no longer available; refresh the snapshot.', + { + reason: 'history-lost', + oldestId: head ? id({ ...head, sequence: Math.max(1, head.sequence - 255) }) : undefined, + latestId: head ? id(head) : undefined, + }, + ); +} + +function unavailable(message: string, cause?: unknown): SagaEventFeedError { + return new SagaEventFeedError(message, { reason: 'unavailable', cause }); +} + +function asFeedError(error: unknown): SagaEventFeedError { + return error instanceof SagaEventFeedError ? error : unavailable('Saga event KV failed.', error); +} + +function wait(promise: Promise, signal?: AbortSignal): Promise { + return signal ? abortable(promise, signal) : promise; +} + +/** Drain notifications continuously, keeping one wake token and a terminal state. */ +function watchHead(kv: WatchableKv, signal: AbortSignal) { + let state: 'starting' | 'watching' | 'failed' | 'closed' = 'starting'; + let failure: unknown; + let wake = Promise.withResolvers(); + const first = Promise.withResolvers(); + void first.promise.catch(() => {}); + const watch = kv.watch([HEAD_KEY], { initial: true, signal }); + const notify = (): void => { + wake.resolve(); + wake = Promise.withResolvers(); + }; + const done = (async () => { + try { + for await (const _batch of watch) { + state = 'watching'; + first.resolve(); + notify(); + } + if (!signal.aborted) throw unavailable('Saga event head watch ended unexpectedly.'); + state = 'closed'; + } catch (error) { + if (signal.aborted) state = 'closed'; + else { + state = 'failed'; + failure = error; + } + } finally { + first.reject(failure ?? signal.reason ?? unavailable('Saga event watch ended before ready.')); + notify(); + } + })(); + return { + ready: watch.ready ?? first.promise, + token: () => wake.promise, + check: (): void => { + if (state === 'failed') throw asFeedError(failure); + }, + done, + }; +} diff --git a/packages/plugin-sagas-core/src/adapters/mod.ts b/packages/plugin-sagas-core/src/adapters/mod.ts index d864abbca1..7bcda42130 100644 --- a/packages/plugin-sagas-core/src/adapters/mod.ts +++ b/packages/plugin-sagas-core/src/adapters/mod.ts @@ -92,3 +92,12 @@ export { createSagaBusBridge, SagaBusBridge } from './saga-bus-bridge.ts'; export type { SagaBridgeCompensationResolver, SagaBusBridgeOptions } from './saga-bus-bridge.ts'; export { WORKER_COMMAND_EFFECT_KINDS } from '../domain/mod.ts'; + +export { KvSagaEventFeed, SAGA_EVENT_HISTORY_LIMIT } from './kv-saga-event-feed.ts'; +export type { + SagaEventFeedAppendOptions, + SagaEventFeedEntry, + SagaEventFeedItem, + SagaEventFeedSubscribeOptions, +} from './kv-saga-event-feed.ts'; +export type { SagaSSEEvent, SagaSSEEventType } from '../domain/saga-message.ts'; diff --git a/packages/plugin-sagas-core/src/contracts/v1/sagas.contract.ts b/packages/plugin-sagas-core/src/contracts/v1/sagas.contract.ts index af040fa066..9e88e39087 100644 --- a/packages/plugin-sagas-core/src/contracts/v1/sagas.contract.ts +++ b/packages/plugin-sagas-core/src/contracts/v1/sagas.contract.ts @@ -14,6 +14,8 @@ import { type BasePluginDescribeRoute, } from '@netscript/plugin/contract-base'; import { SAGA_DURABILITY_TIERS, SAGA_INSTANCE_STATUSES } from '../../domain/mod.ts'; +import type { SagaSSEEvent, SagaSSEEventType } from '../../domain/saga-message.ts'; +export type { SagaSSEEvent, SagaSSEEventType } from '../../domain/saga-message.ts'; /** Result returned by contract schema validation. */ export type ContractSchemaResult = @@ -183,28 +185,6 @@ export type PublishMessageResponse = Readonly<{ messageId?: string; }>; -/** Server-sent event kinds emitted by the saga service. */ -export type SagaSSEEventType = - | 'saga:started' - | 'saga:message_received' - | 'saga:state_changed' - | 'saga:completed' - | 'saga:failed' - | 'saga:compensating' - | 'heartbeat'; - -/** Server-sent event payload emitted by saga subscriptions. */ -export type SagaSSEEvent = Readonly<{ - type: SagaSSEEventType; - timestamp: string; - sagaName?: string; - sagaId?: string; - instanceId?: string; - correlationId?: string; - correlationKey?: string; - data?: Readonly>; -}>; - /** Query filters accepted by the list-sagas endpoint. */ export type SagaFilters = Readonly<{ topic?: string; diff --git a/packages/plugin-sagas-core/src/domain/errors.ts b/packages/plugin-sagas-core/src/domain/errors.ts index 65394d9f13..9fe8164fff 100644 --- a/packages/plugin-sagas-core/src/domain/errors.ts +++ b/packages/plugin-sagas-core/src/domain/errors.ts @@ -76,3 +76,41 @@ export type SagasErrorOptions = Readonly<{ retryable?: boolean; cause?: unknown; }>; + +/** Why an event subscription cannot continue from its requested cursor. */ +export type SagaEventFeedFailure = 'invalid-cursor' | 'history-lost' | 'unavailable'; + +/** Context for a failed event append or subscription. */ +export type SagaEventFeedErrorOptions = Readonly<{ + /** Stable classification for presentation and recovery. */ + reason: SagaEventFeedFailure; + /** Oldest retained event id, when history is available. */ + oldestId?: string; + /** Latest committed event id, when history is available. */ + latestId?: string; + /** Original backend failure, if any. */ + cause?: unknown; +}>; + +/** A cursor gap, invalid cursor, or unavailable saga observation journal. */ +export class SagaEventFeedError extends SagasError { + /** Stable classification; history loss requires a fresh application snapshot. */ + readonly reason: SagaEventFeedFailure; + /** Oldest retained event id, when known. */ + readonly oldestId?: string; + /** Latest committed event id, when known. */ + readonly latestId?: string; + + /** Create an error without conflating a replay gap with malformed input. */ + constructor(message: string, options: SagaEventFeedErrorOptions) { + super(message, { + code: options.reason === 'unavailable' ? 'SAGA_RETRYABLE' : 'SAGA_VALIDATION_FAILED', + retryable: options.reason === 'unavailable', + cause: options.cause, + }); + this.name = 'SagaEventFeedError'; + this.reason = options.reason; + this.oldestId = options.oldestId; + this.latestId = options.latestId; + } +} diff --git a/packages/plugin-sagas-core/src/domain/mod.ts b/packages/plugin-sagas-core/src/domain/mod.ts index 66f82bf1c5..687cba1d95 100644 --- a/packages/plugin-sagas-core/src/domain/mod.ts +++ b/packages/plugin-sagas-core/src/domain/mod.ts @@ -23,8 +23,12 @@ export type { SagasErrorCode, } from './constants.ts'; export { DEFAULT_RETRY_POLICY } from './retry-policy.ts'; -export { SagasError } from './errors.ts'; -export type { SagasErrorOptions } from './errors.ts'; +export { SagaEventFeedError, SagasError } from './errors.ts'; +export type { + SagaEventFeedErrorOptions, + SagaEventFeedFailure, + SagasErrorOptions, +} from './errors.ts'; export type { SagaCorrelationKey, SagaId, SagaInstanceId, SagaMessageId } from './ids.ts'; export type { RetryPolicy } from './retry-policy.ts'; export type { @@ -33,7 +37,12 @@ export type { SagaStateEnvelope, SagaStateMetadata, } from './saga-state.ts'; -export type { SagaMessage, SagaMessageType } from './saga-message.ts'; +export type { + SagaMessage, + SagaMessageType, + SagaSSEEvent, + SagaSSEEventType, +} from './saga-message.ts'; export type { CascadedMessage, CascadedMessageOptions, diff --git a/packages/plugin-sagas-core/src/domain/saga-message.ts b/packages/plugin-sagas-core/src/domain/saga-message.ts index b35eba1439..31bf2c201e 100644 --- a/packages/plugin-sagas-core/src/domain/saga-message.ts +++ b/packages/plugin-sagas-core/src/domain/saga-message.ts @@ -15,3 +15,25 @@ export type SagaMessage = Rea /** Extracts the message type discriminator from a saga message. */ export type SagaMessageType = TMessage['type']; + +/** Server-sent event kinds emitted by the saga service. */ +export type SagaSSEEventType = + | 'saga:started' + | 'saga:message_received' + | 'saga:state_changed' + | 'saga:completed' + | 'saga:failed' + | 'saga:compensating' + | 'heartbeat'; + +/** Server-sent event payload emitted by saga subscriptions. */ +export type SagaSSEEvent = Readonly<{ + type: SagaSSEEventType; + timestamp: string; + sagaName?: string; + sagaId?: string; + instanceId?: string; + correlationId?: string; + correlationKey?: string; + data?: Readonly>; +}>; diff --git a/packages/plugin-sagas-core/tests/contracts/saga-event-feed_test.ts b/packages/plugin-sagas-core/tests/contracts/saga-event-feed_test.ts new file mode 100644 index 0000000000..99b45440f1 --- /dev/null +++ b/packages/plugin-sagas-core/tests/contracts/saga-event-feed_test.ts @@ -0,0 +1,33 @@ +import { assertEquals, assertInstanceOf } from '@std/assert'; +import { SagaEventFeedError, SagasError } from '../../src/domain/mod.ts'; +import type { SagaSSEEvent as DomainEvent } from '../../src/domain/mod.ts'; +import type { SagaSSEEvent as ContractEvent } from '../../src/contracts/v1/mod.ts'; + +Deno.test('SSE domain vocabulary preserves the existing contract shape', () => { + const event: DomainEvent = { type: 'saga:compensating', timestamp: 'now', data: { step: 1 } }; + const contract: ContractEvent = event; + const domain: DomainEvent = contract; + assertEquals(domain, event); +}); + +Deno.test('event feed errors distinguish a replay gap, bad input, and retryable storage', () => { + const cause = new Error('backend'); + for (const reason of ['invalid-cursor', 'history-lost', 'unavailable'] as const) { + const error = new SagaEventFeedError('feed failed', { + reason, + oldestId: 'oldest', + latestId: 'latest', + cause, + }); + assertInstanceOf(error, SagasError); + assertEquals(error.reason, reason); + assertEquals(error.retryable, reason === 'unavailable'); + assertEquals( + error.code, + reason === 'unavailable' ? 'SAGA_RETRYABLE' : 'SAGA_VALIDATION_FAILED', + ); + assertEquals(error.oldestId, 'oldest'); + assertEquals(error.latestId, 'latest'); + assertEquals(error.cause, cause); + } +}); diff --git a/packages/plugin-sagas-core/tests/fixtures/event-feed-backends.ts b/packages/plugin-sagas-core/tests/fixtures/event-feed-backends.ts new file mode 100644 index 0000000000..83bdc0758d --- /dev/null +++ b/packages/plugin-sagas-core/tests/fixtures/event-feed-backends.ts @@ -0,0 +1,47 @@ +import { DenoKvAdapter, MemoryKvAdapter, type WatchableKv } from '@netscript/kv'; +import { RedisKvAdapter } from '@netscript/kv/redis'; +import type { SagaEventFeedItem, SagaSSEEvent } from '../../src/adapters/mod.ts'; + +export const backends: readonly string[] = [ + 'memory', + 'deno-kv', + ...(Deno.env.get('NETSCRIPT_TEST_REDIS_URL') ? ['redis'] : []), + ...(Deno.env.get('NETSCRIPT_TEST_GARNET_URL') ? ['garnet'] : []), +]; + +export async function storage( + backend: string, + namespace = `saga-feed-${crypto.randomUUID()}`, +): Promise { + if (backend === 'memory') return new MemoryKvAdapter(); + if (backend === 'deno-kv') return new DenoKvAdapter(await Deno.openKv(':memory:')); + const url = Deno.env.get( + backend === 'redis' ? 'NETSCRIPT_TEST_REDIS_URL' : 'NETSCRIPT_TEST_GARNET_URL', + ); + if (!url) throw new Error(`Missing real ${backend} service`); + return new RedisKvAdapter({ url, namespace }); +} + +export function event(ordinal: number, payload = ''): SagaSSEEvent { + return { type: 'saga:message_received', timestamp: 'now', data: { ordinal, payload } }; +} + +export async function next(iterator: AsyncIterator): Promise { + let timer: ReturnType | undefined; + try { + const result = await Promise.race([ + iterator.next(), + new Promise((_, reject) => { + timer = setTimeout(() => reject(new Error('journal reader stalled')), 5_000); + }), + ]); + if (result.done) throw new Error('journal ended before expected item'); + return result.value; + } finally { + clearTimeout(timer); + } +} + +export function cursor(epoch: string, sequence: number): string { + return `${epoch}:${sequence}`; +} diff --git a/packages/plugin-sagas-core/tests/stores/saga-event-feed_test.ts b/packages/plugin-sagas-core/tests/stores/saga-event-feed_test.ts new file mode 100644 index 0000000000..cc54d20dd3 --- /dev/null +++ b/packages/plugin-sagas-core/tests/stores/saga-event-feed_test.ts @@ -0,0 +1,207 @@ +import { SagaEventFeedError } from '../../src/domain/mod.ts'; +import { assert, assertEquals, assertInstanceOf, assertRejects } from '@std/assert'; +import { spy, stub } from '@std/testing/mock'; +import { KvSagaEventFeed } from '../../src/adapters/mod.ts'; +import { backends, cursor, event, next, storage } from '../fixtures/event-feed-backends.ts'; + +const headKey = ['saga', 'event-feed', 'v1', 'head']; + +for (const backend of backends) { + Deno.test(`event feed ${backend}: concurrent writers, independent readers and stable replay`, async () => { + await using kv = await storage(backend); + const first = new KvSagaEventFeed(kv); + const second = new KvSagaEventFeed(kv); + const fast = first.subscribe(); + const slow = second.subscribe(); + try { + assertEquals(await next(fast), { type: 'ready' }); + assertEquals(await next(slow), { type: 'ready' }); + const written = await Promise.all( + Array.from({ length: 20 }, (_, i) => (i % 2 ? first : second).append(event(i))), + ); + const ordered = [...written].sort((a, b) => + Number(a.id.split(':')[1]) - Number(b.id.split(':')[1]) + ); + assertEquals(new Set(written.map((entry) => entry.id.split(':')[0])).size, 1); + for (const entry of ordered) assertEquals(await next(fast), { type: 'event', ...entry }); + for (const entry of ordered) assertEquals(await next(slow), { type: 'event', ...entry }); + const replay = new KvSagaEventFeed(kv).subscribe({ afterId: ordered[9].id }); + try { + assertEquals(await next(replay), { type: 'ready' }); + for (const entry of ordered.slice(10)) { + assertEquals(await next(replay), { type: 'event', ...entry }); + } + const tail = await second.append(event(99)); + assertEquals(await next(replay), { type: 'event', ...tail }); + } finally { + await replay.return(undefined); + } + } finally { + await fast.return(undefined); + await slow.return(undefined); + } + }); + + Deno.test(`event feed ${backend}: retention is 257 keys and exact replay boundary is valid`, async () => { + await using kv = await storage(backend); + const feed = new KvSagaEventFeed(kv); + let epoch = ''; + for (let i = 1; i <= 300; i++) epoch = (await feed.append(event(i))).id.split(':')[0]; + let count = 0; + for await (const _entry of kv.list({ prefix: ['saga', 'event-feed', 'v1'] })) count++; + assertEquals(count, 257); + const replay = feed.subscribe({ afterId: cursor(epoch, 44) }); + try { + await next(replay); + for (let i = 45; i <= 300; i++) { + const item = await next(replay); + assert(item.type === 'event'); + assertEquals(item.id, cursor(epoch, i)); + assertEquals(item.event.data?.ordinal, i); + } + } finally { + await replay.return(undefined); + } + const lost = feed.subscribe({ afterId: cursor(epoch, 43) }); + const error = await assertRejects(() => lost.next(), SagaEventFeedError); + assertEquals(error.reason, 'history-lost'); + assertEquals(error.oldestId, cursor(epoch, 45)); + assertEquals(error.latestId, cursor(epoch, 300)); + }); + + Deno.test(`event feed ${backend}: invalid, foreign, reset and corrupt cursors fail distinctly`, async () => { + await using kv = await storage(backend); + const feed = new KvSagaEventFeed(kv); + const entry = await feed.append(event(1)); + const epoch = entry.id.split(':')[0]; + for ( + const bad of [ + '1', + cursor(epoch, 2), + cursor(epoch, -1), + `${epoch}:01`, + `${epoch}:1:2`, + `${epoch}:${Number.MAX_SAFE_INTEGER + 1}`, + 'x'.repeat(101), + ] + ) { + const error = await assertRejects( + () => feed.subscribe({ afterId: bad }).next(), + SagaEventFeedError, + ); + assertEquals(error.reason, 'invalid-cursor', bad); + } + const foreign = await assertRejects( + () => feed.subscribe({ afterId: cursor(crypto.randomUUID(), 1) }).next(), + SagaEventFeedError, + ); + assertEquals(foreign.reason, 'history-lost'); + await kv.delete(headKey); + const reset = await assertRejects( + () => feed.subscribe({ afterId: entry.id }).next(), + SagaEventFeedError, + ); + assertEquals(reset.reason, 'history-lost'); + const recreated = await feed.append(event(2)); + assert(recreated.id.split(':')[0] !== epoch); + await kv.set(headKey, { format: 1, epoch, sequence: 'corrupt' }); + const corrupt = await assertRejects(() => feed.append(event(3)), SagaEventFeedError); + assertEquals(corrupt.reason, 'unavailable'); + await kv.set(headKey, { format: 1, epoch, sequence: Number.MAX_SAFE_INTEGER }); + assertEquals( + (await assertRejects(() => feed.append(event(3)), SagaEventFeedError)).reason, + 'unavailable', + ); + }); + + Deno.test(`event feed ${backend}: detached events and large per-record values`, async () => { + await using kv = await storage(backend); + const feed = new KvSagaEventFeed(kv); + const payload = { ordinal: 1 }; + const first = await feed.append({ ...event(1), data: payload }); + payload.ordinal = 999; + const returned = first.event.data; + if (returned) Reflect.set(returned, 'ordinal', 888); + for (let i = 2; i <= 12; i++) await feed.append(event(i, 'x'.repeat(16_384))); + const replay = feed.subscribe({ afterId: cursor(first.id.split(':')[0], 0) }); + try { + await next(replay); + const original = await next(replay); + assert(original.type === 'event'); + assertEquals(original.event.data?.ordinal, 1); + for (let i = 2; i <= 12; i++) { + const item = await next(replay); + assert(item.type === 'event'); + assertEquals(item.event.data?.payload, 'x'.repeat(16_384)); + } + } finally { + await replay.return(undefined); + } + }); +} + +Deno.test('event feed only retries explicit CAS conflicts, never ambiguous native failure', async () => { + await using kv = await storage('memory'); + const feed = new KvSagaEventFeed(kv); + { + using busy = stub(kv, 'atomic', () => Promise.resolve({ ok: false, versionstamp: null })); + assertEquals( + (await assertRejects(() => feed.append(event(1)), SagaEventFeedError)).reason, + 'unavailable', + ); + assertEquals(busy.calls.length, 64); + } + const cause = new Error('unknown commit outcome'); + using failed = stub(kv, 'atomic', () => Promise.reject(cause)); + const error = await assertRejects(() => feed.append(event(2)), SagaEventFeedError); + assertInstanceOf(error, SagaEventFeedError); + assertEquals(error.cause, cause); + assertEquals(failed.calls.length, 1); +}); + +Deno.test('append abort abandons backend IO without closing host KV or retrying', async () => { + await using kv = await storage('memory'); + const controller = new AbortController(); + const pending = Promise.withResolvers(); + using commits = stub(kv, 'atomic', () => pending.promise); + using closes = spy(kv, 'close'); + const operation = new KvSagaEventFeed(kv).append(event(1), { signal: controller.signal }); + while (commits.calls.length === 0) await Promise.resolve(); + controller.abort(new Error('stop waiting')); + await assertRejects(() => operation, Error, 'stop waiting'); + assertEquals(commits.calls.length, 1); + assertEquals(closes.calls.length, 0); + pending.reject(new Error('late native failure')); +}); + +for (const backend of backends.filter((name) => name === 'redis' || name === 'garnet')) { + Deno.test(`event feed ${backend}: independent native clients share commit order and fanout`, async () => { + const namespace = `saga-multi-client-${crypto.randomUUID()}`; + await using firstKv = await storage(backend, namespace); + await using secondKv = await storage(backend, namespace); + const first = new KvSagaEventFeed(firstKv); + const second = new KvSagaEventFeed(secondKv); + const firstReader = first.subscribe(); + const secondReader = second.subscribe(); + try { + await next(firstReader); + await next(secondReader); + const written = await Promise.all( + Array.from({ length: 32 }, (_, i) => (i % 2 ? first : second).append(event(i))), + ); + const ordered = [...written].sort((a, b) => + Number(a.id.split(':')[1]) - Number(b.id.split(':')[1]) + ); + assertEquals(new Set(ordered.map((entry) => entry.id)).size, 32); + assertEquals(new Set(ordered.map((entry) => entry.id.split(':')[0])).size, 1); + for (const [i, entry] of ordered.entries()) { + assertEquals(Number(entry.id.split(':')[1]), i + 1); + assertEquals(await next(firstReader), { type: 'event', ...entry }); + assertEquals(await next(secondReader), { type: 'event', ...entry }); + } + } finally { + await firstReader.return(undefined); + await secondReader.return(undefined); + } + }); +} diff --git a/packages/plugin-sagas-core/tests/stores/saga-event-subscription_test.ts b/packages/plugin-sagas-core/tests/stores/saga-event-subscription_test.ts new file mode 100644 index 0000000000..361f05359d --- /dev/null +++ b/packages/plugin-sagas-core/tests/stores/saga-event-subscription_test.ts @@ -0,0 +1,305 @@ +import { SagaEventFeedError } from '../../src/domain/mod.ts'; +import { assert, assertEquals, assertRejects } from '@std/assert'; +import { delay } from '@std/async'; +import { spy, stub } from '@std/testing/mock'; +import type { KvEntry, WatchEvent, WatchStream } from '@netscript/kv'; +import { KvSagaEventFeed } from '../../src/adapters/mod.ts'; +import { backends, cursor, event, next, storage } from '../fixtures/event-feed-backends.ts'; + +const headKey = ['saga', 'event-feed', 'v1', 'head']; + +for (const backend of backends) { + Deno.test(`event subscription ${backend}: idle watches one fixed key, never scans`, async () => { + await using kv = await storage(backend); + using listing = spy(kv, 'list'); + using prefix = spy(kv, 'watchPrefix'); + using watches = spy(kv, 'watch'); + const reader = new KvSagaEventFeed(kv).subscribe(); + try { + assertEquals(await next(reader), { type: 'ready' }); + await delay(200); + assertEquals(listing.calls.length, 0); + assertEquals(prefix.calls.length, 0); + assertEquals(watches.calls.length, 1); + assertEquals(watches.calls[0].args[0], [headKey]); + assertEquals(watches.calls[0].args[1]?.initial, true); + } finally { + await reader.return(undefined); + } + }); + + Deno.test(`event subscription ${backend}: a slow reader gets an explicit gap`, async () => { + await using kv = await storage(backend); + const feed = new KvSagaEventFeed(kv); + const reader = feed.subscribe(); + try { + await next(reader); + for (let i = 1; i <= 257; i++) await feed.append(event(i)); + const error = await assertRejects(() => next(reader), SagaEventFeedError); + assertEquals(error.reason, 'history-lost'); + assert(error.oldestId?.endsWith(':2')); + } finally { + await reader.return(undefined); + } + }); + + Deno.test(`event subscription ${backend}: returning one reader preserves another and host KV`, async () => { + await using kv = await storage(backend); + using closes = spy(kv, 'close'); + const feed = new KvSagaEventFeed(kv); + const first = feed.subscribe(); + const second = feed.subscribe(); + try { + await next(first); + await next(second); + await first.return(undefined); + const entry = await feed.append(event(1)); + assertEquals(await next(second), { type: 'event', ...entry }); + assertEquals(closes.calls.length, 0); + } finally { + await second.return(undefined); + } + }); + + Deno.test(`event subscription ${backend}: aborting a blocked next releases owned watch`, async () => { + await using kv = await storage(backend); + const controller = new AbortController(); + const reader = new KvSagaEventFeed(kv).subscribe({ signal: controller.signal }); + await next(reader); + const pending = reader.next(); + controller.abort(new Error('reader cancelled')); + await assertRejects(() => pending, Error, 'reader cancelled'); + await kv.set(['host', 'still-open'], true); + assertEquals((await kv.get(['host', 'still-open']))?.value, true); + }); +} + +Deno.test('subscribe-first barrier retains writes racing the initial head reread', async () => { + await using kv = await storage('memory'); + const feed = new KvSagaEventFeed(kv); + const get = kv.get.bind(kv); + let reads = 0; + using reading = stub( + kv, + 'get', + async (key: Parameters[0]): Promise | null> => { + const entry = await get(key); + // Memory's native initial watch snapshot reads first, feed's reread second. + if (++reads === 2) await feed.append(event(1)); + return entry; + }, + ); + const reader = feed.subscribe(); + try { + assertEquals(await next(reader), { type: 'ready' }); + const item = await next(reader); + assert(item.type === 'event'); + assertEquals(item.event.data?.ordinal, 1); + assert(reading.calls.length >= 3); + } finally { + await reader.return(undefined); + } +}); + +Deno.test('coalesced/duplicate native notifications do not duplicate records or stall slow yields', async () => { + await using kv = await storage('memory'); + const watch = kv.watch.bind(kv); + let batches = 0; + using duplicate = stub( + kv, + 'watch', + ( + keys: Parameters[0], + options?: Parameters[1], + ): WatchStream => ({ + // A third-party handle with no ready property must use its first snapshot. + async *[Symbol.asyncIterator]() { + for await (const batch of watch(keys, options)) { + batches++; + yield batch; + yield batch; + } + }, + }), + ); + const feed = new KvSagaEventFeed(kv); + const reader = feed.subscribe(); + try { + await next(reader); + const one = await feed.append(event(1)); + assertEquals(await next(reader), { type: 'event', ...one }); + const entries = []; + for (let i = 2; i <= 5; i++) entries.push(await feed.append(event(i))); + for (const entry of entries) assertEquals(await next(reader), { type: 'event', ...entry }); + assert(batches >= 2, 'the pump must drain native notifications while consumer is paused'); + assertEquals(duplicate.calls.length, 1); + } finally { + await reader.return(undefined); + } +}); + +for (const termination of ['end', 'error'] as const) { + Deno.test(`unexpected native watch ${termination} is a structured unavailable failure`, async () => { + await using kv = await storage('memory'); + const cause = new Error('watch failed'); + const watch = kv.watch.bind(kv); + using ended = stub( + kv, + 'watch', + ( + keys: Parameters[0], + options?: Parameters[1], + ): WatchStream => ({ + async *[Symbol.asyncIterator](): AsyncGenerator[]> { + for await (const batch of watch(keys, options)) { + yield batch; + if (termination === 'error') throw cause; + return; + } + }, + }), + ); + const reader = new KvSagaEventFeed(kv).subscribe(); + try { + // Failure can race the initial ready item; neither path may hang or reset live. + const first = await reader.next(); + assertEquals(first.value, { type: 'ready' }); + await assertRejects(() => reader.next(), SagaEventFeedError); + } catch (error) { + assert(error instanceof SagaEventFeedError); + assertEquals(error.reason, 'unavailable'); + if (termination === 'error') assertEquals(error.cause, cause); + } finally { + await reader.return(undefined); + } + assertEquals(ended.calls.length, 1); + }); +} + +Deno.test('missing and concurrently overwritten slots never produce incomplete replay', async () => { + await using kv = await storage('deno-kv'); + const feed = new KvSagaEventFeed(kv); + const one = await feed.append(event(1)); + await feed.append(event(2)); + await kv.delete(['saga', 'event-feed', 'v1', 'slot', 1]); + const missing = feed.subscribe({ afterId: one.id }); + await next(missing); + assertEquals( + (await assertRejects(() => next(missing), SagaEventFeedError)).reason, + 'history-lost', + ); + await feed.append(event(3)); + const getMany = kv.getMany!.bind(kv); + using overwritten = stub( + Object.assign(kv, { getMany }), + 'getMany', + async (keys: Parameters[0]): Promise<(KvEntry | null)[]> => { + for (let i = 4; i <= 260; i++) await feed.append(event(i)); + return await getMany(keys); + }, + ); + const reader = feed.subscribe({ afterId: cursor(one.id.split(':')[0], 2) }); + await next(reader); + assertEquals( + (await assertRejects(() => next(reader), SagaEventFeedError)).reason, + 'history-lost', + ); + assertEquals(overwritten.calls.length, 1); +}); + +Deno.test('abort during readiness and head IO releases watch without closing shared KV', async () => { + for (const boundary of ['ready', 'head']) { + await using kv = await storage('memory'); + const watch = kv.watch.bind(kv); + const get = kv.get.bind(kv); + const entered = Promise.withResolvers(); + const blocked = Promise.withResolvers(); + using watching = stub( + kv, + 'watch', + ( + keys: Parameters[0], + options?: Parameters[1], + ): WatchStream => { + const native = watch(keys, options); + if (boundary === 'ready') { + entered.resolve(); + return { + [Symbol.asyncIterator]: () => native[Symbol.asyncIterator](), + ready: blocked.promise, + }; + } + return native; + }, + ); + let reads = 0; + using reading = stub( + kv, + 'get', + (key: Parameters[0]): Promise | null> => { + if (boundary === 'head' && ++reads === 2) { + entered.resolve(); + return blocked.promise; + } + return get(key); + }, + ); + const controller = new AbortController(); + const reader = new KvSagaEventFeed(kv).subscribe({ signal: controller.signal }); + const pending = reader.next(); + await entered.promise; + controller.abort(new Error('stop subscription')); + await assertRejects(() => pending, Error, 'stop subscription'); + blocked.reject(new Error('late IO')); + assertEquals(watching.calls.length, 1); + assert(reading.calls.length >= 1); + } +}); + +Deno.test('watch failure after readiness wakes an idle reader instead of silently hanging', async () => { + await using kv = await storage('memory'); + const watch = kv.watch.bind(kv); + const end = Promise.withResolvers(); + using ended = stub( + kv, + 'watch', + ( + keys: Parameters[0], + options?: Parameters[1], + ): WatchStream => ({ + async *[Symbol.asyncIterator]() { + for await (const batch of watch(keys, options)) { + yield batch; + await end.promise; + throw new Error('subscriber terminated'); + } + }, + }), + ); + const reader = new KvSagaEventFeed(kv).subscribe(); + try { + await next(reader); + const blocked = next(reader); + end.resolve(); + const failure = await assertRejects(() => blocked, SagaEventFeedError); + assertEquals(failure.reason, 'unavailable'); + assertEquals(ended.calls.length, 1); + } finally { + end.resolve(); + await reader.return(undefined); + } +}); + +Deno.test('unsupported custom KV capabilities fail explicitly', async () => { + await using kv = await storage('memory'); + Reflect.set(kv, 'atomic', undefined); + const feed = new KvSagaEventFeed(kv); + assertEquals( + (await assertRejects(() => feed.append(event(1)), SagaEventFeedError)).reason, + 'unavailable', + ); + assertEquals( + (await assertRejects(() => feed.subscribe().next(), SagaEventFeedError)).reason, + 'unavailable', + ); +}); diff --git a/plugins/sagas/README.md b/plugins/sagas/README.md index f86c872331..968bc59ac3 100644 --- a/plugins/sagas/README.md +++ b/plugins/sagas/README.md @@ -435,3 +435,31 @@ runtime backfill or parallel query path is added. PostgreSQL rejects non-canonic column values with `saga_instances_status_check`. When the core lifecycle vocabulary changes, ship a new immutable migration to update that constraint; never edit an already-installed SQL contribution. + +## Replaying API event notifications + +`GET /api/v1/sagas/subscribe` delivers API publish notifications from a KV journal. Each active +client has its own cursor and receives matching events in successful publish-commit order. Readers +do not consume or delete each other's history. The connected heartbeat has no id; data events carry +stable `epoch:sequence` ids. Connections without `Last-Event-ID` start live after readiness; send the +last data id in that header to replay later retained events and then continue live. + +The journal retains the latest 256 events globally, using at most 257 keys (256 event slots and a +head), without a time-based expiry. The existing `sagaName` filter applies after advancing through +that shared history. Idle subscriptions watch the fixed head key and do not scan the keyspace. +A reader overtaken by retention receives a native oRPC SSE error frame with `CONFLICT` and +`data.reason: 'history-lost'`, including history bounds when available. Fetch a fresh application +snapshot, clear the saved cursor and reconnect. Malformed/future ids produce `BAD_REQUEST`; +backend or corrupt-history failures produce `SERVICE_UNAVAILABLE`. Streaming headers may already +be HTTP 200, so clients must handle the terminal error frame as well as network failures. + +This is an observation feed for API publications, with the existing `saga:message_received` default +writer. It does not add runtime lifecycle publishers. Runtime acceptance and journal append are +separate commits: a failed or cancelled response can follow successful acceptance, and an uncertain +retry may append another notification. Use runtime idempotency keys and deduplicate replay by event +id. History survives API restarts when the configured KV survives; retention and restart durability +follow the KV backend. Cancellation releases the reader and leaves the host-owned KV open. + +Upgrade by draining old API instances and clearing legacy numeric cursors. The new versioned +journal does not read or extend old random event keys; legacy history is not migrated. Its key bound +excludes legacy keys, which can be removed separately through the host's KV maintenance path. diff --git a/plugins/sagas/services/src/routers/v1-handlers.ts b/plugins/sagas/services/src/routers/v1-handlers.ts index e2ac4d32ab..17c8407ce8 100644 --- a/plugins/sagas/services/src/routers/v1-handlers.ts +++ b/plugins/sagas/services/src/routers/v1-handlers.ts @@ -1,11 +1,12 @@ -import { withEventMeta } from '@orpc/server'; +import { ORPCError, withEventMeta } from '@orpc/server'; +import { abortable } from '@std/async'; +import { KvSagaEventFeed } from '@netscript/plugin-sagas-core/adapters'; import type { PluginCapabilities } from '@netscript/plugin/contract-base'; -import type { SagaSSEEvent } from '@netscript/plugin-sagas-core/contracts/v1'; import { getKv } from '@netscript/kv'; import { notFound } from '@netscript/contracts'; import { getTraceContext } from '@netscript/telemetry/context'; import { getSagaMetadata, listSagaMetadata } from '../saga-registry.ts'; -import { SagasError } from '@netscript/plugin-sagas-core/domain'; +import { SagaEventFeedError, SagasError } from '@netscript/plugin-sagas-core/domain'; import { router, type SagasHandlers } from './router-context.ts'; import { buildSagaInstanceWhere, @@ -156,58 +157,44 @@ export const sagasV1: SagasHandlers = { }), /** Publish a message to trigger saga state transitions. */ - publish: router.publish.handler(async ({ input, context }) => { + publish: router.publish.handler(async ({ input, context, signal }) => { const traceContext = getTraceContext(); return await publishSagaMessage(input, { runtime: contextSagaRuntime(context), traceHeaders: traceContextToHeaders(traceContext), timeoutMs: context.publishTimeoutMs, + signal, }); }), /** Subscribe to real-time saga state updates over SSE. */ - subscribe: router.subscribe.handler(async function* ({ input, signal }) { - const sagaNameFilter = input?.sagaName; - const kv = await getKv(); - let lastHeartbeat = Date.now(); - let eventId = 0; - - yield withEventMeta( - { - type: 'heartbeat' as const, - timestamp: new Date().toISOString(), - data: { connected: true }, - } as SagaSSEEvent, - { id: String(++eventId), retry: 5000 }, - ); - - const eventStream = kv.watchPrefix(['saga', 'events'], { - signal, - pollInterval: 100, - }); - - for await (const watchEvent of eventStream) { - if (signal?.aborted) break; - if (watchEvent.type === 'delete' || !watchEvent.value) continue; - - const event = watchEvent.value; - if (sagaNameFilter && event.sagaName !== sagaNameFilter) continue; - - yield withEventMeta(event, { id: String(++eventId), retry: 5000 }); - await kv.delete(watchEvent.key); - - const now = Date.now(); - if (now - lastHeartbeat > 30000) { - yield withEventMeta( - { + subscribe: router.subscribe.handler(async function* ({ input, signal, lastEventId }) { + try { + const kv = await getKv(); + const feed = new KvSagaEventFeed(kv); + for await (const item of feed.subscribe({ afterId: lastEventId, signal })) { + if (item.type === 'ready') { + yield withEventMeta({ type: 'heartbeat' as const, timestamp: new Date().toISOString(), data: { connected: true }, - } as SagaSSEEvent, - { id: String(++eventId), retry: 5000 }, - ); - lastHeartbeat = now; + }, { retry: 5000 }); + } else if (!input?.sagaName || item.event.sagaName === input.sagaName) { + yield withEventMeta(item.event, { id: item.id, retry: 5000 }); + } } + } catch (error) { + if (!(error instanceof SagaEventFeedError)) throw error; + const code = error.reason === 'invalid-cursor' + ? 'BAD_REQUEST' + : error.reason === 'history-lost' + ? 'CONFLICT' + : 'SERVICE_UNAVAILABLE'; + throw new ORPCError(code, { + message: error.message, + cause: error, + data: { reason: error.reason, oldestId: error.oldestId, latestId: error.latestId }, + }); } }), @@ -251,6 +238,7 @@ export async function publishSagaMessage( tracestate: options.traceHeaders?.tracestate, }); + options.signal?.throwIfAborted(); await publishWithinDeadline( options.runtime.publish(message, { idempotencyKey, @@ -258,6 +246,7 @@ export async function publishSagaMessage( tracestate: message.tracestate, }), options.timeoutMs ?? DEFAULT_SAGA_PUBLISH_TIMEOUT_MS, + options.signal, ); const event: SagaPublishEvent = { @@ -266,7 +255,11 @@ export async function publishSagaMessage( correlationId, data: { messageType: type, correlationId, payload, headers: options.traceHeaders ?? {} }, }; - await (options.writeEvent ?? writeSagaPublishEvent)(event); + options.signal?.throwIfAborted(); + const write = options.writeEvent + ? options.writeEvent(event) + : writeSagaPublishEvent(event, options.signal); + await (options.signal ? abortable(write, options.signal) : write); return { published: true, @@ -275,7 +268,11 @@ export async function publishSagaMessage( }; } -async function publishWithinDeadline(publish: Promise, timeoutMs: number): Promise { +async function publishWithinDeadline( + publish: Promise, + timeoutMs: number, + signal?: AbortSignal, +): Promise { if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) { throw SagasError.validationFailed('Saga publish timeout must be a positive number.'); } @@ -287,7 +284,8 @@ async function publishWithinDeadline(publish: Promise, timeoutMs: numbe ); }); try { - await Promise.race([publish, timeout]); + const pending = Promise.race([publish, timeout]); + await (signal ? abortable(pending, signal) : pending); } finally { if (timer !== undefined) { clearTimeout(timer); @@ -302,9 +300,9 @@ function contextSagaRuntime(context: SagaServiceContext) { throw SagasError.validationFailed('Sagas API publish requires a started saga runtime.'); } -async function writeSagaPublishEvent(event: SagaPublishEvent): Promise { +async function writeSagaPublishEvent(event: SagaPublishEvent, signal?: AbortSignal): Promise { const kv = await getKv(); - await kv.set(['saga', 'events', crypto.randomUUID()], event); + await new KvSagaEventFeed(kv).append(event, { signal }); } function traceContextToHeaders( diff --git a/plugins/sagas/services/src/routers/v1-types.ts b/plugins/sagas/services/src/routers/v1-types.ts index e39873fba9..37d0341d88 100644 --- a/plugins/sagas/services/src/routers/v1-types.ts +++ b/plugins/sagas/services/src/routers/v1-types.ts @@ -79,6 +79,8 @@ export type SagaPublishEventWriter = ( /** Options used when publishing one contract message through the saga runtime. */ export type PublishSagaMessageOptions = Readonly<{ + /** Request cancellation limits waiting; accepted runtime work is not rolled back. */ + signal?: AbortSignal; /** Started runtime used to route the message. */ runtime: SagaServiceRuntime; /** Optional event writer used by tests or alternate transports. */ diff --git a/plugins/sagas/tests/services/event-feed-http_test.ts b/plugins/sagas/tests/services/event-feed-http_test.ts new file mode 100644 index 0000000000..ee8fa5ad39 --- /dev/null +++ b/plugins/sagas/tests/services/event-feed-http_test.ts @@ -0,0 +1,369 @@ +import { assert, assertEquals, assertNotEquals } from '@std/assert'; +import { delay } from '@std/async'; +import { spy } from '@std/testing/mock'; +import '@netscript/kv/redis'; +import { KvSagaEventFeed } from '@netscript/plugin-sagas-core/adapters'; +import { closeKv, getKv, getRawKv } from '@netscript/kv'; +import { createPluginService } from '@netscript/plugin/service'; +import { type SagaSSEEvent, SagaSSEEventSchema } from '@netscript/plugin-sagas-core/contracts/v1'; +import { router } from '../../services/src/router.ts'; +import type { SagaServiceDatabaseClient } from '../../services/src/routers/v1-types.ts'; + +const db: SagaServiceDatabaseClient = { + sagaInstance: { + findFirst: () => Promise.resolve(null), + findMany: () => Promise.resolve([]), + count: () => Promise.resolve(0), + }, + sagaExecutionHistory: { + findMany: () => Promise.resolve([]), + count: () => Promise.resolve(0), + }, +}; + +function application() { + return createPluginService(router, { + name: 'saga-event-feed-test', + auth: { public: true, reason: 'Exercise the native saga SSE contract in an isolated fixture' }, + context: () => ({ db, sagaRuntime: { publish: () => Promise.resolve() } }), + }).build(); +} + +type App = ReturnType; +type Frame = { readonly id?: string; readonly event: SagaSSEEvent }; +type RawFrame = { readonly id?: string; readonly eventName?: string; readonly data: unknown }; + +class Connection { + private buffer = ''; + private readonly decoder = new TextDecoder(); + private readonly reader: ReadableStreamDefaultReader; + private constructor(response: Response, private readonly lifetime: AbortController) { + assert(response.body); + this.reader = response.body.getReader(); + } + + static async open(app: App, lastEventId?: string, query = ''): Promise { + const lifetime = new AbortController(); + const response = await app.request(`/api/v1/sagas/subscribe${query}`, { + signal: lifetime.signal, + headers: lastEventId === undefined ? {} : { 'Last-Event-ID': lastEventId }, + }); + assertEquals(response.status, 200); + return new Connection(response, lifetime); + } + + async raw(): Promise { + for (;;) { + const end = this.buffer.indexOf('\n\n'); + if (end >= 0) { + const text = this.buffer.slice(0, end); + this.buffer = this.buffer.slice(end + 2); + const fields = text.split('\n'); + const data = fields.filter((line) => line.startsWith('data: ')) + .map((line) => line.slice(6)).join('\n'); + if (!data) continue; + const decoded: unknown = JSON.parse(data); + return { + id: fields.find((line) => line.startsWith('id: '))?.slice(4), + eventName: fields.find((line) => line.startsWith('event: '))?.slice(7), + data: decoded, + }; + } + const chunk = await this.reader.read(); + assertEquals(chunk.done, false, 'SSE ended before the expected event.'); + this.buffer += this.decoder.decode(chunk.value, { stream: true }).replaceAll('\r\n', '\n'); + } + } + + async next(): Promise { + const frame = await this.raw(); + assert(frame.eventName !== 'error', JSON.stringify(frame.data)); + return { id: frame.id, event: SagaSSEEventSchema.parse(frame.data) }; + } + + async message(): Promise { + for (;;) { + const frame = await this.next(); + if (frame.event.type !== 'heartbeat') return frame; + } + } + + async close(): Promise { + this.lifetime.abort(); + await this.reader.cancel(); + } +} + +async function bounded(promise: Promise): Promise { + let timer: ReturnType | undefined; + try { + return await Promise.race([ + promise, + new Promise((_resolve, reject) => { + timer = setTimeout( + () => reject(new Error('Expected retained SSE event did not arrive.')), + 5_000, + ); + }), + ]); + } finally { + clearTimeout(timer); + } +} + +async function publish(app: App, ordinal: number): Promise { + const response = await app.request('/api/v1/sagas/publish', { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify({ type: 'feed.probe', payload: { ordinal } }), + }); + assertEquals(response.status, 200, await response.text()); +} + +function ordinal(frame: Frame): unknown { + const payload = frame.event.data?.payload; + return payload && typeof payload === 'object' ? Reflect.get(payload, 'ordinal') : undefined; +} + +async function withStorage(run: (app: App) => Promise, backend = 'deno-kv'): Promise { + if (backend !== 'deno-kv') { + await getKv({ + provider: 'redis', + skipServiceDiscovery: true, + redisUrl: Deno.env.get( + backend === 'redis' ? 'NETSCRIPT_TEST_REDIS_URL' : 'NETSCRIPT_TEST_GARNET_URL', + ), + redisNamespace: `saga-http-${crypto.randomUUID()}`, + }); + } else await getKv({ provider: 'deno-kv', path: ':memory:', skipServiceDiscovery: true }); + try { + await run(application()); + } finally { + await closeKv(); + } +} + +Deno.test('two HTTP SSE clients both receive all events when one reader pauses consumption', () => + withStorage(async (app) => { + const fast = await Connection.open(app); + const slow = await Connection.open(app); + try { + const ready = await bounded(fast.next()); + assertEquals(ready.event.type, 'heartbeat'); + assertEquals(ready.id, undefined); + const ids: (string | undefined)[] = []; + assertEquals((await bounded(slow.next())).event.type, 'heartbeat'); + for (let index = 1; index <= 6; index++) { + await publish(app, index); + const item = await bounded(fast.message()); + assertEquals(ordinal(item), index); + ids.push(item.id); + } + const received: unknown[] = []; + for (let index = 1; index <= 6; index++) { + const item = await bounded(slow.message()); + received.push(ordinal(item)); + assertEquals(item.id, ids[index - 1]); + } + assertEquals(received, [1, 2, 3, 4, 5, 6]); + } finally { + await fast.close(); + await slow.close(); + } + })); + +Deno.test('HTTP Last-Event-ID replays missed events even after another reader consumed them', () => + withStorage(async (app) => { + const resident = await Connection.open(app); + const original = await Connection.open(app); + let resumed: Connection | undefined; + try { + await bounded(resident.next()); + await bounded(original.next()); + await publish(app, 1); + const first = await bounded(original.message()); + assertEquals(ordinal(await bounded(resident.message())), 1); + assert(first.id); + await original.close(); + for (const index of [2, 3]) { + await publish(app, index); + assertEquals(ordinal(await bounded(resident.message())), index); + } + resumed = await Connection.open(app, first.id); + assertEquals((await bounded(resumed.next())).event.type, 'heartbeat'); + const second = await bounded(resumed.message()); + const third = await bounded(resumed.message()); + assertEquals([ordinal(second), ordinal(third)], [2, 3]); + assertNotEquals(second.id, first.id, 'A reconnect reused a per-connection counter id.'); + assertNotEquals(third.id, second.id); + } finally { + await resident.close(); + await original.close(); + await resumed?.close(); + } + })); + +Deno.test('an idle HTTP SSE connection performs zero keyspace list scans', () => + withStorage(async (app) => { + const raw = await getRawKv(); + using listing = spy(raw, 'list'); + const connection = await Connection.open(app); + try { + await bounded(connection.next()); + await delay(350); + assertEquals(listing.calls.length, 0, 'Idle SSE is periodically enumerating the keyspace.'); + } finally { + await connection.close(); + } + })); + +Deno.test('HTTP event publication retains at most 256 events plus one fixed journal head', () => + withStorage(async (app) => { + for (let index = 0; index < 300; index++) await publish(app, index); + const kv = await getKv(); + let stored = 0; + for await (const _entry of kv.list({ prefix: ['saga'] })) stored++; + assert(stored > 0, 'The retained event history must survive without active readers.'); + assert(stored <= 257, `Unbounded event history retained ${stored} keys.`); + })); + +Deno.test('native HTTP replay errors distinguish malformed/future ids from expired/foreign/reset history', () => + withStorage(async (app) => { + const kv = await getKv(); + const feed = new KvSagaEventFeed(kv); + const one = await feed.append({ type: 'saga:started', timestamp: new Date().toISOString() }); + const epoch = one.id.split(':')[0]; + for (let i = 2; i <= 258; i++) { + await feed.append({ type: 'saga:started', timestamp: new Date().toISOString() }); + } + for ( + const [afterId, code, status, reason] of [ + ['bad-cursor', 'BAD_REQUEST', 400, 'invalid-cursor'], + [`${epoch}:999`, 'BAD_REQUEST', 400, 'invalid-cursor'], + [one.id, 'CONFLICT', 409, 'history-lost'], + [`${crypto.randomUUID()}:1`, 'CONFLICT', 409, 'history-lost'], + ] as const + ) { + const connection = await Connection.open(app, afterId); + try { + await assertErrorFrame(connection, code, status, reason); + } finally { + await connection.close(); + } + } + await kv.delete(['saga', 'event-feed', 'v1', 'head']); + const reset = await Connection.open(app, `${epoch}:258`); + try { + await assertErrorFrame(reset, 'CONFLICT', 409, 'history-lost'); + } finally { + await reset.close(); + } + })); + +Deno.test('HTTP backend failure is an explicit native unavailable frame', () => + withStorage(async (app) => { + const kv = await getKv(); + await kv.set(['saga', 'event-feed', 'v1', 'head'], { format: 99 }); + const connection = await Connection.open(app); + try { + await assertErrorFrame(connection, 'SERVICE_UNAVAILABLE', 503, 'unavailable'); + } finally { + await connection.close(); + } + })); + +Deno.test('HTTP sagaName filtering advances the global cursor and retains stable replay ids', () => + withStorage(async (app) => { + const connection = await Connection.open(app, undefined, '?sagaName=orders'); + let replay: Connection | undefined; + try { + assertEquals((await bounded(connection.next())).id, undefined); + const feed = new KvSagaEventFeed(await getKv()); + await feed.append({ + type: 'saga:started', + timestamp: new Date().toISOString(), + sagaName: 'other', + }); + const matching = await feed.append({ + type: 'saga:started', + timestamp: new Date().toISOString(), + sagaName: 'orders', + }); + const frame = await bounded(connection.message()); + assertEquals(frame.id, matching.id); + await connection.close(); + await feed.append({ + type: 'saga:completed', + timestamp: new Date().toISOString(), + sagaName: 'other', + }); + const tail = await feed.append({ + type: 'saga:completed', + timestamp: new Date().toISOString(), + sagaName: 'orders', + }); + replay = await Connection.open(app, matching.id, '?sagaName=orders'); + assertEquals((await bounded(replay.next())).id, undefined); + assertEquals((await bounded(replay.message())).id, tail.id); + } finally { + await connection.close(); + await replay?.close(); + } + })); + +for (const backend of ['redis', 'garnet']) { + if ( + !Deno.env.get(backend === 'redis' ? 'NETSCRIPT_TEST_REDIS_URL' : 'NETSCRIPT_TEST_GARNET_URL') + ) continue; + Deno.test(`real HTTP ${backend}: ordered fanout and native Last-Event-ID replay`, () => + withStorage(async (app) => { + const first = await Connection.open(app); + const slow = await Connection.open(app); + let resumed: Connection | undefined; + try { + await bounded(first.next()); + await bounded(slow.next()); + const ids: string[] = []; + for (let i = 1; i <= 8; i++) { + await publish(app, i); + const frame = await bounded(first.message()); + assertEquals(ordinal(frame), i); + assert(frame.id); + ids.push(frame.id); + } + for (let i = 1; i <= 8; i++) { + const frame = await bounded(slow.message()); + assertEquals(ordinal(frame), i); + assertEquals(frame.id, ids[i - 1]); + } + await first.close(); + resumed = await Connection.open(app, ids[3]); + assertEquals((await bounded(resumed.next())).id, undefined); + for (const id of ids.slice(4)) assertEquals((await bounded(resumed.message())).id, id); + } finally { + await first.close(); + await slow.close(); + await resumed?.close(); + } + }, backend)); +} + +async function assertErrorFrame( + connection: Connection, + code: string, + status: number, + reason: string, +): Promise { + const frame = await bounded(connection.raw()); + assertEquals(frame.eventName, 'error'); + assertEquals(frame.id, undefined); + assert(frame.data && typeof frame.data === 'object'); + assertEquals(Reflect.get(frame.data, 'code'), code); + assertEquals(Reflect.get(frame.data, 'status'), status); + const data: unknown = Reflect.get(frame.data, 'data'); + assert(data && typeof data === 'object'); + assertEquals(Reflect.get(data, 'reason'), reason); + if (reason === 'history-lost' && Reflect.get(data, 'latestId')) { + assert(typeof Reflect.get(data, 'oldestId') === 'string'); + } +} diff --git a/plugins/sagas/tests/services/publish-message_test.ts b/plugins/sagas/tests/services/publish-message_test.ts index ba72be439f..3588e63b2d 100644 --- a/plugins/sagas/tests/services/publish-message_test.ts +++ b/plugins/sagas/tests/services/publish-message_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from 'jsr:@std/assert@^1'; +import { assertEquals, assertRejects } from 'jsr:@std/assert@^1'; import { type PublishMessageInput, PublishMessageInputSchema } from '../../contracts/v1/mod.ts'; import { publishSagaMessage } from '../../services/src/routers/v1-handlers.ts'; @@ -88,3 +88,53 @@ class RecordingRuntime { return Promise.resolve(this.#result); } } + +Deno.test('publish cancellation before runtime acceptance prevents both runtime and event writes', async () => { + const controller = new AbortController(); + controller.abort(new Error('cancel publish')); + let calls = 0; + await assertRejects( + () => + publishSagaMessage({ type: 'probe' }, { + runtime: { + publish: () => { + calls++; + return Promise.resolve(); + }, + }, + writeEvent: () => { + calls++; + return Promise.resolve(); + }, + signal: controller.signal, + }), + Error, + 'cancel publish', + ); + assertEquals(calls, 0); +}); + +Deno.test('publish cancellation abandons an injected writer after runtime acceptance', async () => { + const controller = new AbortController(); + const entered = Promise.withResolvers(); + const pending = Promise.withResolvers(); + let accepted = false; + const operation = publishSagaMessage({ type: 'probe' }, { + runtime: { + publish: () => { + accepted = true; + return Promise.resolve(); + }, + }, + writeEvent: () => { + entered.resolve(); + return pending.promise; + }, + signal: controller.signal, + }); + await entered.promise; + controller.abort(new Error('stop event wait')); + await assertRejects(() => operation, Error, 'stop event wait'); + assertEquals(accepted, true); + pending.reject(new Error('late native writer failure')); +}); diff --git a/resources/examples/expo-streams/deno.lock b/resources/examples/expo-streams/deno.lock index 026b52bdcd..6370139893 100644 --- a/resources/examples/expo-streams/deno.lock +++ b/resources/examples/expo-streams/deno.lock @@ -462,7 +462,8 @@ "jsr:@netscript/plugin-workers-core@0.0.9", "jsr:@netscript/service@0.0.9", "jsr:@netscript/telemetry@0.0.9", - "jsr:@std/assert@1" + "jsr:@std/assert@1", + "jsr:@std/async@1" ] }, "jsr:@netscript/plugin-sagas@0.0.9": {