[PR #3024] feat(evm): inspect exact Solidity compiler artifacts #5563

Open
opened 2026-10-31 01:07:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3024
Author: @fangkangmi
Created: 10/13/2026
Status: 🔄 Open

Base: main ← Head: feat/solc-compiler-artifacts


📝 Commits (10+)

  • 013c60f feat(evm): inspect exact Solidity compiler artifacts
  • 4ab9f38 fix(evm): preserve compiler artifact provenance and linkage
  • 4e56047 docs(evm): record current-base compiler verification
  • 96ea9b2 test(evm): make compiler artifact cancellation checks deterministic
  • faa4403 fix(evm): validate compiler evidence identity and placeholders
  • 3795231 fix(evm): enforce metadata evidence consistency
  • 0602a06 chore: merge main into compiler artifact branch
  • 9c11f75 fix(evm): integrate compiler artifacts with current main
  • 29e5d9b fix(evm): validate compiler reference ownership and source ranges
  • e75d932 fix(ci): prepare native controls for EVM portability checks

📊 Changes

46 files changed (+4743 additions, -204 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/SKILL.md (+5 -3)
📝 .github/workflows/ci.yml (+3 -2)
📝 .github/workflows/real-evm-interface.yml (+68 -0)
📝 bridge/pwndbg/core_context.py (+3 -0)
📝 bridge/pwndbg/test_core_context.py (+20 -4)
📝 docs/evm-bytecode.md (+83 -4)
➕ docs/specs/solidity/compiler-artifacts/plan.md (+21 -0)
➕ docs/specs/solidity/compiler-artifacts/spec.md (+79 -0)
➕ docs/specs/solidity/compiler-artifacts/tasks.md (+12 -0)
➕ docs/specs/solidity/compiler-artifacts/verification.md (+267 -0)
📝 package.json (+1 -0)
📝 scripts/ci/scopes.mjs (+4 -0)
➕ scripts/fixtures/solidity/compiler-artifacts.mjs (+84 -0)
➕ scripts/fixtures/solidity/compiler-artifacts.sol (+29 -0)
➕ scripts/lib/evm-verifier-cancellation.mjs (+224 -0)
➕ scripts/verify-solc-artifacts.mjs (+913 -0)
📝 src/application/evm/EvmInterfaceService.test.ts (+60 -0)
📝 src/application/evm/EvmInterfaceService.ts (+7 -3)
📝 src/cli/evmCommands.ts (+47 -6)
📝 src/contracts/evm/evmToolContracts.ts (+13 -1)

...and 26 more files

📄 Description

Summary

Fixes #2389. Inspect an exact contract and creation/deployed object from an existing solc Standard JSON file, preserving compiler provenance and unresolved linkage.

rea inspect-evm-interface output.json solc-json \
  --source-unit src/Example.sol --contract-name Example \
  --bytecode-kind deployed --json

Approach and scope

  • Domain-owned parsing provides explicit bytecode kind and exact source-unit/contract selectors. Missing or ambiguous selections fail explicitly; raw/hex inputs remain compatible.
  • Concrete objects use the existing EVMole inference path. Unresolved placeholders remain evidence with unavailable inference and are never zero-filled.
  • CLI/MCP retain carrier digests, JSON coordinates, original objects, diagnostics, references and compiler metadata. Imported compiler version/settings are checked against retained metadata source; summaries preserve complete parent Evidence.
  • Inspection is offline. REA does not invoke solc, execute contracts, load referenced sources or fetch metadata URLs. Linux x64 supports inference; Windows/macOS contracts explicitly refuse unsupported inference.

Includes integration with main 144843ccc, consistent native-exit cleanup, offline recorded-crash verification, and fixture/cache wiring repairs. Valid compiler versions and settings are checked against retained metadata source.

Validation

Current head: 86a941115, including main 144843ccc.

  • Real Linux solc 0.8.30 / EVMole 0.9.3 CLI and stdio-MCP verification: all 83 cases passed, including selection, unresolved linkage, diagnostics, file limits, cancellation and process cleanup.
  • Focused EVM provider, service, compiler-view and MCP regressions: 104 passed, one skipped. Both full and compact MCP schema profiles were checked. The compiler-view fixture was rerun after the Evidence predicate update.
  • npm run check:fast and the pre-push checks passed.

Full fork-hosted qualification passed at prior head 20683e120: 40 jobs succeeded, one skipped, no failures. Hosted qualification has not been rerun for the current merged head.

Imported-Evidence metadata-status/diagnostic consistency findings remain deferred. Historical live-agent, legacy-compiler and recorded-crash checks were not rerun for this merge. Pinned verification details.

Author readiness

Human owner: @fangkangmi

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 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/3024 **Author:** [@fangkangmi](https://github.com/fangkangmi) **Created:** 10/13/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/solc-compiler-artifacts` --- ### 📝 Commits (10+) - [`013c60f`](https://github.com/morluto/rea/commit/013c60fe2033fe1f66dbad8a9e1489253fd97c56) feat(evm): inspect exact Solidity compiler artifacts - [`4ab9f38`](https://github.com/morluto/rea/commit/4ab9f3863e33bcee988053d88ecb7fbc990e4844) fix(evm): preserve compiler artifact provenance and linkage - [`4e56047`](https://github.com/morluto/rea/commit/4e56047c288b557ffc95f8ef3252d8be79284479) docs(evm): record current-base compiler verification - [`96ea9b2`](https://github.com/morluto/rea/commit/96ea9b2d62067cf0f8652387b05fab955efdd983) test(evm): make compiler artifact cancellation checks deterministic - [`faa4403`](https://github.com/morluto/rea/commit/faa440313d86eee4df64997d870fc8651480286e) fix(evm): validate compiler evidence identity and placeholders - [`3795231`](https://github.com/morluto/rea/commit/37952317fbe8bb45bbd11e3736bead80722781af) fix(evm): enforce metadata evidence consistency - [`0602a06`](https://github.com/morluto/rea/commit/0602a06fe5bd332a9a32efe3884da4fd4d41a248) chore: merge main into compiler artifact branch - [`9c11f75`](https://github.com/morluto/rea/commit/9c11f75a9479686a0b30a534b41c1653ade235e3) fix(evm): integrate compiler artifacts with current main - [`29e5d9b`](https://github.com/morluto/rea/commit/29e5d9b98a97a8530cf8be7075c9f0167cc131b9) fix(evm): validate compiler reference ownership and source ranges - [`e75d932`](https://github.com/morluto/rea/commit/e75d93243ecfc1cc0b513d7b4dab6b7df4022744) fix(ci): prepare native controls for EVM portability checks ### 📊 Changes **46 files changed** (+4743 additions, -204 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/SKILL.md` (+5 -3) 📝 `.github/workflows/ci.yml` (+3 -2) 📝 `.github/workflows/real-evm-interface.yml` (+68 -0) 📝 `bridge/pwndbg/core_context.py` (+3 -0) 📝 `bridge/pwndbg/test_core_context.py` (+20 -4) 📝 `docs/evm-bytecode.md` (+83 -4) ➕ `docs/specs/solidity/compiler-artifacts/plan.md` (+21 -0) ➕ `docs/specs/solidity/compiler-artifacts/spec.md` (+79 -0) ➕ `docs/specs/solidity/compiler-artifacts/tasks.md` (+12 -0) ➕ `docs/specs/solidity/compiler-artifacts/verification.md` (+267 -0) 📝 `package.json` (+1 -0) 📝 `scripts/ci/scopes.mjs` (+4 -0) ➕ `scripts/fixtures/solidity/compiler-artifacts.mjs` (+84 -0) ➕ `scripts/fixtures/solidity/compiler-artifacts.sol` (+29 -0) ➕ `scripts/lib/evm-verifier-cancellation.mjs` (+224 -0) ➕ `scripts/verify-solc-artifacts.mjs` (+913 -0) 📝 `src/application/evm/EvmInterfaceService.test.ts` (+60 -0) 📝 `src/application/evm/EvmInterfaceService.ts` (+7 -3) 📝 `src/cli/evmCommands.ts` (+47 -6) 📝 `src/contracts/evm/evmToolContracts.ts` (+13 -1) _...and 26 more files_ </details> ### 📄 Description ## Summary Fixes #2389. Inspect an exact contract and creation/deployed object from an existing solc Standard JSON file, preserving compiler provenance and unresolved linkage. ```sh rea inspect-evm-interface output.json solc-json \ --source-unit src/Example.sol --contract-name Example \ --bytecode-kind deployed --json ``` ## Approach and scope - Domain-owned parsing provides explicit bytecode kind and exact source-unit/contract selectors. Missing or ambiguous selections fail explicitly; raw/hex inputs remain compatible. - Concrete objects use the existing EVMole inference path. Unresolved placeholders remain evidence with unavailable inference and are never zero-filled. - CLI/MCP retain carrier digests, JSON coordinates, original objects, diagnostics, references and compiler metadata. Imported compiler version/settings are checked against retained metadata source; summaries preserve complete parent Evidence. - Inspection is offline. REA does not invoke solc, execute contracts, load referenced sources or fetch metadata URLs. Linux x64 supports inference; Windows/macOS contracts explicitly refuse unsupported inference. Includes integration with main `144843ccc`, consistent native-exit cleanup, offline recorded-crash verification, and fixture/cache wiring repairs. Valid compiler versions and settings are checked against retained metadata source. ## Validation Current head: `86a941115`, including main `144843ccc`. - Real Linux solc 0.8.30 / EVMole 0.9.3 CLI and stdio-MCP verification: all 83 cases passed, including selection, unresolved linkage, diagnostics, file limits, cancellation and process cleanup. - Focused EVM provider, service, compiler-view and MCP regressions: 104 passed, one skipped. Both full and compact MCP schema profiles were checked. The compiler-view fixture was rerun after the Evidence predicate update. - `npm run check:fast` and the pre-push checks passed. [Full fork-hosted qualification](https://github.com/fangkangmi/rea/actions/runs/39315218760) passed at prior head `20683e120`: 40 jobs succeeded, one skipped, no failures. Hosted qualification has not been rerun for the current merged head. Imported-Evidence metadata-status/diagnostic consistency findings remain deferred. Historical live-agent, legacy-compiler and recorded-crash checks were not rerun for this merge. [Pinned verification details](https://github.com/morluto/rea/blob/27e0e8eeabad993d6d6b0509ea1d0da744d6aa62/docs/specs/solidity/compiler-artifacts/verification.md). ## Author readiness Human owner: @fangkangmi - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5563
No description provided.