Skip to content

Document the native event bus and file the persisted-dedup follow-up - #306

Open
ScottMorris wants to merge 4 commits into
feat/255-p4c-dismiss-idempotencyfrom
feat/255-p5a-docs
Open

Document the native event bus and file the persisted-dedup follow-up#306
ScottMorris wants to merge 4 commits into
feat/255-p4c-dismiss-idempotencyfrom
feat/255-p5a-docs

Conversation

@ScottMorris

@ScottMorris ScottMorris commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What this is

Phase 5A of #255's implementation plan — the last piece. Documents everything built across the whole stack (#294#305), written entirely from reading the actual final merged code, not from the design plan.

What's here

  • docs/architecture/event-architecture.md: a new "Native Event Bus" section covering the NativeEventBus/DurableEventQueue mechanism and its rationale, a full topic table (including the "alarmId" vs "id" payload key inconsistency that tripped up a reviewer during implementation), the threading contract, the handled_natively/"watch-ring" tag flow (including its real, disclosed limitation — durability-first ordering means it's essentially always empty in production, a deliberate tradeoff not a bug), EventDedup's accurate (limited) scope, and the ContentProvider registration pattern (substantially closing out issue wear-sync: decide the incremental-sync future and document the channel-bridge pattern #209's ask).
  • New docs/plugins/native-bus.md; updates to docs/plugins/wear-sync.md/alarm-manager.md/README.md.
  • Six new CLAUDE.md gotchas: the provider-manifest convention, native-bus's direct-Cargo-dependency requirement, the one-way DurableEventQueue migrations, the watch-not-connected gap, iOS's non-implementation, and the payload key-naming inconsistency.
  • Deleted docs/architecture/255-phase3-payload-contract.md (a temporary working note, folded in per its own header) and repointed the handful of source comments that referenced it.
  • Filed Persist EventDedup's dedup state so it survives an app crash-and-restart #303 — persisting EventDedup's state across app restarts (currently in-memory only, so it structurally can't catch the crash-and-restart case it was originally meant for).

Review status

Reviewed via /code-review medium. Found and fixed: a stale topic-table row (claimed no listener subscribes to dismiss-requested, when NativeStopListener already does) and the dangling doc-path references mentioned above.

Stacked on #305 — the last PR in this stack. Part of #255.

@ScottMorris ScottMorris added the documentation Improvements or additions to documentation label Aug 14, 2026
@ScottMorris ScottMorris changed the title feat/255 p5a docs Document the native event bus and file the persisted-dedup follow-up Aug 14, 2026
@ScottMorris ScottMorris added the architecture System design label Aug 14, 2026
@ScottMorris
ScottMorris marked this pull request as ready for review August 14, 2026 04:44
@ScottMorris

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6553617bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/event-architecture.md Outdated
Comment thread docs/architecture/event-architecture.md Outdated
ScottMorris added a commit that referenced this pull request Aug 18, 2026
Reflows every hard-wrapped paragraph, blockquote, and list item in the "Native Event Bus (Android, Issue #255)" section onto a single source line each, per AGENTS.md's Markdown convention -- flagged by automated review on PR #306. No wording changed, only line breaks.
ScottMorris and others added 3 commits August 18, 2026 13:07
…an-out (Phase 5A)

Documents the plugins/native-bus substrate (NativeEventBus/DurableEventQueue),
the fired->watch-ring and dismiss/snooze->stop native fan-out flows, the
ContentProvider registration pattern, the handled_natively tag's real
durability-first limitation, and EventDedup's same-process-only scope --
all built and merged in prior Stage 1-4 work on issue #255, previously
tracked only in the temporary docs/architecture/255-phase3-payload-contract.md
working note, which is folded in here and removed per its own header.

Adds docs/plugins/native-bus.md, updates event-architecture.md, wear-sync.md,
and alarm-manager.md, adds CLAUDE.md Gotchas entries for the ContentProvider
manifest convention, native-bus's direct-Cargo-dependency requirement, the
one-way DurableEventQueue migrations, the watch-not-connected gap, iOS's
missing implementation, and the wear:alarm:* payload key inconsistency.
The Native Event Bus topic table incorrectly claimed no native Kotlin
listener subscribes to alarm-manager:dismiss-requested; NativeStopListener
already does, matching the row below it for snooze-requested.

Also repoint the handful of Kotlin/Rust comments that still referenced
the now-deleted 255-phase3-payload-contract.md at its new home, the
Native Event Bus section of event-architecture.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reflows every hard-wrapped paragraph, blockquote, and list item in the "Native Event Bus (Android, Issue #255)" section onto a single source line each, per AGENTS.md's Markdown convention -- flagged by automated review on PR #306. No wording changed, only line breaks.
…empotency gap

The note described dismiss_alarm's double-invocation safety as
unverified/a known concern, which was accurate when it was written but
is now stale -- Phase 4C actually closed that gap. Updated to describe
the real fix instead of the historical open question.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture System design documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant