Skip to content

Phase 3 d.3: final public Platform collapse ios/macos -> apple #979

Description

@thymikee

Collapse the public Platform literal from ios/macos to apple (with the appleOs discriminant carrying the OS). This is the highest-diff, public-compatibility step — keep it last, after b.2/b.3/d.1/d.2/d.5.

Size (current grep, non-test unless noted)

  • platform === 'macos' 51 + platform !== 'macos' 8 = ~59 macOS-branch sites across 28 non-test files: src/core/dispatch-interactions.ts, src/core/interactors/apple.ts, src/daemon/app-log.ts, src/daemon/handlers/{session-perf,session-open-target,session-open-surface,snapshot-*,session-state}.ts, src/daemon/request-lock-policy.ts, src/daemon/handlers/record-trace-recording-backends.ts, src/kernel/device.ts, src/utils/parsing.ts, plus src/platforms/apple/core/*.
  • isApplePlatform = 47 non-test references (~30+ call sites across daemon/** and core/**), plus uncounted === 'ios' sites.
  • Public surface: PLATFORMS (src/kernel/device.ts:8), parsePlatform (src/utils/parsing.ts:109-117), CLI --platform enum, MCP projection, and any persisted session records.

Approach

Strangler-fig with parity tests; do not flatten the leaves. Needs a back-compat story for the public ios/macos strings (CLI, persisted state, MCP). Human judgment required.

Label rationale

ready-for-human — public compatibility + sequencing judgment.

Refs

perfect-shape.md §7 ("the Platform collapse is the LAST, highest-diff step"); ADR-0009. (Phase 3 step d.3.)


Part of #972 (Phase 3 — Apple PlatformPlugin).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-humanValid work that needs human implementation, judgment, or maintainer mergerefactor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions