Problem
st2 message ls cannot distinguish a valid agent with no mail from an identity that does not exist in the catalog.
$ st2 message ls example-host.no-such-agent
# 0 messages in example-host.no-such-agent inbox
$ echo $?
0
$ st2 message ls --json example-host.no-such-agent
[]
$ echo $?
0
A typo or incorrect ST_AGENT therefore fails silently in the safe-looking direction: the caller concludes there is no mail while messages may be waiting under the real identity.
The adjacent read commands already distinguish the case:
$ st2 status example-host.no-such-agent
Error: no agent 'example-host.no-such-agent' found in catalog ...
$ echo $?
1
$ st2 resource ls example-host.no-such-agent
Error: no agent 'example-host.no-such-agent' found in catalog ...
$ echo $?
1
Expected
When an explicit identity is not declared in the selected catalog, message ls should report that fact and exit nonzero, consistently in human and JSON modes. A valid declared agent with an empty inbox should remain 0 messages / [] with exit 0.
If reading undeclared bus paths is intentionally supported, it needs an explicit opt-in so the default agent-facing read cannot silently accept a misspelled identity.
Why this matters
Identity propagation bugs and identity renames have existed independently (#30 and #21). Even when those write/launch paths are fixed, the inbox read boundary should detect an unknown destination instead of converting it into an apparently healthy empty state.
This is distinct from #41, #42, and #44, which concern Agent Spec publication, retirement, and task adoption.
Version
- st2
0.1.0+6f1fe48
- source
6f1fe484b517406b80d06f335997859b1a53f609
- Linux
Problem
st2 message lscannot distinguish a valid agent with no mail from an identity that does not exist in the catalog.A typo or incorrect
ST_AGENTtherefore fails silently in the safe-looking direction: the caller concludes there is no mail while messages may be waiting under the real identity.The adjacent read commands already distinguish the case:
Expected
When an explicit identity is not declared in the selected catalog,
message lsshould report that fact and exit nonzero, consistently in human and JSON modes. A valid declared agent with an empty inbox should remain0 messages/[]with exit 0.If reading undeclared bus paths is intentionally supported, it needs an explicit opt-in so the default agent-facing read cannot silently accept a misspelled identity.
Why this matters
Identity propagation bugs and identity renames have existed independently (#30 and #21). Even when those write/launch paths are fixed, the inbox read boundary should detect an unknown destination instead of converting it into an apparently healthy empty state.
This is distinct from #41, #42, and #44, which concern Agent Spec publication, retirement, and task adoption.
Version
0.1.0+6f1fe486f1fe484b517406b80d06f335997859b1a53f609