Skip to content

fix(help): correct input and MCP descriptions, add a first-screen help gate - #3788

Merged
thymikee merged 7 commits into
mainfrom
fix/help-facts-and-first-screen-gate
Oct 17, 2026
Merged

thymikee merged 7 commits into
mainfrom
fix/help-facts-and-first-screen-gate

Conversation

@thymikee

@thymikee thymikee commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Salvages three non-STE parts of closed #3735. The ASD-STE100 help rewrite is not brought over; main's help wording is unchanged.

  • fix(help): correct two wrong input descriptions — launchConsole is a file path for the initial iOS simulator launch stdout/stderr (direct app launches only, not URL opens), not a "launch console mode"; jitterPx is deterministic (pressJitter cycles a fixed table), not random. Matches the existing flag texts.
  • fix(help): name the root decision card in the MCP help tool description — the no-topic call returns buildUsageText() (the root decision card), not the workflow card.
  • fix(help): omit a topic's own entry from its Related footer — manual-qa/workflow no longer self-link.
  • test(help): pin each topic's key rules to its first 30 lines — new cli-help-first-screen.test.ts. Declared rules quote main's exact phrases. The gate passes for the root help and all 18 topics with no rule excluded, so there are no first-screen findings to report.
  • build(bench): default the help bench Codex runner to gpt-6-luna — gpt-5.4-mini fails with a ChatGPT login here.

Touched files: 7. No scope expansion beyond the salvaged items.

Validation

  • Head 138be32b01: pnpm check:affected --run --head 138be32b01 — all runnable checks passed; receipt at .tmp/validation/run-X9KO20/receipt.json (exactCommit=true).
  • pnpm vitest run src/commands/schema src/mcp — 294 passed.
  • Mutation proof: padding the workflow body so a declared rule lands on line 41 fails the gate; rewording "End with: agent-device close" out of the root help fails it as "missing". Both reverted.
  • Bench smoke: node scripts/help-conformance-bench.mjs --runner codex:gpt-6-luna --case focused-type-stops-at-success completes with no runner error.

View guided diff Turn on auto-fix

launchConsole said 'Launch console mode.', but the value is a file path:
runIosSimulatorConsoleLaunch writes the launch stdout/stderr to that path
(simctl launch --console-pty), and open refuses it off an iOS simulator
and for URL opens.

jitterPx said 'Randomization radius in pixels.', but pressJitter cycles a
fixed PRESS_JITTER table scaled by the amount, so the offsets are
deterministic; the --jitter-px flag text already says so.
callHelpTool returns buildUsageText() when the topic is absent, and
buildUsageText() renders renderCliHelpOverview(), the root decision card.
The description said that it returns the full workflow card.
The workflow and manual-qa topics listed themselves in the shared Related
footer. The self-link repeats the topic that the reader is on.
Agents often read only the first screen of a help text, and the help
benchmark caps the root help at 30 lines (`--help:first30`). Declare,
for the root help and for every topic id, the rules from the current
rendering that must stay in lines 1-30: prerequisites, refusals,
verification steps, and recovery. A topic id without an entry fails the
test. The declared rules quote the main rendering; no help text changed.
gpt-5.4-mini fails with a ChatGPT login on this host. gpt-6-luna is the
latest Codex model; a smoke run of one case completes the call and grades
the plan without a runner error.
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.38 MB 5.38 MB +421 B
Package (unpacked) 5.38 MB 5.38 MB +421 B
Package (download) 1.62 MB 1.62 MB +174 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 18.6 ms 19.4 ms +0.8 ms
CLI --help 51.8 ms 52.8 ms +1.0 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/commands/schema/cli-help-first-screen.test.ts Outdated
Comment thread src/commands/command-input.ts Outdated
pressJitter multiplies a pattern that includes diagonal offsets, so a press
moves up to sqrt(2) x jitterPx. Align the input description, the response
schema, and the flag usage description on the per-axis wording.

#3788 (comment)
A substring match let a short generic rule like 'Commands:' pass from
inside unrelated prose. A rule now counts only when the trimmed rendered
line equals it or starts with it at a word boundary, and each pinned
rule quotes its line from its start. Mutation-proven: a rule moved below
line 30 and a deleted rule both still fail, and a short rule embedded in
prose fails.

#3788 (comment)
@thymikee

Copy link
Copy Markdown
Member Author

Both cubic P3 threads fixed and replied.

  • b1c8082 — jitterPx is now described as a deterministic per-axis offset (input schema, response schema, flag usageDescription); the old "radius" wording overstated nothing but misdescribed the diagonal reach of up to sqrt(2) x jitterPx.
  • 5d267ec — the first-screen gate matches rules against whole rendered lines (equal, or prefix ending at a word boundary); all pinned rules re-anchored to their line starts. Mutation proofs: rule moved below line 30 fails, deleted rule fails, short rule inside prose fails.

Validation: pnpm format, focused vitest (src/commands/schema, src/mcp, parser, option-field), check:mcp-metadata, then pnpm check:affected --run --head 5d267ec — all runnable checks passed (exactCommit=true). Pushed fast-forward on top of 138be32. No CI changes; no rebase needed.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed 5d267ec. The code looks good. The corrected launchConsole, jitterPx and MCP help-tool descriptions match the implementation. Both cubic threads are fixed at this head, so you can resolve them: rules now match whole rendered lines (#3788 (comment)), and jitterPx reads as a per-axis offset in all three places (#3788 (comment)).

Not blocking: no test pins the Related-footer self-omission (https://github.com/callstack/agent-device/blob/5d267ec/src/commands/schema/cli-help.ts#L970), and the router test at https://github.com/callstack/agent-device/blob/5d267ec/src/mcp/__tests__/router.test.ts#L103 still says "workflow card". Could the codex:gpt-6-luna bench default go in its own PR, or could the body say why this PR needs it?

Smoke Tests is still running, and every other check passes. The diff does not touch the smoke route, so a failure there would most likely be unrelated. There are no conflicts.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 17, 2026
@thymikee
thymikee merged commit 4a8abed into main Oct 17, 2026
17 of 18 checks passed
@thymikee
thymikee deleted the fix/help-facts-and-first-screen-gate branch October 17, 2026 18:23
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-17 18:24 UTC

thymikee added a commit that referenced this pull request Oct 17, 2026
…me-no-process-globals

* origin/main:
  fix(help): correct input and MCP descriptions, add a first-screen help gate (#3788)
  test(ios): isolate smoke contracts and synchronize observable state (#3786)
thymikee added a commit that referenced this pull request Oct 17, 2026
…ment

* origin/main:
  fix(help): correct input and MCP descriptions, add a first-screen help gate (#3788)
  test(ios): isolate smoke contracts and synchronize observable state (#3786)
thymikee added a commit that referenced this pull request Oct 18, 2026
…ntract

The gate asserted the pre-#3761 help literal, so the merged pair (#3788 test,
#3761 help owner) fails only in combination on main. Replace the stale rule
with the current full contract line, including the capture-panel-unidentified
refusal. The help text itself is unchanged; the assertion now matches the
rendered first screen.

CI evidence: Coverage job 117649571201 at 73d562b fails this assertion on
unchanged-base integration; it is not caused by this PR's edits and not a
flake.
thymikee added a commit that referenced this pull request Oct 18, 2026
* docs(adr): identify the derived daemon registry owners

Item A. packages/command-registry/src/registry.ts declares the separately typed daemon facet; daemon-command-descriptor.ts owns DaemonCommandDescriptor. packages/daemon/src/core/daemon-command-registry.ts derives the table and exposes predicates. Its tests pin policy and routes.

4648051 (#906) introduced the dormant descriptor and parity tests. 47abc8c (#907) activated derivation and deleted the hand table. This corrects the brief attribution to #906 alone.

Known invariant-3 gap: types.ts CommandDescriptorBase exposes daemon?: DaemonCommandTraits, and src/cli/command-explain.ts describeCommandDaemon reads and publishes route/traits. Preserve the invariant and report the gap; do not change behavior.

* docs(adr): match guarantee declarations and fixture consumers

Items 1 and 2. packages/contracts/src/interaction-guarantees.ts declares 14 guarantees, including keyboardOcclusion, parentOwnedTouchPoint, settleObservation, resolutionDisclosure, outcomeObservation, and targetStability. Match the complete list. rg finds only the TypeScript snapshot-visibility-tap-point-policy.test.ts and RunnerTests+TapPointPolicyTests.swift reading tap-point-policy.json; the matrix parityTable is metadata. No fake runner reads it. Keep migration step 3 open.

* docs(adr): correct the default lease inactivity period

Item 3. packages/daemon/src/resources/lease-registry-scope.ts DEFAULT_LEASE_TTL_MS = 60_000; normalizeLeaseTtlMs uses it when no positive TTL is supplied. The admitted-work section already states one minute.

* docs(adr): record the active settle timing detector

Item 4. gh issue view 1299 reports CLOSED, closedAt 2026-07-21T08:54:50Z. packages/maestro/test/conformance/differential/scenarios.ts settle-after-tap has no knownDivergence and requires settleLatches >= 1 and settleTimeouts <= 0. invariants.test.ts exercises synthetic traces. This is repository evidence, not a new live-device result.

* docs(adr): include recording consumers of the gesture codec

Item 5. a13a683 (#1567) added target-authored drag. packages/daemon/src/execution/interaction/internal/interaction-gesture.ts calls gesturePayloadToPositionals; packages/daemon/src/core/session-script-writer.ts calls dragGesturePayloadFromPositionals. PUBLIC_GESTURE_SYNTAX still defines arity for the two parsers.

* docs(adr): record retired aliases and current client result gaps

Items A and 6. 47abc8c (#907) activated the derived daemon table after parity in 4648051 (#906). Mark the hand-table inventory as pre-migration context. 189b062 (#960) moved client-types.ts into client/. 494eb52 (#1877) removed read. gh issue view 1153 reports CLOSED, closedAt 2026-07-08T16:35:29Z, but src/client/client-types.ts alert and reactNative still return CommandRequestResult. Do not infer total narrowing from closure.

* docs(adr): exclude bridge preparation from the generation circuit

Item 7. packages/platform-apple/src/snapshot-route.ts opensGenerationCircuit excludes failure.kind === preparing and WINDOW_COORDINATE_SPACE_UNRESOLVED. snapshot-route.test.ts pins that bridge preparation sends only the current capture to XCTest. Keep glance and body consistent.

* docs(adr): replace deleted migration references in code

Item 8. ADR 0011 Layer 2 and ADR 0014 Mutation admission and read behavior / Command effects are daemon-owned and completely classified replace removed phase, step, and escape-hatch references. Change comments and one test name only.

R56 evidence: c77bc40 (#2021) deleted the legacy src/core/dispatch.ts app-switcher arm and dispatch facet. The current descriptor retains daemon.route generic, but platformExecution is device-runtime; generic-runtime-execution.ts routes system buttons through system-button-runtime.ts, whose app-switcher row uses appSwitcherRuntimeUse. Retained generic routing is intentional, not evidence of a surviving legacy leaf or runtime bug. Clarify that distinction.

* docs(adr): identify the current generic-dispatch rejection boundary

Item 9. c77bc40 (#2021) retired src/core/dispatch.ts and dispatchKnownCommand. packages/daemon/src/server/request-router.ts calls resolveGenericRuntimeExecution before dispatchGenericCommand. packages/daemon/src/execution/generic-runtime-execution.ts rejects its default with COMMAND_FAILED / generic-route-runtime-missing. Its __tests__/generic-route-runtime-completeness.test.ts pins unknown-command rejection. No dispatch-keyboard.test.ts exists. Keep the proposed fragment INVALID_ARGS contract conditional and identify the absent format-specific proof rather than claim this routing-gap test proves it.

* docs(adr): remove the dangling historical hard-reject pointer

Item 10. git log -S hard-reject identifies 66fe801 (#1177), which held the rejection rationale in Consequences, not Alternatives. The later structural-equivalence amendment superseded geometric mutation selection; 36957e8 rewrote the retained consequence. Remove only the dangling pointer in historical acceptance evidence. Do not restore an obsolete current selection rule.

* docs(adr): align the proposed durable-resource amendment

Item 11. ADR 0019 section 5 proposed amendment already requires native-path disposition, retention by fence generation until both facts settle, and a failed-finish test for each kind before its cleanup changes. ADR 0024 sections 2.4 and 2.5 already retain archived generations; glance rule 6 already has the per-kind test gate. Match section 2.7 to these constraints. Both ADRs remain Proposed for this amendment.

* docs(adr): point exhaustive runtime facts to section 2

Item 12. ADR 0019 section 2 Runtime use joins facts and narrows the bound runtime contains the exhaustive per-device-shape fact rule. Section 3 owns provider resolution. Change the citation only.

* docs(adr): cite the withdrawn allocator design for its historical move

Item 13. ADR 0021 section 3 now states consequences, including deletion of managed-allocation. Section 4 records the withdrawn allocator design and its ownership. 4565606 (#3287) is the historical collocation move; retain the historical row and point its rationale to section 4.

* docs(adr): record the coupling ban and its landing date

Item 14. 1612e33 (#3431) and b9005d8 (#3430) both landed on 2026-10-12. The latter removed the remaining selector coupling and replaced R76 classification machinery with a ban. Status now matches Decision and enforcement; do not claim a current classification inventory.

* docs(adr): record the active shape rule and shared test owner

Items 15 and 16. Root src/__tests__/install-source.test.ts exercises shared provision-kit behavior and family adapters; cli-install-from-source.test.ts exercises the CLI boundary. Add the missing body owner matching the existing glance. efd2108 (#2808) added the no-fact-cell rule; 746e9b3 (#2806) enforces shape refusal at the web owner, pinned by packages/platform-web/src/runtime.test.ts. Mark the rule in force and correct its section pointer to section 2. Item 11: the section 5 proposed amendment is already correct and remains unchanged.

* docs(adr): correct the direction of the superseded hop comparison

Item 17. The ADR trace counts 41 distinct files for press/Android and 30 shared plus 17 AX / 19 runner for snapshot/iOS (47/49). Both exceed the superseded 38/29. The facade PRs predate e624ef9, so they cannot explain the difference; the old count is not higher.

* docs(adr): date hinge-stream evidence by toolchain

Item 18. 057dfb7 (2026-09-20) recorded the initial toolchain examination; e8da1e1 (2026-09-21, #2717) and 6cb160a (#2734) recorded a working stream. 590f171 (2026-10-14, #3587) records no motion subcommand in devicectl 651.13.5 / Xcode 27.1 build 27A9275, then called RC, and adds dispatched-unverified refusal. Read-only host check on 2026-10-16: xcodebuild -version reports Xcode 27.1, 27A9275; devicectl --version reports 651.13.5; device help lists no motion subcommand. Preserve dated successes without claiming every 27.1 build supports the stream. Sync the glance to existing no-sample behavior. No device state changed.

* docs(adr): describe the permitted capture-only second bind

Item 19. ADR 0019 section 9 permits one second bind for --settle when the action use has no capture, after facts admission. The second bind is capture-only; captureSnapshot in the action use reuses the cached binding. Correct the fixture comment only.

* docs(adr): date the completed root-pass move correction

Item 20. gh issue view 3294: CLOSED 2026-10-08T07:57:29Z. gh issue view 3281: CLOSED 2026-10-07T18:48:47Z. 8c5bce0 (#3297) moved daemon diagnostics to src/daemon-contracts; 75b414a (#3299) moved the assembly pair into src/command-runtime. Current owners are packages/daemon-contracts/src/daemon-diagnostics-scope.ts and src/command-runtime/{runtime-command-surface,runtime-factory}.ts. Add a 2026-10-16 correction to the dated observation without declaring every root move complete.

* docs(adr): record daemon trait enforcement gaps

M1. Registry tests pin the derived table; types do not fully enforce invariants 3 and 4. Keep both invariants required and synchronize Rules at a glance.

Evidence: packages/command-registry/src/types.ts:213 makes daemon optional. DaemonCommandDescriptor requires command and route but makes the other traits optional. packages/daemon/src/core/daemon-command-registry.ts:34-35 defaults missing descriptors to generic. src/cli/command-explain.ts:205-210 reads daemon traits in the public CLI projection. Registry policy pins are in packages/daemon/src/core/__tests__/daemon-command-registry.test.ts.

Maintainer follow-up: determine how types should enforce invariant 4 without weakening the accepted declaration boundary.

* docs(adr): describe pending bridge preparation precisely

L6. Describe a bridge preparation that is still running. Do not invent a preparation queue.

Evidence: packages/platform-apple/src/snapshot-source/preparation.ts:119-123 reports bridge-preparation-pending through attempts.value. packages/platform-apple/src/snapshot-route.ts:314-315 excludes preparing failures from the generation circuit. The existing glance exception already agrees.

* docs(adr): restore client result migration prerequisites

M2, L1, L2. Restore the contract-move prerequisite and its reason. State the full extent of broad client results. Retain the historical client path and restore prerequisite wording without the unrelated ADR 0010 pointer. Synchronize the client-contract rule in Rules at a glance.

Evidence: src/client/client-types.ts has 21 Promise<CommandRequestResult> methods, including alert, reactNative, and interactions.swipe. packages/command-registry/src/command-result.ts:41-47 documents dynamic payload exclusions; its result map remains nonexhaustive. packages/daemon/src/execution/interaction/internal/interaction-gesture.ts:59-74 retains local result types and Record payloads. Git commit 189b062 (#960) moved src/client-types.ts into src/client/. gh issue view 1153 confirms CLOSED at 2026-07-08T16:35:29Z.

* docs(adr): restore the retained rejection rationale pointer

L7. Repoint the historical hard-reject rationale to Consequences instead of deleting the useful pointer or restoring an obsolete alternative.

Evidence: git log -S hard-reject identifies 66fe801 (#1177), 36957e8, and 9362026. The current Consequences paragraph at line 1356 retains the reason blanket rejection is unsuitable: RN row/button/text wrapper chains. The structural-equivalence amendment remains authoritative.

* docs(adr): include replay and publication gesture codec callers

L3. Add the two omitted consumers of the positional drag codec.

Evidence: packages/replay-port/src/daemon-port/target-token.ts:13 calls dragGesturePayloadFromPositionals to select a source or destination target. packages/daemon/src/core/session-script-active-publication.ts:129 calls it through readRecordedDrag; assertPortableDragBindings at lines 102-123 validates portable endpoints and recorded target evidence before publication. No syntax or migration rule changes.

* docs(adr): trace old-reader guard failures without a codec promise

M3. Keep failure before platform execution as the proposed safety property. Record the session-dependent guard-request errors and the unresolved INVALID_ARGS requirement. A future codec cannot change an old reader. Keep Rules at a glance and both body descriptions aligned.

Evidence path: packages/ad-script/src/internal/script.ts:270-283,483 accepts an unknown command as an action. packages/ad-replay/src/internal/verify-dispatch.ts:65,280-287 dispatches the unannotated action. packages/replay-port/src/daemon-port/session-replay-runtime-engine-adapter.ts:221-237 calls invokeReplayAction. session-replay-action-runtime.ts:171,199 preserves the command. packages/daemon/src/server/request-router.ts:407,658-662 returns unknown replay actions to the full request path because core/daemon-command-registry.ts:58-59 has no replayScopedAction trait for them.

After admission, request-router.ts:346,393 reaches sessions/request-handler-chain.ts:127 and core/daemon-command-registry.ts:34-35. The unknown command routes to generic; the handler at request-handler-chain.ts:110-112 returns null. request-router.ts:596-598 returns noActiveSessionError with no session; packages/kernel/src/contracts.ts:263-264 sets SESSION_NOT_FOUND. With a session, request-router.ts:602-617 reaches execution/generic-runtime-execution.ts:116-123, which returns COMMAND_FAILED / generic-route-runtime-missing before dispatchGenericCommand at request-router.ts:619-620.

The replay adapter wraps the failure through session-replay-runtime-engine-adapter.ts:295-303,384-398 and session-replay-runtime-failure.ts:106. session-replay-runtime-failure-response.ts:108 emits REPLAY_DIVERGENCE. packages/ad-replay/src/internal/step-loop.ts:178-185 stops the loop before later open or include actions. These are the current paths after admission, not universal error guarantees for every historical release. The existing generic-route completeness test proves only the resolver branch.

Maintainer question: accept the existing old-reader errors, or keep INVALID_ARGS as an unresolved requirement?

* docs(adr): scope hop counts to their recorded trace

L9. Attribute 41 and 47/49 to this trace, without claiming that they are current repository counts.

Evidence: the Counting definition names commit 27a97ee and the retained trace tables measure press/Android and the two snapshot/iOS arms. Only the attribution changes; the counts and scope remain unchanged.

* docs(adr): retain the outstanding physical module moves

L4. Retain the dated corrections for completed moves and explicitly state that other physical moves remain outstanding as of 2026-10-16.

Evidence: scripts/layering/root-module-zones.ts:9-14 states that logical classification is not physical collocation and that the table should shrink. Its core, command-runtime, and platform-runtime entries still name root src/*.ts modules. No layering rule or completed-move claim changes.

* docs(adr): qualify the capture-only second bind

L5. Add the missing condition to the fixture comment: the settle observation may acquire a second capture-only bind only when the action use has no capture.

Evidence: docs/adr/0019-request-bound-platform-runtime.md:762-768 permits that second bind and requires reuse when the action already requires captureSnapshot. This commit changes only the comment.

Validation: pnpm format passed. All five fixture consumer suites and generic-route-runtime-completeness.test.ts passed: 6 files, 58 tests.

* docs(adr): state that the ADR 0020 old-reader trace starts after admission

Admission can resolve a device for lock and provider selection
(request-binding.ts, request-platform-provider-context.ts). It only reads the
inventory, so the safety property holds, but the trace does not cover
admission-time failures. Found in review round 2.

* docs(adr): align ADR 0003 invariants 3 and 4 with the shipped derivation

The 2026-06 update required types to stop every public projection from
reading daemon traits and a compile error for a missing trait. The shipped
derivation (#906, #907) does neither: the daemon facet is optional, a command
without one gets the generic route, and command explain displays the facet.

Invariant 3 now bans public contracts (CLI grammar, Node options, MCP schemas,
help, capability support) that derive from daemon traits, and allows a
diagnostic display. Only command-explain.ts and the daemon's own policy file
(daemon-policy-file.ts) read the facet. Invariant 4 now requires one daemon
facet per command and no second table. Decided with the maintainer.

* docs(adr): accept existing old-reader errors in ADR 0020

An old reader cannot learn a new error from a later codec. The traced path
already fails before platform execution with SESSION_NOT_FOUND or
COMMAND_FAILED (generic-route-runtime-missing), wrapped as REPLAY_DIVERGENCE.
The proposal now accepts these errors for old readers and keeps INVALID_ARGS
for readers that ship with the fragment codec. Decided with the maintainer.

* docs(adr): list the full provider-scenario exclusion buckets in ADR 0001

* docs(adr): scope the Android helper rule to instrumentation touch in ADR 0002

* docs(adr): record the exempt commands and grown allowlist in ADR 0005

* docs(adr): state per-fate wire-gate outcomes in ADR 0006

* docs(adr): name the platformExecution facet and execute seam in ADR 0008

* docs(adr): point the visionOS discovery claim at its test file in ADR 0009

* docs(adr): state the remote logPathUnavailable case in ADR 0010

* docs(adr): correct the scroll keyboard-probe condition in ADR 0011

* docs(adr): scope the linear-schedule sentence to endpoint-hold in ADR 0013

* docs(adr): name the frame value module and empty-result rule in ADR 0014

* docs(adr): add the we-are-lenient outcome to ADR 0015

* docs(adr): state the session event hides fill text in ADR 0017

* docs(adr): include translation hops in the collapse rule of ADR 0022

* docs(adr): separate the runner capture path and complete refusal causes in ADR 0025

* docs(adr): scope the novelty fact to verbatim transplants in ADR 0027

* docs(adr): correct the freshness row and cycle wording in ADR 0033

* docs(adr): state the platformExecution execution shapes in ADR 0008

platformExecution is a discriminated union of none, host, inventory, and
device-runtime (packages/contracts/src/command-platform-execution.ts). The
active design claimed it always names a runtime use; only the device-runtime
variants do. Describe the shape and qualify the bound runtime use to those
variants.

Fixes #3796 review thread discussion_r4306650944.

* docs(adr): match the active design to platformExecution in ADR 0009

The active design still said it composes with ADR 0008's descriptor capability
facet. That facet is retired; the per-OS predicates live in request-bound
runtime facts (packages/platform-apple/src/gesture-facts.ts and siblings).
Match ADR 0008's platformExecution declaration. Dated history and the
retirement notes keep their wording.

Fixes #3796 review thread discussion_r4306650938.

* docs(adr): scope the diagnostic fields to the request scope in ADR 0010

Malformed RPC method params throw in packages/daemon/src/server/http/http-rpc-methods.ts
before the router opens the request diagnostics scope (request-router.ts
handleRequestOnLedger), so http-server.ts answers with normalizeError output
that carries neither diagnosticId nor logPath; the validation tests pin that
400 / -32602 envelope. Scope the flush and field guarantee to errors inside a
request diagnostics scope and state that pre-scope failures omit the fields.
The remote logPathUnavailable rule is unchanged.

Fixes #3796 review thread discussion_r4306650954.

* docs(adr): confine frame construction claims to the slot class in ADR 0014

ref-frame.ts calls issuedRefFrame (ref-frame.ts activateRefFrame) and derives
expiry through expiredRefFrame, both exported factories of ref-frame-slot.ts.
The original sentence claimed no module outside the slot file can construct or
derive a frame value. Confine the claim to the private class, its private
fields, and direct construction; state the exported factory APIs and keep
transitions and admission owned by ref-frame.ts. The slot-file comment carried
the same overstatement and is corrected at the same scope.

Fixes #3796 review thread discussion_r4306650966.

* docs(core): state the pinned-generation warning exception in ref-frame.ts

resolveRefStalenessWarning (execution/session-snapshot.ts) warns on an active
frame when a pinned ref's generation differs from the frame epoch; the
existing test covers all three branches (expired any-ref, active plain/matching
pin clean, active mismatched pin warns). The header comment claimed an active
frame never warns. State the exact behavior.

Fixes #3796 review thread discussion_r4306650958.

* docs(adr): qualify the runner fallback policy and record the panel refusal in ADR 0025

shouldFallbackToRunner gates the runner path in
packages/platform-apple/src/core/screenshot.ts: a failure the policy rejects
rethrows before any runner capture. The glance row implied the runner follows
every simctl failure. State the policy condition. The app-window display facts
are unchanged.

#3761 merged into main as feca8cb (2026-10-18). When neither the sole lit
panel nor CoreDevice's primary panel identifies a panel,
resolveAppleCaptureTarget now refuses with COMMAND_FAILED and
details.reason capture-panel-unidentified (display-inventory.ts); array order
is never used. Update the Capture target body and add the glance row. The
former deferred claim is removed.

Fixes #3796 review thread discussion_r4306650971.

* docs(registry): separate app-switcher admission from execution

admitRuntimeOperations (packages/daemon/src/core/runtime-admission.ts) performs
the side-effect-free facts inspection of the owner's appSwitcher fact and only
then hands back the binding gateway; execution
(packages/daemon/src/execution/system-button-runtime.ts) uses the bound
operation. The comment implied admission itself uses the bound operation.
State the two stages separately.

Fixes #3796 review thread discussion_r4306650973.

* test(help): pin the foldable first-screen rule to the merged #3761 contract

The gate asserted the pre-#3761 help literal, so the merged pair (#3788 test,
#3761 help owner) fails only in combination on main. Replace the stale rule
with the current full contract line, including the capture-panel-unidentified
refusal. The help text itself is unchanged; the assertion now matches the
rendered first screen.

CI evidence: Coverage job 117649571201 at 73d562b fails this assertion on
unchanged-base integration; it is not caused by this PR's edits and not a
flake.

* docs(adr): state the attempted flush and field conditions in ADR 0010

withDiagnosticsScope (packages/host-kit/src/internal/diagnostics.ts) runs no
finalizer. Only finalizeThrownRequestError (request-router.ts) flushes, and it
is reached by thrown errors alone: the token refusal in runRequestWithinScope
is a returned normalizeError output without context, and
flushDiagnosticsToSessionFile returns no record for zero events or a write
failure, so an in-scope thrown error can still omit logPath. State that a
thrown request error attempts one forced flush, diagnosticId requires an
active scope, logPath appears only when the flush produces a file, and
returned or pre-scope failures may omit both fields. The remote
logPathUnavailable rule and the no-secrets rule are unchanged.

Follow-up qualification on discussion_r4306650954.

* docs(adr): scope the primary-panel fallback row to a primary panel in ADR 0025

buildInventory names the primary panel and emits apple_display_capture_ambiguous
only when a primary panel exists (display-inventory.ts: the capture display is
the sole lit panel or the primary panel); with neither, resolveAppleCaptureTarget
refuses with capture-panel-unidentified. The two glance rows overlapped on zero
or multiple lit panels. Qualify the fallback row condition.

Fixes #3796 review thread discussion_r4306742872.

* docs(adr): scope the flush owner to the router finalizer in ADR 0010

The previous sentence generalized over every thrown request error, but a
malformed-RPC throw never reaches the router. Name the owner: the router's
thrown-error finalizer attempts the flush. Replace the generic
returned/pre-scope sentence with the two concrete cases that omit both fields,
so the text no longer claims every returned or pre-scope failure must omit
them; normalization preserves any existing metadata.

Completes the qualification on discussion_r4306650954.
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