Skip to content

feat(offline): compose runtime capabilities - #39

Closed
rdlabo wants to merge 1 commit into
mainfrom
feat/offline-capability-api
Closed

feat(offline): compose runtime capabilities#39
rdlabo wants to merge 1 commit into
mainfrom
feat/offline-capability-api

Conversation

@rdlabo

@rdlabo rdlabo commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add capability-based provideOffline composition for independent pull, outbox, and read-fallback use cases
  • keep the existing ProvideOfflineOptions interface and legacy full-runtime configuration source-compatible
  • make delete intent durable with effect: 'delete' and provide OfflineReplicaQueryService for consistent optimistic tombstone visibility
  • validate pull change serverId metadata against the schema-declared serverId() value before persisting or advancing the cursor
  • migrate existing native SQLite outbox tables additively with effect DEFAULT 'upsert'; older web/native commands remain upserts
  • document the capability API, delete visibility, identity validation, and compatibility behavior

Why

Read-only products such as tipsys currently have to register an executor that always fails and a puller that returns no changes. Product request policies also duplicate pending-delete filtering, while pull identity checks differ between products. These are runtime invariants and optional capabilities that belong in the shared kit.

Compatibility

  • existing provideOffline({ commandExecutor, replicaPuller, requestPolicies, ... }) callers retain the same behavior
  • the public ProvideOfflineOptions remains an interface for consumers that extend it
  • removeReplica remains supported for existing executors
  • old commands without effect are interpreted as upsert
  • SQLite adds the new column with a default and does not bump the destructive base storage schema version

Validation

  • npx ng test kit --watch=false — 37 files / 507 tests passed
  • npm run lint — all projects passed
  • npm run test:offline-types:nonstrict — passed
  • npm run prebuild:kit — passed
  • git diff --check — passed

@netlify

netlify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploy Preview for rdlabo-ionic-angular-library ready!

Name Link
🔨 Latest commit 3d69634
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a64a8c753e37b000802c281
😎 Deploy Preview https://deploy-preview-39--rdlabo-ionic-angular-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rdlabo

rdlabo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

自己レビュー結論: このPRは現在の main へマージせず、superseded として close します。

  • durable delete / optimistic tombstone は後続の main で replicaMutation: 'delete'pending_delete visibility、原子的な ACK/discard/recreate 処理として実装済みです。このPRの旧 effect / groupId / aggregateLocalId モデルをrebaseすると現行identity・mutation契約を後退させます。\n- pull identity validation は後続の generated/natural identity と remoteId 正規化・schema validationへ置き換え済みです。\n- 当初の read-only product の動機は現行 mode: 'readCacheOnly' で、dummy puller/executorなしに解決済みです。\n- PRは baseから大幅に乖離し現在 CONFLICTING。残る独自要素はcapability builderですが、現行consumerに必要性がなく、この古い699行の変更を競合解消して取り込む費用と回帰リスクに見合いません。\n\n当時のCIはgreenでしたが、現在のmainに対する受け入れ根拠にはならないため、競合解消やマージは行いません。

@rdlabo rdlabo closed this Aug 9, 2026
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