feat(core): add compat.rs re-export layer for platform SDK types#19
feat(core): add compat.rs re-export layer for platform SDK types#19
Conversation
Create new term-core crate with src/core/compat.rs providing: - Re-exports of Hotkey, ChallengeId (UUID-based) from platform_core - Re-exports of WeightAssignment, ChallengeRoute (HttpMethod enum), RouteRequest, RouteResponse, ChallengeError, ServerChallenge from platform_challenge_sdk - ChallengeConfigMeta thin wrapper combining metadata + config - Deprecated backward-compatible aliases (LegacyChallengeId, LegacyWeightAssignment, LegacyRoute) with Into conversions - Conversion utilities (weight_u16_to_f64, challenge_id_from_bytes, method_str_to_enum, normalize_weights, etc.) - Prelude submodule for convenient imports - 153 tests (126 unit + 27 doc tests)
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 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 |
…ports # Conflicts: # Cargo.lock # Cargo.toml
Summary
Create a new
term-corecrate providing a compatibility/re-export layer that replaces local type definitions with canonical types fromplatform-coreandplatform-challenge-sdk.Changes
term-core(core/) with path dependencies onplatform-coreandplatform-challenge-sdkplatform_core:Hotkey(replaces local[u8;32]),ChallengeId(UUID-based, replaces[u8;16]),Stake,Score,BlockHeight,ValidatorInfo,NetworkConfig,Job,JobStatusplatform_challenge_sdk:WeightAssignment(f64 weights),ChallengeRoute(HttpMethod enum),RouteRequest/RouteResponse(with params/query/auth_hotkey),ChallengeError,ServerChallengetrait,ChallengeContext,ChallengeMetadata,EvaluationResult,AgentInfo, weight calculation types, submission types, data types, P2P types, databaseChallengeConfigMeta: Thin wrapper combiningChallengeMetadata+ChallengeConfigfields with bidirectional conversion (handles dualChallengeIdtype via inner UUID)LegacyChallengeId,LegacyWeightAssignment,LegacyRoutewithIntoconversions for incremental migrationweight_u16_to_f64/weight_f64_to_u16,challenge_id_from_bytes,method_str_to_enum/method_enum_to_str,normalize_weights,make_weight,make_routeCargo.tomlto includecoremember