Skip to content

feat: supplier timeliness metric plus testing, funding and CLI guides - #723

Merged
shakurJJ merged 5 commits into
shakurJJ:mainfrom
king-aj-the-first:fix-4-issues
Oct 23, 2026
Merged

shakurJJ merged 5 commits into
shakurJJ:mainfrom
king-aj-the-first:fix-4-issues

Conversation

@king-aj-the-first

Copy link
Copy Markdown
Contributor

This PR addresses four issues in one branch with four separate commits.

#631 feat: supplier on-time milestone rate metric

  • New SupplierTimeliness { on_time, late } contract type and DataKeyExt4::SupplierTimeliness(Address) storage key with TTL extension on every write.
  • Counters update on confirmation only (confirm_milestone held and direct paths, batch_confirm_milestones, confirm_milestone_graded, claim_auto_confirmation): on-time when proof_submitted_ledger <= deadline_ledger, late otherwise. Milestones without a deadline are ignored.
  • New get_supplier_timeliness(supplier) getter; the confirming party is authenticated by the underlying confirmation call, which also appends the milestone_confirmed shipment audit entry.
  • Each recorded milestone emits a timeliness_recorded event.
  • New test_supplier_timeliness module (happy path, late, exact-deadline edge, no-deadline ignored, event emission, authorization failure, invalid index) and docs/supplier-timeliness.md.
  • Note: repaired a truncated test-module header in storage.rs (pre-existing, blocked all compilation); remaining build errors in the repo are pre-existing merge drift unrelated to this change.

#688 docs: testing guide

  • New docs/testing.md covering module layout and lib.rs registration, test_common.rs fixtures, snapshot tests with UPDATE_SNAPSHOTS=1, proptest usage, and the env.events().all() last-invocation pitfall. Linked from the README.

#690 docs: buyer funding options

  • New docs/funding.md covering direct funding plus top_up_escrow, the escrow vault (vault_deposit / vault_withdraw / get_vault_balance with fund_from_vault), standing orders (create_standing_order / execute_standing_order / cancel_standing_order / get_standing_order), allowance-based funding (create_shipment_with_allowance), and interaction with buyer spending limits and the TVL cap. Linked from the README.

#687 docs: Stellar CLI cookbook

  • New docs/cli.md with copy-paste stellar contract invoke examples for init, create_shipment (struct/vector encoding), submit_proof, confirm_milestone, raise_dispute / resolve_dispute, and admin config (add_allowed_token, set_fee_config, set_tvl_cap). Linked from the README.

Closes #631
Closes #688
Closes #690
Closes #687

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

@king-aj-the-first 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

@shakurJJ
shakurJJ merged commit ebd37b0 into shakurJJ:main Oct 23, 2026
0 of 2 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.

docs: document buyer funding options docs: write a testing guide docs: write a Stellar CLI cookbook feat: supplier on-time milestone rate metric

2 participants