authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-25 19:11:31-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-26 13:20:36-08:00
log7e46da9f22828aad1707e4a3ecc83c2979d83177
treebd72c66349b568e5df842673358bb774683181c1
parentab83a17d2ba335eaa513f81f6ead1db30d2111ce

revise plan


4 files changed, 18 insertions(+), 61 deletions(-)

.plans/16-pr89-review-remediation-phases.md+4-6
...@@ -7,9 +7,9 @@...@@ -7,9 +7,9 @@
7 - Total threads: 1857 - Total threads: 185
8 - Outdated: 94 (excluded)8 - Outdated: 94 (excluded)
9 - Active unresolved: 859 - Active unresolved: 85
10 - Invalid/false-positive: 1 active (excluded)10 - Invalid/false-positive: 3 (excluded)
11 - Duplicate reposts: collapsed11 - Duplicate reposts: collapsed
12 - Unique actionable findings after filtering: 7412 - Unique actionable findings after filtering: 58
1313
14## Phase 0: Canonical Triage Lock14## Phase 0: Canonical Triage Lock
1515
...@@ -25,19 +25,17 @@ Exit criteria:...@@ -25,19 +25,17 @@ Exit criteria:
25Related bug groups solved together:25Related bug groups solved together:
26- Worker loop/fiber fatal error handling in orchestration reactors.26- Worker loop/fiber fatal error handling in orchestration reactors.
27- WebSocket message error boundaries and unhandled rejection guards.27- WebSocket message error boundaries and unhandled rejection guards.
28- Missing `providers.event` stream consumption/validation on web client.28- Close invalid `providers.event` review findings as documented architecture mismatch (no code change expected).
2929
30Primary files:30Primary files:
31- `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts`31- `apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts`
32- `apps/server/src/orchestration/Layers/CheckpointReactor.ts`32- `apps/server/src/orchestration/Layers/CheckpointReactor.ts`
33- `apps/server/src/wsServer.ts`33- `apps/server/src/wsServer.ts`
34- `apps/web/src/routes/__root.tsx`
35- `apps/web/src/wsNativeApi.ts`
3634
37Exit criteria:35Exit criteria:
38- A single event-processing failure cannot permanently stop ingestion/reactor loops.36- A single event-processing failure cannot permanently stop ingestion/reactor loops.
39- WS message handling cannot produce unhandled promise rejections.37- WS message handling cannot produce unhandled promise rejections.
40- Provider event stream reaches UI through validated contract path.38- Invalid provider-event-channel review findings are closed with architecture rationale.
4139
42## Phase 2: State Consistency and Ordering40## Phase 2: State Consistency and Ordering
4341
.plans/16a-pr89-phase0-canonical-triage.json+6-44
...@@ -10,11 +10,11 @@...@@ -10,11 +10,11 @@
10 "phase0_generated_at": "2026-02-26T02:49:21.091145Z",10 "phase0_generated_at": "2026-02-26T02:49:21.091145Z",
11 "summary": {11 "summary": {
12 "total_threads": 185,12 "total_threads": 185,
13 "actionable_canonical": 60,13 "actionable_canonical": 58,
14 "actionable_duplicates": 24,14 "actionable_duplicates": 24,
15 "filtered_outdated": 94,15 "filtered_outdated": 94,
16 "filtered_resolved": 6,16 "filtered_resolved": 6,
17 "filtered_invalid": 117 "filtered_invalid": 3
18 },18 },
19 "canonical_items": [19 "canonical_items": [
20 {20 {
...@@ -82,42 +82,6 @@...@@ -82,42 +82,6 @@
82 "macroscopeapp"82 "macroscopeapp"
83 ]83 ]
84 },84 },
85 {
86 "canonical_id": "C004",
87 "area": "Web provider event integration",
88 "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. <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",
89 "severity": "High",
90 "path": "apps/web/src/routes/__root.tsx",
91 "line": 140,
92 "thread_ids": [
93 "PRRT_kwDORLtfbc5v9An7"
94 ],
95 "thread_indexes": [
96 31
97 ],
98 "duplicate_count": 0,
99 "authors": [
100 "coderabbitai"
101 ]
102 },
103 {
104 "canonical_id": "C005",
105 "area": "Web provider event integration",
106 "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\". <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",
107 "severity": "High",
108 "path": "apps/web/src/wsNativeApi.ts",
109 "line": 165,
110 "thread_ids": [
111 "PRRT_kwDORLtfbc5v9An-"
112 ],
113 "thread_indexes": [
114 34
115 ],
116 "duplicate_count": 0,
117 "authors": [
118 "coderabbitai"
119 ]
120 },
121 {85 {
122 "canonical_id": "C006",86 "canonical_id": "C006",
123 "area": "Build/runtime portability",87 "area": "Build/runtime portability",
...@@ -1580,9 +1544,8 @@...@@ -1580,9 +1544,8 @@
1580 "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. <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",1544 "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. <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",
1581 "severity": "High",1545 "severity": "High",
1582 "has_false_positive_signal": false,1546 "has_false_positive_signal": false,
1583 "canonical_id": "C004",1547 "phase0_status": "filtered_invalid",
1584 "phase0_status": "actionable_canonical",1548 "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."
1585 "phase0_reason": "Canonical actionable item."
1586 },1549 },
1587 {1550 {
1588 "index": 32,1551 "index": 32,
...@@ -1623,9 +1586,8 @@...@@ -1623,9 +1586,8 @@
1623 "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\". <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",1586 "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\". <details> <summary>\ud83e\udd16 Prompt for AI Agents</summary>",
1624 "severity": "High",1587 "severity": "High",
1625 "has_false_positive_signal": false,1588 "has_false_positive_signal": false,
1626 "canonical_id": "C005",1589 "phase0_status": "filtered_invalid",
1627 "phase0_status": "actionable_canonical",1590 "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."
1628 "phase0_reason": "Canonical actionable item."
1629 },1591 },
1630 {1592 {
1631 "index": 35,1593 "index": 35,
.plans/16a-pr89-phase0-canonical-triage.md+7-10
...@@ -7,11 +7,11 @@...@@ -7,11 +7,11 @@
7## Summary7## Summary
88
9- Total threads: 1859- Total threads: 185
10- Actionable canonical: 6010- Actionable canonical: 58
11- Actionable duplicates: 2411- Actionable duplicates: 24
12- Filtered outdated: 9412- Filtered outdated: 94
13- Filtered resolved: 613- Filtered resolved: 6
14- Filtered invalid: 114- Filtered invalid: 3
1515
16## Canonical Actionable Checklist16## Canonical Actionable Checklist
1717
...@@ -143,13 +143,6 @@...@@ -143,13 +143,6 @@
143- [ ] 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)143- [ ] 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)
144 - Threads: PRRT_kwDORLtfbc5whtrN144 - Threads: PRRT_kwDORLtfbc5whtrN
145145
146### Web provider event integration (2)
147
148- [ ] 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. <details> <summary>🤖 Prompt for AI Agents</summary> (apps/web/src/routes/__root.tsx:140)
149 - Threads: PRRT_kwDORLtfbc5v9An7
150- [ ] 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". <details> <summary>🤖 Prompt for AI Agents</summary> (apps/web/src/wsNativeApi.ts:165)
151 - Threads: PRRT_kwDORLtfbc5v9An-
152
153### Build/runtime portability (2)146### Build/runtime portability (2)
154147
155- [ ] C006 [Medium] Build script runs TypeScript file with bare node (apps/server/package.json:14)148- [ ] C006 [Medium] Build script runs TypeScript file with bare node (apps/server/package.json:14)
...@@ -164,8 +157,12 @@...@@ -164,8 +157,12 @@
164157
165## Invalid / False-Positive Threads158## Invalid / False-Positive Threads
166159
160- 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. <details> <summary>🤖 Prompt for AI Agents</summary>
161 - 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.
162- 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". <details> <summary>🤖 Prompt for AI Agents</summary>
163 - 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.
167- PRRT_kwDORLtfbc5widJx | apps/server/package.json:14 | Build script requires implicit Node.js TypeScript support164- PRRT_kwDORLtfbc5widJx | apps/server/package.json:14 | Build script requires implicit Node.js TypeScript support
168 - Rationale: Explicit false-positive determination in thread replies.165 - Rationale: Thread contains explicit false-positive determination in replies.
169166
170## Duplicate Mapping167## Duplicate Mapping
171168
AGENTS.md+1-1
...@@ -29,7 +29,7 @@ How we use it in this codebase:...@@ -29,7 +29,7 @@ How we use it in this codebase:
29- Session startup/resume and turn lifecycle are brokered in `apps/server/src/codexAppServerManager.ts`.29- Session startup/resume and turn lifecycle are brokered in `apps/server/src/codexAppServerManager.ts`.
30- Provider dispatch and thread event logging are coordinated in `apps/server/src/providerManager.ts`.30- Provider dispatch and thread event logging are coordinated in `apps/server/src/providerManager.ts`.
31- WebSocket server routes NativeApi methods in `apps/server/src/wsServer.ts`.31- WebSocket server routes NativeApi methods in `apps/server/src/wsServer.ts`.
32- Web app consumes provider event streams via WebSocket push on channel `providers.event`.32- Web app consumes orchestration domain events via WebSocket push on channel `orchestration.domainEvent` (provider runtime activity is projected into orchestration events server-side).
3333
34Docs:34Docs:
3535