Skip to content

fix(predictify-hybrid): 22 missing modules + unclosed delimiter in disputes.rs block resolution test suite #1233

Description

@ogunjobielijah09-cyber

Bug

cargo build -p predictify-hybrid currently fails with 23 errors:

  • 22 error[E0583]: file not found for module <name> errors for module declarations in contracts/predictify-hybrid/src/lib.rs whose source files do not exist on disk:

    analytics, audit, audit_trail, monitor, balances, batch_operations, circuit_breaker, config, force_resolve, extensions, gov_registry, fees, gas, governance, oracles, reentrancy_guard, oracle_health, upgrade_manager, utils, validation, versioning, performance_benchmarks

  • One error: this file contains an unclosed delimiter in contracts/predictify-hybrid/src/disputes.rs at line 4896, with the offending impl DisputeUtils { opened at line 2765 and never closed.

  • lib.rs declares the following modules twice: events, extensions, tokens, audit_trail, monitor.

Impact

Adding predictify-hybrid as a dev-dependency of any other crate (e.g. resolution) forces cargo to compile it, breaking the dependent crate's cargo test run. This blocks PR #1231 and any other cross-crate integration testing that touches the hybrid crate.

Suggested fix scope

A dedicated PR (out of scope of issue #1231) that:

  1. Restores or stubs the 22 missing module source files with the API surface declared in lib.rs (e.g. crate::audit::AuditTrailManager::append_record, crate::circuit_breaker::CircuitBreaker::*, crate::config::ConfigManager::*, crate::reentrancy_guard::GuardError, etc.).
  2. Locates and closes the missing } in disputes.rs between line 2765 and line 4896.
  3. Removes the duplicate mod events;, mod extensions;, mod tokens;, mod audit_trail;, mod monitor; declarations from lib.rs.

Workaround in the meantime

gas_snap.rs (which exercises predictify_hybrid entrypoints) was relocated to contracts/predictify-hybrid/tests/ in PR closing #1231, so:

  • cargo test -p resolution works on the moved-out gas_snap suite.
  • cargo test -p predictify-hybrid --test gas_snap is registered but cannot run until the compile errors are fixed.

Acceptance criteria

  • cargo build -p predictify-hybrid exits 0.
  • cargo test -p predictify-hybrid runs all 5+ registered test targets (err_stability, stateful, gas_snap, plus the inline tests) and they pass or are appropriately gated.
  • cargo test -p predictify-hybrid --test gas_snap exercises the snapshot baselines and passes within the 5% ceiling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions