Skip to content

[DEV] Treat an unimplemented contract as a terminal compilation failure - #144

Merged
shellygr merged 6 commits into
devfrom
shelly/dev-pr-131
Aug 10, 2026
Merged

[DEV] Treat an unimplemented contract as a terminal compilation failure#144
shellygr merged 6 commits into
devfrom
shelly/dev-pr-131

Conversation

@shellygr

@shellygr shellygr commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Mirror of #131 onto the dev bleeding-edge branch.

Source branch: shelly/autosetup-terminal-unimplemented-contract. This branch is that head merged forward with dev; #131 itself is untouched and still targets master.

Per the dev branch policy this merges without review once pyright and pytest are green.

shellygr and others added 6 commits August 7, 2026 21:24
A contract that inherits functions it never implements is rejected by solc
unless it is declared abstract. That is a defect in the contract's source, not
in the compilation settings, so no workaround can clear it -- but the retry
loop cannot tell, and its catch-all fires anyway: the run spends several more
certoraRun invocations, then the import-patch pass, before reporting a generic
"compilation analysis failed" that names neither the contract nor the reason.
The contracts most exposed to this are the generated harnesses, written
against their target's own file and so blind to what the target inherits from
elsewhere.

Detect the diagnostic next to the existing abstract-main-contract check and
raise on it, naming the contract and the file that declares it. Like that
check, it runs before any workaround is applied, so the loop stops at the
compilation that reported it. Detection folds solc's hard wrap away first, as
the other multi-line detectors in this module do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three collisions in compilation_workarounds.py and its tests, all between
independent additions landing at the same point, so both sides are kept:
the UnimplementedContractError type and regex alongside dev's
UnsatisfiableSolcPinError/BlockedPin/SolcFallbackPlan, the two terminal
guards in the workaround loop as consecutive checks, and both names in the
test module's import list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@shellygr
shellygr merged commit f8dadda into dev Aug 10, 2026
2 checks passed
@shellygr
shellygr deleted the shelly/dev-pr-131 branch August 10, 2026 13:55
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.

1 participant