Skip to content

refactor(reasons): declare the platform-android reasons in ReasonTable rows - #4928

Merged
thymikee merged 3 commits into
mainfrom
refactor/r2-platform-android-reasons
Nov 22, 2026
Merged

thymikee merged 3 commits into
mainfrom
refactor/r2-platform-android-reasons

Conversation

@thymikee

@thymikee thymikee commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Declares the 43 published error.details.reason spellings owned by packages/platform-android as ReasonTable rows beside the code that classifies each failure, and reads every raise site through TABLE.member.reason. Wire spellings stay byte-for-byte, so no client, doc or test fixture changes. The tables sit in modules their producers already load, so no new module joins an eager import closure. The four generic helper-install states keep their spelling, so nothing published changes. Scope expands into contracts and replay-port: four values leave plain constants for a marked table, and setting_app_not_package moves to the Android settings owner that raises it. Import edits only.

Value

Measure base head
R89 untyped reason sites in platform-android 31 (13 files) 1 (R7's keyboard_dismiss_unavailable)
Marked reason tables holding Android reasons 1 / 5 rows 19 / 48 rows
This batch's values declared in a table 0 of 43 43 of 43

Before / after

No observable change: every wire spelling, message, hint and details key is unchanged; only where each literal is declared moved. The docs page gains 119 documented rows.

Validation

Tested at 0692887a3b: pnpm check:affected --run, pnpm format, tsc --noEmit, pnpm lint, pnpm check:layering (R89 holds: 173 files against the merge-base's 185), pnpm generate:reasons, reason-tables.test.ts, and the 1,529 platform-android unit tests. CI owns full coverage, device lanes and native builds.

🤖 Generated with Claude Code

…e rows

Moves the 43 published `error.details.reason` spellings owned by the Android platform into
18 `ReasonTable` rows beside the code that classifies each failure, and reads every raise site
through `TABLE.member.reason`. Wire spellings stay byte-for-byte.

Three values move out of plain `contracts` constants into the table their producers and the
replay boundary already load; `setting_app_not_package` moves from a contracts constant to the
Android settings owner that raises it.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.50 MB 6.50 MB +2.5 kB
Package (unpacked) 6.50 MB 6.50 MB +2.5 kB
Package (download) 1.98 MB 1.98 MB +581 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 17.5 ms 17.5 ms -0.0 ms
CLI --help 40.2 ms 36.6 ms -3.6 ms

@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging 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.

Apex Sentinel: 1 new finding on 0692887. The verdict and the full list are in the summary comment.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 0692887, and no conflicts are known. CI is green; the three cancelled 'Body rules' runs were superseded, and no failing job needs attribution. Not blocking, and each can be taken or left: the two kill rows in ANDROID_APP_CLOSE_REASONS (app-lifecycle.ts:44) are raised only by the Maestro kill route, so the generated page lists them under close, which cannot return them; moving them to a table owned by that route (for example ReasonTable<'replay'> with commands ['test']) would fix the page. The ANDROID_HELPER_INPUT_REASONS table (automation-helper.ts:154) now sits between the admitInputTimeoutMs JSDoc and the function, so the doc attaches to the table. InstalledAndroidHelperState (helper-artifacts.ts:52) still repeats the four failure spellings, with nothing tying them to the table; deriving them from the table's rows would keep the two in step. The one open inline thread does not apply, because current returns early at helper-package-install.ts:107 and never reaches the published state.reason, so the four-row table is complete (#4928 (comment)). Not verified here: the R89 count claim beyond the passing ratchet job, and any local test or generator run. A live device run is not needed, because the change only moves constant declarations and the spellings are byte-identical.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 21, 2026
…android-reasons

* origin/main:
  docs(commands): generate blocks for every public command and halve hand-written prose (#4919)
  fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920)
  refactor: remove dead exports and stale fallow exemptions (#4931)
  refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938)

# Conflicts:
#	website/docs/docs/error-reasons.md
@apex-sentinel-staging

This comment has been minimized.

…ive helper install states from their table

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

Applied the review notes in cd9f2ad. The two Maestro kill rows now live in a module-private table beside the kill route, owned by replay and listed under test, so the close page no longer shows them. The input-budget table moved above admitInputTimeoutMs so its JSDoc attaches to the function again. InstalledAndroidHelperState now derives its failure spellings from the install-state table, which moved into helper-artifacts to avoid an import cycle. That table's comment states that current is never published, and the thread is answered and resolved. The regenerated reasons page is included.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of cd9f2ad

Since the review of 6f331a6: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (b03e32bf7a36).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee

Copy link
Copy Markdown
Member Author

The code in cd9f2ad looks good, and the install-state gap from the earlier review of 0692887 is fixed. helper-artifacts.ts now documents that current is never published, and InstalledAndroidHelperState derives from the table, so the open inline thread on that table (#4928 (comment)) no longer applies and can be resolved. All 21 checks are passing, and there are no conflicts. Nothing else must happen before merge. Not verified here: tests and the docs generator were not run, and error-reasons.md was checked by reading the change against the tables.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit d3aeb2f into main Nov 22, 2026
21 checks passed
@thymikee
thymikee deleted the refactor/r2-platform-android-reasons branch November 22, 2026 08:37
thymikee added a commit that referenced this pull request Nov 22, 2026
* origin/main:
  refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928)

# Conflicts:
#	packages/replay-port/src/daemon-port/__tests__/session-replay-runtime-failure-response.test.ts
#	packages/replay-port/src/daemon-port/session-replay-runtime-failure-response.ts
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
…n-client-reasons

* origin/main:
  refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
…-reasons

* origin/main:
  refactor(reasons): declare the R5 provider reasons in ReasonTable rows (#4932)
  refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928)

# Conflicts:
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
* origin/main:
  refactor(reasons): declare the R5 provider reasons in ReasonTable rows (#4932)
  refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928)

# Conflicts:
#	packages/contracts/src/lease-scope.ts
#	website/docs/docs/error-reasons.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant