Skip to content

fix(offline): keep prepared batches linear - #58

Merged
rdlabo merged 1 commit into
mainfrom
fix/offline-batch-linear-time
Aug 12, 2026
Merged

fix(offline): keep prepared batches linear#58
rdlabo merged 1 commit into
mainfrom
fix/offline-batch-linear-time

Conversation

@rdlabo

@rdlabo rdlabo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reserve one contiguous createdAt block for prepared batches
  • read existing Outbox commands once instead of once per entry
  • assert a product principal/scope lease immediately before the atomic commit

Verification

  • focused OfflineSyncService: 116/116
  • ESLint: pass
  • kit package build: pass

Open in Devin Review

@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 56e091c
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a7bf8c804eca200083af2b9
😎 Deploy Preview https://deploy-preview-58--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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +76 to +80
export interface PreparedOfflineBatchOptions {
flush?: boolean;
/** Product identity/scope lease asserted after all async preparation and immediately before the durable commit. */
assertCurrent?: () => void;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 新しく公開された設定用の型に説明コメントが付いていない

公開APIとして追加された設定の型に説明コメントが付いていない(PreparedOfflineBatchOptions at projects/kit/offline/src/lib/offline-sync.service.ts:76)ため、リポジトリ規約(AGENTS.md「Every public class, function, and type must have a JSDoc comment.」)に違反しています。
Impact: 利用者向けドキュメントが欠落し、公開パッケージの説明が不揃いになります。

規約と該当箇所

AGENTS.md の「When modifying this repo」項目3で、すべての public な class / function / type に JSDoc を必須としています。同ファイル内の他の公開型(projects/kit/offline/src/lib/offline-sync.service.ts:66-74PreparedOfflineCommand など)は JSDoc を持っており、export * from './lib/offline-sync.service'projects/kit/offline/src/public-api.ts:18)により本型も公開APIとして出力されます。メンバー assertCurrent にはコメントがありますが、型自体にはありません。

Suggested change
export interface PreparedOfflineBatchOptions {
flush?: boolean;
/** Product identity/scope lease asserted after all async preparation and immediately before the durable commit. */
assertCurrent?: () => void;
}
/** Options for committing a prepared batch of Outbox commands in one serialized transaction. */
export interface PreparedOfflineBatchOptions {
flush?: boolean;
/** Product identity/scope lease asserted after all async preparation and immediately before the durable commit. */
assertCurrent?: () => void;
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@rdlabo
rdlabo merged commit ddbba75 into main Aug 12, 2026
12 checks passed
@rdlabo
rdlabo deleted the fix/offline-batch-linear-time branch August 12, 2026 04:41
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