Skip to content

ci: enforce wasm size and resource-budget limits with Tollcraft tooling - #244

Merged
mallison031 merged 3 commits into
accensa:mainfrom
lawalajose:ci-budget-limits
Aug 30, 2026
Merged

ci: enforce wasm size and resource-budget limits with Tollcraft tooling#244
mallison031 merged 3 commits into
accensa:mainfrom
lawalajose:ci-budget-limits

Conversation

@lawalajose

Copy link
Copy Markdown
Contributor

Add a budget CI job that fails on WASM-size or budget regression:

  • WASM size ceiling per contract with committed baseline (.wasm-budget.json) and a stated 10% tolerance.
  • soroban-cost-linter (cargo cost-lint, pinned v0.1.1) runs over both contracts with findings surfaced in the job log.
  • soroban-budget-assert integration: Tier A #[budget_cpu_lt(N)] macro tests gate anchor_batch (count 1/500/1000), verify_receipt (proof depth 1/10), prune_batches (100 deletes), refund and deposit; Tier B cargo budget-report (--check) publishes network-simulated numbers when a funded testnet identity is present.

Baselines are committed (budget.toml, .wasm-budget.json, budget_test.rs thresholds) and updated only by an explicit change. docs/BENCHMARKS.md now publishes per-function CPU/memory/read/write costs with headroom against the network limits, and justifies MAX_BATCH_SIZE = 1000 by the measured O(1) on-chain cost (99%+ CPU headroom) rather than by assertion.

Summary

Provide a brief summary of the changes in this pull request and the problem being solved.

Contract Change Safety Checklist

Please verify that your changes adhere to contract stability requirements:

  • Event Shapes: Does this PR modify event topic tuples or data shapes? (Breaking change per docs/EVENTS.md)
  • Storage Layout: Does this PR change storage keys or layout? (Assessed for archival & migration risks)
  • Error Variants: Does this PR add or renumber contract error codes? (Client-visible breaking change)
  • Changelog: Has a corresponding entry been added to CHANGELOG.md?
  • Deployments: Has any impact on deployed contracts or DEPLOYMENTS.md been documented?
  • Verification: Has this change been tested locally (cargo test) and/or exercised on Soroban testnet?

Related Issues

Closes #52

Add a budget CI job that fails on WASM-size or budget regression:
- WASM size ceiling per contract with committed baseline (.wasm-budget.json)
  and a stated 10% tolerance.
- soroban-cost-linter (cargo cost-lint, pinned v0.1.1) runs over both
  contracts with findings surfaced in the job log.
- soroban-budget-assert integration: Tier A #[budget_cpu_lt(N)] macro tests
  gate anchor_batch (count 1/500/1000), verify_receipt (proof depth 1/10),
  prune_batches (100 deletes), refund and deposit; Tier B cargo budget-report
  (--check) publishes network-simulated numbers when a funded testnet identity
  is present.

Baselines are committed (budget.toml, .wasm-budget.json, budget_test.rs
thresholds) and updated only by an explicit change. docs/BENCHMARKS.md now
publishes per-function CPU/memory/read/write costs with headroom against the
network limits, and justifies MAX_BATCH_SIZE = 1000 by the measured O(1)
on-chain cost (99%+ CPU headroom) rather than by assertion.
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@lawalajose 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! 🚀

Learn more about application limits

@mergekeeper

mergekeeper Bot commented Aug 27, 2026

Copy link
Copy Markdown

MergeKeeper review unavailable

AI provider review response did not contain valid JSON

No approval or merge action was taken.

@mergekeeper

mergekeeper Bot commented Aug 29, 2026

Copy link
Copy Markdown

MergeKeeper review

Scope: in scope for linked issue #52.
Verdict: clean

The PR successfully implements the budget CI job, Tollcraft tooling integration, committed baselines, documentation, and the measured justification for MAX_BATCH_SIZE as requested in the issue.

Reviewed commit: bdf37ac3f559a37269aa54d1c0eb93cf23564525.
CI and merge eligibility are checked separately.

@mergekeeper

mergekeeper Bot commented Aug 29, 2026

Copy link
Copy Markdown

MergeKeeper merge status

Status: blocked
PR state: open
Mergeability: unknown
Checked commit: bdf37ac3f559a37269aa54d1c0eb93cf23564525.

Reason: One or more required CI checks failed.

Failing checks:

Next steps:

  1. Open the failing check details above and fix the reported error.
  2. Run the same checks locally where possible.
  3. Commit and push the fix.
  4. MergeKeeper will automatically re-review the updated PR.

@mallison031
mallison031 merged commit 2720739 into accensa:main Aug 30, 2026
2 of 9 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.

ci: enforce wasm size and resource-budget limits with the Tollcraft Soroban tooling

2 participants