[PR #2420] [CLOSED] feat(evm): inspect lossless Solidity terminal CBOR metadata #5214

Closed
opened 2026-10-31 01:04:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2420
Author: @matbrgz
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: feat/solidity-cbor-metadata


📝 Commits (3)

  • 0cf1ceb feat(evm): retain lossless terminal CBOR metadata
  • 6d22ed5 merge: integrate upstream and verify compiled metadata coverage
  • 183d212 merge: integrate current contracts and strengthen metadata verification

📊 Changes

22 files changed (+752 additions, -0 deletions)

View changed files

📝 .github/workflows/real-evm-interface.yml (+2 -0)
📝 docs/evm-bytecode.md (+24 -0)
➕ docs/specs/solidity/cbor-metadata/plan.md (+33 -0)
➕ docs/specs/solidity/cbor-metadata/spec.md (+43 -0)
➕ docs/specs/solidity/cbor-metadata/tasks.md (+8 -0)
➕ docs/specs/solidity/cbor-metadata/verification.md (+36 -0)
📝 package-lock.json (+10 -0)
📝 package.json (+2 -0)
📝 scripts/ci/scopes.mjs (+1 -0)
📝 scripts/verify-evm-interface.mjs (+20 -0)
➕ scripts/verify-solidity-metadata.mjs (+102 -0)
📝 src/domain/evm/evmInterface.test.ts (+8 -0)
📝 src/domain/evm/evmInterface.ts (+19 -0)
➕ src/domain/evm/solidityMetadata.ts (+89 -0)
📝 src/evm/EvmoleInterfaceProvider.ts (+3 -0)
📝 src/evm/EvmoleInterfaceWorker.ts (+2 -0)
➕ src/evm/SolidityMetadata.test.ts (+96 -0)
➕ src/evm/SolidityMetadata.ts (+158 -0)
➕ tests/boundary/evm/solidityMetadataWorker.test.ts (+75 -0)
📝 tests/boundary/filesystem/ciChangeScope.test.ts (+4 -0)

...and 2 more files

📄 Description

EVM interface inspection previously retained engine-reported terminal metadata with unknown integer precision and key coverage. This change independently inspects a bounded terminal CBOR root-map candidate from the exact selected bytecode inside the existing owned worker.

bytecode.metadata retains candidate ranges, lossless decimal integers, typed scalar keys, bytes and declared compiler-version representations. Partial nested values and unsupported/malformed candidates remain explicit. Historical omission parses as a null unknown facet without changing retained Evidence, and selected summaries preserve the new facts. Original bytecode and raw EVMole output remain available.

The pinned cborg 6.1.3 tokenizer validates UTF-8 while preserving initial U+FEFF, bounds nesting before decoder recursion and checks collection lengths against encoded bytes before allocation. A metadata declaration does not authenticate Solidity origin, compiler identity or a deployment. There is no source/metadata fetch, RPC access or contract execution; existing Linux x64 admission and worker resource ownership remain in place.

The specification and single implementation plan are in docs/specs/solidity/cbor-metadata/. This implements the terminal-CBOR inspection increment of #2388; supplied metadata JSON commitment binding remains deferred, so the whole issue is not closed.

Validation includes exact large positive/negative integers, typed keys, malformed UTF-8, BOM preservation, duplicate keys, excessive nesting, unsupported tags/floats, partial/unavailable facts, actual compiled-worker/WASM output, historical contracts and the production MCP server with an injected provider seam. Owned solc 0.8.30 fixtures passed for unoptimized, optimized via-IR, content-hash-free and CBOR-free settings. No contract was executed.

The real Linux CLI/MCP verifier now asserts decoded metadata ranges, declared compiler version and exact solc bytes for its existing raw/hex compiler fixtures. Its CI lane also runs the new owned-compiler verification, and CI planning recognizes changes to that verifier. The full Linux provider/resource-limit/cleanup lane is not locally verified on this macOS host; compiled-worker coverage and MCP seam tests do not establish that claim.

Local representative first decode was approximately 0.81 ms or less and 100 warm parses approximately 2.92 ms or less. Peak process RSS included solc (299536 KiB); process-family costs and agent tokens were not measured. Relevant test totals and final static/documentation checks are recorded in the feature verification document.

Refs #2388 and #2383. Related documentation relocation: #2403; Git can carry the additive EVM guide text into its new path.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2420 **Author:** [@matbrgz](https://github.com/matbrgz) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/solidity-cbor-metadata` --- ### 📝 Commits (3) - [`0cf1ceb`](https://github.com/morluto/rea/commit/0cf1ceba1538d779c2b0c1e9cc691da678022abe) feat(evm): retain lossless terminal CBOR metadata - [`6d22ed5`](https://github.com/morluto/rea/commit/6d22ed57ded343bdff96073808332706e2b9b1ef) merge: integrate upstream and verify compiled metadata coverage - [`183d212`](https://github.com/morluto/rea/commit/183d21210acda588184dd9a0897047523aa644b2) merge: integrate current contracts and strengthen metadata verification ### 📊 Changes **22 files changed** (+752 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/real-evm-interface.yml` (+2 -0) 📝 `docs/evm-bytecode.md` (+24 -0) ➕ `docs/specs/solidity/cbor-metadata/plan.md` (+33 -0) ➕ `docs/specs/solidity/cbor-metadata/spec.md` (+43 -0) ➕ `docs/specs/solidity/cbor-metadata/tasks.md` (+8 -0) ➕ `docs/specs/solidity/cbor-metadata/verification.md` (+36 -0) 📝 `package-lock.json` (+10 -0) 📝 `package.json` (+2 -0) 📝 `scripts/ci/scopes.mjs` (+1 -0) 📝 `scripts/verify-evm-interface.mjs` (+20 -0) ➕ `scripts/verify-solidity-metadata.mjs` (+102 -0) 📝 `src/domain/evm/evmInterface.test.ts` (+8 -0) 📝 `src/domain/evm/evmInterface.ts` (+19 -0) ➕ `src/domain/evm/solidityMetadata.ts` (+89 -0) 📝 `src/evm/EvmoleInterfaceProvider.ts` (+3 -0) 📝 `src/evm/EvmoleInterfaceWorker.ts` (+2 -0) ➕ `src/evm/SolidityMetadata.test.ts` (+96 -0) ➕ `src/evm/SolidityMetadata.ts` (+158 -0) ➕ `tests/boundary/evm/solidityMetadataWorker.test.ts` (+75 -0) 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+4 -0) _...and 2 more files_ </details> ### 📄 Description EVM interface inspection previously retained engine-reported terminal metadata with unknown integer precision and key coverage. This change independently inspects a bounded terminal CBOR root-map candidate from the exact selected bytecode inside the existing owned worker. `bytecode.metadata` retains candidate ranges, lossless decimal integers, typed scalar keys, bytes and declared compiler-version representations. Partial nested values and unsupported/malformed candidates remain explicit. Historical omission parses as a null unknown facet without changing retained Evidence, and selected summaries preserve the new facts. Original bytecode and raw EVMole output remain available. The pinned cborg 6.1.3 tokenizer validates UTF-8 while preserving initial U+FEFF, bounds nesting before decoder recursion and checks collection lengths against encoded bytes before allocation. A metadata declaration does not authenticate Solidity origin, compiler identity or a deployment. There is no source/metadata fetch, RPC access or contract execution; existing Linux x64 admission and worker resource ownership remain in place. The specification and single implementation plan are in `docs/specs/solidity/cbor-metadata/`. This implements the terminal-CBOR inspection increment of #2388; supplied metadata JSON commitment binding remains deferred, so the whole issue is not closed. Validation includes exact large positive/negative integers, typed keys, malformed UTF-8, BOM preservation, duplicate keys, excessive nesting, unsupported tags/floats, partial/unavailable facts, actual compiled-worker/WASM output, historical contracts and the production MCP server with an injected provider seam. Owned solc 0.8.30 fixtures passed for unoptimized, optimized via-IR, content-hash-free and CBOR-free settings. No contract was executed. The real Linux CLI/MCP verifier now asserts decoded metadata ranges, declared compiler version and exact solc bytes for its existing raw/hex compiler fixtures. Its CI lane also runs the new owned-compiler verification, and CI planning recognizes changes to that verifier. The full Linux provider/resource-limit/cleanup lane is not locally verified on this macOS host; compiled-worker coverage and MCP seam tests do not establish that claim. Local representative first decode was approximately 0.81 ms or less and 100 warm parses approximately 2.92 ms or less. Peak process RSS included solc (299536 KiB); process-family costs and agent tokens were not measured. Relevant test totals and final static/documentation checks are recorded in the feature verification document. Refs #2388 and #2383. Related documentation relocation: #2403; Git can carry the additive EVM guide text into its new path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5214
No description provided.