fix(cli): add token auth to search#512
Closed
dongmucat wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Technical review requested for the CLI auth changes in this PR. Review focus:
|
Collaborator
Author
|
技术审查结论:代码层面通过,未发现阻塞问题。说明:当前 GitHub 凭证被判定为 PR 作者,平台不允许我对自己的 PR 设置 阻塞问题:无,按 ISSUE-37 范围满足正式规格。 确认点:
优化建议:当前认证错误文案比正式规格里的推荐示例更短,特别是 |
Signed-off-by: dongmucat <1127093059@qq.com>
ccfd37e to
c68a484
Compare
Collaborator
Author
|
Superseded by #523, the single replacement PR for ISSUE-36 / ISSUE-42. Closing this PR so there is one active delivery path. No main merge was performed. |
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.
概述
Add one-off token support to
skillhub searchand pin actionable auth failure behavior for CLI search/install.变更内容
后端实现
CLI 实现
--token <token>to the top-levelskillhub searchcommand parser.searchCommandtoken resolution path so priority remains: CLI arg >SKILLHUB_TOKEN> stored credentials.cli/README.mdcommand usage for search token support.测试覆盖
search --tokensendsAuthorization: Bearer ...and CLI token wins overSKILLHUB_TOKEN.Error,Context, andNext, and no anonymous retry occurs.--jsonincludesok=false,message,exitCode,details.registry, anddetails.next.质量门禁
cd cli && bun test test/integration/search-command.test.ts test/integration/install-command.test.tspassed: 51 tests, 0 failures.make typecheck-clipassed.make lint-clipassed.make test-clipassed: 329 tests, 0 failures.make build-clipassed.git diff --checkpassed.make generate-apinot required: no Controller/API schema change.make test-backend-appnot run: no server Java files changed.安全考虑
PR #511 coordination
This is a separate PR because #511 is the server-side invalid Bearer fail-closed change for CLI API routes, while this PR is CLI package wiring and CLI integration coverage. The two changes are compatible and independently reviewable.
相关 Issue
Closes ISSUE-37
测试说明
本地验证步骤
make cli-installifcli/node_modulesis absent.make typecheck-cli.make lint-cli.make test-cli.make build-cli.回归测试范围
skillhub searchanonymous usage.skillhub search --tokenvalid and invalid token behavior.skillhub search --jsonauth error envelope.skillhub install --token401 handling without anonymous retry.