Skip to content

feat(cli): render the cloud catalog view in connect cloud list - #5316

Open
thymikee wants to merge 8 commits into
0.22from
feat/catalog-view
Open

thymikee wants to merge 8 commits into
0.22from
feat/catalog-view

Conversation

@thymikee

@thymikee thymikee commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

connect cloud list now renders a display tree that the cloud service sends from <cloud endpoint>. The service decides groups, labels, order and notes. The CLI has one generic renderer for heading, group, row, text and note, and skips unknown kinds. --platform, --form (new, listing only), --device and --os pass through as query parameters. --live still works. --json prints the view's data rows. The old catalog formatter is removed. Help, docs and the skill card gain a pick-a-device flow, and the book example names --session <name>. Needs the companion cloud-service PR.

Before / after

Local cloud API with seeded data. Offer names, isolation labels and prerequisite text are redacted; the companion PR shows them.

$ agent-device connect cloud list --device iphone-17e --os "iOS 27"
iOS
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.

$ agent-device connect cloud list --device android-tv --os 14
Android
Android TV (android-tv), tv
  Android 14
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.

$ agent-device connect cloud list --device nokia-3310
Note: No cloud device matches --device nokia-3310.
Run connect cloud list without filters to see every device.

Before: one flat line per offer and platform, with no device or OS view and no filters.

connect cloud list --platform ios
iOS
iPhone (iphone), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 26"
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17e
iPhone Duo (iphone-duo), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-duo --os "iOS 27"
iPhone SE (iphone-se), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-se --os "iOS 27"
iPhone 17 (iphone-17), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17
iPhone 17 Pro (iphone-17-pro), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro
iPhone 17 Pro Max (iphone-17-pro-max), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro-max
iPhone Air (iphone-air), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-air
iPad (ipad), tablet
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 26"
iPad (A16) (ipad-a16), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-a16
iPad Air 11" (ipad-air-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-11
iPad Air 13" (ipad-air-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-13
iPad mini (ipad-mini), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-mini
iPad Pro 11" (ipad-pro-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-11
iPad Pro 13" (ipad-pro-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-13
Apple Watch (apple-watch), watch
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device apple-watch --os "iOS 26"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.
connect cloud list
Android
Android phone (android-phone), phone
  Android 16
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 16"
    Note: offer-b <CLI prerequisite from the service>.
  Android 15
    offer   price       connect p50  isolation       vendor capacity  book
    offer-a <price/min>   <time> s          <isolation>    <availability>        --platform android --vendor <offer> --device android-phone --os "Android 15"
    offer-b <price/min>  <time> s        <isolation>    <availability>        --platform android --vendor <offer> --device android-phone --os "Android 15"
    offer-c <price/min>   <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device android-phone
    Note: offer-b <CLI prerequisite from the service>.
  Android 14
    offer   price       connect p50  isolation      vendor capacity  book
    offer-a <price/min>   <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 14"
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
  Android 13
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 13"
    Note: offer-b <CLI prerequisite from the service>.
  Android 12
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 12"
    Note: offer-b <CLI prerequisite from the service>.
Pixel 9 (pixel-9), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9
Pixel 9 Pro (pixel-9-pro), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9-pro
Pixel 9 Pro XL (pixel-9-pro-xl), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9-pro-xl
Pixel 9a (pixel-9a), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9a
Android tablet (android-tablet), tablet
  Android 15
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-tablet --os "Android 15"
  Android 14
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-tablet --os "Android 14"
Android TV (android-tv), tv
  Android 15
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 15"
    Note: offer-b <CLI prerequisite from the service>.
  Android 14
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
  Android 13
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 13"
    Note: offer-b <CLI prerequisite from the service>.
  Android 12
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 12"
    Note: offer-b <CLI prerequisite from the service>.

iOS
iPhone (iphone), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 26"
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17e
iPhone Duo (iphone-duo), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-duo --os "iOS 27"
iPhone SE (iphone-se), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-se --os "iOS 27"
iPhone 17 (iphone-17), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17
iPhone 17 Pro (iphone-17-pro), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro
iPhone 17 Pro Max (iphone-17-pro-max), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro-max
iPhone Air (iphone-air), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-air
iPad (ipad), tablet
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 26"
iPad (A16) (ipad-a16), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-a16
iPad Air 11" (ipad-air-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-11
iPad Air 13" (ipad-air-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-13
iPad mini (ipad-mini), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-mini
iPad Pro 11" (ipad-pro-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-11
iPad Pro 13" (ipad-pro-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-13
Apple Watch (apple-watch), watch
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device apple-watch --os "iOS 26"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.
Note: Narrow the list with --platform, --form, --device or --os.

