Repository navigation
Closed
Labels
area:moss-integrationMoss integrationMoss integrationarea:qaQuality assurance and testingQuality assurance and testingpriority:P0Critical priorityCritical priorityrisk:trust-boundaryChanges a trust or evidence boundaryChanges a trust or evidence boundarytype:featureNew product functionalityNew product functionality
Description
Type: Moss Adapter Security/Evidence Feature
Priority: P0 / trust boundary
Initial status: Blocked
Owner: Moss Integration
Depends on: M2-06
Blocks: M2-08, M2-09, M2-12
Writable: simulation*, evidence-mapper*, errors*, raw fixtures/tests
唯一目标
把 exact Capability 交给 Moss Simulator,无损保存原始结果,并用可归因的 Mini-Demo 派生验证补齐 block、coverage、ordering 和 state continuity。
记录型 RPC 策略
1. pass-through wrapper 记录 simulator 的 eth_blockNumber 响应
2. 响应交给 simulator 前查询该 block pre-hash
3. 记录每个 debug_traceCall / eth_estimateGas block 参数
4. 要求一次 simulate 全部绑定同一 block
5. simulation 后查询同一 block post-hash
6. 要求 pre-hash === post-hash
7. 任何不可观察/不一致/hash 变化 => UNPROVABLE
证据分层
MossOriginalEvidence:
Capability, raw simulation, transactions, Changes, Receipts,
Outcomes, Warnings, gas
MiniDemoDerivedVerification:
derivedBy, ruleVersion, pinned mossCommit,
capabilityIntegrity, receiptCoverage, ordering, stateContinuity,
sourceReferences
验收
[ ] simulator 收到 exact action-return value
[ ] pre/post Capability digest 相等
[ ] transaction/change 顺序和 stable index 保留
[ ] Receipt tree/leaf、Outcome、Warning exact code/message、gas 保留
[ ] raw unknown fields 不丢失
[ ] positive derived claim 都含 adapter/ruleVersion/mossCommit
[ ] derived 不标成 Moss raw/original
[ ] exact block number/hash 可证明
[ ] RPC wrapper 有 request-equivalence tests
[ ] block 不一致/不可观察 => UNPROVABLE
[ ] 单交易 continuity = NOT_APPLICABLE
[ ] rollback/missing receipt/acquisition failure 显式
[ ] normalized display 不替代 raw
[ ] MCP reduced output 不作为完整证据源
测试矩阵
single success; Approval+Swap order; warning; rollback; missing receipt;
coverage fail; ordering fail; state interruption; inconsistent blocks;
hash lookup failure; unsupported Moss commit; provenance separation;
unknown raw field; determinism; input immutability
验证
pnpm vitest run packages/moss-adapter/test/evidence-mapper.test.ts
pnpm vitest run packages/moss-adapter/test/simulation.test.ts
pnpm --filter @moss-mini-demo/moss-adapter build
pnpm checkCodex 指令
实现 pass-through observation 和 lossless mapper。不得更改 Moss 控制流、RPC 请求、
Capability 或 raw response;无法证明时只能 UNPROVABLE。逐项标记 original/derived 来源。
Metadata
Metadata
Assignees
Labels
area:moss-integrationMoss integrationMoss integrationarea:qaQuality assurance and testingQuality assurance and testingpriority:P0Critical priorityCritical priorityrisk:trust-boundaryChanges a trust or evidence boundaryChanges a trust or evidence boundarytype:featureNew product functionalityNew product functionality
Activity
feat: construct synthetic Capability integrity evidence (#74)
pillowtalk-Qy commentedon Aug 7, 2026
DEPENDENCY_GATE_CLEARED
Issue #27 / M2-06 has been squash-merged through PR #74 into
main@b3ba1411ce521d0d8526ae5805a162f5167f1e3c.162f5d8578b6e13f45cd638aed3523a565acc250main@65753ada85156716e263b660eeab72c42d293431The direct M2-06 dependency is satisfied. Issue #28 may move from Blocked to Ready for planning on this exact latest-main baseline.
Ready means dependency-ready only. It is not
SCOPE_CONFIRMED, implementation authorization, QA,READY_TO_MERGE, or merge authorization. A complete closed Work Plan and separateSINGLE_OPERATOR_SCOPE_REVIEWmust pass before any implementation branch, worktree, repository change, commit, or PR is created.pillowtalk-Qy commentedon Aug 7, 2026
BUILDER_CLAIM / WORK_PLAN_REQUIRED
Qy claims the single active implementation-planning slot for Issue #28.
origin/main@b3ba1411ce521d0d8526ae5805a162f5167f1e3ccodex/issue-28-simulation-evidence/Users/qy/Documents/Clear402 x Moss Mini-Demo/worktrees/issue-28The Project
In Progressstate records planning ownership only. It does not authorize branch/worktree creation, file changes, dependencies, commits, a PR, Ready state, Merge Gate, or merge. The Work Plan must receiveSINGLE_OPERATOR_SCOPE_REVIEW / PASSand a separateSCOPE_CONFIRMED / IMPLEMENTATION_AUTHORIZEDrecord before implementation starts.The worktree path is inside the active permitted workspace because macOS denies this controller access to the historical sibling path
/Users/qy/Documents/moss-mini-demo-issue-28; isolation semantics remain one dedicated worktree for one Issue.pillowtalk-Qy commentedon Aug 7, 2026
Final Implementation Work Plan v1 - M2-07 Simulation and Lossless Evidence Mapping
Authority and baseline
origin/main@b3ba1411ce521d0d8526ae5805a162f5167f1e3c1ae6b6322d51fae9104f047efb94e601050b967fcodex/issue-28-simulation-evidence/Users/qy/Documents/Clear402 x Moss Mini-Demo/worktrees/issue-28This remains planning only. No implementation branch, worktree, edit, dependency change, commit, or PR exists.
Exact source facts
MossPortis the fixed five-method application boundary and already hassimulate(capability).simulatorInputand rejects hostile mutation before delegation.eth_blockNumberonce, passes that block as parameter 1 to everydebug_traceCallandeth_estimateGas, verifies Receipt coverage before exposing a Receipt, and merges each prior state diff before the next transaction.results[]with transaction, optional Changes, optional Receipt/Outcome, exact Warnings, string-or-null gas, and optionalhalted.SimulateOutcome; adapter-owned pass-through RPC observation is required.A baseline, pin, or audited Moss control-flow change invalidates the positive rules and requires a new Scope Gate.
Goal
Pass the exact Capability to Moss, retain raw and immutable simulation evidence without dropping unknown JSON fields or order, and separately attribute Mini-Demo verification for Capability integrity, exact block, Receipt coverage, ordering, and state continuity. This is not safety, execution, signing, Decision, STOP, or live evidence.
Closed writable paths
Exactly these 13 paths are requested:
packages/moss-adapter/src/types.tspackages/moss-adapter/src/source-bindings.tspackages/moss-adapter/src/simulation.tspackages/moss-adapter/src/evidence-mapper.tspackages/moss-adapter/src/index.tspackages/moss-adapter/test/fixtures/simulation.tspackages/moss-adapter/test/simulation.test.tspackages/moss-adapter/test/evidence-mapper.test.tspackages/moss-adapter/test/capability.test.tspackages/moss-adapter/test/contracts.test.tspackages/moss-adapter/test/production.test.tspackages/moss-adapter/test/fake.test.tspackages/moss-adapter/test/public-entry.smoke.mjsNo wildcard is implied. A fourteenth path requires a prior Scope Amendment. Root metadata, lockfile, report-schema, decision-engine, Web/API, docs, workflows,
vendor/moss, and.gitmodulesare read-only.Dependencies and public boundary
No dependency, package metadata, lockfile, workspace, lifecycle permission, submodule, or Moss pin change is authorized.
MossPortremains exactly five methods;simulate(capability: RawCapability)is unchanged.The low-level
MossSourceBindingsadds one rawsimulationRpcClientdependency and a secondrpcClientargument on its simulator binding. The binding must build/use its Moss runtime with the adapter-supplied client and must not bypass it.RawSimulationEvidencebecomes the full M2-07 contract. Supporting evidence/RPC types are type-only exports. There is no new runtime export, package subpath, Schema, or public mapper helper. The package-root runtime export set and server-only boundary remain exact.Recording RPC contract
One isolated recording session is created per
MossPort.simulatecall.eth_blockNumberresponse.eth_getBlockByNumber(block, false)and retain the pre-hash.debug_traceCallandeth_estimateGas.PROVENrequires exactly one canonical block response, every observed simulation call bound to it, valid pre/post hashes, strict hash equality, and a complete observation lifecycle.UNPROVABLE, never nearest/latest block evidence.SIMULATION_FAILED / simulate.Request-equivalence tests cover request identity, count, order, method, params, response identity, and rejection behavior.
Raw ownership and evidence layers
MossOriginalEvidenceV0_1retains:SimulateOutcomesource objects;halted;The adapter does not freeze, modify, decorate, normalize, or replace Moss-owned objects. Only adapter-owned snapshots/wrappers are frozen. Shared Change/Receipt references are permitted and preserved by structured clone. Cycles, Proxies, accessors, sparse arrays, Symbols, unsupported prototypes, non-finite values, lone surrogates, and non-JSON fields fail closed.
MiniDemoDerivedVerificationV0_1is separately labeled withderivedBy: "@moss-mini-demo/moss-adapter",ruleVersion: "0.1", exactmossCommit, block proof, four verification states, and deterministic source references. No derived field is called Moss original/raw, and no display model replaces raw evidence.Verification rules
Capability integrity:
PROVEN; unequal =>FAILED; unavailable =>UNPROVABLE.Receipt coverage:
verifyReceiptCoveragepassed;PROVEN;CHANGE_COVERAGE_MISMATCH, missing required Receipt, or incomplete result set =>FAILED;UNPROVABLE.Ordering:
PROVEN;CHANGE_ORDER_UNAVAILABLE, incomplete result set, or demonstrable order failure =>FAILED;UNPROVABLE.State continuity:
NOT_APPLICABLE;STATE_CHAIN_FAILED=>PROVEN;STATE_CHAIN_FAILED=>FAILED;UNPROVABLE.Rules never parse Warning prose, invent evidence, or strengthen unknown states.
Validation and failure boundary
Caller/source objects are untrusted. The merged #27 descriptor-closed validation is reused. Before delegation the capability, raw RPC client, simulator binding, and complete Moss build identity must validate. After delegation protocol/method and full
SimulateOutcomegraph must validate.Malformed source output => secret-safe
SOURCE_CONTRACT_VIOLATION / simulate.Source/RPC rejection => secret-safe
SIMULATION_FAILED / simulate.No cause, URL, headers, query, calldata, account, params, raw message, or secret is exposed.
An unsupported Moss commit cannot reuse the mapping rules or produce a positive claim.
Test matrix
simulation.test.ts:evidence-mapper.test.ts:NOT_APPLICABLE;Existing tests change only to supply the new low-level RPC dependency/signature and retain all five-method, exact-identity, hostile-input, Fake/production parity, type-only, runtime-export, and server-only assertions. All fixtures are explicit synthetic offline data, not Moss/Monad/RPC/live evidence.
Verification
Node 22.23.1 and pnpm 11.16.0:
Isolation and non-goals
No Monad live smoke (#29), alignment (#30), report/DecisionInput/presentation (#31), orchestrator/API (#33), Decision/STOP/MANUAL_REVIEW policy, UI, deployment, credential, endpoint, wallet, signing, transaction submission, Moss modification, Schema change, CI change, or real-evidence claim.
Stop conditions
Stop for a prior Scope Amendment if the baseline/pin differs; a fourteenth path, dependency, runtime export, package subpath, vendor/Schema/workflow change is needed;
MossPortshape must change; exact request/response pass-through cannot hold; a positive rule needs prose parsing or assumption; complete raw evidence cannot be retained; or production secrets/live data/report/UI behavior is requested.Sequence
After authorization: revalidate baseline; create one branch/worktree; add focused failing fixtures/tests; implement recorder; implement mapper; wire source binding; update compatibility tests; run focused/full matrices; audit exact paths; commit/push/Draft PR; wait exact-head CI; publish Implementation Report/QA Handoff; freeze; perform clean
SINGLE_OPERATOR_QA.This requests a separate
SINGLE_OPERATOR_SCOPE_REVIEWand thenSCOPE_CONFIRMED / IMPLEMENTATION_AUTHORIZEDfor only this exact object.WORK_PLAN_V1_SUBMITTED / AWAITING_SCOPE_REVIEWpillowtalk-Qy commentedon Aug 7, 2026
SINGLE_OPERATOR_SCOPE_REVIEW / PASS
This is a same-controller scope review by Qy. It is not an independent second-person review.
Reviewed immutable planning object:
52118437512026-08-07T03:19:04Zb3ba1411ce521d0d8526ae5805a162f5167f1e3c1ae6b6322d51fae9104f047efb94e601050b967fScope review checks:
MossPortAPI remains unchanged.MossSourceBindingsRPC injection is necessary and sufficient for adapter-owned pass-through observation; trusting a caller-supplied observation record is not permitted.UNPROVABLEwithout altering Moss control flow.SIMULATION_FAILEDboundary.changesand Receipt leaves are explicitly allowed; cycles and descriptor-hostile graphs are not.NOT_APPLICABLE, not fabricated proof.No scope finding remains open.
SINGLE_OPERATOR_SCOPE_REVIEW_PASS / READY_FOR_SCOPE_CONFIRMATIONpillowtalk-Qy commentedon Aug 7, 2026
SCOPE_CONFIRMED / IMPLEMENTATION_AUTHORIZED
Frozen authorization object:
52118437512026-08-07T03:19:04Z3283a43e4dc9f210568f29888a8a072f01e2e019c7eb8f41f3a3a13974ab2fa5f0a4faa976c31c0f0b3ac11321e490e529768368d1fdd299231ab1f837d9d0a8origin/main@b3ba1411ce521d0d8526ae5805a162f5167f1e3c1ae6b6322d51fae9104f047efb94e601050b967fQy, acting as the sole project controller, confirms this implementation scope after the explicit same-controller review. No independent reviewer is claimed.
Authorized writable paths, exactly:
packages/moss-adapter/src/types.tspackages/moss-adapter/src/source-bindings.tspackages/moss-adapter/src/simulation.tspackages/moss-adapter/src/evidence-mapper.tspackages/moss-adapter/src/index.tspackages/moss-adapter/test/fixtures/simulation.tspackages/moss-adapter/test/simulation.test.tspackages/moss-adapter/test/evidence-mapper.test.tspackages/moss-adapter/test/capability.test.tspackages/moss-adapter/test/contracts.test.tspackages/moss-adapter/test/production.test.tspackages/moss-adapter/test/fake.test.tspackages/moss-adapter/test/public-entry.smoke.mjsFrozen constraints:
MossPortstays at five unchanged method signatures;MossSourceBindingsreceives only the authorized raw RPC dependency and adapter-injected simulator client;UNPROVABLE;Authorized implementation objects:
codex/issue-28-simulation-evidence/Users/qy/Documents/Clear402 x Moss Mini-Demo/worktrees/issue-28Any baseline, pin, path, dependency, export, API, evidence rule, or downstream-boundary change invalidates this authorization until a prior Scope Amendment passes the same review flow.
This authorizes implementation only. It is not QA PASS, review approval,
READY_TO_MERGE, Merge Gate, merge permission, live evidence, or release evidence.SCOPE_CONFIRMED / IMPLEMENTATION_AUTHORIZEDpillowtalk-Qy commentedon Aug 7, 2026
SCOPE_AMENDMENT_1 / REQUESTED
Work Plan v1 remains unchanged except for one additional test path.
Requested fourteenth writable path:
packages/moss-adapter/test/errors.test.tsReason discovered by the first full adapter regression:
SimulateOutcomebefore asserting that a hostile result is still converted to secret-safeSOURCE_CONTRACT_VIOLATION / simulate;Authorized change within this file is limited to its shared synthetic binding/fixture and the simulation source-error case. No error code, error source, production behavior, assertion strength, dependency, runtime export, package metadata, or other path changes.
All original baseline, Moss pin, 13 paths, contracts, tests, non-goals, stop conditions, and downstream isolation remain frozen.
SCOPE_AMENDMENT_1_SUBMITTED / AWAITING_SINGLE_OPERATOR_SCOPE_REVIEWpillowtalk-Qy commentedon Aug 7, 2026
SINGLE_OPERATOR_SCOPE_REVIEW / AMENDMENT_1 / PASS
This is a same-controller review by Qy, not an independent review.
Reviewed amendment: #28 (comment)
6f0ccc193af47f51864ae2c6970aa9e0d0f6bd92977d01b553fe9fbb73f8718cNo amendment finding remains open.
SINGLE_OPERATOR_SCOPE_REVIEW_PASS / AMENDMENT_1_READY_FOR_AUTHORIZATIONpillowtalk-Qy commentedon Aug 7, 2026
SCOPE_AMENDMENT_1 / IMPLEMENTATION_AUTHORIZED
Qy authorizes the reviewed amendment as the sole controller. No independent reviewer is claimed.
6f0ccc193af47f51864ae2c6970aa9e0d0f6bd92977d01b553fe9fbb73f8718cThe closed writable set is now the original 13 paths plus exactly:
packages/moss-adapter/test/errors.test.tsWithin that file only the shared synthetic simulation setup and existing hostile simulation source-error regression may change. Assertion strength must not decrease.
Everything else in Work Plan v1 and the original authorization remains frozen. This is implementation-scope authorization only, not QA or merge authorization.
SCOPE_AMENDMENT_1_AUTHORIZEDpillowtalk-Qy commentedon Aug 8, 2026
Implementation frozen / QA started
Draft PR #75 is open at frozen head
479e3a3291a278eafdc80ca399eca3315c11365f.quality-gate: success — https://github.com/Moss-Mini-Demo/moss-mini-demo/actions/runs/31235450724A new detached clean worktree will now test and review that exact immutable commit. This is
SINGLE_OPERATOR_QA; no independent reviewer is claimed. The PR remains Draft and is not merge-ready yet.IMPLEMENTATION_FROZEN / CLEAN_SINGLE_OPERATOR_QA_IN_PROGRESSM2-07: map lossless Moss simulation evidence (#75)
pillowtalk-Qy commentedon Aug 8, 2026
POST_MERGE_AUDIT / COMPLETE
PR #75 merged under branch protection as
e468c6c035c3c35e12a0c1d7795d76d5306045eb.479e3a3291a278eafdc80ca399eca3315c11365fquality-gate: success — https://github.com/Moss-Mini-Demo/moss-mini-demo/actions/runs/31235869098The merge tree equals the clean-QA reviewed tree. No post-merge finding remains open. This closes M2-07 and permits a fresh dependency-gate evaluation for #29, #30, and #33; it does not by itself authorize those implementations.
POST_MERGE_AUDIT_PASS / M2_07_DONE