feat: credit staleness, bounded recompute, price oracle, budget regression baselines - #1422
Merged
Akanimoh12 merged 1 commit intoAug 26, 2026
Conversation
|
@aniokedianne Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
aniokedianne
force-pushed
the
feat/issue-1184-1185-1186-1194
branch
from
August 26, 2026 02:15
e1308c1 to
3b75c09
Compare
…ssion baselines Closes Akanimoh12#1186 — credit score staleness reporting: track computed_at_ledger in persistent storage, fill is_stale/ledger_age in get_credit_breakdown. Closes Akanimoh12#1185 — bounded paginated credit recompute: dense CreatorIndex for O(page) iteration, recompute_credit_scores_page with 50-entry page cap. Closes Akanimoh12#1184 — price oracle interface: OraclePrice type, set/remove/fetch helpers using try_invoke_contract for graceful degradation, cache fallback. Closes Akanimoh12#1194 — gas/budget regression tests: committed baselines in budget_baselines.toml, 10% tolerance assertions, CI step for delta report.
aniokedianne
force-pushed
the
feat/issue-1184-1185-1186-1194
branch
from
August 26, 2026 14:30
3b75c09 to
fd11285
Compare
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.
Closes #1186
Closes #1185
Closes #1184
Closes #1194
Summary
Add credit score staleness reporting #1186 Credit score staleness reporting: stores
computed_at_ledgerin persistent storage per creator;get_credit_breakdownnow returnsledger_age,computed_at_ledger, andis_stalebased on a configurable threshold (default 8 640 ledgers ≈ 12 h). Threshold is admin-settable viaset_credit_staleness_threshold.Make the credit score recomputation bounded and incremental #1185 Bounded paginated recompute: introduces a dense
CreatorIndex(u32)→Addressmapping maintained onregister_profile.recompute_credit_scores_page(cursor, limit)processes at most 50 creators per call and returns(next_cursor, is_done), enabling callers to page through the full set without hitting ledger budget limits.Add a price oracle interface for cross-token normalisation #1184 Price oracle interface:
OraclePrice { price_scaled: i128, updated_at: u64 }type;set_token_oracle/remove_token_oracleadmin methods;fetch_oracle_priceusestry_invoke_contractso a reverting oracle degrades gracefully toNonewithout propagating a panic. Stale prices (older than 1 h) are rejected. Missing or failed oracles return 0 for ranking — tipping is never blocked.Add gas/budget regression tests with committed baselines #1194 Budget regression tests with committed baselines:
budget_baselines.tomlcaptures CPU/MEM baselines for 6 entry points;test_budget_regression.rsasserts each measured value stays within 10% of its baseline; CI workflow gains a budget-delta reporting step that posts deltas to the job summary.