Repository navigation
test: audit CLI dispatch and mobile host boundaries - #32576
Conversation
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
🧹 Nitpick comments: 1
mobile/src/mobile-web-shell/bridge/bridge-media-verbs.test.ts: 1
53-60: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winRestore 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
📒 Files selected for processing: 9
docs/audits/test-value/batch-0006-validation.jsondocs/audits/test-value/inventory.jsonldocs/audits/test-value/progress.jsondocs/audits/test-value/reviews/mobile-0006-post-ci-validation.jsondocs/audits/test-value/reviews/mobile-0006-root-verification.jsondocs/audits/test-value/reviews/mobile-0006-validation.jsondocs/audits/test-value/reviews/mobile-0006.jsonlmobile/src/mobile-web-shell/bridge-terminal-output-backlog.test.tsmobile/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.
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
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
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
Checklist