Uh oh!
There was an error while loading. Please reload this page.
fix(raw-weights): rebuild expired pending and surface rejection reasons - #68
Conversation
Challenge push clients were stuck replaying expired pending snapshots, so master returned 422 freshness forever while operators only saw a generic status. Clear non-retryable pending, rebuild fresh payloads, reject all-zero weight maps, and log attributable rejection details without leaking secrets. Burn is masking a broken aggregation pipeline; operators need visible rejection reasons.
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRaw-weight push clients now rebuild expired pending snapshots, skip all-zero weight maps, and clear pending state for non-retryable rejections. The master ingress returns attributable rejection details, logs structured metadata, and rejects zero-only payloads. ChangesRaw-weight push safety
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant RawWeightPushClient
participant RawWeightPushStore
participant raw_weight_ingress
RawWeightPushClient->>RawWeightPushStore: read pending snapshot
RawWeightPushClient->>RawWeightPushClient: check pending freshness
RawWeightPushClient->>RawWeightPushStore: clear expired pending snapshot
RawWeightPushClient->>raw_weight_ingress: submit rebuilt payload
raw_weight_ingress-->>RawWeightPushClient: return status and rejection detail
RawWeightPushClient->>RawWeightPushStore: clear pending for non-retryable rejection
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Why
On-chain burn is currently the only thing keeping validator weights fresh. That masks a broken aggregation pipeline: challenge raw-weight pushes never land durable snapshots. Operators need visible rejection reasons, not a generic 422 loop.
Root cause (prod evidence)
422 {"detail":"snapshot outside freshness window"}.prism_challenge.raw_weight_pushloop) is the broken side; schema itself accepts valid fresh payloads.Changes
Test plan
pytest tests/unit/test_raw_weight_ingress.py packages/challenges/prism/tests/test_raw_weight_push.py packages/challenges/agent-challenge/tests/test_ac_raw_weight_push.py→ 39 passedCI
Notes
Summary by CodeRabbit
Bug Fixes
Validation / New Behavior
Reliability