Address code-review findings (in-repo)#15
Merged
Conversation
The build document described a 5-factor model while the contract, scoring.js, docs/reputation-model.md, and all tests use 6 factors (community split into Community Verification 5% + Trust Propagation 5%). Update §5 and the three inline mentions, correct the age formula to the actual logarithmic curve and the community formula to the 5-point version, and note the Phase 2 stubs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an in-memory fixed-window limiter (60 req/min per client key) and apply it to /attest, /flag, and /epoch after the bearer-token check. Blunts bursts even if the admin token leaks, so a flood can't drive scores or burn oracle gas. Testnet-grade (single-process, resets on restart). 3 tests added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub Actions running forge build + test (ci profile, 5000 fuzz runs), the SDK vitest suite, and the oracle node --test suite on push/PR. lib/ is gitignored, so the contracts job fetches the Solidity deps (OZ pinned v5.6.1, forge-std default branch) to match foundry.toml remappings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
forge test has no --profile flag; the profile is chosen with the FOUNDRY_PROFILE env var. Fixes the contracts CI job. Co-Authored-By: Claude Opus 4.8 <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.
The three review findings that are actually in this repo (the frontend/Supabase ones were a mis-push, since removed).
Countersig_Build_Document.mdsaid 5-factor; the contract/scoring/tests use 6 (community split into Community Verification 5% + Trust Propagation 5%). Aligned §5 + 3 inline mentions, and corrected the stale age (logarithmic) and community formulas./attest,/flag,/epochafter the bearer check; blunts floods even if the token leaks. 3 tests.--profile citest), SDK vitest, and oracle node --test. Fetches Solidity deps in-job sincelib/is gitignored.Local: contracts 113, SDK 52, oracle 53 — all green. CI itself needs this first run to confirm (can't trigger Actions locally); if the dep-clone step needs a tweak it's a one-liner.
🤖 Generated with Claude Code