Skip to content

docs(openspec): 歸檔會議生命週期稽核規格 - #34

Merged
monkey1sai merged 1 commit into
mainfrom
codex/openspec/archive-coordinator-session-lifecycle-events-audit
May 12, 2026
Merged

monkey1sai merged 1 commit into
mainfrom
codex/openspec/archive-coordinator-session-lifecycle-events-audit

Conversation

@monkey1sai

@monkey1sai monkey1sai commented May 12, 2026 •

Copy link
Copy Markdown
Owner

變更摘要

歸檔已合併的 OpenSpec change coordinator-session-lifecycle-events-audit,並同步正式 spec 與 SaaS roadmap Markdown/HTML。

修改原因

PR #32 已完成並 squash merge,依 AGENTS.md 的 OpenSpec workflow,正式接受後需要把 delta spec 併入 openspec/specs/,將 change 移入 archive,並更新 roadmap 的 spec 清單、archive 溯源、Phase 狀態與下一步規劃。

主要變更

  • 將 openspec/changes/coordinator-session-lifecycle-events-audit/ 移至 openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/。
  • 更新 openspec/specs/review-session-request-lifecycle/spec.md,納入 lifecycle audit endpoint、sequence event schema、lifecycle-only filter 與 close/release audit requirements。
  • 更新 docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md,把 fix(coordinator): timeout BimControlClient fetches to stop test flakiness #4 從 active 改為 completed / archived,並補 archive 溯源與驗證紀錄。
  • 更新 docs/plans/AI-BIM-governance-saas-roadmap-2026-05.html,保持同名 HTML 檢視版與 Markdown source 對齊。
  • 無 API、環境變數、部署流程、排程、Webhook 或 migration 變更;本 PR 只做規格與文件 archive sync。

驗證方式

  • openspec validate --all --strict:12 passed, 0 failed
  • openspec list:active change 只剩 worker-canonical-storage-batch-baseline
  • gitnexus detect-changes --scope all --repo C:\Users\IOT\.codex\worktrees\8dc5\AI-BIM-governance:risk low, affected processes 0
  • git diff --check:通過,僅有 Windows CRLF 提示

風險與影響

回滾方式

若需撤回,revert 本 PR 的 squash commit;這會把 archived change 移回 active change 目錄,並還原正式 spec / roadmap 的 archive sync。

後續建議

Summary by CodeRabbit

  • New Features

    • Added new API endpoint to retrieve a complete audit log of lifecycle events for review sessions, sorted by sequence.
  • Documentation

    • Updated project roadmap with revised priorities and completed milestones.
    • Enhanced specification documentation with standardized lifecycle event schema and audit trail requirements.

Review Change Stack

Copilot AI review requested due to automatic review settings May 12, 2026 11:10
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR formalizes the review session lifecycle event audit specification and documents its completion. The spec now requires coordinator-managed append-only lifecycle event persistence with a stable schema and a new API endpoint, while the roadmap updates track the closure of change #4 and adjust downstream dependencies and new follow-up items accordingly.

Changes

Lifecycle Event Audit Definition

Layer / File(s) Summary
Lifecycle Event Schema and API Endpoint Specification
openspec/specs/review-session-request-lifecycle/spec.md
Specifies lifecycle event persistence as append-only audit with required fields (event_id, session_id, type, sequence, created_at, payload), mandates review_request_id correlation when sessions are created from requests, requires _bim-control to record lifecycle events/binding updates sufficient to correlate review intent with coordinator audit trail, and adds new coordinator endpoint GET /api/review-sessions/{session_id}/lifecycle-events returning sorted lifecycle events (sessionCreated, sessionActive, sessionClosing, sessionClosed, kitInstanceReleased) excluding generic collaboration events.
Roadmap Completion Tracking and Downstream Dependencies
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md
Documents completion and archival of #4 across validation evidence, OpenSpec archive provenance, Phase 6 freeze table (lifecycle event schema archived but durable audit persistence frozen), P1 candidate completion entry, priority summary, and dependency diagram. Updates downstream changes (notification-webhook-service, observability-audit-baseline) to reference archived #4 lifecycle events. Updates review-session-request-lifecycle spec status summary with lifecycle audit endpoint and sequence schema coverage. Adds new 2026-05-12 follow-up item worker-canonical-storage-batch-baseline for canonical storage batch readiness (single-file conversion → worker-hosted visual validation → full batch verification).

Sequence Diagram(s)

This section is not applicable to this PR's changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • monkey1sai/AI-BIM-governance#32: The main PR's OpenSpec additions for coordinator session lifecycle audit (lifecycle-events endpoint, event schema, and sequence field) directly correspond to the code implementation changes in PR #32 (EventLog sequence, lifecycle-events GET endpoint, and related payload additions).
  • monkey1sai/AI-BIM-governance#28: Both PRs modify the openspec review-session-request-lifecycle spec to clarify coordinator-managed lifecycle and audit behavior requirements.
  • monkey1sai/AI-BIM-governance#31: Both PRs add and refine the same follow-up item worker-canonical-storage-batch-baseline (single-file gate with visual preview and batch verification specs).

Poem

🐰 The lifecycle audit hops in line,
With sequence marks, so crisp and fine!
From request born to session sealed,
Each event logged, the trail revealed.
Phase 4's done—the roadmap's neat,
Next batch conversion can't be beat! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: archiving the completed coordinator session lifecycle events audit specification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/openspec/archive-coordinator-session-lifecycle-events-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@monkey1sai

Copy link
Copy Markdown
Owner Author

Code Review Summary

Verdict: No blocking findings

Critical

  • 無。

Warnings

  • 無。

Suggestions

  • 無需修改。本 PR 是 OpenSpec archive sync,差異集中在 change folder rename、正式 spec 合併與 roadmap Markdown/HTML 對齊。

Looks Good

  • coordinator-session-lifecycle-events-audit 已從 active change 移到 openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/,archive rename 保留原 proposal/design/tasks/spec delta。
  • review-session-request-lifecycle 正式 spec 已納入 lifecycle audit endpoint、sequence schema 與 lifecycle-only filter。
  • Roadmap 已把 fix(coordinator): timeout BimControlClient fetches to stop test flakiness #4 改為 completed / archived,並保留 Phase 6 durable audit persistence 仍凍結的邊界。
  • 本地驗證紀錄完整:OpenSpec strict validation、GitNexus detect-changes low risk、git diff --check passed。

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md`:
- Line 40: 移除區塊引用(以 > 開頭的 blockquote)內的多餘空白行,使該 blockquote 內容連續不間斷以修正
MD028(no-blanks-blockquote)錯誤;檢查該文件中所有以 > 開頭的段落(特別是包含說明或列表的
blockquote)並刪除中間的空白行以保持單一連續段落格式(保留原有行首的 > 標記)。

In `@openspec/specs/review-session-request-lifecycle/spec.md`:
- Around line 54-57: 此段落及後續相關要求文字需由英文改為繁體中文,但保留技術字串原文;請將描述「The coordinator SHALL
represent review session lifecycle with `created`, `active`, `closing`,
`closed`, and `failed`...」及後續條款(包含
`_bim-control`、`event_id`、`session_id`、`type`、`sequence`、`created_at`、`payload`、`review_request_id`
等欄位/字樣)翻譯為繁體中文,保留所有 API/欄位/enum/特殊字串原文不變,並更新 Line 54–117 範圍內的
requirement/scenario 文字為繁體中文表述,同時確保語句語意與原英文條件(append-only lifecycle audit
events、persist lifecycle transitions、preserve review_request_id 等)完全對等。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9dc1904b-e4af-4099-a7d8-aca9e3208b47

📥 Commits

Reviewing files that changed from the base of the PR and between 8eaa7cb and a452499.

📒 Files selected for processing (8)
  • docs/plans/AI-BIM-governance-saas-roadmap-2026-05.html
  • docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md
  • openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/.openspec.yaml
  • openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/design.md
  • openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/proposal.md
  • openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/specs/review-session-request-lifecycle/spec.md
  • openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/tasks.md
  • openspec/specs/review-session-request-lifecycle/spec.md

>
> **2026-05-12 更新(canonical storage batch follow-up)**:新增 active change **`worker-canonical-storage-batch-baseline`**,專門處理已歸檔 #3/#3A 留下的 readiness gap:`C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc` 13-file real batch 尚未 passed,且 `--limit 1` 曾 600s timeout。此 change 是下一個 worker risk burn-down;執行順序明確改為「單檔 real conversion 先跑通 → 用既有 web viewer / Kit 載入 worker-hosted `model.usdc` 看轉檔成果 → 再跑 full 13-file batch」。`coordinator-session-lifecycle-events-audit` 仍保留為下一個新功能候選。
> **2026-05-12 更新(canonical storage batch follow-up)**:新增 active change **`worker-canonical-storage-batch-baseline`**,專門處理已歸檔 #3/#3A 留下的 readiness gap:`C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc` 13-file real batch 尚未 passed,且 `--limit 1` 曾 600s timeout。此 change 是下一個 worker risk burn-down;執行順序明確改為「單檔 real conversion 先跑通 → 用既有 web viewer / Kit 載入 worker-hosted `model.usdc` 看轉檔成果 → 再跑 full 13-file batch」。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

移除 blockquote 內的空白行以避免 MD028。

Line 40 的空白行會觸發 no-blanks-blockquote,建議刪除該空白行。

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 40-40: Blank line inside blockquote

(MD028, no-blanks-blockquote)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md` at line 40, 移除區塊引用(以 >
開頭的 blockquote)內的多餘空白行,使該 blockquote 內容連續不間斷以修正
MD028(no-blanks-blockquote)錯誤;檢查該文件中所有以 > 開頭的段落(特別是包含說明或列表的
blockquote)並刪除中間的空白行以保持單一連續段落格式(保留原有行首的 > 標記)。

