Skip to content

feat: canonical decision payloads, settlement self-containment, version-negotiation endpoint, address auth labels - #544

Merged
usmanimamu17-create merged 2 commits into
ApexChainx:mainfrom
JamesEjembi:james/prs-429-428-427-426
Sep 1, 2026
Merged

feat: canonical decision payloads, settlement self-containment, version-negotiation endpoint, address auth labels#544
usmanimamu17-create merged 2 commits into
ApexChainx:mainfrom
JamesEjembi:james/prs-429-428-427-426

Conversation

@JamesEjembi

@JamesEjembi JamesEjembi commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Resolves #429,
Resolves #428,
Resolves #427,
Resolves #426.

#429 — Canonical decision payload across sla_calc / set_int / dup_input

publish_sla_event and publish_settlement_intent_event now emit the same 9-field canonical tuple (outage_id, status, mttr_minutes, threshold_minutes, amount, payment_type, rating, config_version_hash, recorded_at) already used by dup_input. A single decoder now parses every decision event. Tests assert the shared canonical order and the 9-field decode.

#428 — set_int is self-contained for settlement

The settlement-intent event now carries the full decision (rating, mttr minutes, threshold), so settlement-only consumers reconstruct the SLA decision without a follow-up read.

#427 — get_version_negotiation_info

New read-only method exposing protocol_version, min_compatible_protocol, storage config version, pause and migration state for the multi-contract handshake. Descriptor entry included; get_public_api reports 62 methods (test updated).

#426 — accurate address auth labels

get_public_api now labels accept_admin/accept_operator as "addr" (they call require_auth for the contract address), not "none".

Verification: cargo check clean (0 warnings); full test suite 599 passed / 0 failed / 5 ignored (includes regression tests for all four issues).

…on-negotiation endpoint, address auth labels

- ApexChainx#429: sla_calc and set_int now share the 9-field canonical SLAResult field order with dup_input so a single decoder parses every decision event
- ApexChainx#428: set_int carries the full decision (mttr minutes, threshold, rating) so settlement-only consumers reconstruct the SLA decision without a follow-up read
- ApexChainx#427: add get_version_negotiation_info exposing protocol_version/min_compatible_protocol/storage/pause/migration state for the multi-contract handshake
- ApexChainx#426: get_public_api labels accept_admin/accept_operator as address-scoped ("addr") since they call require_auth and match the pending-slot address, not "none"

Closes ApexChainx#429, ApexChainx#428, ApexChainx#427, ApexChainx#426
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

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

@usmanimamu17-create usmanimamu17-create 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.

Looks good to me.

@usmanimamu17-create usmanimamu17-create 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.

Looks good, thanks!

@usmanimamu17-create
usmanimamu17-create merged commit ab85cec into ApexChainx:main Sep 1, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment