From 7e46da9f22828aad1707e4a3ecc83c2979d83177 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 25 Feb 2026 19:11:31 -0800 Subject: [PATCH] revise plan --- .plans/16-pr89-review-remediation-phases.md | 10 ++-- .plans/16a-pr89-phase0-canonical-triage.json | 50 +++----------------- .plans/16a-pr89-phase0-canonical-triage.md | 17 +++---- AGENTS.md | 2 +- 4 files changed, 18 insertions(+), 61 deletions(-) diff --git a/.plans/16-pr89-review-remediation-phases.md b/.plans/16-pr89-review-remediation-phases.md index 81144ad7bae3e0f2d533a6e5c22b083b73136cf2..513727edabd5c9cebbfc46954a7359f6d4554fe0 100644 --- a/.plans/16-pr89-review-remediation-phases.md +++ b/.plans/16-pr89-review-remediation-phases.md @@ -7,9 +7,9 @@ - Total threads: 185 - Outdated: 94 (excluded) - Active unresolved: 85 - - Invalid/false-positive: 1 active (excluded) + - Invalid/false-positive: 3 (excluded) - Duplicate reposts: collapsed - - Unique actionable findings after filtering: 74 + - Unique actionable findings after filtering: 58 ## Phase 0: Canonical Triage Lock @@ -25,19 +25,17 @@ Exit criteria: Related bug groups solved together: - Worker loop/fiber fatal error handling in orchestration reactors. - WebSocket message error boundaries and unhandled rejection guards. -- Missing `providers.event` stream consumption/validation on web client. +- Close invalid `providers.event` review findings as documented architecture mismatch (no code change expected). Primary files: - `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts` - `apps/server/src/orchestration/Layers/CheckpointReactor.ts` - `apps/server/src/wsServer.ts` -- `apps/web/src/routes/__root.tsx` -- `apps/web/src/wsNativeApi.ts` Exit criteria: - A single event-processing failure cannot permanently stop ingestion/reactor loops. - WS message handling cannot produce unhandled promise rejections. -- Provider event stream reaches UI through validated contract path. +- Invalid provider-event-channel review findings are closed with architecture rationale. ## Phase 2: State Consistency and Ordering diff --git a/.plans/16a-pr89-phase0-canonical-triage.json b/.plans/16a-pr89-phase0-canonical-triage.json index f9c73ceb1d08766ec1c221814f982feaee4d4518..761146cf852d4a3530a1cb6c351c880168962c26 100644 --- a/.plans/16a-pr89-phase0-canonical-triage.json +++ b/.plans/16a-pr89-phase0-canonical-triage.json @@ -10,11 +10,11 @@ "phase0_generated_at": "2026-02-26T02:49:21.091145Z", "summary": { "total_threads": 185, - "actionable_canonical": 60, + "actionable_canonical": 58, "actionable_duplicates": 24, "filtered_outdated": 94, "filtered_resolved": 6, - "filtered_invalid": 1 + "filtered_invalid": 3 }, "canonical_items": [ { @@ -82,42 +82,6 @@ "macroscopeapp" ] }, - { - "canonical_id": "C004", - "area": "Web provider event integration", - "title": "channel.** The web app currently does not consume provider event streams via the `providers.event` channel. While the orchestration API has `onReadModel()` and `onDomainEvent()` subscriptions, the providers event stream subscription is missing. Add a subscription to `ORCHESTRATION_WS_CHANNELS.event` (or the appropriate providers event channel from contracts) in `wsNativeApi.ts` and expose it via the `api.providers` object to comply with the guideline requirement.
\ud83e\udd16 Prompt for AI Agents", - "severity": "High", - "path": "apps/web/src/routes/__root.tsx", - "line": 140, - "thread_ids": [ - "PRRT_kwDORLtfbc5v9An7" - ], - "thread_indexes": [ - 31 - ], - "duplicate_count": 0, - "authors": [ - "coderabbitai" - ] - }, - { - "canonical_id": "C005", - "area": "Web provider event integration", - "title": "push stream, and the callbacks rely on unchecked casts. Please reintroduce a `providers.onEvent` (or equivalent) that subscribes to the `providers.event` channel and decode read-model/domain-event payloads using the shared contracts schemas before invoking callbacks. As per coding guidelines: \"Web app must consume provider event streams via WebSocket push on channel `providers.event`\" and \"Use Zod schemas from `packages/contracts` for shared type contracts covering provider events, WebSocket protocol, and model/session types\".
\ud83e\udd16 Prompt for AI Agents", - "severity": "High", - "path": "apps/web/src/wsNativeApi.ts", - "line": 165, - "thread_ids": [ - "PRRT_kwDORLtfbc5v9An-" - ], - "thread_indexes": [ - 34 - ], - "duplicate_count": 0, - "authors": [ - "coderabbitai" - ] - }, { "canonical_id": "C006", "area": "Build/runtime portability", @@ -1580,9 +1544,8 @@ "title": "channel.** The web app currently does not consume provider event streams via the `providers.event` channel. While the orchestration API has `onReadModel()` and `onDomainEvent()` subscriptions, the providers event stream subscription is missing. Add a subscription to `ORCHESTRATION_WS_CHANNELS.event` (or the appropriate providers event channel from contracts) in `wsNativeApi.ts` and expose it via the `api.providers` object to comply with the guideline requirement.
\ud83e\udd16 Prompt for AI Agents", "severity": "High", "has_false_positive_signal": false, - "canonical_id": "C004", - "phase0_status": "actionable_canonical", - "phase0_reason": "Canonical actionable item." + "phase0_status": "filtered_invalid", + "phase0_reason": "Invalid by design: provider runtime events are intentionally surfaced through orchestration domain events (`orchestration.domainEvent`), not a separate `providers.event` WebSocket channel in the current architecture." }, { "index": 32, @@ -1623,9 +1586,8 @@ "title": "push stream, and the callbacks rely on unchecked casts. Please reintroduce a `providers.onEvent` (or equivalent) that subscribes to the `providers.event` channel and decode read-model/domain-event payloads using the shared contracts schemas before invoking callbacks. As per coding guidelines: \"Web app must consume provider event streams via WebSocket push on channel `providers.event`\" and \"Use Zod schemas from `packages/contracts` for shared type contracts covering provider events, WebSocket protocol, and model/session types\".
\ud83e\udd16 Prompt for AI Agents", "severity": "High", "has_false_positive_signal": false, - "canonical_id": "C005", - "phase0_status": "actionable_canonical", - "phase0_reason": "Canonical actionable item." + "phase0_status": "filtered_invalid", + "phase0_reason": "Invalid by design: provider runtime events are intentionally surfaced through orchestration domain events (`orchestration.domainEvent`), not a separate `providers.event` WebSocket channel in the current architecture." }, { "index": 35, diff --git a/.plans/16a-pr89-phase0-canonical-triage.md b/.plans/16a-pr89-phase0-canonical-triage.md index 13b9c0e09e83e5c0adaf4fbfb72d4449807e3bcd..e59ef61dcc65b2f02113fa45ed89a7eb4213aa3e 100644 --- a/.plans/16a-pr89-phase0-canonical-triage.md +++ b/.plans/16a-pr89-phase0-canonical-triage.md @@ -7,11 +7,11 @@ ## Summary - Total threads: 185 -- Actionable canonical: 60 +- Actionable canonical: 58 - Actionable duplicates: 24 - Filtered outdated: 94 - Filtered resolved: 6 -- Filtered invalid: 1 +- Filtered invalid: 3 ## Canonical Actionable Checklist @@ -143,13 +143,6 @@ - [ ] C059 [Low] Suggestion: don’t spread `params` into `body`; it can override `_tag` and mishandle non-object values. Keep `_tag` separate and nest `params` under a single key (e.g., `data`), or validate `params` is a plain object. (apps/web/src/wsTransport.ts:59) - Threads: PRRT_kwDORLtfbc5whtrN -### Web provider event integration (2) - -- [ ] C004 [High] channel.** The web app currently does not consume provider event streams via the `providers.event` channel. While the orchestration API has `onReadModel()` and `onDomainEvent()` subscriptions, the providers event stream subscription is missing. Add a subscription to `ORCHESTRATION_WS_CHANNELS.event` (or the appropriate providers event channel from contracts) in `wsNativeApi.ts` and expose it via the `api.providers` object to comply with the guideline requirement.
πŸ€– Prompt for AI Agents (apps/web/src/routes/__root.tsx:140) - - Threads: PRRT_kwDORLtfbc5v9An7 -- [ ] C005 [High] push stream, and the callbacks rely on unchecked casts. Please reintroduce a `providers.onEvent` (or equivalent) that subscribes to the `providers.event` channel and decode read-model/domain-event payloads using the shared contracts schemas before invoking callbacks. As per coding guidelines: "Web app must consume provider event streams via WebSocket push on channel `providers.event`" and "Use Zod schemas from `packages/contracts` for shared type contracts covering provider events, WebSocket protocol, and model/session types".
πŸ€– Prompt for AI Agents (apps/web/src/wsNativeApi.ts:165) - - Threads: PRRT_kwDORLtfbc5v9An- - ### Build/runtime portability (2) - [ ] C006 [Medium] Build script runs TypeScript file with bare node (apps/server/package.json:14) @@ -164,8 +157,12 @@ ## Invalid / False-Positive Threads +- PRRT_kwDORLtfbc5v9An7 | apps/web/src/routes/__root.tsx:140 | channel.** The web app currently does not consume provider event streams via the `providers.event` channel. While the orchestration API has `onReadModel()` and `onDomainEvent()` subscriptions, the providers event stream subscription is missing. Add a subscription to `ORCHESTRATION_WS_CHANNELS.event` (or the appropriate providers event channel from contracts) in `wsNativeApi.ts` and expose it via the `api.providers` object to comply with the guideline requirement.
πŸ€– Prompt for AI Agents + - Rationale: Invalid by design: provider runtime events are intentionally surfaced through orchestration domain events (`orchestration.domainEvent`), not a separate `providers.event` WebSocket channel in the current architecture. +- PRRT_kwDORLtfbc5v9An- | apps/web/src/wsNativeApi.ts:165 | push stream, and the callbacks rely on unchecked casts. Please reintroduce a `providers.onEvent` (or equivalent) that subscribes to the `providers.event` channel and decode read-model/domain-event payloads using the shared contracts schemas before invoking callbacks. As per coding guidelines: "Web app must consume provider event streams via WebSocket push on channel `providers.event`" and "Use Zod schemas from `packages/contracts` for shared type contracts covering provider events, WebSocket protocol, and model/session types".
πŸ€– Prompt for AI Agents + - Rationale: Invalid by design: provider runtime events are intentionally surfaced through orchestration domain events (`orchestration.domainEvent`), not a separate `providers.event` WebSocket channel in the current architecture. - PRRT_kwDORLtfbc5widJx | apps/server/package.json:14 | Build script requires implicit Node.js TypeScript support - - Rationale: Explicit false-positive determination in thread replies. + - Rationale: Thread contains explicit false-positive determination in replies. ## Duplicate Mapping diff --git a/AGENTS.md b/AGENTS.md index 7a3b300d9594832533bd1bf78efb143680af0317..d3c82e42efe1dd8cdbcb8b799dc7cd7eae55dbeb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,7 +29,7 @@ How we use it in this codebase: - Session startup/resume and turn lifecycle are brokered in `apps/server/src/codexAppServerManager.ts`. - Provider dispatch and thread event logging are coordinated in `apps/server/src/providerManager.ts`. - WebSocket server routes NativeApi methods in `apps/server/src/wsServer.ts`. -- Web app consumes provider event streams via WebSocket push on channel `providers.event`. +- Web app consumes orchestration domain events via WebSocket push on channel `orchestration.domainEvent` (provider runtime activity is projected into orchestration events server-side). Docs: -- 2.54.0