Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@maratal , great, so based on the |
AndyTWF
left a comment
There was a problem hiding this comment.
Is there a reason why this has been done as an LLM workflow, and not as strengthening our existing testing infrastructure?
LLMs are inherently nondeterministic, there's no guarantee that they're going to spot the same things each time and they can't be effectively CI gated. There's no protection against regression (a markdown report doesn't protect us, a failing test does).
For example:
- JSON/stdout cleanliness, this belongs in unit tests.
- Cross-command workflows (subscribe + publish), that's what our E2E tests cover.
There are couple of reasons to do this.
We already found few output specific formatting issues with this skill => For prompts: 1.
|
| # | Severity | Command | Issue | Output Modes Affected |
|---|---|---|---|---|
| 1 | Minor | rooms reactions send |
Domain fields (emoji, metadata, room) are spread at the top level of the JSON envelope instead of nested under a reaction domain key, deviating from the JSON data nesting convention in CLAUDE.md. Expected: {"type":"result","command":"rooms:reactions:send","success":true,"reaction":{"emoji":"thumbs_up","metadata":null},"room":"..."}. Actual: {"type":"result","command":"rooms:reactions:send","success":true,"emoji":"thumbs_up","metadata":null,"room":"..."} |
--json, --pretty-json |
| 2 | Minor | rooms reactions subscribe |
Domain fields (clientId, metadata, name, room, timestamp) are spread at the top level instead of nested under a reaction domain key. Expected: data nested under "reaction":{...}. Actual: all fields at envelope level. |
--json, --pretty-json |
| 3 | Minor | rooms messages subscribe |
"Duration elapsed" message printed before the final received message during shutdown — race condition in output ordering. No data loss occurs, but the output sequence is confusing to read. Steps to reproduce: subscribe with --duration 8, send a message near the end of the duration window. |
Human-readable |
| 4 | Minor | rooms messages subscribe |
"Listening for messages. Press Ctrl+C to exit." printed once per room in multi-room subscribe (e.g., printed twice when subscribing to 2 rooms). Could consolidate into a single message after all rooms are subscribed. Steps to reproduce: ably rooms messages subscribe room-a room-b --duration 5 |
Human-readable |
2. Test ably channels command group =>
Issue 1: Empty channel name returns exit code 0
- Severity: Major
- Affected command(s):
channels publish - Output mode(s): Both (human-readable and JSON)
- Description:
pnpm cli channels publish "" "test"shows error "Could not find path: /channels/messages" but exits with code 0. - Expected: Non-zero exit code when all messages fail to publish. Ideally, validate empty channel name before API call with a clearer error message.
- Steps to reproduce:
pnpm cli channels publish "" "test"
Issue 2: SDK decode error with --encoding utf-8
- Severity: Medium
- Affected command(s):
channels history(when retrieving messages published with--encoding utf-8) - Output mode(s): Both
- Description: When messages are published with
--encoding utf-8, retrieving them viachannels historytriggers an SDK error on stderr:[AblySDK Error] Error processing the utf-8 encoding, decoder returned 'Expected input of utf8Decode to be a buffer, arraybuffer, or view'; statusCode=400; code=40013. Messages still display correctly but the error pollutes output. - Steps to reproduce:
pnpm cli channels publish my-channel "test" --encoding utf-8pnpm cli channels history my-channel- Observe stderr SDK error
Issue 3: Occupancy subscribe human-readable format inconsistency
- Severity: Minor
- Affected command(s):
channels occupancy subscribe - Output mode(s): Human-readable only
- Description: The subscribe command dumps occupancy data as raw JSON (
Occupancy Data: { "metrics": {...} }) while thegetcommand uses clean labeled format (Connections: 0,Publishers: 0, etc.). Subscribe should use the same labeled format for consistency. - Steps to reproduce:
pnpm cli channels occupancy subscribe my-channel --duration 5
Issue 4: Occupancy get human-readable missing fields present in JSON
- Severity: Low
- Affected command(s):
channels occupancy get - Output mode(s): Human-readable only
- Description: Human-readable output omits
objectSubscribersandobjectPublishersfields that are present in JSON output. Per conventions, non-JSON output should expose the same fields as JSON (omit only null/undefined/empty). All fields are 0, so this is an inconsistency in which zero-valued fields are shown. - Steps to reproduce: Compare
pnpm cli channels occupancy get my-channelvspnpm cli channels occupancy get my-channel --json
Issue 5: Occupancy subscribe JSON exposes internal event name
- Severity: Low
- Affected command(s):
channels occupancy subscribe - Output mode(s): JSON only
- Description: The
eventfield in JSON output contains[meta]occupancywhich is an internal Ably meta-channel event name. Consider using a more user-friendly label or omitting it. - Steps to reproduce:
pnpm cli channels occupancy subscribe my-channel --duration 5 --json
Issue 6: Annotations publish/delete JSON nesting convention
- Severity: Low
- Affected command(s):
channels annotations publish,channels annotations delete - Output mode(s): JSON only
- Description: Domain data (
channel,serial,name) is spread at the top level alongside envelope fields (type,command,success). Per JSON nesting conventions, domain data should be nested under a domain key (e.g.,"annotation": {"channel": ..., "serial": ..., "name": ...}). - Steps to reproduce:
pnpm cli channels annotations publish my-channel "serial" "reactions:unique.v1" --name test --json
Issue 7: Presence enter JSON includes "data": null
- Severity: Low
- Affected command(s):
channels presence enter - Output mode(s): JSON only
- Description: When no
--datais provided, JSON output includes"data": null. Per conventions, null/undefined fields should be omitted for cleaner output. - Steps to reproduce:
pnpm cli channels presence enter my-channel --client-id test --duration 3 --json
Make sure that it includes complete list of EXACT commands it executed. I would even expect them in a separate file for easy access and repeat. |

CLAUDE-BEHAVIOR-TESTING