Skip to content

fix(guardrails): align /ship with retired review receipts #340

Closed as not planned

Description

@terisuke

問題

/ship の指示と注入コンテキストが、退役済みの producer が生成する
review_state="done" / reviewed_head をマージ条件として要求している。
実レビューとGitHubチェックが揃っていても、エージェントが未記録の状態を理由に停止する。

これは現行のツールレベル・マージゲートが拒否したという主張ではなく、
削除済み機構を前提とする指示の不整合。

ソース上の根拠

  • 確認した dev: 1237acfb4658b9a481a6e56221b5950d524239e6。
  • 退役コミット 3cd8456f4e は、
    guardrail-review.ts、完了記録・証跡復元・FULL/LIGHT/DOCS_ONLY機械ゲートを意図的に削除している。
  • profile/agents/ship.md / profile/commands/ship.md には完了状態の必須化・ツールレベル強制の説明が残る。
  • profile/plugins/guardrail-context.ts の compact() は、古いレビュー状態を explicit gate として注入する。
  • 現行の task 完了フックは委任カウント等を更新するが、退役済みの成功receiptは生成しない。

上記 profile/ は packages/guardrails/profile/ 配下。

是正範囲

minimal-safety の退役方針に宣言を整合させる。receipt機構の復活や手動state書換えはしない。
full tier の code-reviewer+Codex、現在のPR headへの対応、GitHub checks、重大指摘・変更要求の停止、
fact-check、権限・保護ブランチ制約を維持する。docs-only/low-riskの既存例外も維持する。

再現・受け入れ条件

  • 古い宣言/注入文で回帰テストが失敗することを示す(既存検証: 3 fail)。
  • 実際の command.execute.before に空のruntime stateを入力しても、古いreview telemetryをマージ条件にしない。
  • selected tierで必要な実レビュー、GitHubチェック、fact-checkの要求は保持される。
  • --match-head-commit により、確認したheadにマージ対象を固定する。
  • プラグイン所有stateの手動変更、admin/auto/self-approval等の回避経路を追加しない。
  • scoped/profile testsと独立レビューの証跡をPRへ添付する。

既存の local:check 問題 #338 / #339 は別件として扱い、この修正に混ぜない。

Activity

  1. added
    bugSomething isn't working
    documentationImprovements or additions to documentation
    on Oct 1, 2026
  2. terisuke commented on Oct 19, 2026

    @terisuke
    Author

    2026-10-19 の 2.x 再プラットフォーム(#343)後もこの不整合は残っています。profile/agents/ship.md・profile/commands/ship.md・guardrail-context.ts はそのまま持ち越したためです(後者は profile/plugins/ → profile/src/ に移動)。修正の #341 は旧配置のパスを触っているので、新しい配置で作り直しが必要です。本体チェックアウトに残っていた未コミットの関連作業(ship-contract.test.ts など)は、ローカルブランチ wip-guardrails-1x(337cd9ed23)に退避してあります。

  3. terisuke commented on Oct 25, 2026

    @terisuke
    Author

    Closed by owner decision (Terada Kousuke, 2026-10-25), posted verbatim:

    古い issue 13 件(gov #172/#166/#148/#147/#145、ccs anomalyco#390/#279/#270、opencode #340/#339/#325/#294/#1)は「運用で見る」として閉じてください。理由をコメントに残してください。

    Context: the AIDD H17 work moved to an operate-and-observe phase on 2026-10-24 (H17 control 216a955e accepted in aidd-governance#216, the report contract shipped to every entry in claude-code-skills#441, the design rule for shell state guards recorded as ADR-012). This issue was not on the H17 path, had no activity since its last update, and will be watched through real use (the guard ledger and the weekly tally in the operations guide) instead of as an open item. Reopen if real operation shows the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions