Skip to content

docs(help): document wait readiness and restart exhaustion - #3098

Merged
thymikee merged 1 commit into
mainfrom
codex/wait-failure-help
Oct 1, 2026
Merged

thymikee merged 1 commit into
mainfrom
codex/wait-failure-help

Conversation

@thymikee

@thymikee thymikee commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

agent-device help workflow and agent-device help manual-qa omit two retriable wait outcomes the runtime emits: wait_readiness_exhausted and wait_runner_restart_exhausted.

Document both in their shared failure contract, including details.readinessPhase. Tighten the existing descriptions to stay within the unchanged 9,100-byte workflow budget. Existing assertions follow the compact wording; no assertions or limits are removed.

3 files. Follow-up to the review on #3093, which merged before the correction was pushed. Runtime behavior is unchanged.

Validation

Tested commit 27c95ed67a3305b65c8cbcf317bf091794b945cc, based on current main 788f2d305:

  • pnpm build: passed.
  • pnpm check:affected --run: all runnable checks passed; 54 test files / 638 tests, plus formatting, lint, typecheck, layering/fallow and build checks.
  • Rendered workflow is 9,065 bytes; manual-qa is 4,290 bytes. Both include the two retriable reasons.

No live-device run is needed for help-only changes. Remote CI is pending; this is published for review, not claimed merge-ready.

Review in cubic

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.92 MB 4.92 MB -30 B
Package (unpacked) 4.92 MB 4.92 MB -30 B
Package (download) 1.47 MB 1.47 MB -16 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 29.3 ms 28.0 ms -1.3 ms
CLI --help 88.4 ms 85.3 ms -3.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.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/schema/cli-help-workflows.ts">

<violation number="1" location="src/commands/schema/cli-help-workflows.ts:8">
P3: The two newly documented reasons (`wait_readiness_exhausted`, `wait_runner_restart_exhausted`) have no test assertion, while every other line of the contract is asserted in `cli-help-topics.test.ts`. A follow-up that drops or rewords them would pass silently, reintroducing the exact omission this PR fixes. Add assertions for both lines next to the other reason checks.</violation>
</file>

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

Fix all with cubic | Re-trigger cubic

predicate_failed: no valid absence capture; observation/diagnostic kept.
wait_capture_stalled: no readable capture by deadline -- retriable.
wait_deadline_exceeded: later capture exhausted budget after a readable one.
wait_readiness_exhausted: readiness deadline; details.readinessPhase -- retriable.

@cubic-dev-ai cubic-dev-ai Bot Oct 1, 2026 •

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.

P3: The two newly documented reasons (wait_readiness_exhausted, wait_runner_restart_exhausted) have no test assertion, while every other line of the contract is asserted in cli-help-topics.test.ts. A follow-up that drops or rewords them would pass silently, reintroducing the exact omission this PR fixes. Add assertions for both lines next to the other reason checks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/commands/schema/cli-help-workflows.ts, line 8:

<comment>The two newly documented reasons (`wait_readiness_exhausted`, `wait_runner_restart_exhausted`) have no test assertion, while every other line of the contract is asserted in `cli-help-topics.test.ts`. A follow-up that drops or rewords them would pass silently, reintroducing the exact omission this PR fixes. Add assertions for both lines next to the other reason checks.</comment>

<file context>
@@ -1,12 +1,14 @@
+  predicate_failed: no valid absence capture; observation/diagnostic kept.
+  wait_capture_stalled: no readable capture by deadline -- retriable.
+  wait_deadline_exceeded: later capture exhausted budget after a readable one.
+  wait_readiness_exhausted: readiness deadline; details.readinessPhase -- retriable.
+  wait_runner_restart_exhausted: restart deadline -- retriable.
+  wait_landmark_identity_mismatch: replay guard: selector matched, recorded identity differed.
</file context>
Fix with cubic

@thymikee

thymikee commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

This PR is ready at 27c95ed. The change only touches help text and its tests, and the code looks right to me.

Not blocking: cli-help-workflows.ts line 2 now says "Read --json error.details.reason" and dropped the "not message" part, so a short "not message" could go back if the byte budget allows. The two new codes, wait_readiness_exhausted and wait_runner_restart_exhausted, are also not asserted in cli-help-topics.test.ts or cli-help-workflows.test.ts. Asserts like /wait_readiness_exhausted: .*details\.readinessPhase/ and /wait_runner_restart_exhausted/ would cover them. You can take or leave both.

Smoke Tests and Coverage are still running, so CI is not done. The diff does not touch any device route that Smoke uses, so it should only fail if it asserts on help text. I did not check that. I also did not run the byte-budget assertion or the tests, and I did not check whether other docs or skills repeat the wait contract text. There are no conflicts. It is ready for human review once Smoke Tests and Coverage finish.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 1, 2026
@thymikee
thymikee merged commit 0be44f0 into main Oct 1, 2026
19 checks passed
@thymikee
thymikee deleted the codex/wait-failure-help branch October 1, 2026 12:35
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-01 12:35 UTC

thymikee added a commit to hassantsyed/agent-device that referenced this pull request Oct 3, 2026
…lugin

* origin/main: (628 commits)
  fix(ios): pin runner build roots under derived data (callstack#3158)
  feat: add managed provider plugin infrastructure (callstack#3121)
  fix(ios): report keyboard focus from the AX bridge's is-editing trait (callstack#3163)
  feat(devices): report model and osVersion (callstack#3119)
  fix: guard alert deadline before native tap synthesis (callstack#3113)
  feat(install-source): accept archive URLs from any public host (callstack#3110)
  test: keep uptime responsive behind busy runner work (callstack#3114)
  fix(apple): read the launch confirmation whenever the open cannot see the app (callstack#3115)
  fix(host-kit): keep extracted directories owner-accessible (callstack#3111)
  fix(daemon): run Apple tools with the requesting client's DEVELOPER_DIR (callstack#3109)
  fix(daemon): fence daemon.json removal to its owning process (callstack#3102)
  fix(snapshot): stop sibling-sized chrome containers from covering their own region (callstack#2996) (callstack#3097)
  fix(ios): stop reading windows past the one the runner resolved (callstack#3103)
  refactor(daemon): apply one dispatch-disclosure rule to returned and thrown failures (callstack#3099)
  chore: drop unused production exports and suppress dynamic consumers (callstack#3100)
  docs(help): document wait readiness and restart exhaustion (callstack#3098)
  docs: simplify Host to fresh Simlock devices and lease recovery (callstack#3095)
  feat(capture): report the display rotation a screenshot was rendered in (callstack#3088)
  refactor(snapshot): preserve normalized node attributes through presentation (callstack#3092)
  refactor(help): colocate fold guidance and extract workflows (callstack#3093)
  ...

# Conflicts:
#	README.md
#	package.json
#	packages/kernel/src/snapshot.ts
#	src/__tests__/eager-closure-budgets.ts
#	src/cli/commands/connection-presentation.ts
#	src/commands/schema/cli-help.ts
#	src/commands/schema/command-overrides.ts
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