Skip to content

fix(showcase): restore atomic PocketBase observation persistence - #7548

Merged
contextablemark merged 6 commits into
mainfrom
contextablemark/restart-pocketbase-green-honest
Oct 1, 2026
Merged

contextablemark merged 6 commits into
mainfrom
contextablemark/restart-pocketbase-green-honest

Conversation

@contextablemark

@contextablemark contextablemark commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

jpr5 and others added 3 commits September 30, 2026 16:02
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.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (4)
  • fix(showcase)
  • feat(showcase)
  • chore(release)
  • chore: release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: CopilotKit/CopilotKit/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 05ab24bc-b0c0-4b19-9484-3ee1fe7f4684

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 42 services digest-pinned.

Run 2026-09-30 19:57:32 PDT — 0 finding(s).

@contextablemark
contextablemark marked this pull request as ready for review October 1, 2026 01:59
…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.
@contextablemark
contextablemark merged commit 8324c3e into main Oct 1, 2026
27 checks passed
@contextablemark
contextablemark deleted the contextablemark/restart-pocketbase-green-honest branch October 1, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants