Skip to content

Finish the reason-table migration: shared reasons (R7) and enforcement (R8) #4937

Open

Description

@thymikee

Tracks the last two steps of the published-reason migration into ReasonTable rows (pattern from #4904; per-package batches #4922 #4924 #4928 #4930 #4932 #4934 #4936 and R6a).

R7: reasons raised from more than one batch (about 50 values)

Each goes to the lowest contract package every producer already depends on, with every producer moving in one PR. Known sites still holding untyped values, for example in src/ and packages/daemon-client after #4934:

  • remote_instance_mismatch: packages/daemon-client/src/daemon-client-transport.ts (raise and bare match), daemon, proxy
  • daemon_retirement_unconfirmed: daemon-client-lifecycle.ts, daemon-lifecycle-errors.ts, daemon-contracts
  • owner-unavailable, runtime-contract-invalid: src/platform-runtime-gateway.ts (into its existing table), kernel, capture-kit
  • app-device-scope: src/platform-runtime-open-target.ts, platform-apple
  • invalid_plugin: src/provider-plugin-policy.ts, plugins
  • daemon-owner-unrecognized (DAEMON_RECORD_OWNER_UNRECOGNIZED_REASON, daemon-lifecycle-errors.ts)
  • request_canceled (fold refactor(reasons): declare the R6b reasons in ReasonTable rows #4930's REQUEST_CANCELED_REASON into a row; reuse the kernel cancellation classifier)
  • the shared families: runtime facts (merge with PROVIDER_RUNTIME_REASONS from refactor(reasons): declare the R5 provider reasons in ReasonTable rows #4932), durable cleanup outcomes, boot failures
  • fill_text_stdin_in_batch, keyboard_dismiss_unavailable, alert-not-found

R8: enforcement

  • Audit publication paths R89 cannot see: errorResponse, hand-built responses, publishing helpers, details builders, native mappings (macOS helper, runner code mapping), non-AppError errors.
  • Extend the guard to those paths, then flip R89 from ratchet to ban.
  • Point test/repo-guards/runner-refusal-reason-docs.test.ts at the generated error reasons page instead of commands.md.

Activity

  1. apex-sentinel-staging commented on Nov 21, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: feature

    This is an internal tracking issue for completing the ReasonTable migration, with concrete remaining work for shared reasons and enforcement guard changes, so it is a maintainable enhancement rather than a defect report.

  2. thymikee commented on Nov 22, 2026

    @thymikee
    MemberAuthor

    Add to R8: audit every ReasonTable row summary against all sites that publish its value (including helpers that take the reason as a parameter). Reviews on #4932 and #4938 found several summaries written from one emitter only (e.g. swift_cache_untrusted, provider_session_cleanup_incomplete, provider_session_released_during_allocation), so the page described a narrower or wrong cause.

  3. thymikee commented on Nov 22, 2026

    @thymikee
    MemberAuthor

    Follow-up from the #4936 review: once #4930 and #4936 merge, move FIND_READ_REASONS (find_snapshot_unreadable) from capture-kit/src/snapshot-quality-verdict.ts into packages/selectors/src/interaction-error.ts beside target_disabled. Both find response builders would read that row, and capture-kit would keep only the capture verdict.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions