Claude/sweet brown p76 du - #149
Merged
Merged
Conversation
Structured pre-audit security review across factory, internal oracle, standard/creator pool creation, commit/threshold, expand-economy, swap, liquidity, and keeper logic. Severity-ranked findings, README-claim substantiation, top investor risks, audit-readiness assessment, and a recommended scope for the paid third-party audit. Highest-priority items: build/release hygiene (the documented Makefile path ships a mock+integration_short_timing wasm under the canonical artifact name), migrate-key/admin centralization, and creator-allocation economics. No unprivileged-exploitable Critical/High in-contract bug found. https://claude.ai/code/session_015Fnyajy2edpFrKK7nXnbU7
The documented build path produced no feature-clean artifact: both optimizer build variants for factory/expand-economy enabled `mock`, and `make optimize-factory` renamed the mock+integration_short_timing build onto the canonical artifacts/factory.wasm that deploy tooling loads. A deployer following the Makefile would ship the wasm the README says to never ship (mock oracle prices, 120s timelocks, warmup bypassed, basket on). Changes: - factory/Cargo.toml, expand-economy/Cargo.toml: add a `prod` optimizer build with empty features (real oracle, real 48h timelocks). The mock builds keep explicit -mock / -mock_only names. - Makefile: optimize-* targets now copy the -prod artifact onto the canonical <crate>.wasm and hard-fail if the -prod build is missing (so the canonical name can never silently be a mock build); the local `build` target emits the mock factory under factory-mock.wasm. - ci/check_prod_build.py + .github/workflows/ci.yml: new prod-artifact-guard job fails the build if the `prod` optimizer build ever gains `mock` or `integration_short_timing`, and proves the no-features config compiles. - README.md: correct the build-matrix table/prose to match (canonical artifact is the prod build, not the renamed mock build). - SECURITY_REVIEW_PREAUDIT.md: note H-1 remediation status. https://claude.ai/code/session_015Fnyajy2edpFrKK7nXnbU7
Remove audit-finding labels (HIGH-/MEDIUM-/M-x/H6/C-EE-1/R1 and similar) and audit-test cross-references from production source comments, keeping the technical rationale that explains why each piece of code does what it does. Comments-only change: verified that no code, identifier, or test lines were modified and that `cargo check --workspace` still passes. The audit test modules and their `mod` declarations, the testing/ modules, the fuzz harness, and the .md docs are left unchanged.
…t comments - Rename audit_tests.rs / audit_regression_tests.rs -> regression_tests.rs (factory, creator-pool, expand-economy) and update the three mod declarations. The only non-comment line changes are those three mod lines. - Strip audit-finding labels and audit-test cross-references from test-file comments, preserving what each test verifies. Comments-only apart from the three mod declarations.
Strip audit-finding labels and audit-test cross-references from test-file comments, preserving what each test verifies. Comments-only.
Reword the remaining "audit record" / "audit conversion" comments to "on-chain record" / "inspect conversion" so no code comment contains the word "audit". Comments-only; cargo test --workspace --no-run passes.
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.
No description provided.