Skip to content

Conversation

@ootakazuhiko
Copy link
Collaborator

変更内容

  • CSP ランナー(scripts/formal/verify-csp.mjs)を拡張
    • CSP_RUN_CMD(shell)に加え、利用可能なら自動で以下を使用
      • FDR refines--mode typecheck|assertions
      • cspmchecker(typecheck)
  • CSP サンプル(spec/csp/sample.cspm)を「デッドロックしない最小例」に更新し、FDR の deadlock free assertion を同梱
  • ドキュメント更新
    • spec/csp/README.md: バックエンド優先順、FDR assertion 実行例、セキュリティ注意
    • docs/quality/formal-tools-setup.md: CSP バックエンド候補を明記
  • tools:formal:check の CSP 表示を改善(refines / cspmchecker の検出)

目的

ISSUE#1890 の「ツール候補の整理と採用案(ローカル実行の現実解)」を確定し、verify:csp を “設定があれば動く” から “ツールがあれば即動く” へ前進させます。

使い方(ローカル)

  • Typecheck(安全な既定):
    • pnpm run verify:csp -- --file spec/csp/sample.cspm --mode typecheck
  • Assertions 実行(FDR refines がある場合):
    • pnpm run verify:csp -- --file spec/csp/sample.cspm --mode assertions

関連ISSUE

Copilot AI review requested due to automatic review settings February 3, 2026 19:24
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

❓ Code Generation Drift Detection

Status:
Regeneration needed: No


Automated by AE-Framework Codegen

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Quality Summary

  • Adapters:

  • Formal: n/a

  • Replay: n/a

  • Trace IDs:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Progress Summary

  • Missing: metrics, quality, traceability, phaseState

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Generate Artifacts Preview

Generated at: 2026-02-03T19:41:04.860Z

  • tests/api/generated: clean
  • artifacts/codex: clean
  • artifacts/spec: clean

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@artifacts/quality/comment-body.txt

Copy link

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

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: 467bc298f5

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

KvOnce Trace Validation

  • OTLP: ✅ Success (Issues: 0)
  • NDJSON: ✅ Success (Issues: 0)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request extends the CSP (Communicating Sequential Processes) verification infrastructure by adding automatic toolchain detection and support for FDR's refines command and the OSS cspmchecker tool. The changes move the CSP integration from "stub only" to "works when tools are available locally."

Changes:

  • Extended verify-csp.mjs to auto-detect and use refines (FDR) and cspmchecker tools with a fallback priority order
  • Updated the CSP sample to be a genuinely deadlock-free minimal example with FDR assertion
  • Enhanced documentation with toolchain options, usage examples, and security warnings

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spec/csp/sample.cspm Updated to deadlock-free example with synchronized parallel composition and FDR assertion
spec/csp/README.md Added toolchain documentation in English and Japanese with usage examples
scripts/formal/verify-csp.mjs Added auto-detection for refines/cspmchecker and --mode flag for assertions
scripts/formal/tools-check.mjs Added detection and version reporting for refines and cspmchecker
docs/quality/formal-tools-setup.md Updated CSP section with supported backends and priority order

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

❓ Code Generation Drift Detection

Status:
Regeneration needed: No


Automated by AE-Framework Codegen

@ootakazuhiko
Copy link
Collaborator Author

レビュー指摘への対応です。

  • scripts/formal/verify-csp.mjs: runCommand 未定義で refines / cspmchecker 検出時に実行時例外になる問題を修正しました(runCommand を追加)。これにより、ツールが存在する環境でも summary が必ず生成されます。
  • scripts/formal/verify-csp.mjs: --mode の値を検証し、未知の値は警告ログを出した上で typecheck にフォールバックするようにしました。
  • scripts/formal/verify-csp.mjs: cspm / csp0 / fdr4 / fdr 等が検出される場合でも、現状の自動バックエンドは CSP_RUN_CMD / refines / cspmchecker のみである点が伝わるよう、メッセージを明確化しました。
  • spec/csp/README.md: 日本語でのツール候補/実行例は、プロジェクトの「英日併記」方針に合わせて残しています(英語節の単純重複ではなく、利用者向けの日本語資料として提供)。

Copilot Review Gate 対応として、該当スレッドは解決して再実行します。

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@artifacts/quality/comment-body.txt

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

CI Status Snapshot (2026-02-03T19:44:45.165Z)

@ootakazuhiko ootakazuhiko merged commit 051fcce into main Feb 3, 2026
57 of 58 checks 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.

formal: CSP 導入検討(並行/プロトコル検査)

2 participants