Skip to content

docs(openspec): 封存 worker mapping lineage 基線 - #30

Merged
monkey1sai merged 1 commit into
mainfrom
codex/openspec/archive-worker-mapping-lineage-quality-baseline
May 12, 2026
Merged

monkey1sai merged 1 commit into
mainfrom
codex/openspec/archive-worker-mapping-lineage-quality-baseline

Conversation

@monkey1sai

@monkey1sai monkey1sai commented May 12, 2026 •

Copy link
Copy Markdown
Owner

變更摘要

封存 worker-mapping-lineage-quality-baseline OpenSpec change,將 lineage API、all-IFC-entity coverage policy、storage batch evidence tier 與 worker UI lineage / quality view 併入現行 specs,並同步更新 SaaS roadmap Markdown/HTML。

修改原因

PR #29 已合併,依 OpenSpec workflow 需要在實作接受後把 delta specs 併入 openspec/specs/,再將 change artifacts 移入 archive,避免 roadmap 與現行 spec 目錄漂移。

主要變更

  • openspec/specs/worker-artifact-pipeline/spec.md:併入 lineage graph API、stable artifact IDs、all-IFC-entity coverage denominator、minimum_coverage_ratio=1.0 policy 與 storage batch verification requirements。
  • openspec/specs/runtime-verification-evidence/spec.md:併入 storage batch evidence tier、locked mapping baseline evidence、issue-to-real-prim evidence 條件。
  • openspec/specs/worker-demo-upload-convert-ui/spec.md:併入 worker UI lineage / quality view requirements。
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/:保留已接受 change 的 proposal、design、tasks 與 delta spec 快照。
  • docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md 與 .html:同步 archive 狀態、候選清單、Phase 1 gap、優先順序與下一步。

驗證方式

  • openspec archive worker-mapping-lineage-quality-baseline --yes:完成,更新 3 個 specs,archive folder 已建立。
  • openspec validate --all --strict:11 specs passed, 0 failed。
  • git diff --check:通過。
  • gitnexus detect-changes --scope compare --base-ref origin/main --repo AI-BIM-governance:回報 HIGH,但內容指向已合併 PR feat(worker): 建立 lineage API 與 IFC entity coverage 基線 #29 的 _worker symbols;fallback git diff --name-only origin/main 確認本 PR scope 僅 OpenSpec specs/archive 與 roadmap 文件。

風險與影響

  • 這是規格與文件收斂 PR,不修改 runtime production code。
  • runtime-verification-evidence 現在明確要求 canonical storage batch evidence 才能宣稱 production mapping baseline locked。
  • Roadmap 已把 Add project architecture overview UI #3 / #3A 從候選池移到 archived;下一個 P1 候選以 #4 coordinator-session-lifecycle-events-audit 為主。

回滾方式

Revert 此 PR 的 merge commit,可將 openspec/specs/ 與 roadmap 回到 archive 前狀態,並把 change artifacts 從 archive path 還原到 active change path。

後續建議

  • 補 C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc canonical 13-file real batch evidence。
  • 先解決 89MB fixture --limit 1 超過 600s timeout 的 runtime / performance blocker,再宣稱 production baseline locked。

Summary by CodeRabbit

  • Documentation
    • Updated project roadmap with phase status clarifications and specification baseline confirmations.
    • Expanded conversion quality and evidence specifications with detailed metric requirements, batch verification, and quality policy enforcement.
    • Added lineage API requirements for artifact tracking and quality metrics exposure.
    • New specification for worker demo UI to display conversion quality and lineage information via API endpoints.

Review Change Stack

Copilot AI review requested due to automatic review settings May 12, 2026 07:37
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR archives the worker-mapping-lineage-quality-baseline development into four specification files and the governance roadmap: it adds comprehensive real conversion evidence policy and coverage metrics to runtime-verification-evidence spec, defines worker artifact pipeline quality gates and a new lineage graph API, introduces worker UI visualization for lineage and quality status, and updates the roadmap to reflect these changes, capabilities, phases, and remaining constraints before production baseline lock.

Changes

Worker Lineage and Quality Baseline Integration

Layer / File(s) Summary
Real conversion evidence and coverage policy
openspec/specs/runtime-verification-evidence/spec.md
Specification expands to define comprehensive metrics recording (converter/fixture identity, openability, IFC→USD mapping counts, coverage ratio/status, lineage API status), establishes measure-first policy before baseline lock and stricter pass/warn/fail policy after lock, adds batch storage IFC evidence tier for storage/*.ifc fixtures with Windows glob equivalence, and introduces issue-to-real-prim evidence gated on locked coverage baseline and traceability through element_mapping.json.
Worker artifact pipeline: quality gates, lineage API, and batch verification
openspec/specs/worker-artifact-pipeline/spec.md
Converts conversion-quality requirement from P0 gates into policy-driven enforcement with artifact readiness criteria, coverage reported before/after baseline lock with locked minimum policy fields, all IFC entities required in denominator with non-renderable materialization. Adds GET /api/artifacts/{artifact_id}/lineage returning normalized graph of source/derived/index/mapping artifacts with quality-metrics summaries and diagnostics. Introduces storage IFC batch quality verification over storage/*.ifc with per-fixture records covering IDs, openability, mapping/coverage metrics, lineage-API status, duration, and diagnostics.
Worker UI lineage and quality visualization
openspec/specs/worker-demo-upload-convert-ui/spec.md
New requirement for lineage and quality view using _worker API endpoints rather than local files. Specifies visualization of successful conversion lineage, quality metrics (coverage, minimum coverage, mapping counts, warnings/diagnostics), warn-state behavior (handoff available, not verified labels), incomplete lineage/quality surfacing without filesystem paths, and ensures review routing to existing coordinator/viewer without worker session management.
Roadmap capability inventory and archival
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md
Updates 2026-05-12 follow-up to establish worker-mapping-lineage-quality-baseline branch archival, updates §1.2 capability inventory table for 11 affected worker/runtime-verification specs, adds §1.3 verified evidence milestone documenting openspec validation and worker test pass, clarifies constraints that production coverage baseline remains unlocked pending canonical 13-file batch, and establishes §1.4 traceability linking archived baseline to current specs (lineage graph API, stable derived/index/mapping IDs, minimum coverage policy, storage batch evidence tier, worker UI support).
Roadmap phase gaps and execution constraints
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md
Marks Phase 1 mapping/lineage content as archived and incorporated into current specs, explicitly lists production coverage as unlocked (canonical 13-file batch incomplete), links lineage API to existing constraints. Phase 6 freeze clarified to exclude Phase 4–5 candidates. Quality pipeline conclusion emphasizes blocker resolved, lineage API and all-IFC-entity policy archived, but prohibits coverage as production baseline until canonical storage batch locks. Archived worker-real-conversion-quality constraint updated with defined all-IFC-entity policy but production gate not locked. §5.2 merges #3/#3A into single candidate with archive path, specs, completed items, and canonical batch completion condition. Priority summary and dependency diagram updated with remaining evidence conditions for #1 and #3/#3A. Risk R1 restated as direct limitation (canonical/production baseline not completed).
Roadmap execution plan and next steps
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md
Confirms #1/#3/#3A archival alignment with current specs, adds concrete next worker quality work (canonical storage 13-file real batch evidence with 89MB fixture performance focus), maintains #2 execution pause with GPU capacity and kit-mcp signalPort/streamPort alignment steps, reinforces Phase 6 candidate freeze startup rules requiring PR reference and business intake confirmation, and defers #5/#6 to maintain overall scope consistency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • monkey1sai/AI-BIM-governance#29: Main PR documents and incorporates the exact _worker lineage/coverage baseline, lineage API, and batch verification artifacts/spec changes implemented in this PR.
  • monkey1sai/AI-BIM-governance#28: Both PRs modify OpenSpec runtime-verification-evidence and worker-artifact-pipeline specs to coordinate lineage/mapping evidence requirements and GPU-capacity-dependent verification gating.
  • monkey1sai/AI-BIM-governance#26: Both PRs modify the same roadmap file and update OpenSpec capability archival entries and spec inventory alignment.

Poem

🐰 Lineage traces through the artifacts' dance,
Quality metrics lock baseline's stance,
From worker to UI, the path is clear,
Canonical batches settle the frontier!
The roadmap marks progress, the next steps align—
All lineage shining, a feature so fine! ✨

🚥 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 PR title clearly summarizes the main change: archiving the worker mapping lineage quality baseline by merging delta specs into current specs and moving change artifacts to archive.
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-worker-mapping-lineage-quality-baseline

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.

@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: 1

🤖 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 `@openspec/specs/runtime-verification-evidence/spec.md`:
- Around line 164-165: The spec uses minimum_coverage_locked in multiple places
but the artifact pipeline spec expects minimum_coverage_baseline_locked; update
the spec to use the unified field name minimum_coverage_baseline_locked
everywhere (e.g., the evidence record description that currently lists
minimum_coverage_locked, and the other occurrence around line 183) so the
evidence payloads and UI parsers are consistent with the artifact pipeline
contract; ensure the related sentence that lists fields still reads correctly
(minimum_coverage_baseline_locked=true, minimum_coverage_ratio=1.0,
coverage_denominator=source_ifc_entity_count, per-fixture metrics, and batch
status as passed).
🪄 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: 5ebb2394-f226-4848-b9b6-28958957528c

📥 Commits

Reviewing files that changed from the base of the PR and between a9500ca and a94cad6.

📒 Files selected for processing (12)
  • 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-worker-mapping-lineage-quality-baseline/.openspec.yaml
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/design.md
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/proposal.md
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/runtime-verification-evidence/spec.md
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/worker-artifact-pipeline/spec.md
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/worker-demo-upload-convert-ui/spec.md
  • openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/tasks.md
  • openspec/specs/runtime-verification-evidence/spec.md
  • openspec/specs/worker-artifact-pipeline/spec.md
  • openspec/specs/worker-demo-upload-convert-ui/spec.md

Comment on lines +164 to +165
- **THEN** the evidence records `minimum_coverage_locked=true`, `minimum_coverage_ratio=1.0`, `coverage_denominator=source_ifc_entity_count`, per-fixture metrics, and the batch status as `passed`

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

Unify baseline-lock field name across specs

Line 164 and Line 183 use minimum_coverage_locked=true, but the artifact pipeline spec defines the lock field as minimum_coverage_baseline_locked. This contract drift can break evidence/UI parsing and create incompatible payload expectations.

Proposed spec-alignment diff
- - **THEN** the evidence records `minimum_coverage_locked=true`, `minimum_coverage_ratio=1.0`, `coverage_denominator=source_ifc_entity_count`, per-fixture metrics, and the batch status as `passed`
+ - **THEN** the evidence records `minimum_coverage_baseline_locked=true`, `minimum_coverage_ratio=1.0`, `coverage_denominator=source_ifc_entity_count`, per-fixture metrics, and the batch status as `passed`

- - **THEN** the evidence records the issue identifier, IFC GUID, mapped USD prim path, conversion job ID, artifact group ID, and `minimum_coverage_locked=true`
+ - **THEN** the evidence records the issue identifier, IFC GUID, mapped USD prim path, conversion job ID, artifact group ID, and `minimum_coverage_baseline_locked=true`

Also applies to: 183-183

🤖 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/runtime-verification-evidence/spec.md` around lines 164 - 165,
The spec uses minimum_coverage_locked in multiple places but the artifact
pipeline spec expects minimum_coverage_baseline_locked; update the spec to use
the unified field name minimum_coverage_baseline_locked everywhere (e.g., the
evidence record description that currently lists minimum_coverage_locked, and
the other occurrence around line 183) so the evidence payloads and UI parsers
are consistent with the artifact pipeline contract; ensure the related sentence
that lists fields still reads correctly (minimum_coverage_baseline_locked=true,
minimum_coverage_ratio=1.0, coverage_denominator=source_ifc_entity_count,
per-fixture metrics, and batch status as passed).

@monkey1sai
monkey1sai merged commit 66f43bd 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 accepted OpenSpec change worker-mapping-lineage-quality-baseline by merging its delta requirements into the current authoritative specs under openspec/specs/, preserving the change artifacts under openspec/changes/archive/, and updating the SaaS roadmap (Markdown + generated HTML) to reflect the archived status and updated Phase 1 gaps.

Changes:

  • Merge lineage API, all-IFC-entity coverage baseline policy, storage batch verification/evidence tier, and worker UI lineage/quality requirements into current OpenSpec specs.
  • Add an archive snapshot folder for the accepted change (proposal/design/tasks + delta spec snapshots).
  • Update the 2026-05 SaaS roadmap Markdown and regenerate the corresponding HTML to reflect the new archived state and next priorities.

Reviewed changes

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

Show a summary per file
File Description
openspec/specs/worker-demo-upload-convert-ui/spec.md Adds current-spec requirements for worker UI lineage + quality observability.
openspec/specs/worker-artifact-pipeline/spec.md Incorporates lineage API contract, all-entity coverage baseline policy, and storage batch verification requirements.
openspec/specs/runtime-verification-evidence/spec.md Incorporates storage batch evidence tier + issue-to-real-prim evidence prerequisites.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/tasks.md Archives the change task checklist as historical record.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/worker-demo-upload-convert-ui/spec.md Stores delta snapshot of UI spec changes for the archived change.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/worker-artifact-pipeline/spec.md Stores delta snapshot of pipeline spec changes for the archived change.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/specs/runtime-verification-evidence/spec.md Stores delta snapshot of evidence spec changes for the archived change.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/proposal.md Archives the accepted change proposal.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/design.md Archives the accepted change design decisions and rationale.
openspec/changes/archive/2026-05-12-worker-mapping-lineage-quality-baseline/.openspec.yaml Adds archive metadata for the change folder.
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.md Updates roadmap narrative/status tables to reflect the archived change and updated next steps.
docs/plans/AI-BIM-governance-saas-roadmap-2026-05.html Regenerates the HTML view to match the updated roadmap Markdown.

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

Comment on lines +161 to +165
#### Scenario: Full storage fixture batch passes

- **WHEN** all required `storage/*.ifc` fixtures complete real IFC->USDC conversion with openable USDC, truthful mapping output, lineage API success, and every source IFC entity mapped to at least one real USD prim path
- **THEN** the evidence records `minimum_coverage_locked=true`, `minimum_coverage_ratio=1.0`, `coverage_denominator=source_ifc_entity_count`, per-fixture metrics, and the batch status as `passed`

lineage API / UI / quality policy: implemented in change branch
lineage API / UI / quality policy: archived into current specs
_worker dependency baseline: requirements pin fastapi/starlette/uvicorn to repo baseline
canonical storage dry-run: 13 IFC fixtures found; not converted; minimum_coverage_locked=false
| **涵蓋原候選** | #3 `worker-artifact-lineage-api` + #3A `worker-mapping-quality-baseline` |
| **已併入 specs** | `worker-artifact-pipeline`、`runtime-verification-evidence`、`worker-demo-upload-convert-ui` |
| **已完成** | lineage graph API、stable mapping/index derived artifact IDs、worker UI lineage / quality view、all-IFC-entity coverage denominator、`minimum_coverage_ratio=1.0` policy、warn reviewable / fail blocking readiness、storage batch helper |
| **仍未宣稱完成** | canonical 13-file real batch 未完成;`minimum_coverage_locked=true` production baseline 與 issue → real prim verified evidence 尚未成立 |
3. **下一個 worker 品質工作:補 canonical storage 13-file real batch evidence**:
- 使用 `C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc` 作為正式本機 fixture root。
- 先解決 89MB fixture `--limit 1` 超過 600s timeout 的 runtime / performance 問題,再擴到 13-file batch。
- 只有全批次 real conversion、USDC openability、lineage API、all-IFC-entity coverage 都通過時,才可把 `minimum_coverage_locked=true` production baseline 寫入 evidence。
Comment on lines +176 to +184
### Requirement: Issue-to-real-prim evidence requires locked real mapping

Runtime verification evidence SHALL only classify issue-to-real-prim highlight baseline as verified when the worker mapping is real, coverage baseline is locked, and the highlighted prim path can be traced from an issue's IFC GUID through `element_mapping.json` to `primary_usd_prim_path` or `usd_prim_paths`.

#### Scenario: Issue highlight uses real mapping

- **WHEN** a reviewer or smoke test highlights an issue whose IFC GUID appears in real mapping output with a valid primary USD prim path
- **THEN** the evidence records the issue identifier, IFC GUID, mapped USD prim path, conversion job ID, artifact group ID, and `minimum_coverage_locked=true`

@monkey1sai
monkey1sai deleted the codex/openspec/archive-worker-mapping-lineage-quality-baseline branch May 12, 2026 07:41

@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: a94cad6567

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

#### Scenario: Full storage fixture batch passes

- **WHEN** all required `storage/*.ifc` fixtures complete real IFC->USDC conversion with openable USDC, truthful mapping output, lineage API success, and every source IFC entity mapped to at least one real USD prim path
- **THEN** the evidence records `minimum_coverage_locked=true`, `minimum_coverage_ratio=1.0`, `coverage_denominator=source_ifc_entity_count`, per-fixture metrics, and the batch status as `passed`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the canonical baseline-lock field name

This new evidence scenario writes minimum_coverage_locked=true, but the rest of the archived contract and worker payloads use minimum_coverage_baseline_locked (for example the conversion-quality requirement immediately above and worker-artifact-pipeline both name that field). If future batch evidence follows this scenario verbatim, downstream checks looking for the canonical field will not recognize the baseline as locked; the same shortened name also appears later in the issue-highlight scenario/roadmap and should be aligned.

Useful? React with 👍 / 👎.


`_worker` SHALL provide an implementation path for batch quality verification over repo-local `storage/*.ifc` fixtures. The Windows local fixture glob `C:\Repos\active\iot\AI-BIM-governance\storage\*.ifc` and the worktree-local `_worker` dev source root `../storage` SHALL be treated as the same fixture source class for local validation.

The batch verification path MUST use existing worker artifact intake and selected-source conversion contracts unless a later production batch-job spec is opened. Each fixture result MUST record filename, relative path, size, source artifact ID, artifact group ID, conversion job ID, USDC openability, mapped count, unmapped count, coverage ratio, coverage status, lineage API status, duration when available, and failure or warning details.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require batch output to carry the evidence fields

The runtime-evidence spec now requires the storage batch tier to identify source_ifc_entity_count, minimum_coverage_ratio=1.0, and the baseline-lock state, but this worker batch contract only requires generic mapped/unmapped counts plus coverage status. If someone implements or validates against this spec alone, the batch summary can pass the worker contract while still being insufficient to prove the all-IFC-entity denominator or baseline-lock evidence required before declaring the production mapping baseline locked.

Useful? React with 👍 / 👎.

monkey1sai added a commit that referenced this pull request Jun 2, 2026
tidy-repo-scripts-tests-hygiene: #22 deploy.ps1 strict-mode fail-safe / #25 port 常數 / #31 .etl gitignore / #37 conftest / #39 fake host 白名單 / #30 alias comment / #20 INVARIANT 註解 / #40 superseded。opus 4-lens 全 LGTM。
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