Skip to content

chore(ci): add cargo-deny, wasm size budgets, and soroban-sdk consistency checks - #640

Merged
Elizabethxxx merged 2 commits into
0xLizTech:mainfrom
noevidence1017:chore/stage1-ci-tooling-checks
Oct 26, 2026
Merged

Elizabethxxx merged 2 commits into
0xLizTech:mainfrom
noevidence1017:chore/stage1-ci-tooling-checks

Conversation

@noevidence1017

Copy link
Copy Markdown
Contributor

Summary

Resolves Stage 1 repository, tooling, and CI developer experience issues:

  • Cargo-deny license, ban, and registry policy (Add cargo-deny configuration for licenses and bans #91): Adds root deny.toml allowing permissive licenses (Apache-2.0, Apache-2.0 WITH LLVM-exception, MIT, BSD-2-Clause, BSD-3-Clause, Unicode-3.0), rejecting copyleft/GPL licenses, and denying unknown registries and git sources (unknown-registry = deny, unknown-git = deny). Wires cargo deny check into .github/workflows/security.yml using a pinned cargo-deny version and documents findings, assumptions, and residual risks in docs/SECURITY.md.
  • Contract WASM size budgets and CI tracking (Track WASM size per contract in CI #93, Add a size budget file for each contract #94): Adds contracts/size-budget.json defining baseline and maximum byte budgets for all five contracts (
    wa-asset,
    egistry, compliance, governance, oracle-adapter). Adds scripts/check-wasm-size.cjs and integrates it into .github/workflows/contracts-ci.yml to measure compiled .wasm sizes, report byte/KB deltas on pull requests, and fail the build when any contract exceeds its budget.
  • Workspace soroban-sdk version consistency check (Add soroban-sdk version consistency check #95): Adds scripts/check-soroban-sdk-version.cjs and integrates it into .github/workflows/contracts-ci.yml (check job) to verify soroban-sdk is centrally pinned in [workspace.dependencies] and reject any per-crate version overrides or duplicate lockfile versions. Documents the workspace upgrade procedure in CONTRIBUTING.md.
  • Workspace build & test restoration: Resolves pre-existing merge conflict syntax defects and duplicate error enum discriminants across
    egistry, oracle-adapter, governance, compliance, and ools/benchmark.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --all --features testutils (including contracts/common/tests/test_workspace_tooling.rs)
  • cargo deny check

ode scripts/check-wasm-size.cjs

ode scripts/check-soroban-sdk-version.cjs

  • cd sdk && npm run typecheck && npm test (including sdk/tests/ci-tooling.test.ts)

closes #91
closes #93
closes #94
closes #95

…ency checks

Add deny.toml and security.yml cargo-deny step (0xLizTech#91), contracts/size-budget.json (0xLizTech#94), scripts/check-wasm-size.cjs for CI WASM size tracking and PR delta reporting (0xLizTech#93), and scripts/check-soroban-sdk-version.cjs for workspace SDK version consistency (0xLizTech#95). Also resolve pre-existing merge conflict syntax and discriminant collisions across registry, oracle-adapter, governance, compliance, and benchmark crates.
@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@noevidence1017 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

@OrderStream OrderStream left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very thorough security and build stability improvements:

  • Permissive licensing gate: The deny.toml configuration appropriately allows Apache-2.0 and MIT while disallowing restrictive copyleft licenses, protecting downstream integrations.
  • Contract WASM byte-budget checks: Adding size-budget.json and CI size delta checks is critical for Soroban deployments to prevent transaction footprint budget blowouts.
  • SDK version consistency: Centrally pinning soroban-sdk in [workspace.dependencies] eliminates insidious runtime type mismatches between contract crates.
  • Observation: Ensure CI compiles release profiles with opt-level = 'z' and lto = true prior to running the size check for accurate production binary measurement.

Looks solid.

# Conflicts:
#	CHANGELOG.md
#	CONTRIBUTING.md
#	contracts/governance/src/lib.rs
#	contracts/size-budget.json
#	deny.toml
#	docs/SECURITY.md
@Elizabethxxx
Elizabethxxx merged commit 8fc7b8c into 0xLizTech:main Oct 26, 2026
4 of 17 checks passed
};

const listUrl = `${apiUrl}/repos/${repo}/issues/${prNumber}/comments?per_page=100`;
const listRes = await fetchImpl(listUrl, { method: "GET", headers });
const updateRes = await fetchImpl(updateUrl, {
method: "PATCH",
headers,
body: JSON.stringify({ body: markdown }),
}

const createUrl = `${apiUrl}/repos/${repo}/issues/${prNumber}/comments`;
const createRes = await fetchImpl(createUrl, {
const createRes = await fetchImpl(createUrl, {
method: "POST",
headers,
body: JSON.stringify({ body: markdown }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants