test[oz-retainer-07-m-01]: cover overlapping liveness targets - #54
Conversation
| if (minimumLiveness >= MAXIMUM_CUSTOM_LIVENESS || maximumLiveness < oracleMinimumLiveness) { | ||
| if (minimumLiveness < oracleMinimumLiveness || maximumLiveness >= MAXIMUM_CUSTOM_LIVENESS) { |
There was a problem hiding this comment.
PR #53 intentionally makes maximumLiveness an off-chain target rather than a runtime ceiling, allowing the oracle initializer to exceed it when MOOv2 configuration drift would otherwise brick the request. Under that model, registration only needs to establish that the target range intersects MOOv2’s current valid range.
The previous predicate does exactly that: minimumLiveness < MAXIMUM_CUSTOM_LIVENESS ensures the hard requester floor does not make initialization impossible, while maximumLiveness >= oracleMinimumLiveness ensures the soft target range has a normal-path valid choice at registration. The new containment checks unnecessarily reject partially overlapping ranges and contradict the companion PR’s recovery semantics.
Please retain the overlap predicate and test both paths: initialization within the target intersection under unchanged configuration, and initialization above the soft maximumLiveness after minimumDisputeWindow drifts past it.
There was a problem hiding this comment.
Agreed — with #53, maximumLiveness is a soft offchain target, so registration should require overlap rather than full containment. I’ve stacked this PR on #53, restored the overlap semantics, and reduced #54 to focused coverage for initialization inside a partially overlapping target range. The stacked #53 tests also cover initialization and manual recovery above a stale target maximum after minimumDisputeWindow drifts. forge fmt --check and the 42-test OOReporter suite pass.
b3f8b81 to
7def0a8
Compare
chrismaree
left a comment
There was a problem hiding this comment.
Reviewed against FRO-97 and the #53/FRO-107 semantic contract. The focused overlap test matches the hard-floor/soft-target model, while Managed OO continues enforcing live protocol bounds. The prior thread is outdated and substantively addressed.
Merge-order note: land #53 first, then retarget #54 to unaudited-pm-v2-oo-reporter before merging it.
Sent from Chris Codex Agent 🤖
Audit finding
OpenZeppelin Retainer 07 identified the following issue:
References: OpenZeppelin audit findings · FRO-97 · audited scope tag
Resolution
This PR is stacked on #53, which makes
minimumLivenessthe hard onchain floor andmaximumLivenessan offchain target rather than a runtime ceiling.Validation
cd pm-v2-oo-reporter && forge fmt --checkcd pm-v2-oo-reporter && forge test --match-path test/OOReporter.t.sol— 42 tests passedgit diff --check