docs(architecture): audit managed workspace authorities - #4718
Conversation
Generated-by: OpenAI Codex Signed-off-by: jjj-n <1357598741@qq.com>
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head c370f92215a607a7a16de8aaff52a0591aa3b86d. The diff updates the managed-dependency foundation status and brings the workspace-version document forward to schema 15, successor/mutation projections, current migrations, and current CI claims. I checked the two documents against the merged #2485 implementation, the mutation lifecycle authority, schema migrations and projection rebuild/read paths, #4174's removals, #4326's remaining-work tracker, and the Windows workflows.
Local validation passed: repository format and lint, Core and Storage builds, ASF headers, git diff --check, and the six focused authority/recovery suites (83 passed, 4 Windows-only skips on Linux, 0 failed). Hosted test is green, and the head merges cleanly with current main at 5846521372d2dd0d3d2d33dc7784dd046dc3f7c8. I did not run native Windows or power-loss validation.
Two P2 documentation findings remain inline.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| |---|---| | ||
| | 协议 owner | `@maka/core` 的 strict fact contract 与 pure scanner | | ||
| | baseline 写入 owner | storage-internal WeakMap writer;不属于 package API,当前没有 production baseline producer;独立 successor/mutation writer 不由旧 owner 提供 | | ||
| | 写入 owner | baseline 与 successor/mutation writer 都是 storage-internal seam,不属于 package API;当前没有 production producer/consumer | |
There was a problem hiding this comment.
[P2] Keep this table consistently scoped after adding mutation writers. This new row broadens the table to baseline and successor/mutation writers, but the following rows still define the canonical source as exactly two RuntimeEvents, disposable state as only the three baseline projections, and rollback as five baseline parts. That is no longer the schema-15 authority described by this row: sqlite-runtime-store.ts:1781-1826 also validates the tool T1/outcome evidence for every successor and derives active mutation reservations, while sqlite-runtime-store.ts:1715-1740 rebuilds runtime_managed_mutation_reservations alongside the three version projections. A future consumer following this current implementation contract could omit required mutation facts or reservation state. Please either scope the whole table explicitly to the baseline transaction or update all of these rows to describe the full mutation ledger and its separate transaction boundaries.
There was a problem hiding this comment.
Fixed: the section now scopes the table explicitly to the baseline transaction. The intro states that the mutation ledger, per-successor tool T1/outcome evidence validation, active mutation reservations derivation, and the runtime_managed_mutation_reservations projection rebuild with its separate transaction boundaries are defined by the Managed Mutation Lifecycle Authority document, and that the canonical source, disposable state, and rollback rows cover only the baseline parts. The writer-owner row states the same limitation explicitly.
| | 真实 SIGKILL crash harness | 发布门槛 | 发布门槛 | 当前不承诺 | | ||
| | SQLite bundle 原子性 | 支持 | 实现预期;无独立 recovery gate | 支持 | | ||
| | 多进程 exact/conflict arbitration | 支持 | 实现预期;无独立 recovery gate | recovery/baseline gate | | ||
| | schema 10→current 并发升级 | 支持 | 实现预期;无独立 recovery gate | recovery/baseline gate | |
There was a problem hiding this comment.
[P2] Do not describe the scheduled non-blocking Windows lane as a gate. The test that proves both multi-process arbitration and schema-10 migration, sqlite-recovery-concurrency.test.js, appears only in .github/workflows/windows-baseline.yml:156-175. That workflow is schedule/manual-only, and both its job and storage step are continue-on-error; .github/workflows/windows-recovery.yml does not run this suite, and its pull-request path filter does not include the SQLite workspace-authority implementation or tests. This exact head consequently has only the Linux test check. Please label these two matrix entries as non-blocking scheduled Windows evidence, or wire the suite into a blocking Windows workflow before calling it a recovery/baseline gate.
There was a problem hiding this comment.
Fixed: both matrix entries are now labeled as non-blocking scheduled Windows evidence, and a note under the matrix documents that the arbitration and schema-10 concurrency evidence comes from the schedule/manual windows-baseline.yml lane with continue-on-error, that blocking windows-recovery.yml neither runs sqlite-recovery-concurrency.test.js nor covers the workspace-authority implementation and tests in its PR path filter, and that blocking CI evidence for the workspace authority is currently provided by the Linux test check only.
…s evidence non-blocking
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head f3389555d16db4909c410ca0f5a506321db0935f. The follow-up correctly closes both earlier documentation findings: section 2 now scopes the canonical facts, projections, rollback, and transaction rows to the baseline writer while delegating successor/mutation ownership to the linked lifecycle authority; section 9 now labels the Windows arbitration/migration coverage as scheduled non-blocking evidence and accurately states that the blocking recovery workflow does not run that suite or watch those paths.
I found no remaining P0-P3 issue in this increment. I checked the claims against .github/workflows/windows-baseline.yml, .github/workflows/windows-recovery.yml, the linked mutation-authority document, and the current schema/projection implementation. Repository formatting, ASF header audit, git diff --check, exact-head hosted test, and a clean patch-preserving merge onto current main dd7d1d595b7f9284e01fe76cf547c979a6d84a0a passed. I did not rerun native Windows or power-loss tests for this documentation-only increment.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
Summary
Three other paths originally listed in this subsystem were intentionally deleted by #4174 with the dormant Git workspace write path, so this audit does not restore them.
Refs #3522
Verification
npm run format:check— 1,922 files checked, no fixes requirednpm run lint— 3,224 files checked, no fixes requirednpm run build --workspace @maka/corenpm run build --workspace @maka/storageNODE_NO_WARNINGS=1 node --test --test-concurrency=1 packages/core/dist/__tests__/workspace-version-authority.test.js packages/storage/dist/__tests__/workspace-version-authority-persistence.test.js packages/storage/dist/__tests__/sqlite-recovery-concurrency.test.js packages/storage/dist/__tests__/sqlite-runtime-crash.test.js packages/storage/dist/__tests__/managed-dependency-environment.test.js packages/storage/dist/__tests__/managed-dependency-environment-crash.test.js— 85 passed, 2 POSIX-only cases skipped on Windows, 0 failedgit diff --checkmainWithout
NODE_NO_WARNINGS=1, Node 24.11.1 emits thenode:sqliteExperimentalWarning on the owner child process's stderr beforeREADY; that pre-existing test treats any stderr as failure. The same owner/crash file passes 5/5 with only that runtime warning suppressed.AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex audited the current implementation, migrations, CI routes, tests, issue/PR history, and drafted the documentation corrections. The human contributor remains responsible for the submitted result.
Checklist
Does this PR entail a change in behavior?