Wall time, p50 of 10 runs: comparable across base, head and filtered listings.

pnpm install --frozen-lockfile && pnpm build
export AGENT_DEVICE_CLOUD_BASE_URL=http://127.0.0.1:8787 AGENT_DEVICE_CLOUD_API_KEY_ORIGIN=http://127.0.0.1:8787
export AGENT_DEVICE_CLOUD_API_KEY=<key from the companion PR's seed script>
node bin/agent-device.mjs connect cloud list --platform ios
node bin/agent-device.mjs connect cloud list --device iphone-17e --os "iOS 27" --json

Release notes

connect cloud list --json changes shape. Before (the Dec-1 nightly): one row per vendor and platform with capabilities. Now: the service's data, one row per offer, with device, OS, price, connect P50, availability scope and book flags. The repository keeps no changelog file.

Validation

At ae45a2b007, the full unit-ci gate, typecheck, and lint passed locally on Node 26. Changed-line coverage reached 92/92. Hosted CI and companion endpoint verification are pending.

@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 14 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="packages/command-surface/src/schema/command-overrides.ts">

<violation number="1" location="packages/command-surface/src/schema/command-overrides.ts:143">
P1: `--form` is advertised but is not accepted by the `connect` CLI because it was added only to `supportedFlags`, not `CONNECT_ALLOWED_FLAGS`. Add `form` to `CONNECT_ALLOWED_FLAGS` so `connect cloud list --form <form>` reaches the request parser.</violation>
</file>

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

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

positionalArgs: ['provider?|list'],
allowedFlags: CONNECT_ALLOWED_FLAGS,
supportedFlags: [...CONNECT_SUPPORTED_FLAGS, 'live'],
supportedFlags: [...CONNECT_SUPPORTED_FLAGS, 'live', 'form'],

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.

P1: --form is advertised but is not accepted by the connect CLI because it was added only to supportedFlags, not CONNECT_ALLOWED_FLAGS. Add form to CONNECT_ALLOWED_FLAGS so connect cloud list --form <form> reaches the request parser.

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 packages/command-surface/src/schema/command-overrides.ts, line 143:

<comment>`--form` is advertised but is not accepted by the `connect` CLI because it was added only to `supportedFlags`, not `CONNECT_ALLOWED_FLAGS`. Add `form` to `CONNECT_ALLOWED_FLAGS` so `connect cloud list --form <form>` reaches the request parser.</comment>

<file context>
@@ -135,12 +135,12 @@ const SCHEMA_ONLY_CLI_COMMAND_SCHEMAS = {
     positionalArgs: ['provider?|list'],
     allowedFlags: CONNECT_ALLOWED_FLAGS,
-    supportedFlags: [...CONNECT_SUPPORTED_FLAGS, 'live'],
+    supportedFlags: [...CONNECT_SUPPORTED_FLAGS, 'live', 'form'],
     explicitOnlyFlags: ['target'],
   },
</file context>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Catalog listing preflight consumes --form before the normal connect allowed-flag check. The production CLI route test at 62f43d403b verifies that it reaches the query string and that booking refuses it. No flag allowance change was needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The CLI test passed at ae45a2b007: catalog preflight sends form=phone on a listing and refuses --form on a booking. Catalog preflight handles the flag before the shared connect allowed-flag check.

Comment thread src/cli/connect-preflight.ts Resolved
Comment thread website/docs/docs/commands.md Resolved
Comment thread skills/agent-device/SKILL.md Resolved
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.29 MB 5.29 MB +973 B
Package (unpacked) 5.29 MB 5.29 MB +973 B
Package (download) 1.62 MB 1.62 MB +428 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 16.6 ms 16.4 ms -0.1 ms
CLI --help 32.5 ms 27.7 ms -4.8 ms

Affected plugins

