Repository navigation
fix(analytics): slim capabilities() and scaffold predictify-analytics - #1466
Merged
greatest0fallt1me merged 1 commit intoOct 19, 2026
Conversation
|
@abdooltata 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! 🚀 |
AnnieIj
added a commit
to AnnieIj/predictify-contracts
that referenced
this pull request
Oct 22, 2026
Predictify-org#1466 added predictify-analytics to the workspace (via the contracts/* glob) but never committed its src/, so every cargo command failed to load the workspace ("can't find library predictify_analytics") and the Soroban CI build job has been red on master since. Also fix the crate's Cargo.toml: the [depdevelopment-dependencies] section name was a typo cargo silently ignored, and the dev-dependency requested a `testutils` feature on predictify-hybrid that does not exist (available: default, full), which broke version resolution for the whole workspace. Commit a placeholder lib so CI is green until the real analytics contract sources land. Verified locally with the exact CI commands: cargo build -p predictify-hybrid, cargo test -p hello-world -p oracles, cargo test -p predictify-hybrid --lib (739 passed), and cargo test -p predictify-analytics.
greatest0fallt1me
added a commit
that referenced
this pull request
Oct 24, 2026
#1478) * fix(bets): route vote and place_bet through one validated stake ledger vote and place_bet maintained overlapping stake ledgers: a bet overwrote a prior vote stake, permanently stranding those tokens, and vote skipped the circuit breaker, stake validation, min/max limits, the max-participants accounting used by bets, and the per-ledger bet cap. Both entrypoints now delegate to a single validated record_stake that runs, in order: circuit breaker, per-ledger cap, market state, bet deadline, outcome, amount bounds, duplicate stake across both ledgers, participant capacity, per-user cap, and checked total_staked - then locks funds and writes the shared ledger. No state is written before lock_funds succeeds. Cross-entrypoint duplicates return AlreadyBet; the first stake is never overwritten or stranded. cancel_bet only removes ledger entries that the bet itself created. Covered by contracts/predictify-hybrid/src/stake_ledger_unification_tests.rs (all 9 issue rows plus legacy pre-fix market compatibility). Closes #1454 * fix(analytics): unbreak workspace resolution for CI #1466 added predictify-analytics to the workspace (via the contracts/* glob) but never committed its src/, so every cargo command failed to load the workspace ("can't find library predictify_analytics") and the Soroban CI build job has been red on master since. Also fix the crate's Cargo.toml: the [depdevelopment-dependencies] section name was a typo cargo silently ignored, and the dev-dependency requested a `testutils` feature on predictify-hybrid that does not exist (available: default, full), which broke version resolution for the whole workspace. Commit a placeholder lib so CI is green until the real analytics contract sources land. Verified locally with the exact CI commands: cargo build -p predictify-hybrid, cargo test -p hello-world -p oracles, cargo test -p predictify-hybrid --lib (739 passed), and cargo test -p predictify-analytics. * chore: sync Cargo.lock with analytics dev-dependencies --------- Co-authored-by: greatest0fallt1me <greatest0fallt1me@users.noreply.github.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.
Overview
This PR starts the split of the predictify monolith by scaffolding a separate
predictify-analyticscrate and correctingcapabilities()so the slim build no longer advertises features it does not export. It also adds a size-guarded analytics WASM build script and wires the new crate into CI.Related Issue
Changes
🧩 Analytics Contract Scaffold
contracts/predictify-analytics/Cargo.tomlcrate-type = ["cdylib", "rlib"]andsoroban-sdkfrom the workspace, picked up automatically bymembers = ["contracts/*"].🛠️ Core Capabilities Fix
contracts/predictify-hybrid/src/capabilities.rscapabilities()is now derived fromcfg!(feature = "full")so the slim bitmask drops full-only features (ANALYTICS,DISPUTES,GOVERNANCE,MONITORING,UPGRADE_MANAGEMENT) instead of returning a fixed mask that overstated the slim build.📦 Build and CI
scripts/build_analytics_wasm.sh.github/workflows/contract-ci.ymlcargo test -p predictify-analyticsalongside the existing core test run.Verification Results
cargo test -p predictify-analyticsandcargo test -p predictify-hybrid --libpass, and CI runs bothbuild_analytics_wasm.shcapabilities()excludes full-only featurescfg!(feature = "full")Closes #1459