Skip to content

fix: migrate discos-cli to current EvidenceOS protocol#146

Merged
jverdicc merged 1 commit intomainfrom
codex/fix-api-drift-in-discos-cli
Mar 2, 2026
Merged

fix: migrate discos-cli to current EvidenceOS protocol#146
jverdicc merged 1 commit intomainfrom
codex/fix-api-drift-in-discos-cli

Conversation

@jverdicc
Copy link
Owner

@jverdicc jverdicc commented Mar 2, 2026

Motivation

  • Discos CLI was failing to compile due to EvidenceOS protocol and API drift; the daemon/client proto types and request/response shapes changed and must be adapted.
  • Ensure the CLI remains compatible with the workspace evidenceos-protocol/evidenceos-core APIs and the new request/response field names so runtime and verification flows continue to work.

Description

  • Added missing discos-cli dependencies: evidenceos-core and evidenceos-protocol in crates/discos-cli/Cargo.toml so protocol constants and safety_policy resolve against the workspace API.
  • Updated CreateClaimV2Request call sites to include the new fields nullspec_id, dp_epsilon_budget, and dp_delta_budget, and converted epoch_size using .into() where appropriate; preserved dual-use policy logic and fixed borrowing/binding issues (ref cmd, cloning, and dereferencing) to avoid partial-move errors.
  • Migrated commit flow to the new CommitArtifactsRequest shape by building a Vec<pb::Artifact> (mapping digest→artifact_hash, name→kind) and passing artifacts plus wasm_module in a single commit_artifacts RPC, and updated the CLI output to use the response state field.
  • Adjusted fetch-capsule handling to the new response field names: etl_root_hashroot_hash, inclusioninclusion_proof, consistencyconsistency_proof, etl_tree_sizetree_size, sth_signaturesigned_tree_head (extracting .signature), and capsulecapsule_bytes, and fixed conversions for proof node vectors and types.
  • Updated Freeze output to use state instead of frozen and changed revocation watching to iterate WatchRevocationsResponse.entries and use the current entry fields (reason, timestamp_unix).
  • Avoided requiring Serialize on the proto FeatureFlags by converting it to a stable printable JSON string via format!("{:?}", ...) when embedding in server JSON output.
  • Minor formatting and ergonomics fixes (use args.log.clone() for env filter, adjust boolean/borrow dereferences) to make the changes build cleanly.

Testing

  • Ran cargo check -p discos-cli and the check completed with no errors.
  • Built the binary with cargo build -p discos-cli and it finished successfully (EXIT:0).
  • Ran cargo check --workspace and it completed with no errors.
  • Ran cargo fmt to apply formatting (an initial cargo fmt --check reported diffs), after which formatting checks passed.

Codex Task

@jverdicc jverdicc merged commit b37e3b2 into main Mar 2, 2026
3 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant