Skip to content

ci: enforce protocol verification baseline - #124

Open
devin-ai-integration[bot] wants to merge 47 commits into
mainfrom
devin/1794908721-align-protocol-ci
Open

devin-ai-integration[bot] wants to merge 47 commits into
mainfrom
devin/1794908721-align-protocol-ci

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Note

Morpho token CI omitted Solidity lint, Certora input formatting, and solc download integrity checks. This PR closes those CI coverage and reproducibility gaps while preserving production contract logic and the existing compiler, library, and legacy Forge versions.

Context

Current Foundry follows nightly to catch upstream regressions; forge-old is pinned to Foundry v1.8.3. Protocol accepts Certora-key exposure as low impact, so repository agent guidance excludes dependency hardening justified solely by protecting that key.

Impact of merging

The repository’s subsequent pull-request and main-branch CI runs enforce the expanded baseline. Deployed contract behavior and bytecode settings do not change. Current Forge follows nightly to detect upstream changes early; the legacy lane uses pinned Foundry v1.8.3. Required-check rules in GitHub settings are outside this code change.

Change outline

  • Keep shared CI review guidance synchronized across repositories, including accepted common choices and transient download failures that pass on retry.
  • Fail nightly test compilation on first-party compiler warnings; exempt test contract/code-init size diagnostics. The lib/ compiler-warning filter applies to local Forge commands and CI.
  • Run forge lint src script certora test --deny notes with all lint severity levels and shared exclusions. Source/harness files use ordinary Solidity rules; tests use Forge’s dedicated test rules.
  • Seed both Forge lanes from github.sha: each workflow revision exercises fresh inputs, and reruns use the same seed.
  • Configure 1,024 fuzz runs in shared Foundry defaults for both Forge lanes.
  • Check Solidity formatting in src/ and test/, plus existing Solidity script and Certora harness directories.
  • Use the shared forge.yml layout for current Forge checks.

Claim: enforce the repository’s protocol CI baseline. Kind: behavior (CI configuration). Base: main; no prerequisite PR.

  • Use named imports in the direct-source Certora harnesses.

  • Verify downloaded solc against the same SHA256 digest already enforced by forge-old.

  • Format every certora/**/*.conf and certora/**/*.spec in separate steps, including reusable configs and shared helpers; install the current Certora CLI using the runner-provided Python and preinstalled Java 21.

  • Standardize read-only permissions; keep current Forge tracking nightly explicitly.

  • Select Java 21 explicitly for the formatting job as well as proof jobs; CLI formatting fails under Java 17 and passes under Java 21.

  • Disable persisted checkout credentials after fetching, including submodules.

  • Document the accepted Certora-key risk in repository agent guidance.

Evidence

  • The solc installation steps pass local download, checksum and executable checks, using an isolated installation directory. Compiler versions and hashes match the preceding revision. Java 21 PATH selection and exact Certora formatting commands pass with JAVA_HOME deliberately left at Java 17.

  • All 44 Forge tests pass locally, together with locked build, lint, formatting, and actionlint. All 14 Certora configurations compile and typecheck against production sources. The formatted CVL specs match main, preserving its storage-hook ghosts and zero-delegatee model.

  • Java 21 is selected from the runner via JAVA_HOME_21_X64 and PATH, without a runtime download. Solc installation retains the existing compiler versions and hardcoded SHA-256 digests.

  • actionlint and forge fmt --check pass locally with Foundry 1.9.1-nightly (6264e501, 2026-11-17).

  • The exact combined lint command above, Solidity formatting and workflow validation pass locally under that nightly build.

  • Recursive Certora config/spec formatting passes, including helpers. An unformatted reusable config outside certora/confs is rejected; matrix discovery remains limited to certora/confs. Formatter output is piped directly to diff without trimming whitespace.

  • Existing pinned upstream action commits were verified.

  • Production implementation logic and compiler/library pins are preserved. Source edits remove unused imports/using directives or add local lint suppressions; pinned legacy Forge remains v1.8.3. GitHub CI runs the complete workflows for each revision.

Special things to note

Certora uses the runner’s default Python and preinstalled Java 21. Solidity compiler downloads remain pinned to explicit versions and hardcoded SHA-256 digests.

Superseded workflow runs are not canceled. Matrix jobs explicitly disable fail-fast, so all sibling tests/proofs run to completion after a failure.

Lint uses shared exclusions plus documented repository-specific exceptions and local suppressions. Unused imports and using directives are removed where needed. These exclusions are a CI baseline, not a new security assessment of those patterns.

Reverting the PR restores the previous CI policy. No deployment or migration is needed.

Link to Devin session: https://app.devin.ai/sessions/a2cba343d21d42f0b8c1bb215852942b
Open in Devin Desktop: https://app.devin.ai/desktop/session/a2cba343d21d42f0b8c1bb215852942b?variant=devin


🟢 Devin fixed all 2 findings · Follow Devin's work

Devin Review

Also folds in #122 (forge-old note in AGENTS.md).

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 2 findings. Devin automatically fixed all 2 findings.

Fixed by Devin (2)
  • Half the stated fuzz budget — The contributor's latest revision sets 1,024 runs consistently across all nine repositories. Preserved that setting and corrected the stale PR description to state 1,024 runs for both Forge lanes; local nightly forge config confirms the effective value. No source change is needed.
  • Outdated Certora setup evidence — Corrected the PR description and validation evidence to describe the checksum-verified CPython archive now in both jobs, removed stale setup-python discussion, and confirmed its installer matches the previously executed, SHA-256-validated block.

View findings in Devin Review · Follow Devin's work

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Certora runtime differs from PR description — Confirmed at reviewed/current HEAD 3d5d770: both Certora jobs intentionally use the runner-provided Python after Adrien’s default-python merge. Updated the PR description to state this and restrict archive/checksum claims to Java; preserved the contributor’s workflow change.

View findings in Devin Review · Follow Devin's work

Devin Review

MathisGD
MathisGD previously approved these changes Nov 19, 2026
MathisGD
MathisGD previously approved these changes Nov 19, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 findings. Devin automatically fixed all 2 findings.

Fixed by Devin (2)
  • Directory timestamp replaces completion marker — The main sync removed certora/Makefile and applyMunging.patch entirely, following main's direct-source and storage-hook verification architecture. No generated-directory timestamp or completion marker is used on the current branch.
  • Failed proof cancels other specifications — The contributor subsequently disabled matrix fail-fast. The current Certora verify matrix explicitly uses fail-fast: false, so failures no longer cancel sibling proofs.

View findings in Devin Review · Follow Devin's work

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants