Repository navigation
Conversation
|
@ASIDISG 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! 🚀 |
Brings master in line with the repository's own Format check (cargo fmt --all -- --check), which fails on master today (40 hunks). Formatting only; no code or test changes.
On master 'cargo test --lib' does not compile (23 errors in test modules and the kani harness), and once it does, two gas tests exceed the host's default budget and abort the whole test process, so no test result is reported at all. This commit fixes that, test code only: - kani harness tests: import the std items they use in this no_std crate - test_audit_summary_getter, test_testnet_mode, test_estimate_transfer, test_deposit_revenue_adversarial, test_offering_count_adversarial: follow the current client API (freeze() and pause_admin(), set_min_revenue_threshold has four arguments, estimate_transfer / register_offering results, register_offering is idempotent so a duplicate is Ok) - test_close_period: reset the budget in the two 1000-entry gas tests so they measure cost instead of aborting the process - 48 register_offering calls in eight modules pass display_decimals = 7 for the 7-decimal test token, as the RevoraOrg#612 decimals guard requires
ASIDISG
force-pushed
the
fix/lib-build-recovery
branch
from
October 16, 2026 01:41
dc904be to
18b624c
Compare
This was referenced Oct 16, 2026
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.
Summary
On
master,cargo test --libdoes not compile (23 errors in test modules and the kani harness), and once it does, two gas tests exceed the host's default budget and abort the whole test process (SIGABRT), so no test result is reported at all. This PR makes the lib test target build and run to completion. Test code only; no contract code changes.This replaces the earlier version of this PR (a 33-file "restore lib build" rewrite that had gone stale against
masterand conflicted in 15 files). Most of what it restored has since landed onmaster; what remained was the above. The previous branch is kept atbackup/pr1272-fix-lib-build-recovery.What changed (two commits)
style: cargo fmt --all: the repository's ownFormat check (cargo fmt)job fails onmastertoday (40 hunks). Formatting only. The same commit is the base of the four issuer-transfer test PRs (test: add adversarial cancel_issuer_transfer coverage (#1060) #1279, test: add adversarial propose_transfer_with_expiry coverage (#1057) #1280, test: add adversarial replace_issuer_transfer coverage (#1058) #1281, test: add adversarial accept_issuer_transfer coverage (#1059) #1282), so it merges identically in any order.test: make the lib test target build and run to completion:compute_share.rs,issuer_transfer_cancel.rs): import thestditems they use in thisno_stdcrate (format!,Box,String,ToString).test_audit_summary_getter,test_testnet_mode,test_estimate_transfer,test_deposit_revenue_adversarial,test_offering_count_adversarial):set_min_revenue_thresholdtakes four arguments;freeze()takes none and the pause call ispause_admin; the clients return()forResult<(), _>so.unwrap()is removed;try_*results are matched onOk(Ok(..)); a movedenv/jurisdictionis cloned or computed first;register_offeringis idempotent on(issuer, namespace, token), so a duplicate isOk, there is noOfferingAlreadyExists.test_close_period):env.budget().reset_unlimited()before registering 1000 persistent entries / 1000 holders. Their own comments assume an unlimited test budget; cost is still measured as acpu_instruction_cost()delta.register_offeringcalls in eight modules passeddisplay_decimals = 0for the 7-decimal test token, which the guard rejects withDecimalsMismatch. They now pass7. This one change took the suite from 163 failures to 102.Verification
Before this PR the same command either does not compile or aborts.
The 102 remaining failures are pre-existing, not introduced here
They are in modules this PR only made buildable, grouped by module so they can be split into follow-ups:
test_estimate_transfertest_faucet_metricstest_event_indexed_v3test_transfer_cooldown,test_epoch_boundary_reporttest_storage_layout_version,test_audit_summary_gettertest_quorum_checktest_tax_year,test_reg_limit_delta,test_close_periodtest_faucet_seed,test_compute_share_invariantstest_get_payment_token,test_event_indexed_v2,oracle_chain_testsvesting,test_offering_count_adversarial,test_multi_token_independence,test_claim_transfer_fail,test_accrual_reconciliation_propKnown causes include:
test_faucet_metrics/test_faucet_seedexpect thefct_mtr1emission that the Aug-31 merge chain dropped (the constant, counters and docs survive, the emission does not),test_estimate_transferfails withStaleNonce, andtest_audit_summary_getterreads storage outsideenv.as_contract. The earlier version of this PR contained thefct_mtr1restoration and the orphanedtest_indexer_fixturesmodule; both are still on the backup branch and I will resubmit them separately rather than fold them in here.Notes
Closes #1059by mistake.)Build and testjob runs withcontinue-on-error: trueand|| true, so its green tick does not reflect any of the above. Removing that is worth a follow-up once the 102 are fixed.