Repository navigation
fix(showcase): restore atomic PocketBase observation persistence - #7548
Conversation
Normalize only stored null receipts as empty. Stored false, zero, and empty-string JSON must reach the object guard and fail before status, history, or job changes. Actual private PocketBase red-green cases cover persisted scalars and arrays plus complete record snapshot equality. Fresh and upgraded full transaction suites, Nx format/lint/syntax, and the official Docker build pass. The original receipt migration is unchanged. Call sites checked: storedReceipts is handler-local and consumed only by receipt normalization; test list and snapshot optional-key callers retain existing defaults. No public exports change.
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (4)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Production Digest-Pinning AuditAll 42 services digest-pinned. Run 2026-09-30 19:57:32 PDT — 0 finding(s). |
…nce (#7550) Selected fleet results still used separate status and history writes, so a history failure could be acknowledged as processed. This connects selected observations to the atomic PocketBase endpoint in #7548. Status, history, and the durable observation receipt commit together; persistence failures propagate to the existing consumer and leave the job unprocessed. Selection comes from the persisted job payload. Selected D5 keys use the canonical d5 namespace; aggregate and off-scope rows are excluded. Interrupted results reuse the same run, including after the boot stale-run sweep, and committed observation receipts replay without duplicate history, counters, or status events. A completed-run fingerprint is recorded only after all selected observations and required run finish succeed. The caller asks the endpoint to validate durable receipt replay. The existing writer calculations and ordinary/unfiltered behavior remain. This change adds no probe execution, retry/skip qualification, dashboard UI, storage schema, or test framework. It does not establish honest functional green. Validation: - Focused regression cases failed against the prior caller, then passed with the integration; existing relevant suites and the repaired orchestrator job-lookup case passed. - Harness Nx typecheck/build and scoped format passed. Lint has zero errors and the same 102 warnings as the exact base; the new helper has no diagnostics. - A private real PocketBase run reproduced the old false acknowledgement. With the candidate, a successful prefix committed once, a later history-validation failure rolled back and left the job unprocessed, and a new consumer process ran the real stale-run sweep before recovering the same run. Prefix data/history/receipt, excluded aggregate/off-scope rows, and the raw worker result stayed unchanged; the later observation gained exactly one history row and receipt. All disposable resources were removed. This PR is stacked on #7548 and should follow its endpoint deployment. Capacity restoration is separate in #7549. Preserve database schema/data across application rollback and follow the artifact's staged rollout with a complete D5/D6 observation between changes. No deployment is included. Restart reference: narrowly restores the persistence seam from #7256, without restoring its producer and qualification policy changes.
Selected observations can persist a status row even when the accompanying history write fails. This restores the admin-authenticated PocketBase transaction endpoint from #7255 so status, history, and a durable job receipt commit together. Matching retries return the recorded outcome; stale bases and conflicting identities reject without partial effects.
The additive, bounded receipt migration is restored byte-for-byte with original authorship retained. The hook also rejects malformed receipt maps and incomplete stored receipt entries before writes or replay acknowledgements. Both defects were reproduced against real PocketBase databases before correction.
Retained integration checks cover authentication, real history/receipt-capacity validation rollback, receipt admission, durable replay, concurrency, stale bases, history fallback, and preserved worker results. The tests use the official image without custom fault hooks or a proxy. Removed the test fault hook and legacy/missing-schema modes. Prior upgraded-volume and application-image rollback evidence remains available.
Validation: fresh real PocketBase integration suite, scoped Nx format/lint, JavaScript syntax, and full official Docker image build. These standalone JavaScript checks have no TypeScript configuration.
This is a database prerequisite: the showcase caller does not yet use this route. It makes no pill-execution or fleet-health claim. Deploy before dependent callers and observe a complete staging D5/D6 cycle before the next rollout. Application rollback must retain schema and data. No deployment is included.
Restart references: #7255, #7256, #7340. The archived caller requires a separate narrow change because its retry/skip policy conflicts with the approved design.