fix(actions): unknown platform search is an error, not an empty result (v1.55.5) - #192
Closed
tm07x wants to merge 1 commit into
Closed
fix(actions): unknown platform search is an error, not an empty result (v1.55.5)#192tm07x wants to merge 1 commit into
tm07x wants to merge 1 commit into
Conversation
…t (v1.55.5)
`one --agent actions search bogus-platform-xyz "test"` returned
`{actions:[]}` with exit 0 and cached the miss, so a typo was
indistinguishable from a real platform with no matches.
On empty search results, look the slug up in the connector catalog.
Unknown platforms now exit 1 with `{error, similar, hint}` and are not
cached. A genuine empty match on a known platform is unchanged.
There was a problem hiding this comment.
Pull request overview
This PR changes one --agent actions search so that an unknown/misspelled platform slug is treated as an error (exit 1 with structured {error, similar, hint}) instead of returning an empty result and caching that miss, while preserving the existing behavior for known platforms with zero matches (exit 0 with {actions: []}).
Changes:
- Add an unknown-platform check on empty action-search results by consulting
/available-connectors, and drop any cache entry for the miss. - Add unit + integration tests covering
findPlatform/findSimilarPlatformsand agent-mode search behavior (unknown vs known-empty vs hits). - Update user/agent-facing documentation to clarify the new error contract and caching behavior; bump version to
v1.55.5.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/lib/platforms.test.ts | Adds unit tests for platform lookup and similarity ranking. |
| src/lib/guide-content.ts | Documents that unknown platforms in actions search are errors (exit 1) and are not cached. |
| src/commands/actions.ts | Implements unknown-platform rejection on empty search results and defers cache writes until validated. |
| src/commands/actions.search-unknown.test.ts | Adds agent-mode contract tests for unknown platform handling and cache behavior. |
| skills/one/SKILL.md | Updates agent skill docs with the new actions search error/empty distinction. |
| README.md | Updates quickstart examples to mention unknown-platform exit behavior. |
| package.json | Version bump to 1.55.5. |
| package-lock.json | Version bump to 1.55.5 (root + packages[""]). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| assert.equal(fs.existsSync(cachePath), false); | ||
| }); | ||
|
|
||
| it('exit 0 with empty actions when the platform exists and the query matches nothing', async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
one --agent actions search bogus-platform-xyz "test"returned{actions:[]}with exit 0 and cached the miss. A typo was indistinguishable from a real platform with no matching actions, which breaks any flow that chains on search results.On an empty search result, the CLI now looks the slug up in
/available-connectors:{error, similar, hint}, cache entry discarded{actions:[]}, exit 0)Catalog lookup is skipped when search already returned hits, so the happy path does not pay an extra request. If the catalog itself is unreachable, we fall through to the existing empty-result path rather than failing a genuine miss.
Test plan
actions search unknown platform (agent mode)— typo exits 1, no cache file, known-empty stays exit 0, hits skip the catalogfindPlatform/findSimilarPlatformsunit testsexecute _preflightstill passestsc --noEmit