fix(cosh-ng): preserve raw entry - #2743
Conversation
e298e66 to
e854c1e
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e298e668fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| stdout_tty: bool, | ||
| stderr_tty: bool, | ||
| ) -> Invocation { | ||
| if args.first().and_then(|arg| arg.to_str()) == Some("raw") { |
There was a problem hiding this comment.
Register or split the over-threshold invocation file
This branch and its inline tests grow runtime/invocation.rs from 682 to 751 lines without adding it to the large-file inventory or providing a split plan/waiver. Running the required crates/cosh-shell/scripts/check-layout.sh reports this file as an unregistered large production file and exits with one violation group, so the mandated layout gate now fails; split the module or register the required owner plan/waiver.
AGENTS.md reference: src/cosh-ng/AGENTS.md:L53-L59
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Resolved in 1d3c374: moved invocation tests to invocation_tests.rs, so check-layout.sh now passes.
|
PR number: #2743 评审结论Findings
未发现 blocking package/module/public API 组织问题。 结构核查(对照 code organization 规则)
剩余风险
Validation
|
e854c1e to
5279cd3
Compare
Route explicit raw TUI requests through the wrapper while retaining the legacy non-interactive passthrough forms. Fixes: 76b5a76 ("feat(cosh-ng): [shell] invert cosh entry to exec-bash passthrough") Signed-off-by: Zhilinlinlin <aiyiqi@linux.alibaba.com>
5279cd3 to
1d3c374
Compare
|
Addressed the valid P3 in
The test split also keeps |
Code Review: fix(cosh-ng): preserve raw entry总体结论:未发现阻塞问题 ✅PR 正确修复了 修复正确性分析根因: 修复方案:在 classifier 顶部拦截
验证关键路径:
详细检查1. 架构与代码组织 ✅
2. 功能正确性 ✅
3. 安全性 ✅
4. 测试覆盖 ✅
5. PR 描述可复现性 ✅
观察(非阻塞)
LGTM. 修复精准、测试充分、无阻塞问题。 |
Review Check: LGTM ✅code-reviewer 的 review 分析准确、完整,逐行验证了 6 条行为路径全部正确。经独立代码审核确认:
未发现遗漏的 P0/P1 问题,可以合并。 |
Why
The
/usr/bin/coshtransparency classifier treated the explicitrawTUI subcommand as an unknown token and delegated it to bash. Bash then tried to executerawas a script and exited 127.What changed
Route
rawthrough its existing legacy invocation normalizer before the wrapper classifier. Theraw -c …andraw -- …passthrough forms remain shell-transparent; all otherrawshapes start the TUI and pass normalized launch arguments to the bootstrap.Related issue
closes #2739
User / Agent impact
/usr/bin/cosh raw <adapter>again launches the same TUI path as the directcosh-shell raw <adapter>entry instead of failing with exit 127.Risk and compatibility
Restores the pre-regression
rawwrapper contract while retaining the non-interactive passthrough behavior.Validation
cargo test -p cosh-shell runtime::invocation(22 passed)crates/cosh-shell/scripts/check-layout.shcargo fmt --all -- --checkcargo clippy -p cosh-shell --all-targets -- -D warningsgit diff --checkDocumentation and rollback
No documentation changes. Revert
1d3c374c5to restore the current wrapper behavior.