Skip to content

fix(sec-core): complete skill-ledger status help - #2707

Open
jfeng18 wants to merge 1 commit into
mainfrom
fix/sec-core/ledger-help-statuses
Open

fix(sec-core): complete skill-ledger status help#2707
jfeng18 wants to merge 1 commit into
mainfrom
fix/sec-core/ledger-help-statuses

Conversation

@jfeng18

@jfeng18 jfeng18 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Why

The app-level integrity status list in skill-ledger --help omitted unmanaged and error, and check --help omitted error, so the documented status vocabulary drifted from the actual _VERDICT_SEVERITY verdicts. Readers could not tell from help output which statuses exist or when each one is produced.

What changed

  • Help text now lists all eight verdicts from _VERDICT_SEVERITY and documents when each status is produced.
  • check --help error semantics calibrated against observed behavior: a failed single check prints {"status":"error"} and exits 1, while --all records the error as a per-entry item and continues.
  • Added a drift test asserting all eight statuses appear in --help.

Related issue

closes #2656

User / Agent impact

Help output only; no change to ledger evaluation, exit codes, or JSON output.

Risk and compatibility

  • Public CLI, API, configuration, or documented behavior changed
  • Privileged or security-sensitive behavior changed
  • Cross-component contract changed
  • Migration or rollback guidance is needed

Only the CLI help text changed (status vocabulary completed); zero runtime behavior change.

Validation

  • Local + ECS pytest: 289 passed (baseline 286 + 3 new, latest main baseline re-verified).
  • Locked-version format gates (black 26.3.1 / isort 8.0.1) pass idempotently.

Documentation and rollback

The change itself is the documentation correction; no separate docs update needed. Single commit — revert it directly.

@github-actions github-actions Bot added the component:sec-core src/agent-sec-core/ label Aug 20, 2026

@qoderai qoderai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本次改动主要补齐 skill-ledger 与 check 子命令的状态帮助文本,并新增帮助契约测试。整体实现与 issue 描述及现有行为对齐,未发现功能或安全问题。以下为三点细节建议,均为 P2 级别,可按需采纳:

  • check 的 error JSON 测试示例目前绑定到缺失目录文案,未来扩展错误类型时可能增加演进成本,可改为只校验结构而不依赖具体提示字符串。
  • _status_line_prefix 将状态标签按 9 字符左对齐视为格式契约,建议在测试中简要说明该约定或改为更宽松的匹配以降低对 CLI 文本布局的耦合。
  • cmd_check 的 error 文案中“this object”略显抽象,可考虑明确返回 JSON 至少包含 statuserror 字段,以便用户和 Agent 正确解析错误结果。

🤖 Generated by QoderView workflow run

Comment thread src/agent-sec-core/tests/unit-test/skill_ledger/test_cli_help.py
Comment thread src/agent-sec-core/tests/unit-test/skill_ledger/test_cli_help.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e0a0eec7d

ℹ️ 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".

The app-level integrity status list omitted unmanaged and error,
and check help omitted error. List all eight verdicts from
_VERDICT_SEVERITY, document when each status is produced, and
add a help-contract test that matches statuses layout-independently.

Closes #2656

Assisted-by: Qoder
Signed-off-by: Jiangtian Feng <jiangtianf97@163.com>
@jfeng18
jfeng18 force-pushed the fix/sec-core/ledger-help-statuses branch from 8e0a0ee to d085ce5 Compare August 21, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:sec-core src/agent-sec-core/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-core] skill-ledger help 的 Integrity statuses 清单缺少 unmanaged 与 error

1 participant