Repository navigation
fix(export): include renamed PoC base contract in output export allowlist - #17
Merged
Merged
Conversation
…list The engine renamed the PoC base contract file from LumosPoCBase.sol to Base.sol: the generated PoC.t.sol now does `import "./Base.sol"` / `contract AttackTest is Base`, and the engine writes Base.sol on disk (deleting the legacy LumosPoCBase.sol). The output export artifact allowlist was never updated for that rename and still enumerated only LumosPoCBase.sol. Effect on every exported bundle: the allowlisted LumosPoCBase.sol is reported as missing (engine no longer writes it) while the on-disk Base.sol is never exported (not allowlisted). The base contract the PoC imports is silently dropped, so an exported PoC project fails to compile standalone: Source "test/Base.sol" not found. Add Base.sol next to each LumosPoCBase.sol entry in both the default and export artifact profiles, at both PoC locations (report_bundle/poc/ and the agent_poc foundry test dir). Purely additive: legacy LumosPoCBase.sol entries are kept for backward compatibility, absent files are still reported as missing rather than erroring, and no orchestration/state/DB logic changes — this only widens the read-only export allowlist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The read-only output export allowlist was missing the PoC base contract file, so exported PoC bundles were not self-contained and failed
forge buildwhen rebuilt standalone.Why
The engine renamed the PoC base contract file
LumosPoCBase.sol→Base.sol. The generatedPoC.t.solnow does:and the engine writes
Base.solon disk (deleting the legacyLumosPoCBase.sol).The output export artifact allowlist (
internal/artifacts/reader.go) was never updated for that rename — it still enumerated onlyLumosPoCBase.sol. Effect on every exported bundle:LumosPoCBase.sol→ reported as missing (engine no longer writes it)Base.sol→ never exported (not allowlisted)So the base contract the PoC imports is silently dropped, and rebuilding the exported project fails:
Change
internal/artifacts/reader.go— addBase.solnext to eachLumosPoCBase.solentry, in both the default and export profiles, at both PoC locations:report_bundle/poc/Base.solartifacts/agent_poc/foundry/test/Base.solLegacy
LumosPoCBase.solentries are kept → the change is purely additive and non-regressive: old cases that still carry the legacy file keep exporting it, new cases now exportBase.sol, and absent files are still reported asmissing(never an error).Safety / blast radius
bin/lumoskitdispatch, DB, and concurrency control are untouched.TestECWReaderServesRenamedPoCBaseContract) asserting the export profile exposesBase.solat both locations with the expected content.Verification
gofmt -l/go vetcleango build ./...OKgo test ./internal/artifacts/... ./internal/api/...pass (incl. new test)internal/lumoskitrepo-root test) is a pre-existing macOS/var→/private/varsymlink path artifact, identical toorigin/mainand not touched here.🤖 Generated with Claude Code