Skip to content

feat(cli): trust warn + config resolution + v2.0.1 - #5

Merged
AllenMuu merged 3 commits into
mainfrom
develop
Jul 31, 2026
Merged

feat(cli): trust warn + config resolution + v2.0.1#5
AllenMuu merged 3 commits into
mainfrom
develop

Conversation

@AllenMuu

Copy link
Copy Markdown
Owner

Summary

  • trust 加固: untrusted project config 不再静默回落 -> stderr 告警(不含 trust 命令,防 AI 自动 trust);--no-trust-warn/MYSQL_CLI_NO_TRUST_WARN=1 静默;--strict-trust 报错(exit 10);config trust 非 TTY 需 --yes
  • README: 补 Config resolution(文件优先级/同名替换/并集/字段覆盖)+ project-level trust 行为。
  • v2.0.1: CHANGELOG 标记 v2.0.1 release。

Test plan

  • go vet / go test ./... 全绿(warnUntrustedProject 矩阵 + config trust --yes 路径)
  • skill-format-check 全绿
  • 端到端: 告警/静默/--strict-trust exit 10/trust --yes 成功/trust 后无告警

AllenMuu and others added 3 commits July 31, 2026 19:35
Untrusted project config was silently skipped, falling back to global --
risking running on the wrong DB without notice. Now:

- stderr WARN when an untrusted project config exists and global is the
  fallback (non-blocking, exit 0). The warning omits the trust command to
  keep AI agents from auto-trusting; points to `config path` instead.
- --no-trust-warn / MYSQL_CLI_NO_TRUST_WARN=1 suppress; --strict-trust
  escalates to exit 10.
- `config trust` now requires --yes in non-interactive mode (y/N on TTY),
  blocking AI auto-trust.

Tests: warnUntrustedProject matrix + config trust --yes paths.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@AllenMuu
AllenMuu merged commit 1c8dbe3 into main Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant