Skip to content

[core-split] Retire Core OsNotificationSink onto platform-services backends #1998

Closed

Description

@Xuepoo

Priority: P2 | Area: platform | Labels: chore,P2,area:platform | Milestone: v0.1.0 | Audit: bitty#1629 (CTX-1085 Slice A/B)

Summary

Retire Core's duplicate OS-notification delivery path (OsNotificationSink
spawning notify-send/osascript) onto the real
bitty-platform-services backends (LinuxDbusBackend/MacosBackend,
contract published in that repo's docs/backend-delivery-contract.md).
Core keeps the in-app banner + rate limiting; OS delivery moves out.

Current state (evidence)

  • crates/bitty-platform/src/notification.rs:61,65,183,212-252: second
    OS-notification implementation in Core (absolute-path spawn + bounded
    reaper).
  • crates/bitty-runtime/src/runtime.rs:2442,2461,2551: the linked
    bitty-platform-services crate is used only as a NoopBackend rate cap
    while real delivery routes through OsNotificationSink — two
    rate/dispatch paths for the same stream.
  • crates/bitty-lua/src/host.rs + services.rs (bitty.notify.show):
    notification capability passthrough queued into Core delivery.

Target state

  • OS delivery goes through the platform-services backends (fixed argv, no
    shell interpolation, bounded reaper, BackendMissing fail-closed —
    already implemented + tested there with fake binaries, no real desktop
    in CI).
  • Core keeps: the bounded NotificationQueue, per-tick drain into the
    in-app banner, and the platform.notify grant gate.
  • Single rate/dispatch path. Windows stays explicitly
    Skipped(BackendMissing) on both sides until a scoped ffi decision
    (documented gap, not silent).
  • URL-open stays Core-owned permanently per that repo's
    docs/url-open-ownership.md — out of scope here, do not touch.

Acceptance criteria

  • No notify-send/osascript spawn path remains in Core.
  • One rate/dispatch path for the notification stream (no split-brain
    limiter).
  • Linux/macOS/Windows CI green (fake-backend conformance, never a real
    desktop spawn in CI).
  • Help/docs updated if user-visible behavior or diagnostics change.

Dependencies / blockers

  • bitty-platform-services#13 (real backends) implemented; this issue is
    the Core-side retirement follow-up explicitly deferred from it.

Scheduling

Post-0.0.23 work. Land inside the 0.0.24 window (milestone stays v0.1.0).
No implementation until a CarryCtx task is claimed; this issue is the
立案 record only.

Activity

  1. added this to the v0.1.0 milestone on Oct 12, 2026
  2. added
    chore
    area:platform
    P2
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:platformchore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions