Authority-preserving prepared-data 与 object-bound claim 审查
Current update (
94fab78...): 本文仍描述 predictednumpy.loadoccurrence 的 fixed object-bound claim research lane。随后实现的 Prepared Family 由 Host 显式提供 bounded ndarray,并创建多个 single-use member;它使用 binary preparation ABI,不把 body 编进 trusted Python source。两者不是同一个 lifecycle,见09-prepared-family.md。
1. 范围、状态与结论
审查类型: fixed-target、只读、研究原型审查。未修改源仓库,未运行 campaign,未 commit/push。
固定源对象:
- repository:
/Users/yuzhe/projects/agent-python-runtime - commit:
b94c989785632d98634cdd5c2a6d4a1de6cc13ac - tree:
6b8bb6a8d8274b8329a2aba444d13eac9fac19e9 - parent:
3eb304097edae1af20fcb8af0a22032ceffaf195 - commit 签名:
git verify-commit报告 Good ED25519 signature - commit subject:
docs(research): seal prepared data negative controls
源代码通过该 commit 的 archive 在 /tmp/agent-python-runtime-review-b94c989-6b8bb6a8 中读取和测试。b94c989 相对 parent 只改了两份文档/证据文件:docs/evidence/prepared-data-phase3-v2.json 与 docs/research/authority-preserving-prepared-data-autonomous-megagoal.md;object-bound 实现位于其已冻结的 parent lineage 中。
总判定(按 claim discipline):
- Current / Observed: 在固定的
numpy_npy_c_v1、8 MiB<i8C-order NumPy lane 中,Host declaration、sealed capability Plan、source occurrence、HostReceipt、typed staging、prepared-region scalar token 与同一个StagedObject已形成实际 object-bound join。PreparedRegionTable.Claim先调用 Host claim guard,guard 成功后才消费 scalar capsule;guard 拒绝时两边都保持 ready/unconsumed。 - Current / Observed: strict NPY v1 decoder 在验证完成前不发布 body;
StagedObject对 physical preparation 与 logical claim 分开计数,并在 claim/orphan/cancel/reject 终态清空 body。 - Current / Observed: final Guest 的固定 copy bridge 在调用 Host scalar claim 前重新计算不可变 Guest body 的 SHA-256;只有 digest 相等时才取得 scalar token,之后由
np.frombuffer(...).reshape((1024, 1024))产生 Guest ndarray 可见性。 - Framing / Evidence limitation: 这不是通用 Host typed-materialization API。当前 probe 明确使用
fixed_host_authored_guest_copy_bridge:Host staging 的 body 被复制进 trusted Guest prelude 的 base64/bytes,再由 monkeypatchednp.load使用。该 bridge 证明固定 lane 的身份连接与失败语义,但不证明 zero-copy、通用 object ABI 或任意 Python loader。 - Evidence limitation:
prepared-data-phase3-v2.json是当前 target 中的 checked-in v2 ledger,但其中 platform raw report/binary 只有 digest,raw 文件和独立 checker 不在 target tree;不能仅凭非空 digest 独立重算平台实验。其 producer/source 字段指向 ancestor3eb304...,positive probe 指向c671284...,object-join 实现指向1fa7f99...,因此是 lineage-consistent 的历史证据,不等于 target commit 本身重新执行的 certification。 - Unsupported: 不把这个结果升级为 generic object ABI/cache、authority-free CPython/WASI、production optimizer、observed end-to-end latency、或 EAGER 的普遍性能/安全支配定理。
2. 具体 source anchors
以下均指固定 commit b94c989... 的 source tree;符号优先于易漂移的行号。
| 路径 | 关键符号 | 审查作用 |
|---|---|---|
runtime/prepareddataset/peephole.go | numpyLoadProjection, NewAnalysisRequest, FactsFromVerifiedAnalysis, factsFromCallSites | target-Guest 的 authority-free np.load candidate 与唯一 occurrence 选择;不产生 Host authority |
runtime/prepareddataset/contract.go | HostPreparedDataDeclaration, NewPreparedDataContract, DecodePreparedDataContract, HostPreparedDataDeclaration.validate | 显式 Host declaration;closed schema、固定 loader/codec/dtype/shape/bounds/profile/import/run/privacy/budget |
runtime/prepareddataset/decision.go | Decide, validateDecisionContext, PhysicalCallSite, PreparationDecision.Claim | declaration + facts + sealed Plan/context 的 join;physical preparation identity 不包含未知 final source,claim identity 才加入 final source digest |
runtime/capability/predispatch.go | Plan.PreparePreDispatch, PreparedPreDispatch.Call | 由 sealed Plan 验证 exact sources.read,one-shot physical call;只返回 bounded receipt,不给 Broker 传 8 MiB body |
cmd/prepared-data-authority-probe/main.go | readHandler.Call, main, runPreparedGuest, monkeypatchSource, declarationFor, contextBinding | 真实 probe 的 Host read、typed staging、final source claim、trusted copy bridge 与 Guest E2E join |
research/prepareddataset/codec.go | CanonicalFixture, Decode, DecodeReader, validateHeader | 固定 NPY v1 parser/typed metadata/body digest/length/trailing-input 约束 |
research/prepareddataset/staged.go | NewStagedObject, IssueRead, VerifySource, Decode, Seal, MaterializeStaging, ClaimBoundMaterialization, Orphan, Cancel, Reject, validTransition | HostReceipt-bound physical lifecycle、body ownership与终态清理 |
research/prepareddataset/claim_guard.go | NewPreparedDataClaimGuard, ClaimPreparedRegion | 将 prepared-region decision/capsule 与 exact sealed StagedObject 做一次性 object-bound join |
runtime/preparedregion/contract.go | PreparedRegionBinding, SealPreparedRegionDecision, SealPreparedRegionCapsule, ValidateDecision | scalar token 的 source/AST/analysis/region/live-in/environment/profile/import/Plan/pass/codec identity |
runtime/preparedregion/table.go | NewPreparedRegionTableWithClaimGuard, Claim, Close, ValidateReady | table mutex 下先 guard、后 token consume;replay/close/unready/mismatch fail closed |
cmd/prepared-data-claim-probe/main.go | runCase, stagedObject, token, monkeypatchSource | reached、branch-not-taken、earlier-exception 的 v2 object-bound negative controls |
cmd/prepared-data-authority-probe/main_test.go | TestMonkeypatchSourceRechecksImmutableBodyBeforeClaim | 明确检查 body immutable、digest check 位于 Host claim 前 |
research/prepareddataset/{codec,staged,claim_guard}_test.go | frozen fixture、malformed NPY、state/replay/drift/guard tests | fixed dtype/shape/body、strict decode、one-shot claim 与 identity mutation regressions |
runtime/prepareddataset/prepareddataset_test.go | explicit contract、authority mutation、duplicate occurrence、final-source drift tests | candidate 不生成 authority;contract/Plan/context/occurrence 任何关键字段漂移均 fail closed |
runtime/preparedregion/table_test.go | TestPreparedRegionTableClaimGuardIsAtomicWithTokenConsumption 等 | guard rejection 不消费 token、成功一次、replay 拒绝、close discard |
docs/evidence/prepared-data-phase3-v2.json | claim_contract, negative_control, platforms, validation | P3 v2 superseding ledger;须结合 provenance limitation 阅读 |
research/prepareddatasetcampaign/campaign.go | recordsFor, overlap, aggregate | P6 的 component-duration/projected schedule 计算;不是 interval event trace |
3. 端到端 sequence:两条 lane 最后只在 exact claim 汇合
3.1 Source/authority lane
- Target-Guest candidate analysis(Guest analysis / Host verification)。
NewAnalysisRequest给 normal semantic request 加入封闭的np.loadprojection;projection 只表达 syntax surface,不是 capability grant。FactsFromVerifiedAnalysis只接受 exact target-GuestVerifiedAnalysis,重建 import-line-neutral overlay,验证analysis.SourceSHA256,并从CallSite选择唯一numpy.loadoccurrence。缺失、重复、dynamic argument、alias/path/options drift 都没有 eligible facts。 - Explicit Host declaration(Host)。
Host 通过
HostPreparedDataDeclaration正向声明sources.read/numpy.load,包括 sealedCapabilityPlanSHA256、stream epoch、admitted prefix digest、span、canonical arguments、occurrence、immutable workspace root、exact file/body digest、numpy_npy_c_v1、numpy_ndarray_c_v1、<i8、[1024,1024]、C-order/little-endian、artifact/profile/import closure、run/privacy/freshness/budget 与 8,388,736/8,388,608/4,096 bounds。NewPreparedDataContract对 closed schema 做 canonical JSON digest;Python metadata 无法铸造 Host contract。 - Contract/Plan/context join(Host)。
Decide同时验证 facts 与 declaration 的 stream/prefix/span/arguments/occurrence 相同;DecisionContext与 declaration 的 source/artifact/profile/import/run/privacy/budget/size/cost 相同;plan.Identity()与 declaration 相同;Plan.PreDispatch必须是 read-only、idempotent、exact partition、plan_epoch、discard_with_disposition、forbidden coalescing 与 bounded result。没有 explicit contract 时,probe 直接断言 physical read starts 为零。 - Preparation identity(Host)。
PreparationIdentity绑定 contract、stream epoch、admitted prefix、exact span、canonical arguments、dynamic occurrence;它不猜测尚未生成的 final-source digest。该 digest 仅在后续 claim 进入 identity。
3.2 Physical typed-preparation lane
- Early immutable read(Host capability handler)。
PhysicalCallSite将 candidate 映射为 exactsources.read,Plan.PreparePreDispatch仅校验并返回 one-shotPreparedPreDispatch,不立即启动工作。probe 的readHandler.Call再校验 path/workspace/input.npy,施加 200 ms 固定 delay,os.ReadFile后独立检查 exact file length 和 file SHA-256;capability outcome 只返回 bounded JSON{bytes,file_sha256}。在 probe harness 内,handler 另存 body 供 Host typed stage 读取;这不是把 body 送入 Broker result 的 generic transport。 - HostReceipt-bound staging object(Host, run-private)。
NewStagedObject以HostReceipt建立 object。Receipt 的ContractSHA256、PreparationSHA256、FileSHA256、BodySHA256、ExecutionProfileSHA256、PrivacyPartition、Freshness、BudgetReservationSHA256、MaxFileBytes、MaxBodyBytes构成 physical object 的 provenance/budget/privacy envelope。IssueRead先固定 read budget;handler 成功后VerifySource绑定 file digest。 - Bounded NPY v1 decode(Host pure Go decoder)。
Decode只接受固定 magic/version/header length、canonical header、dtype<i8、shape(1024,1024)、fortran_order=False、C-order、exact body length、exact body SHA 与 exact whole-file SHA。所有检查完成后才复制 body 到 owned staging;错误返回时不发布 partial body。DecodeReader还拒绝 trailing input。Typed metadata 是DType=<i8、Shape=[1024,1024]、Order=C、HeaderBytes=128、BodyBytes=8,388,608、FileBytes=8,388,736、First=0、Last=1,048,575、Sum=549,755,289,600。 - Seal(Host)。
StagedObject.Decode将 pending typed body 放入TypedStaging,Seal将其转为 immutable sealed object。物理完成不等于逻辑调用;此时 object 只能等待 exact claim、orphan、cancel 或 reject。
3.3 Final-source/claim lane
- Final source release and unchanged occurrence(Host analysis + Guest final execution)。
probe 等待 generation gap 后生成
finalSource,重新运行 exact target-Guest analysis。PreparationDecision.Claim验证 final source 是 admitted prefix 的 extension、analysis overlay digest 相符、最终 source digest 已 sealed,并且 exact span/capability/occurrence/reachability/canonical arguments unchanged。于是得到ClaimIdentity = PreparationIdentity + FinalSourceSHA256 + exact occurrence。later syntax error 在 final analysis 前被拒绝,不产生 logical claim。 - Prepared-region decision/capsule(Host)。
runPreparedGuest用PreparedRegionBinding把 final source/AST/analysis/region、RegionSourceSHA256=receipt.BodySHA256、LiveInsSHA256=receipt.PreparationSHA256、EnvironmentSHA256=receipt.ContractSHA256、execution profile、import closure、capability Plan、pass config、固定 scalar codec 与 output name 绑在 decision identity 中。capsule 只有小的 canonical JSON scalartrue,不是 dataset body。 - Exact object-bound guard construction(Host)。
NewPreparedDataClaimGuard仅接受 non-nil object、decision/capsule exact match,以及 sealed object snapshot。它进一步要求:decision live-ins=receipt preparation、environment=receipt contract、region source=receipt body、execution profile 相等;snapshot source/file、metadata body/file、body length 与 receipt 相等。contract digest 又传递绑定 declaration 中的 source root、loader/codec、profile/import、freshness/privacy/budget/Plan 等字段,而非接受一个任意 non-empty object ID。 - Trusted fixed-copy bridge(Guest input preparation)。
MaterializeStaging只返回 Host staging 的 owned copy,monkeypatchSource将它编码进 trusted prelude;_pd_body = bytes(...)明确不可变。该 prelude 将np.load替换为_pd_load,但最终 Agent source 本身保持 unchanged;这是 fixed research bridge,不是 genericobject.materialize()API。 - Immediate body digest check(Guest, before token claim)。
_pd_load先检查 exact path 与allow_pickle=False,再计算sha256(_body)并与 HostReceipt body digest 比较,最后才调用_host.materialize_value(decisionIdentity)。main_test.go直接检查 digest check 的 source position 小于 Host claim,并拒绝bytearray。所以 substituted/corrupted body 不会先消耗 logical token。 - Atomic token + object claim(Host table + Host guard)。
_host.materialize_value将 decision identity 交给PreparedRegionTable.Claim。table mutex 下先确认 entry 是 ready;随后调用PreparedDataClaimGuard.ClaimPreparedRegion。guard 再调用StagedObject.ClaimBoundMaterialization(receipt.BodySHA256, CanonicalBodyBytes),检查 object 仍为 sealed、sealed metadata/body digest 与 body length 相等,然后清 body、置Claimed、递增LogicalClaims/LogicalClaimBytes。guard 成功后 table 才复制/清空 scalar payload、置Consumed、递增Claims;任一 guard error 都只增加RejectedClaims,不消费 capsule。 - ndarray visibility(Guest)。
Host claim 返回 scalar
true,_pd_load随后才执行np.frombuffer(_body, dtype=np.dtype('<i8')).reshape((1024,1024))。因此逻辑 Python 的dataset是固定 shape/dtype 的 NumPy ndarray;probe 比较 shape、sum 与 serial oracle,并同时要求 tableClaims=1, Consumed=1、objectState=Claimed、body bytes 为零。
4. 状态机与 terminal semantics
4.1 Physical object state
Planned
-> ReadIssued
-> SourceVerified
-> TypedStaging
-> Sealed
-> Claimed (exact object-bound logical claim)
-> Orphaned (physical work ready/complete but final occurrence not reached)
-> Cancelled (run/finalization cancellation)
-> Rejected (source, decode, identity, result or policy failure)
research/prepareddataset/staged.go 的 validTransition 不允许任何 terminal state 回到 active state。ClaimBoundMaterialization 与 Claim 都是 one-shot;Orphan、Cancel、Reject 都清 pending/sealed body。Snapshot 只报告 body byte count、typed metadata、receipt、counters 与 disposition,不把终态伪装成 cache hit。
4.2 Scalar token state
Unready --Publish--> Ready --Claim(success)--> Consumed
|
+--Close/discard-----+--> Discarded
PreparedRegionTable 的 Claim 对 missing/unready/consumed/discarded/closed/mismatch 全部 fail closed;Close 释放 ready/unready capsule payload。带 guard 的路径是:Ready --guard reject--> Ready,而不是 token 被消费后才发现 object mismatch。
4.3 失败矩阵
| 情形 | physical object | scalar token | logical effect | 证据/实现 |
|---|---|---|---|---|
| syntax facts 但无 Host contract | 不启动 | 无 | 0 | Decide(nil,...);authority probe 要求 NoContractStarts=0 |
| contract/Plan/source/profile/freshness/budget/occurrence drift | 不应启动或被拒绝 | 不 ready/不 claim | 0 | contract.go、decision.go mutation regressions |
| malformed magic/version/header/dtype/shape/order/length/trailing/body/file digest | Rejected,body 不发布 | 不 claim | 0 | codec_test.go TestDecodeRejectsMalformedNPYBeforePublication |
| source read error / source replacement / late completion | Rejected 或 Cancelled | 不 claim | 0 | readHandler.Call 与 staged lifecycle;shared semantic predispatch cancellation tests |
| later syntax error | 已开始的 physical work 必须 disposition 为 cancel/orphan,不能成为 logical load | discard | 0 | phase3 control contract;current target 不把它当成功逻辑调用 |
| branch-not-taken | Orphaned,body=0 | discard | 0 | prepared-data-claim-probe v2:0/0/1, ObjectState=Orphaned, PhysicalOrphans=1 |
| earlier exception | Orphaned,body=0 | discard | 0 | v2 同上;status=error, logical claims=0 |
| final source/argument/alias/span drift | 保持 sealed,不能 consume | 保持 ready 或最终 discard | 0 | ErrClaimMismatch;TestPreparedDataClaimRequiresPrefixExtensionAndExactOccurrence |
| Guest body corruption/substitution | 保持 sealed | 不 claim,因为 digest 在 claim 前失败 | 0 | main_test.go;v2 guest_body_digest_rechecked_immediately_before_claim=true |
| guard object mismatch | 保持 sealed | 保持 ready,RejectedClaims++ | 0 | TestPreparedRegionTableClaimGuardIsAtomicWithTokenConsumption |
| exact positive claim | Claimed,body=0 | Consumed | 1 | reached v2 1/1/0、logical claims=1、shape/sum parity |
| replay | terminal object/table rejects | ErrPreparedRegionConsumed 或 ErrInvalidTransition | 不增加 | claim_guard_test.go、table_test.go |
| teardown/close with ready work | Orphaned/清 body 或 table Discarded | discard | 0 | Orphan, Close, TestPreparedRegionTableCloseDiscardsReadyEntries |
这里的 late 是 disposition/失败语义,而不是另一个允许再次 claim 的 state;target 的 fixed object state 通过 Cancelled/Rejected/Orphaned 终止它。
5. Ownership 与边界
Host-owned
- explicit
HostPreparedDataDeclaration、sealedPreparedDataContract、capability Grant/Spec/Plan、Plan identity 与 pre-dispatch budget; - immutable workspace-root/file source、read handler、HostReceipt、file/body/source verification;
- pure Go bounded NPY parser、typed metadata、Run-private
StagedObjectbody与lifecycle; - final-source verified analysis、PreparedRegionDecision/Capsule、per-Run table、object claim guard、orphan/cancel/reject cleanup。
Guest-owned
- target-Guest analyzer 提供 opaque syntax facts;它只能证明 candidate,不创建 authority;
- unchanged final Agent source 和 Python logical control flow;是否真的到达
np.load由 final Guest 决定; - body digest check、固定
np.frombuffer/reshape 与最终 ndarray visibility。Guest 不能伪造 Host contract、Plan identity、HostReceipt 或直接调用 object claim API。
Shared / explicitly joined
PreparationIdentity是 Host contract 与 Guest-verified prefix occurrence 的 join;ClaimIdentity再加 final source digest 与 unchanged exact occurrence;PreparedRegionBinding将 final source/region、live-ins、environment、profile/import/Plan/pass/codec 绑定到 scalar token;- HostReceipt body/file/provenance digest 与 Guest body digest 是两边的同一 identity check,不是“有 token 就算消费”。
Run-private / discardable
- 8 MiB Host staged body、
MaterializeStaging的 owned copy、scalar capsule、per-Run table、temporary fixture/workspace; - 未 claim 的 body/token 必须有 explicit orphan/discard disposition;无 durable cross-run cache、无 coalescing、无 pooled reusable object。
6. Fixed identity matrix
| 身份 | 本 lane 的绑定 | 不应误读为 |
|---|---|---|
| candidate | overlay source digest、opaque target-Guest analysis、唯一 np.load CallSite、span/args/occurrence | authority 或 physical read permit |
| contract | schema/capability/call/Plan、stream/prefix/occurrence、workspace root/file/body、loader/codec/dtype/shape/bounds、artifact/profile/import/run/privacy/freshness/budget | Python metadata、AST match、任意字符串 |
| preparation | contract identity + stream epoch + admitted prefix + exact occurrence/arguments | final source 已知或 logical call 已发生 |
| HostReceipt | contract/preparation/file/body/profile/privacy/freshness/budget/size envelope | external-world truth;receipt 只证明 Host 读取并校验了指定 bytes |
| typed object | fixed metadata + body/file digest + current sealed state + Run lifecycle | generic object ABI、durable cache、pointer/FD transfer |
| claim token | decision/capsule identity、final source/region/live-ins/environment/profile/import/Plan/pass/codec | body 本身;scalar token 不携带 8 MiB body |
| logical claim | unchanged final occurrence + immediate Guest body digest + table capsule + exact staged object | physical preparation、staged completion、candidate discovery |
| artifact/producer | phase3-v2 artifact digest、producer commits/trees、raw report digests | 当前 target 已重新运行的 campaign |
7. P3 v1、object-join 修复与 P3 v2 superseding evidence
7.1 P3 v1:历史 no-join,不可与当前 claim 混写
docs/evidence/prepared-data-phase3-v1.json 的 known_limitations 明确写出:scalar token 没有绑定 Guest monkeypatch 消费的 staged object/body,历史 probe 在 token consumption 后独立调用 staged-object Claim,current source 将 unjoined staging orphan,并报告 staged_object_claim_joined=false。该文件在当前 target 中仍是历史 artifact;它不是 object-bound positive evidence。
本审查重新计算其 checked-in JSON digest 为 sha256:5fba3df518de1453c0c2d77014c63a5f7e123be66153aad1438c9f4fd056a70e。这只证明文件 bytes 的 identity,不把 v1 的内容升级为 v2。
7.2 修复 lineage
| commit | tree | 观察到的改变 |
|---|---|---|
1fa7f99cfbc5145a6873af58795707e85618d28e | fedfc7b583a199d1511fc71c8c551e608e8c9b56 | PreparedDataClaimGuard、StagedObject.ClaimBoundMaterialization、table claim-guard hook 与 exact-object tests;physical object 与 scalar claim 第一次有代码 join |
c671284fc8b2457baeed5385232a5b37489fe7e7 | 5952b1f6412ddb3205ace2b99a6c67489fde71a3 | trusted bridge 的 _pd_body 改为 immutable bytes,并把 body SHA-256 check 放在 _host.materialize_value 前;新增 source-order regression |
3eb304097edae1af20fcb8af0a22032ceffaf195 | a818c7e0057ce9a1b46f65c48e61b66ab61aab5f | claim probe 升级 v2;reached、branch-not-taken、earlier-exception 均同时报告 token disposition 与 object state,未到达路径 orphan exact object |
b94c989785632d98634cdd5c2a6d4a1de6cc13ac | 6b8bb6a8d8274b8329a2aba444d13eac9fac19e9 | 将 object-join negative controls 及 lineage 固化为 prepared-data-phase3-v2.json,没有在本 target 中再改 object-join implementation |
7.3 P3 v2:superseding evidence 的准确读法
docs/evidence/prepared-data-phase3-v2.json schema 为 pysolate.prepared-data-phase3-object-join-evidence.v2,claim contract 明确记录:
token_and_object_claim_atomic=true;guard_rejection_preserves_both_ready_states=true;guest_body_digest_rechecked_immediately_before_claim=true;guest_body_immutable=true;body_transport=fixed_host_authored_guest_copy_bridge;generic_blob_materialization=false;- scope 是 fixed
numpy_npy_c_v1research lane。
v2 的 positive/negative reports 与 source lineage 相互对应:source_commit=3eb304...、source_tree=a818c7...、positive_probe_commit=c671284...、object_join_commit=1fa7f99...,均是 current target 的 ancestors。v2 file 的本次 checked-in SHA-256 是 sha256:26f6a69b1c469864d7a33a343c9344998a5aa4a13b45872009d34223e329ac82。
准确表述应是:v2 supersedes v1 only for the fixed-copy object-join claim。它不追溯修复 v1,也不把 v1 的 no-join report 变成正例;它更不扩大 claim 到 generic Host materialization。
8. P4/P5、P6 与 timing boundary
8.1 P4/P5 private-COW:既有 substrate,不是本审查的新颖性
runtime/engine/wazero 的 private-COW / prepared scratch capacity 能提供 fresh Guest、private mapping、mutation isolation 和 discard lifecycle;cmd/prepared-data-claim-probe 也会调用 PrepareNumpyCOWShard 作为运行 substrate。它证明的是 Guest/runtime memory isolation 与 capacity lifecycle,不是 prepared-data 的 authority/receipt/object-bound novelty。
本 lane 的核心 authority-free decode 是 Go research/prepareddataset/codec.go;不能把 CPython/WASI package preparation 描述成 authority-free:项目自己的 contract 文档明确说明该 preparation 仍保留 runtime clock/random imports。ExecutePreparedRegionScratch 只在 WorkspaceMounted 与 CapabilityBrokerAvailable 都为 false 时运行,亦不把它当作 arbitrary Python execution authority。
因此不能声称:
- private-COW 自己完成了 Host declaration → HostReceipt → object claim;
- COW page mapping 是 generic typed object ABI;
- package/import preparation 对所有 WASI ambient capability 都 authority-free;
- P4/P5 的 private-COW correctness 自动认证 P3 data/body identity。
8.2 P6:component timings/projected schedule,不是 observed interval trace
research/prepareddatasetcampaign/campaign.go 的 recordsFor 使用已提供的 HostReadNanos、HostDecodeNanos、DatasetPrepareNanos、ConsumerNanos 与 configured lead_gap_ms,通过 overlap(prep,gap) 计算 critical_path_nanos;aggregate 再对这些 component/projected records 取 median。它没有为每个 trial 记录并独立验证 read-start/end、decode-start/end、source-finalization、seal、claim 的真实 interval,也没有把 concurrent event trace 与 projected schedule 做 causality join。
所以 P6 只能支持:named fixed schedule 的 component accounting / projection。它不能支持:
- observed read/decode/finalization overlap;
- production latency、throughput 或 universal positive economics;
- 当前
b94c989的 fresh end-to-end timing certification。
P6 manifest 还固定了 historical harness/source lineage、N=1/2/4、lead gaps 0/250/1000 ms 与未进入 64/256 MiB extension;这些是实验边界,不是当前 object-bound claim 的运行时证明。
9. EAGER comparison:opportunity-level,不是 dominance theorem
EAGER-style treatment 保持较宽的 persistent interpreter / authority context,并在 final source 之前执行完整 generated chunks;它可能在 fanout 或 warm-up 场景具有较低的 repeated Guest overhead,但其安全边界不能等同于本 lane 的 explicit Host contract + exact source/Plan join。
Pysolate prepared-data lane 的比较应限定为:
- 机会层面: Pysolate 可以在 final source 尚未释放时,提前做被 explicit Host declaration、immutable source、bounded decoder、private budget/privacy 与 discard policy 授权的 physical work;EAGER 若不保留更宽的 interpreter state/authority,通常不能获得同一 opportunity。
- 代价层面: contract sealing、target-Guest analysis、HostReceipt/staging、copy bridge、claim guard、fresh Guest、COW/package preparation 与 orphan cleanup 都会增加固定成本;单次或小 lead-gap run 完全可能慢于 EAGER 或 serial。
- 语义层面: EAGER 的 persistent authority 不是 object-bound claim 的替代物;Pysolate 仍要求 unchanged final occurrence 才能获得 logical effect。
因此不使用“Pysolate 总是更快”“EAGER 总是不安全”或“准备结果等同 cache hit”的句式。比较仅说明安全 overlap opportunity 与额外成本的 trade-off。
10. Tests 与 machine-readable evidence
10.1 本次在 fixed archive 上实际执行
以下均在 target archive 中执行,未运行 campaign:
GOCACHE=/tmp/review-gocache-target go test ./research/prepareddataset ./runtime/prepareddataset ./runtime/preparedregion ./cmd/prepared-data-authority-probe ./cmd/prepared-data-claim-probe -count=1
PASS
GOCACHE=/tmp/review-gocache-target-race go test -race ./research/prepareddataset ./runtime/prepareddataset ./runtime/preparedregion ./cmd/prepared-data-authority-probe ./cmd/prepared-data-claim-probe -count=1
PASS
GOCACHE=/tmp/review-gocache-target-vet go vet ./research/prepareddataset ./runtime/prepareddataset ./runtime/preparedregion ./cmd/prepared-data-authority-probe ./cmd/prepared-data-claim-probe
PASS
GOCACHE=/tmp/review-gocache-target-full go test ./... -count=1
PASS(所有 Go package)
聚焦测试实际报告:
research/prepareddataset: pass;runtime/prepareddataset: pass;runtime/preparedregion: pass;cmd/prepared-data-authority-probe: pass;cmd/prepared-data-claim-probe: no test files;- focused
-race: pass;focusedgo vet: pass;fullgo test ./...: pass。
此外,git diff --check parent target 无输出;三份 phase evidence JSON 均由 Python json.loads 重新解析成功。源仓库 target checkout 在冻结和收尾复核时均无 Git 修改。
10.2 Checked-in evidence 的 provenance
prepared-data-phase3-v2.json 的关键 machine-readable fields:
- fixture: body
8,388,608bytes,body SHAsha256:a78cee...70f8d0,dtype<i8,shape[1024,1024]; - claim strength:
end_to_end_identity_join_for_fixed_copy_bridge_not_generic_zero_copy_materialization; - positive:
authorized_starts=1、read_before_final=true、decode_before_final=true、shape/sum parity、token1/1/0、objectClaimed、body bytes0; - negative: branch-not-taken 与 earlier-exception 各
claims=0, consumed=0, discarded=1, logical_claims=0, physical_orphans=1, object_body_bytes=0; - validation fields: focused race/test/vet pass、real NumPy Guest Linux/macOS pass、remote stage removed。
同时,target 中的 prepared-data-phase7-closeout-v1.json 属于更晚/不同 lineage 的 historical closeout,明确记录过旧阶段的 no_object_bound_host_materialization_join 与 staged_object_claim_joined_false;不能拿它否定当前 target 的 1fa→c671→3eb 修复,也不能拿它替代当前 v2 evidence。它只能帮助解释为何 v1 被 supersede。
Evidence limitation: v2 中的 artifact_sha256、各平台 binary_sha256、raw_report_sha256 与 producer/checker lineage 没有对应 raw report/binary/checker 全量内容在当前 target tree 中可供独立重算。因此本审查把 v2 视为 checked-in, provenance-labelled evidence;源代码机制由 fixed archive 的 tests/race/vet/full test 支撑,平台 campaign 数字不作为本次重新观察的事实。
11. Claims / non-claims
允许保留的 claims
- Explicit authority gate: syntax candidate 本身不能启动 physical work;只有 Host declaration + sealed Plan/context/facts exact join 才能构造 prepared pre-dispatch。
- Bounded typed preparation: fixed immutable
.npyv1 lane 在 Host 侧做 strict<i8,[1024,1024], C-order、body/file digest 与 size validation,并以 Run-private typed staging 保存。 - Physical/logical separation: read/decode/seal 是 physical lifecycle;final unchanged occurrence、Guest body digest 与 exact object-bound claim 才产生 logical effect。
- Object-bound one-shot claim: fixed bridge 中,scalar token 和 exact
StagedObject要同时通过 identity/state/body checks;guard rejection 不消费任一侧,success 只发生一次。 - Failure cleanup: branch-not-taken、earlier-exception、replay、drift、invalid NPY、cancellation/orphan paths 不把 discarded physical work 伪装成 logical success。
- Scoped overlap opportunity: 在 final-source lead window 存在且 Host 已明确授权时,Pysolate 可提前做 discardable physical work;这只是 opportunity claim。
明确不能声称的内容
- generic object ABI、generic blob cache、durable cross-run cache、single-flight/coalescing;
- Host pointer/FD/zero-copy 或任意 typed body 直接进入 Guest;当前是 fixed Host-authored Guest copy bridge;
- authority-free CPython/WASI package/import preparation;该 preparation 仍有 clock/random residual imports;只有 candidate analysis 与 pure Go bounded decoder 可按本 lane 约束讨论;
- arbitrary NumPy dtype/shape/order、任意
numpy.load选项、pickle/mmap、任意 Python object loader; - candidate discovery = authority、HostReceipt = external-world truth、physical completion = logical effect;
- P4/P5 private-COW = prepared-data novelty;
- P6 component/projected schedule = observed interval trace 或 production latency;
- EAGER 或 Pysolate 的 universal performance/security dominance;
- production optimizer、natural-workload prevalence、64/256 MiB payload extension;
- same-Guest continuation 的泛化结论:probe 使用 separate analyzer / trusted prelude 与 fresh final Guest boundary,不能把它改写成任意 original Guest frame continuation。
12. 答辩准备:一段准确解释
这个 target 不是“分析器发现了
np.load,所以 Host 自动替 Guest 读取并把结果塞进 Python”。分析器只提供 authority-free、唯一且 source-bound 的 candidate facts;Host 还必须提供显式、sealed、带 immutable file/body、loader/codec、profile/import、privacy、freshness 和 budget 的 declaration,并把它与 capability Plan 绑定。Host 随后在 Run-privateStagedObject中读取和严格解码固定 NPY v1;这一步是 physical preparation,不是 logical call。final source 释放后,Host/Guest 重新验证 exact unchanged occurrence,trusted fixed-copy bridge 在 claim 前重新检查 Guest body digest,Host claim guard 在 table mutex 下先验证同一个 HostReceipt-bound object,再一次性消费 scalar token 和 object。branch-not-taken、earlier-exception、drift、corruption、replay 或 cancellation 不会继承后来的 authority,而是 discard/orphan/reject。当前可辩护的结论是 fixednumpy_npy_c_v1copy-bridge 的 authority-preserving object-bound claim;不是通用 object ABI、cache、zero-copy、authority-free CPython/WASI,也不是 P6 schedule projection 的生产性能结论。
13. 收尾不确定项
- Evidence reproducibility: 当前 target 未携带 v2 platform raw reports、probe binaries 或独立 checker 全量内容;其 SHA/producer 字段可做 provenance pointer,不能在本次 fixed-target review 中独立重放。
- Copy bridge boundary: object/body identity 是通过 immutable bytes + digest + Host guard 建立的;若未来要求“Host typed object 直接 materialize 为 Guest ndarray”,那将是新 scope,当前代码和证据不能替代该设计。
- Timing: 本次没有把 P6 的 component timings 解读为 observed intervals;若需要 timing claim,必须新增 body-free、target-bound 的 read/decode/finalize/seal/claim event records 及独立 checker。
- Lineage wording: v2 source/probe/join commits 都是 target ancestor,且 target implementation 未变;但它们仍不是
b94c989自身的 fresh campaign producer identity,因此最终 verdict 保持“机制可核验 + campaign evidence 有 provenance limitation”,不写成 production certification。