Plugin Installed (including dependencies) Unpacked Download
@agent-device/aws-device-farm 135.3 kB → 135.3 kB (0 B) 134.8 kB → 134.8 kB (0 B) 41.4 kB → 41.4 kB (0 B)
@agent-device/browserstack 143.0 kB → 143.0 kB (0 B) 142.6 kB → 142.6 kB (0 B) 43.6 kB → 43.6 kB (+1 B)
@agent-device/harmonyos 370.1 kB → 370.1 kB (0 B) 369.7 kB → 369.7 kB (0 B) 106.2 kB → 106.2 kB (0 B)
@agent-device/limrun 3.08 MB → 3.08 MB (0 B) 432.5 kB → 432.5 kB (0 B) 129.0 kB → 129.0 kB (-1 B)
@agent-device/linux 298.9 kB → 298.9 kB (0 B) 298.5 kB → 298.5 kB (0 B) 84.7 kB → 84.7 kB (-2 B)
@agent-device/macos 226.1 kB → 226.1 kB (0 B) 225.7 kB → 225.7 kB (0 B) 64.4 kB → 64.4 kB (0 B)
@agent-device/maestro 896.5 kB → 896.5 kB (0 B) 896.0 kB → 896.0 kB (0 B) 278.2 kB → 278.2 kB (+1 B)
@agent-device/replay 72.6 kB → 72.6 kB (0 B) 72.1 kB → 72.1 kB (0 B) 23.8 kB → 23.8 kB (-2 B)
@agent-device/revyl 187.7 kB → 187.7 kB (0 B) 187.3 kB → 187.3 kB (0 B) 60.7 kB → 60.7 kB (+2 B)
@agent-device/testmu 142.6 kB → 142.6 kB (0 B) 142.2 kB → 142.2 kB (0 B) 44.2 kB → 44.2 kB (+1 B)
@agent-device/tizen 100.8 kB → 100.8 kB (0 B) 100.4 kB → 100.4 kB (0 B) 35.3 kB → 35.3 kB (0 B)
@agent-device/vega 262.9 kB → 262.9 kB (0 B) 262.5 kB → 262.5 kB (0 B) 73.8 kB → 73.8 kB (0 B)
@agent-device/web 94.0 kB → 94.0 kB (0 B) 93.6 kB → 93.6 kB (0 B) 30.8 kB → 30.8 kB (-2 B)
@agent-device/webos 99.6 kB → 99.6 kB (0 B) 99.2 kB → 99.2 kB (0 B) 35.0 kB → 35.0 kB (0 B)

@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: 2 new findings on 5261814. The verdict and the full list are in the summary comment.

Comment thread src/cli/connection/cloud-catalog.ts Resolved
Comment on lines 76 to +85
if (
!Array.isArray(rows) ||
!rows.every(isCloudVendorRow) ||
containsCloudCredential(rows, [accessToken, ...(options.catalogCredentials ?? [])])
!view ||
typeof view.version !== 'number' ||
!Array.isArray(view.nodes) ||
!Array.isArray(view.data) ||
containsCloudCredential(body, [accessToken, ...(options.catalogCredentials ?? [])])
) {
throw new AppError('COMMAND_FAILED', 'Cloud session API returned an invalid vendor list.');
throw new AppError('COMMAND_FAILED', 'Cloud session API returned an invalid catalog view.');
}
if (!options.live) return rows;
const checkedAt = new Date().toISOString();
return rows.map((row) =>
row.availability ? row : { ...row, availability: unsupportedAvailability(checkedAt) },
);
return { version: view.version, nodes: view.nodes, data: view.data };

@apex-sentinel-staging apex-sentinel-staging Bot Dec 1, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No longer raised on 0001878: the code it pointed at changed.

🆕 🟡 Minor · View version is validated as a number but never compared, so a v2 view renders empty

A cloud service that answers /v1/catalog/view with {version: 2, nodes: [...]} in a v2 node vocabulary renders as "No cloud catalog offers to display." with no hint the CLI is too old. fetchCloudCatalogView checks typeof view.version !== 'number' and returns the version without branching on it; renderCloudCatalogView never receives it.

Suggested change

Compare view.version against the highest version this CLI renders and fail (or warn) with a message naming the supported version, instead of accepting any number.

Details

persona: maintainability, senior-developer, javascript

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The finding was withdrawn. 62f43d403b keeps the existing behavior for numeric versions and unknown node kinds. A version compatibility policy awaits a service contract.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This finding was withdrawn. The CLI renders known node kinds and skips unknown kinds in numeric-version views. Rejecting a version requires a compatibility contract with the cloud service so that compatible views keep working.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

The review of c0a1d5a found two defects in catalog processing.

