Skip to content

Persist Mobilithek push deliveries and guard delayed snapshot replay - #32

Open
pjeweb wants to merge 1 commit into
mainfrom
feat/mobilithek-push-inbox
Open

pjeweb wants to merge 1 commit into
mainfrom
feat/mobilithek-push-inbox

Conversation

@pjeweb

@pjeweb pjeweb commented Oct 30, 2026

Copy link
Copy Markdown
Member

Add an optional PDO SQLite PushInbox so an HTTPS receiver can acknowledge a Mobilithek packet only after durable persistence and process it independently through Pulp. The inbox bounds pending work, deduplicates subscription/body retries (including after processing), serializes consumers without blocking incoming deliveries during publication, and retains batches across callback failures or crashes. Bodies are released after publication; retry receipts remain for seven days. Safe health metadata excludes payloads and credentials.

Mixing delayed push and recovery pull also needs snapshot ordering: extract publication timestamps, preserve points newer than an old snapshot even when absent from that snapshot, and ignore pre-baseline packets that could resurrect removals. Keep latest publication time separate from the pull cursor. Sync accumulator cache file/directory replacements before a consumer acknowledges the batch.

Validation: all 223 PHPUnit tests / 868 assertions pass on PHP 8.5 and PHP 8.2 (local Docker image). Includes a writer process exiting after commit, retry after failed publication, concurrent reception during processing, exclusive consumers, capacity limits, and out-of-order snapshots. PHP CS Fixer and git diff --check pass. The 8.2 run supplies a writable tmpfs for legacy TIC fixture outputs; dependencies use an existing installation with worktree source overrides.

SQLite is optional for existing pull consumers; CI explicitly installs pdo_sqlite. The application owns TLS/client identity verification, HTTP body limits, and durable publication before acknowledging a batch. No HTTP server or unverified webhook endpoint is added to the library.

Proposed releases: pulp-mobilithek 1.2.0 and pulp-datex-energy 1.1.3. Braunschweig adoption is prepared separately, disabled until the public TLS proxy is confirmed. No production changes.

This branch has not been deployed

No deployments
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.

1 participant