Comment on lines +54 to 57
The coordinator SHALL represent review session lifecycle with `created`, `active`, `closing`, `closed`, and `failed`. The coordinator SHALL persist lifecycle transitions as append-only lifecycle audit events with stable event schema. `_bim-control` SHALL store review request lifecycle events or request binding updates sufficient to correlate review intent with the coordinator session audit trail.

Lifecycle audit events MUST include `event_id`, `session_id`, `type`, `sequence`, `created_at`, and `payload`. When a session is created from a review request, lifecycle events MUST preserve `review_request_id` in payload or equivalent correlation data.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

請將新增 OpenSpec 敘述改為繁體中文(保留技術字串原文)。

Line 54 到 Line 117 的 requirement/scenario 文字目前為英文;依規範,OpenSpec artifact 應使用繁體中文(API path、schema 欄位、enum 等可保留原文)。

As per coding guidelines, "All OpenSpec artifacts must use Traditional Chinese (繁體中文); preserve original text for API paths, schema fields, CLI flags, status enums, logs/errors, external product names, and OpenSpec parser required headers."

Also applies to: 62-74, 90-117

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openspec/specs/review-session-request-lifecycle/spec.md` around lines 54 -
57, 此段落及後續相關要求文字需由英文改為繁體中文,但保留技術字串原文;請將描述「The coordinator SHALL represent review
session lifecycle with `created`, `active`, `closing`, `closed`, and
`failed`...」及後續條款(包含
`_bim-control`、`event_id`、`session_id`、`type`、`sequence`、`created_at`、`payload`、`review_request_id`
等欄位/字樣)翻譯為繁體中文,保留所有 API/欄位/enum/特殊字串原文不變,並更新 Line 54–117 範圍內的
requirement/scenario 文字為繁體中文表述,同時確保語句語意與原英文條件(append-only lifecycle audit
events、persist lifecycle transitions、preserve review_request_id 等)完全對等。

@monkey1sai
monkey1sai merged commit c37f5bb into main May 12, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR archives the already-merged OpenSpec change coordinator-session-lifecycle-events-audit and synchronizes the “official” OpenSpec spec plus the May 2026 SaaS roadmap (Markdown + HTML) so that openspec/specs/, openspec/changes/archive/, and planning artifacts stay aligned.

Changes:

  • Archived the OpenSpec change into openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/ (proposal/design/spec delta/tasks + metadata).
  • Updated the official review-session-request-lifecycle spec to include lifecycle audit event requirements and the lifecycle-events endpoint requirements.
  • Updated the May 2026 SaaS roadmap Markdown/HTML to mark #4 as completed/archived and add validation/evidence references.

Reviewed changes

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

Show a summary per file
File Description
openspec/specs/review-session-request-lifecycle/spec.md Syncs official spec with lifecycle audit log + lifecycle-events endpoint requirements.
openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/.openspec.yaml Adds archived change metadata for the 2026-05-12 snapshot.
openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/proposal.md Captures the archived change’s rationale and scope boundaries.
openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/design.md Captures design decisions and non-goals for the archived change.
openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/tasks.md Preserves the completed task checklist and validation steps for the archived change.
openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/specs/review-session-request-lifecycle/spec.md Stores the delta spec excerpt for traceability from archive → official spec.
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md Updates roadmap status/evidence to reflect the archived #4 change.
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.html Regenerates/updates HTML view to match the Markdown roadmap updates.

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


- **WHEN** coordinator cannot create the session or open required artifacts
- **THEN** the review request and session record a failed status with an error reference
- **AND** any coordinator-side lifecycle audit event for the failure includes `type=failed` or failure details in `payload`
Comment on lines +39 to 42
> **2026-05-12 更新(canonical storage batch follow-up)**:新增 active change **`worker-canonical-storage-batch-baseline`**,專門處理已歸檔 #3/#3A 留下的 readiness gap:`C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc` 13-file real batch 尚未 passed,且 `--limit 1` 曾 600s timeout。此 change 是下一個 worker risk burn-down;執行順序明確改為「單檔 real conversion 先跑通 → 用既有 web viewer / Kit 載入 worker-hosted `model.usdc` 看轉檔成果 → 再跑 full 13-file batch」。

> **2026-05-12 更新(並行啟動 #4 lifecycle audit)**:新增 active change **`coordinator-session-lifecycle-events-audit`**,在不干擾 `_worker` canonical batch risk burn-down 的前提下,先把 `bim-review-coordinator` 既有 session events 收斂成 append-only lifecycle audit endpoint 與固定 schema;`_bim-control` 僅補 review request correlation 欄位。此 change 不解凍 Phase 6 audit persistence / observability / webhook production delivery。
> **2026-05-12 更新(#4 lifecycle audit archive 對齊)**:依 `openspec/changes/archive/2026-05-12-coordinator-session-lifecycle-events-audit/` 與現行 `openspec/specs/review-session-request-lifecycle/spec.md` 更新 **§1.2 / §1.3 / §1.4 / §2 / §5 / §6 / §10**。#4 已完成並歸檔:`bim-review-coordinator` 已具備 append-only lifecycle audit endpoint 與 `sequence` event schema;`_bim-control` review request lifecycle events 已補 `session_id` / `correlation_id`。此 archive 不解凍 Phase 6 audit persistence / observability / webhook production delivery。

@monkey1sai
monkey1sai deleted the codex/openspec/archive-coordinator-session-lifecycle-events-audit branch May 12, 2026 11:14
monkey1sai added a commit that referenced this pull request Jun 2, 2026
…ig-hygiene

L4 9 items 拆三類,本 design 收第 1 類(可設定防禦 #2 #6 #23 #26,複用 CH-2 strict
pattern 預設 off 不破 demo)+ 第 2 類(repo 治理 #29 #36)共 6 項。使用者拍板:#6
維持 unauth + 文件 + test、#34 不納入。執行權威 = 同名 OpenSpec change。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants