Skip to content

fix: restore compilation of scoregate-score - #157

Merged
hartz0 merged 2 commits into
hartz0:mainfrom
ayomidearegbeshola29-dev:fix/restore-build
Sep 30, 2026
Merged

hartz0 merged 2 commits into
hartz0:mainfrom
ayomidearegbeshola29-dev:fix/restore-build

Conversation

@ayomidearegbeshola29-dev

@ayomidearegbeshola29-dev ayomidearegbeshola29-dev commented Sep 29, 2026 •

Copy link
Copy Markdown

main does not compile, so the test suite cannot run at all. This restores the build.

What was broken

cargo test -p scoregate-score --lib fails with 10 errors on main:

  • verkle.rs was truncated to 210 lines, ending mid-statement at let mut buf =, with a literal truncation marker. Restored byte-identical from 42958bb.
  • The ledgerlens-score -> scoregate-score package rename (c54f61b) dropped four storage functions that governance_helpers.rs still calls. Restored from 2d161b7, plus the two DataKeyD variants they need.
  • finalize_score_state was lost the same way. Restored from 0f5f35a.
  • query_risk_gate_with_confidence called env.invoker(), which is not a Soroban API. The working version used env.current_contract_address().
  • events.rs was missing the Vec import; storage.rs needed a type annotation and no longer uses SymbolStr.

I confirmed each of these by checking that upstream main still fails after only the verkle restore, so the verkle fix alone is not enough.

Verification

  • cargo check -p scoregate-score --lib — clean
  • cargo test -p scoregate-score --lib — 772 pass, 20 fail

The 20 failures are pre-existing and in unrelated modules (ttl_rent_manager, migration_rollback, malformed_proof_corpus, reconciliation, rejection_precedence, and others). They are left for whichever issues own them; this PR only restores the build so they can be investigated and so the feature issues can be worked on.

Note

cargo test rewrites ~350 files under test_snapshots/. Those are test artifacts, not part of this change, and were reverted before committing — the diff is 5 source files only.

main does not compile: `cargo test -p scoregate-score --lib` fails with 10
errors, so the whole test suite is unrunnable.

- verkle.rs was truncated to 210 lines, ending mid-statement at `let mut
  buf =`, with a literal truncation marker. Restored from 42958bb.
- The ledgerlens-score -> scoregate-score rename dropped four storage
  functions that governance_helpers.rs still calls. Restored from 2d161b7,
  plus the two DataKeyD variants they need.
- finalize_score_state was lost the same way. Restored from 0f5f35a.
- query_risk_gate_with_confidence called env.invoker(), which is not a
  Soroban API. The working version used env.current_contract_address().
- events.rs was missing the Vec import; storage.rs needed a type annotation
  and no longer uses SymbolStr.

772 tests pass, 20 fail. Those 20 are pre-existing and unrelated to this
change (ttl_rent_manager, migration_rollback, malformed_proof_corpus and
others); they are left for the issues that own them.
@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

Hey @ayomidearegbeshola29-dev! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#110 #60 — Aggregator Read Endpoints Mutate Instance Storage on Shard Failure Link to this issue
#111 #61 — Aggregator Decoupled Getters Ignore Unhealthy Status of Primary Shard Link to this issue
#109 #59 — Aggregator Risk Gate Fails Open When All Registered Shards Are Unhealthy Link to this issue
#68 #18 — Unbounded Loop and Gas Exhaustion in export_all_scores_paginated Link to this issue

ℹ️ Learn more about linking PRs to issues

@hartz0
hartz0 merged commit f43a316 into hartz0:main Sep 30, 2026
7 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants