CR2 independent completion review for pre-TSW build tasks (0007) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/cr2-completion-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Base:
feat/ofac-payout-hold· Head:feat/cr2-completion-review· Decided by George 2026-11-09 (taskuler/docs 0007). Not deployed.Design
ReviewerRegistry(Ownable2Step, owner = the Safe, holds no funds): published reviewer list, signer-conflict list, per-token minimum fee.assignReviewer(jobId, reviewer)(payable, Safe only, jobOpen), whichescrows the reviewer fee on top of the bounty. After delivery the reviewer calls
submitRecommendation; the Safe canexecuteRecommendationat once, anyone after the objection window.acceptDeliveryand settlement offers revertReviewJob()on review jobs.REVIEWER_FEE_BPS = 500, per-tokensetMinReviewerFee, e.g. USDC50e6). Credited to the reviewer on submission; refunded to the Safe if never earned.reassignReviewer(max 2). If nobody recommends,releaseAfterReviewopens atmax(deliveredAt, assignedAt, customer hold end) + 2 × reviewPeriod; never once a recommendation exists.requestArbitration(same ETH prepay as today) before execution; Kleros overrides the recommendation.acceptBidon every Safe-customer job: builder can't be the reviewer (BadReviewer) or conflicted (Conflicted(builder)).PayoutLib, review bookkeeping toReviewLib(auto-linked at deploy).No new
Statusvalues; newWorkHistory.Outcome.Reviewed(5).Interface
setReviewer(address, bool listed, string metadataURI),setConflicted(address, bool, string reasonURI),setMinReviewerFee(address token, uint256), viewsreviewerFee(token, bounty),canReview,isConflicted.assignReviewer(jobId, reviewer),submitRecommendation(jobId, uint8 builderPct, bytes32 noteHash, string noteURI)(
builderPct ∈ {0,25,50,75,100}, beforereviewDeadline(jobId) = max(deliveredAt, assignedAt) + reviewPeriod),executeRecommendation(jobId),reassignReviewer(jobId, newReviewer), viewsreviews(jobId),reviewDeadline,reviewEndsAt.ReviewerRegistry reviewerRegistry_afterworkHistory(address(0)disables review jobs).ReviewJob,NotReviewer,BadReviewer,Conflicted(address),ReviewWindowClosed.Tests and coverage
forge test: 163 passed, 0 failed (newtest/CompletionReview.t.sol, 27 tests; invariant handler gains a reviewed lifecycle, conservation includes the reviewer).Indexer events
ReviewerAssigned(uint256 indexed jobId, address indexed reviewer, uint256 fee, uint8 reassignment),RecommendationSubmitted(uint256 indexed jobId, address indexed reviewer, uint8 builderPct, uint64 objectionEndsAt, bytes32 noteHash, string noteURI).ReviewerSet(address indexed reviewer, bool listed, string metadataURI),ConflictSet(address indexed account, bool conflicted, string reasonURI),MinReviewerFeeSet(address indexed token, uint256 minReviewerFee).Reviewed(5).PROVISIONAL defaults (George decision pending)
settlementWindow(5 days); no separate parameter.reviewPeriodafter the review deadline; unearned fee back to the Safe.postJobwithout a reviewer stays allowed for the Safe; the Safe curates both lists.3f91893c63to877e6077caTaskuler-bot referenced this pull request from taskuler/web2026-11-10 16:59:11 +00:00
Replaced by #5 (#5), reopened under the taskuler-bot account. Please review there.
Pull request closed