Skip to content

test: audit CLI dispatch and mobile host boundaries - #32576

Merged
OrcaWin merged 15 commits into
mainfrom
OrcaWin/comprehensive-test-audit-6
Oct 23, 2026
Merged

OrcaWin merged 15 commits into
mainfrom
OrcaWin/comprehensive-test-audit-6

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 73 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1865 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1885 $\color{#cf222e}{\Huge{\mathbf{−}}}$​20
Prod 52 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​7645 $\color{#cf222e}{\Huge{\mathbf{−}}}$​883 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6762

ELI5

Some tests checked copied values or stopped before reaching the behavior they promised. This batch makes those tests exercise the real boundary and removes redundant coverage after transferring its distinct controls.

What Changed

  • Review 154 test/support/configuration files and record 1,228 new case decisions plus 20 superseding CI decisions, including parameter rows and manual controls. Keep unchanged files in the tracker with source hashes and individual reasons.
  • Strengthen CLI quoting, screenshot bytes, offline admission, RPC dispatch, shutdown deadlines and legacy settlement checks. Isolate gate refusal from inherited Codex identity.
  • Replace copied browser/config controls with actual clipboard, held-press, editor-disposal, URL and byte observations. Remove four obsolete benchmarks.
  • Fix mobile host readiness, request occupancy, subscription cleanup, audio teardown and reply refusal oracles. Transfer 13 groups of distinct controls before deleting two private predicate suites.
  • Reconcile Cloud runner/workflow entrypoints and refresh the audit tracker. The repository-wide audit remains in progress.

No application behavior changes. Development probes and existing test harnesses are updated to observe the real implementation.

Why

These checks should fail when behavior regresses and remain stable when implementation details change.

Linked Issue

N/A — user-requested comprehensive test audit.

Visual Proof

N/A — tests, development probes and audit documentation; no product UI change.

Testing

  • CLI: 34 targeted suites / 388 passing runtime cases across the recorded batches.
  • Config/browser: 280 unique targeted passing cases; ranking smoke checked 3,000 differentials and 50 workloads.
  • Mobile: 49 suites / 621 tests passed; all 13 coverage transfers passed before deletion.
  • Eight CLI defects exposed by strengthened assertions; six mobile mutations produced seven intended failures. Every temporary production mutation was restored.
  • Scoped typechecks, lint/format and changed-code quality checks; original/final hashes independently verified.
  • Two upstream CI re-reviews: 107 passing cases and all 93 parameter inputs retained.
  • Audit refresh validates original decisions and final hashes: 1,020 present reviewed, 15 removed, zero stale, 15,945 pending.

Linux local validation uses background launch, injected native ports and headless Chromium/WebKit. Native devices, visible windows, authenticated remotes and live external services were not exercised. Cloud reconciliation adds static evidence and shell syntax validation, not a new runtime claim. Full platform/build checks run in CI.

Review

Self-reviewed every changed test/support path. The tracker preserves all original decisions, transfer destinations, mutation results and local validation limits.

Agent skill upstream boundary

  • Not applicable; no upstream skill content copied.

Checklist

  • Focused test-quality batch with per-case review records.
  • Cross-platform, remote, mobile, folder workspace and compatibility coverage considered.
  • Self-reviewed; production mutation sources restored byte for byte.
  • Local scoped checks complete; full PR aggregate and platform/build checks required before merge.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The changes update tests and test-support scripts across configuration, mobile, and CLI areas. They revise benchmark inputs, browser timing and rendering assertions, mobile bridge and host-screen checks, and CLI output and handler checks. Several benchmark scripts and two bridge test files are removed. The changes also add test-value audit inventories, progress data, and validation records. No application behavior changes are stated in the audit record.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to c440a

The PR weakens protection for the media wire-contract limits; restore the independent assertions before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 22.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 80 functions across 51 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "test: audit CLI dispatch and mobile host boundaries" follows conventional commit style and names two real focus areas of the changeset. The diff is mainly test and test-support edits across…
Description check Passed The description follows the template's main sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Agent skill upstream boundary, and Checklist. The Linked Issue is marked N/A…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test: audit CLI dispatch and mobile host boundaries" follows conventional commit style and names two real focus areas of the changeset. The diff is mainly test and test-support edits across CLI, mobile, browser/config, and Cloud areas, plus audit records. The title leaves out the browser/config and Cloud parts, and it reads as an audit rather than a single behavior change. It is still related to the main change and is not misleading.

Full details: Description check

Explanation

The description follows the template's main sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Agent skill upstream boundary, and Checklist. The Linked Issue is marked N/A with a user-requested reason, which the template does not allow for outside contributors. The Why section is brief. The AI Disclosure section is absent. The Testing section gives concrete results and limits. The Notes section from the template is not carried over. The description is mostly complete, so the check passes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 22.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 80 functions across 51 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments: 1
mobile/src/mobile-web-shell/bridge/bridge-media-verbs.test.ts: 1

53-60: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Restore independent assertions for the media contract values.

The boundary tests derive both their inputs and expected outcomes from the same constants used by the schemas. A change to a limit can therefore update the accepted boundary and still pass. The transfer tests also derive chunk counts from BRIDGE_MEDIA_READ_MAX_BYTES.

Restore assertions for 8 handles, 64/128 characters, 393216 read bytes, 48 chunks, and the upload-chunk derivation.

Suggested fix
 const HANDLE = 'media-1'
 
+describe('the numbers this contract states', () => {
+  it('holds a page session to eight staged items, which is 144 MiB of cache', () => {
+    expect(BRIDGE_MEDIA_MAX_LIVE_HANDLES).toBe(8)
+    expect(BRIDGE_MEDIA_MAX_LIVE_HANDLES * CLIPBOARD_IMAGE_MAX_SOURCE_BYTES).toBe(150_994_944)
+  })
+
+  it('holds a handle to 64 characters and a mime to 128', () => {
+    expect(BRIDGE_MEDIA_HANDLE_MAX_CHARS).toBe(64)
+    expect(BRIDGE_MEDIA_MIME_MAX_CHARS).toBe(128)
+  })
+
+  it('reads a whole item in 48 chunks at the cap', () => {
+    expect(BRIDGE_MEDIA_READ_MAX_BYTES).toBe(393_216)
+    expect(Math.ceil(CLIPBOARD_IMAGE_MAX_SOURCE_BYTES / BRIDGE_MEDIA_READ_MAX_BYTES)).toBe(48)
+  })
+
+  it('derives its byte length from the upload path', () => {
+    expect(BRIDGE_MEDIA_READ_MAX_BYTES).toBe(
+      Math.floor(MOBILE_CLIPBOARD_IMAGE_UPLOAD_CHUNK_BASE64_CHARS / 4) * 3
+    )
+  })
+})
+
 describe('what a pick may ask for', () => {

ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b6450500-dc38-42be-98f0-1eb5f5dd2acb
📥 Commits

Reviewing files that changed from the base of the PR and between d52d8aa and c440ab8.

📒 Files selected for processing: 9
  • docs/audits/test-value/batch-0006-validation.json
  • docs/audits/test-value/inventory.jsonl
  • docs/audits/test-value/progress.json
  • docs/audits/test-value/reviews/mobile-0006-post-ci-validation.json
  • docs/audits/test-value/reviews/mobile-0006-root-verification.json
  • docs/audits/test-value/reviews/mobile-0006-validation.json
  • docs/audits/test-value/reviews/mobile-0006.jsonl
  • mobile/src/mobile-web-shell/bridge-terminal-output-backlog.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-media-verbs.test.ts
🚧 Files skipped from review as they are similar to previous changes: 5
  • docs/audits/test-value/reviews/mobile-0006-root-verification.json
  • docs/audits/test-value/progress.json
  • docs/audits/test-value/batch-0006-validation.json
  • mobile/src/mobile-web-shell/bridge/bridge-media-verbs.test.ts
  • docs/audits/test-value/inventory.jsonl

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@OrcaWin
OrcaWin merged commit 633da07 into main Oct 23, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant