Repository navigation
feat(core): fee breakdowns, authorization renewal, public status feed and seed data - #292
Merged
Merged
Conversation
|
@harystyleseze 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! 🚀 |
…feed and seed data
harystyleseze
force-pushed
the
feat/utix-182-185
branch
from
October 18, 2026 16:50
db1506f to
20fbcda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four focused, independently testable core modules, one per issue: a deterministic fee calculator with explainable breakdowns, stale authorization cleanup and an audited renewal flow, a schema-backed public status feed, and contributor-safe seed data with a consistency validator.
Changes
core/fees/(Utix: Create deterministic fee calculation module with explainable breakdowns #182):calculateFeesworks inbigintsmallest units with per-line half-up rounding, per-line minimums and a refusal when fees exceed the amount.explainFeesrenders each line item,reconcileFeescompares a breakdown to stored settlement figures, andparseAssetAmountrejects digits beyond the asset's precision instead of rounding them. Docs:docs/FEES.md.core/authorizations/(Utix: Implement stale authorization cleanup and renewal flow #183): time-boxed delegated permissions whose state (active, renewed, expired, cleaned, revoked) is derived from the clock, so an expired authorization is refused immediately. Adds a read-only stale report, a maintainer/system-only cleanup after a renewal grace period, and renewal that needs the grantor (or a maintainer) plus explicit confirmation. Grant, renew, revoke and cleanup are audited via four newSENSITIVE_ACTIONS, audit-first, with refusals recorded;scripts/verify-audit.mjsanddocs/AUDIT.mdare updated. An optionalcanDelegatehook lets callers enforce that a grantor holds what it delegates (wildcards reserved for maintainers;authorizere-checks it); without it, entitlement is the caller's responsibility. This is separate from the existing session revocation incore/sessions/. Docs:docs/AUTHORIZATIONS.md.core/status/(Utix: Add schema-backed public status page data feed #184):buildPublicStatusFeedturns trusted state into a versioned public feed (health, incidents, maintenance windows) as a pure function of state and time.validatePublicStatusFeedis the exact-shape schema andpublishPublicStatusFeedonly returns feeds that validate. Internal items, diagnostics, internal notes and internal component ids are never published. Docs:docs/PUBLIC_STATUS.md.core/seed/(Utix: Build contributor-safe seed data for complex edge cases #185): deterministicG_SEED_*placeholder dataset covering a failed settlement, revoked access, an overdue workflow and historical records, plusvalidateSeedDataset, which reuses the domain invariants and the fee module.createSeedDataset()returns a fresh copy each call, which is also how it is reset. Addsnpm run verify:seed. Docs:docs/SEED_DATA.md.README.mdlinks the new docs.Issues
Resolves #185
Resolves #184
Resolves #183
Resolves #182
Verification
cargo buildandcargo testwere not run. Nonpmbuild, lint or test command was run either.Limits and tradeoffs:
authorizeis not yet wired into each protected action or a scheduled cleanup job, because the repository has no incident or authorization persistence to bind them to.