authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-25 23:43:33-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-26 13:20:36-08:00
loga328f66bfa9f09f2748a5960ed65546dbd8da9c9
tree396a30bbbe8f735a245fe0e47bd2fa992ff7724c
parentbb8a8444f4c9e1b4e9ad6c33c9a3c0e020f1b6c7

C017


2 files changed, 10 insertions(+), 3 deletions(-)

.plans/16c-pr89-remediation-checklist.md+2-2
...@@ -201,8 +201,8 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6`...@@ -201,8 +201,8 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6`
201 - Threads: PRRT_kwDORLtfbc5widJw, PRRT_kwDORLtfbc5wnWv_, PRRT_kwDORLtfbc5w0_g7, PRRT_kwDORLtfbc5w1C36 (+3 duplicate thread(s))201 - Threads: PRRT_kwDORLtfbc5widJw, PRRT_kwDORLtfbc5wnWv_, PRRT_kwDORLtfbc5w0_g7, PRRT_kwDORLtfbc5w1C36 (+3 duplicate thread(s))
202 - Audit note: Edge schema strategy is in place across contracts/consumers (trim/normalize via schemas and decode at boundaries); CheckpointStore remains an internal repository boundary.202 - Audit note: Edge schema strategy is in place across contracts/consumers (trim/normalize via schemas and decode at boundaries); CheckpointStore remains an internal repository boundary.
203203
204- [ ] `C017` `REQUIRED_SNAPSHOT_PROJECTORS` includes `pending-approvals` and `thread-turns`, but `getSnapshot` doesn't query their data. If these projectors lag behind, the returned `snapshotSequence` will be lower than what the included data actually reflects, causing clients to replay already-applied events. Consider filtering `REQUIRED_SNAPSHOT_PROJECTORS` to only include projectors whose data is actually fetched in the snapshot. <details> <summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary>204- [x] `C017` `REQUIRED_SNAPSHOT_PROJECTORS` includes `pending-approvals` and `thread-turns`, but `getSnapshot` doesn't query their data. If these projectors lag behind, the returned `snapshotSequence` will be lower than what the included data actually reflects, causing clients to replay already-applied events. Consider filtering `REQUIRED_SNAPSHOT_PROJECTORS` to only include projectors whose data is actually fetched in the snapshot. <details> <summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary>
205 - Status: `TODO`205 - Status: `DONE`
206 - Verdict: `partially-valid`206 - Verdict: `partially-valid`
207 - Severity: `Medium`207 - Severity: `Medium`
208 - Area: `Checkpointing correctness`208 - Area: `Checkpointing correctness`
apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts+8-1
...@@ -59,7 +59,14 @@ const ProjectionCheckpointDbRowSchema = ProjectionCheckpoint.mapFields(...@@ -59,7 +59,14 @@ const ProjectionCheckpointDbRowSchema = ProjectionCheckpoint.mapFields(
59);59);
60const ProjectionStateDbRowSchema = ProjectionState;60const ProjectionStateDbRowSchema = ProjectionState;
6161
62const REQUIRED_SNAPSHOT_PROJECTORS = Object.values(ORCHESTRATION_PROJECTOR_NAMES);62const REQUIRED_SNAPSHOT_PROJECTORS = [
63 ORCHESTRATION_PROJECTOR_NAMES.projects,
64 ORCHESTRATION_PROJECTOR_NAMES.threads,
65 ORCHESTRATION_PROJECTOR_NAMES.threadMessages,
66 ORCHESTRATION_PROJECTOR_NAMES.threadActivities,
67 ORCHESTRATION_PROJECTOR_NAMES.threadSessions,
68 ORCHESTRATION_PROJECTOR_NAMES.checkpoints,
69] as const;
6370
64function maxIso(left: string | null, right: string): string {71function maxIso(left: string | null, right: string): string {
65 if (left === null) {72 if (left === null) {