Skip to content

Deployment manifest standardization#621

Open
Adeyemi-cmd wants to merge 2 commits into
Pulsefy:mainfrom
Adeyemi-cmd:Deployment_Manifest_Standardization
Open

Deployment manifest standardization#621
Adeyemi-cmd wants to merge 2 commits into
Pulsefy:mainfrom
Adeyemi-cmd:Deployment_Manifest_Standardization

Conversation

@Adeyemi-cmd

Copy link
Copy Markdown
Contributor

Close #562

PR Description

SC-W6-01: Deployment Manifest Standardization

Problem

Deploy scripts, the backend registry service, and contributors all consumed
different ad-hoc representations of deployed contract state. There was no
single artifact that guaranteed:

  • The same field set across consumers
  • Stable key ordering
  • Network-bound, unambiguous fields
  • Machine-verifiable schema compatibility

Solution

Introduce a canonical deployment manifest with JSON Schema validation.

Artifacts

File Purpose
documentation/manifest-schema.json JSON Schema (draft-07) defining required fields, types, regex patterns, and network enum
scripts/deploy.sh Idempotent deploy script that builds WASM, runs stellar contract install/deploy/init, fetches get_deployment_metadata, and emits the manifest with sort_keys=True
scripts/testnet-upgrade-rehearsal.sh Now emits deployment-manifest.json (canonical) + rehearsal-artifact.json (supplementary)

Tests

Rust (3 new tests in metadata_test.rs):

  • manifest_schema_fields_are_compatible — compile-time + runtime check that every DeploymentMetadata field maps to a manifest schema property
  • manifest_schema_types_are_json_representable — ensures u32, Address, and BytesN types round-trip through JSON
  • manifest_schema_network_is_bound_by_contract_id — verifies contract_id uniquely identifies deployments

Backend (11 new tests in manifest.schema.unit.spec.ts):

  • Schema structure verification (required fields, network enum, type constraints)
  • Manifest consumption validation (TypeScript deserialization, pattern matching)
  • Stable key ordering (alphabetical sort_keys=True order enforced)
  • Network binding (network + network_passphrase together identify the Stellar network)
  • Registry mapping compatibility (manifest → ContractRegistryService record)

Documentation

  • deployment-playbook.md — added "Canonical deployment manifest" section
  • deployment-checklist.md — added "Manifest validation" checklist items

Testing

cargo test -p quickex → 262 passed (0 regressions)
npx jest --config jest.unit.config.ts \
--testPathPattern="manifest.schema" → 11 passed

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Adeyemi-cmd 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

@Cedarich

Copy link
Copy Markdown
Contributor

@Adeyemi-cmd fix failing CI

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.

SC-W6-01: Deployment Manifest Standardization

2 participants