feat(execution): separate work declarations, refinement bounds and session policy - #81
Merged
Merged
Conversation
…urface Implement the explicitly approved mechanism-not-policy classification/check slice. Keep a maintained vocabulary and exact counts keyed by path, named scope and word; classify all 307 occurrences in 123 records across 28 files. Scan identifiers and runtime/SQL literals, ignore TypeScript comments, and refuse new, changed or stale sites without a reviewed table update. Wire check:policy-words into the shared blocking static contract and its agent plan, with a guard against duplicate/missing execution. Move the paired record to implemented with explicit approval, update inbound links, and retain the work-shape rewrite, field experiments and frame/storage migration as deferred/unapproved scope rather than claiming separation. Validation: targeted tests 16/16; keyless product tests 1594/1594; scoped agent:verify passed all 16 blocking checks under the existing 150s cap. The initial full run hit that cap and remains recorded as incomplete. Full mutation sweep caught 110/110 and restored 22/22 byte-identically; one repeated-dispatch mutant was caught by its 30s cap, not an assertion.
Require a digest-bearing declaration carrier, preserve adopter specialization, and pass the frozen declaration unchanged instead of reconstructing patch work. Move preparation to the default adopters and distinguish named claim refusals from failed units. Keep the patch driver's worker specialized at its boundary. Add non-patch numeric fixtures, including real store lease/delivery/independent verdict coverage, and a compile-time guard against the optional-carrier hole. Retire eight policy-word groups whose twenty occurrences were removed; keep all remaining classifications and the blocking ratchet intact. Record reproducible field probes and correct effect-class/write-set confusion. Keep permission/session separation, storage ownership and the independent frame proposal explicitly open; no protocol framework or schema migration. Validation: 16 blocking Agent checks at the unchanged 150s deadline; 1598 product tests; 47 targeted cases; 110/110 mutation teeth caught and 22/22 byte-identical restorations. One catch remains the existing 30s execution cap. Scoped LSP: zero diagnostics across 16 changed TypeScript files.
Enforce explicitly named refinement constraints against normalized resource identities instead of consulting a parent patch envelope. Preserve parent permission obligations and refuse malformed or unsupported declarations. Separate generic session input/state/runner contracts and caller-declared completion bounds from default patch rendering and artifact interpretation. Keep compatibility exports as references to the same implementation. Register the adopter's route and retain its policy-word classifications in the scan. Update bilingual ownership decisions and add controlled numeric, malformed constraint, generic-session and forwarded-export coverage. Storage ownership and the independent frame proposal remain open; no schema or live-provider changes are included. Verification: 89 targeted cases, 1610 product cases, 16 scoped blocking checks, zero diagnostics on 11 touched TypeScript files; 110 mutation teeth caught and 22 targets restored byte-identically. One tooth was caught by its existing 30-second cap. Preserve earlier failed verification receipts and two observed Windows cleanup EPERMs; successful focused/full retries do not explain them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更描述
What(改了什么):共享派发携带不透明、带 digest 的声明;refinement 执行协议显式声明的资源约束;通用会话契约不再要求补丁解释。包含
ab8e0f76与803d7d98两个独立提交。Why(为什么改 / 解决什么问题):词汇门禁只能暴露耦合,不能证明机制已经支持其他形态。本 PR 用非补丁数值声明、真实黑板租约/交付/独立裁决,以及显式资源约束和通用会话输入验证更窄的边界;不把受控证据等同于完整 peer 协议安装。
Changes(关键改动点,按文件或模块列出):
ooo-dispatch.ts的共享端口只要求WorkDeclaration.digest;票据必须声明declaration(允许显式null),原对象不变地交给 worker。采用方拥有冻结、解释和具名拒绝,拒绝在租约/worker 前发生。task-semantics.ts的 refinement 要求显式constraints(包括空列表),within-parent-writes比较规范化effects.proposeWrite;协议选择名字和启用,不从补丁字段取权限。漏掉父权限义务、不支持的原语、未知字段和重复名字按声明位置拒绝。ooo-session-mechanism.ts提供不要求补丁字段的 input/state/runner 和调用方 completion bounds;ooo-patch-session.ts拥有默认渲染、工具/产物策略、最少一次快照读取。兼容导出引用同一实现,不复制函数。docs/experiments/execution/field-ownership-2026-10-01.{md,json}与可复跑evals/ooo-execution/field-ownership.ts保留历史源哈希、五个编译模型、资源/effect/content/dependency/operation 的受控观测;原始报告未被后续 replay 覆盖。依赖 / 合并顺序:#80 当前仍 OPEN,head 为
256bcc0e66ebe8a946e300b8d465731caea02bf4;本 PR 的新工作只有它之后的ab8e0f76与803d7d98。仓库 CI 只响应目标为
main的 PR,因此 #81 以main为 base;在 #80 合并前,完整 diff 暂时包含它的父提交。后续切片的独立审查范围是 256bcc0e…803d7d98。先单独审查并合并 #80,再重新确认本 PR 的 diff、base 与检查;不要把本 PR 合回 #80 分支而改变其已审查 head。此提交不授权合并任何 PR。本地实测
npm run verify:static通过。the-pass-asks-a-unit-it-already-failed-again是现有 30s cap 捕获,不是断言捕获。无残留 mutation lock。reasoning-workspace/stg-isolated的 Windows 清理目录EPERM。对应聚焦重试为 5/5、10/10,后续两个完整产品运行均 1610/1610;不推断成功重试解释了失败原因。此前因失败产品 receipt 产生的 RTM 失败记录也保留。未验证项
Not verified(没验证什么):
EPERM根因仍未确定;失败记录保留,未修改清理逻辑、断言、并发或期限。完成检查项
本地质量检查
npm run verify:static通过。npm run agent:verify -- <路径>,16 blocking checks / 1610 product cases 通过。check:lock通过。Dependency audit 由 CI 独立检查。verify:packages仍按共享静态契约通过。docs:check:308 files,0 errors / 0 warnings;英中决策与拥有方设计同步。## 未验证项已填写;非平凡改动携带决策记录。complexity:gate通过,阈值 15 未改。RCP(Repository Control Plane)
repo-developmententries1790861187483_000179/1790908829584_000180;后者已 resolve,前者待 PR 交付完成。.nmg/verification/latest.json保存最终 scoped blocking 证据。提交仅改变 HEAD,不改变被验证内容;原始失败 receipt 另存。node bin/nmg-rcp.mjs forge-status --pr <编号>确认所需检查成功。ooo-ordinary-handoff.test.ts工作树标记保留,未暂存/清理。CI 完成确认
All checks passed为 SUCCESS。