A sufficiently large array of valid rows can exceed JavaScript's argument limit at cloud-catalog.ts:123, causing an authenticated catalog listing to fail. Append table lines iteratively, and bound or safely reject excessive nesting and size across validation and rendering.

A deeply nested tree can overflow the stack during credential checking or recursive rendering at cloud-catalog.ts:166, causing a malformed service response to fail the listing. Enforce a safe depth across the whole response, or traverse iteratively with bounded output and credential checking.

The open threads on filter defaults and booking flags still apply; one lower-priority thread still applies. The form preflight thread does not apply because catalog preflight returns before finalization and the production-route test covers the flag. The skill wording thread does not apply because both steps are already present. The version thread does not apply because future-version behavior is unspecified and the concern was withdrawn.

The review packet reports 19 passing checks at c0a1d5a, with no failing route to attribute. No conflicts are known. Not verified here: service filtering, booking hints, live availability semantics, and empty-match notes could not be independently established because the companion service source and contract were not supplied. Before merge, make catalog processing safe for oversized and deeply nested service trees, resolve the open empty-catalog regression, and verify the booking and filter contracts.

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member Author

This branch now conflicts with 0.22. Please rebase onto the current 0.22 and push; the open findings from the last review still apply to the rebased head.

@blacksmith-sh

This comment has been minimized.

@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 62f43d4. The verdict and the full list are in the summary comment.

Comment thread src/cli/connect-preflight.ts Resolved
@thymikee

thymikee commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

At 62f43d4, the previous conflict is cleared and the earlier configured defaults, platform guidance, and text fallback issues are fixed. The table formatting and device-pin regression still need fixes.

Table rendering pads and joins cells before trimming trailing whitespace, so wide columns and empty trailing cells can repeat large amounts of work without charging it to the output budget. An authenticated text listing can stall even when the response passes both size limits; JSON bypasses the table. Find the last visible cell and omit its trailing padding, then account for the line before materializing padding, or charge the full untrimmed cost to the shared budget.

The high-priority device-pin thread still stands. No lower-priority threads still apply. The flag validation thread does not apply because listing preflight returns before ordinary connect validation and the fixture checks the flag on the wire. The configured defaults thread is fixed; the separate pin interaction remains open. The platform guidance thread is fixed in the help, docs, and skill. The sentence splitting thread does not apply because both actions are already given in order. The text fallback thread is fixed and covered by a stdout assertion. The version compatibility thread does not apply because the assumed compatibility rule was not supplied.

Smoke Tests appear unrelated: the supplied excerpt ends with an adb connection failure before the emulator CLI calls, and this change does not touch that path. Coverage remains unexplained because the supplied excerpt has no failure line, assertion, threshold, or termination reason. There are no conflicts.

Not verified here: the companion endpoint was not exercised. Please verify that combined filters constrain offers, a live listing carries the intended availability, JSON returns its data array, a no-match text listing explains the result, and representative book hints pass existing booking validation. The local build, test count, example output, and timings are author-reported. No device run is needed for this CLI-to-service read before daemon dispatch.

Before merge, bound table work, resolve the device-pin regression, and provide the Coverage failure tail and companion endpoint integration receipt.

@thymikee

thymikee commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

This branch now conflicts with 0.22. Please rebase onto the current 0.22 and push; the open findings from the last review still apply to the rebased head.

connect cloud list fetches /v1/catalog/view and renders its node tree
with one generic renderer: heading, group, row, text and note. Unknown
node kinds are skipped. The cloud service decides groups, labels and
order. --platform, --form, --device and --os pass through as query
parameters, --live asks for live availability, and --json prints the
view's data rows. --form is new and only valid on a catalog listing.
Group cloud catalog and Limrun guidance in one paragraph so the compact skill fits the read budget enforced by the help conformance test.
@apex-sentinel-staging

This comment has been minimized.

@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 2146d66. The verdict and the full list are in the summary comment.

Comment thread src/cli/connection/cloud-catalog.ts Resolved
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of ae45a2b

Since the review of 2146d66: 0 new · 0 still open · 2 no longer raised (2 marked fixed)

No open findings.

🔧 2 findings marked fixed in their threads
Finding Fixed by Where
Ambient AGENT_DEVICE_PLATFORM or a stored devicePin silently filters connect cloud list thymikee ae45a2b · reply
Credential split by a control character bypasses the leak check and is rejoined by the renderer thymikee ae45a2b · reply

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

💬 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.

This branch has not been deployed

No deployments
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