Skip to content
bitzorcas
中EN

Guide

Industry Extensions Auction, testing, and commercial GA

The real legal boundary of Auction default brackets and the 5% limit, plus golden cases, property tests, expert signoff, shadow calculation, metrics, regulatory change, recovery, and commercial-GA gates for every calculator.

Last updated

Auction contains one static calculator, yet it demonstrates the central commercialization risk: a simple formula does not make legal applicability simple. Contract terms, no-agreement defaults, property category, paying party, and judicial auctions cannot be represented by one 5% check.

1. Default brackets

The default schedule applies 5% up to 2 million, 3% from 2–10 million, 2% from 10–50 million, and 1% above 50 million. It uses progressive increments, not one rate on the entire price.

Understand that the default is progressive
var result = AuctionCommissionCalculator.CalcCommission(
hammerPrice: 3_000_000m);
// The first 2 million uses 5%; the next 1 million uses 3%.
if (result.IsFailure)
return result.Error;
// Current result is 130000, with no bracket lines or policy version.
Debug.Assert(result.Value == 130_000m);
return result.Value;

Source comments call this an industry-association convention but identify no document, publication date, auction category, or hash. It is not a statutory schedule.

2. Custom brackets

The overload accepts ReadOnlySpan<TaxBracket> and delegates to progressive calculation. It validates only nonnegative hammer price. Empty brackets return zero; disorder, negative rates, duplicate limits, and incomplete final coverage are accepted.

A custom policy needs a strict Schedule.Create step and source/version evidence. Never pass an arbitrary client array directly to the engine.

3. Fixed-rate 5% limit

CalcCommissionByRate rejects negative price/rate and any rate above 0.05, then multiplies price by rate and rounds AwayFromZero.

Auction Law Article 56 first allows consignor or buyer to agree a commission with the auctioneer. When no rate is agreed and the auction succeeds, each may be charged no more than 5%. Article 57 separately addresses the Article 9 property category. The API has no scenario parameter and turns 5% into a universal contractual cap.

4. Judicial-auction boundary

Class comments acknowledge special rules for online judicial auctions, but there is no judicial-auction method, participant model, fee model, or source version. A caller must not apply the default schedule merely because the class is named Auction.

A target design separates CommercialAgreed, CommercialUnagreedSeller, CommercialUnagreedBuyer, Article9Buyer, JudicialAuction, and any other governed scenario.

5. Result breakdown

The current decimal cannot explain bracket, party, source, effective date, or contract term. A commercial result includes HammerPrice, Currency, PayerRole, AuctionType, ContractTerm, bracket base/rate/amount, rounding, policy version/source, and warnings.

Target: select a governed scenario before calculating
var policy = await commissionPolicies.ResolveAsync(
auctionType,
payerRole,
contractDate,
cancellationToken);
// Missing or expired legal policy fails closed instead of using an anonymous default.
if (policy.IsFailure)
return policy.Error;
// Breakdown retains every bracket and source for contract review and reconciliation.
return commissionEngine.Calculate(hammerPrice, policy.Value)
.WithPolicyEvidence(policy.Value.Version, policy.Value.SourceHash);

6. Current test fact

The test tree does not reference any Auction, Finance, or HR calculator or method. There is no AOT publish smoke, public-API snapshot, official golden value, property test, mutation test, or expert acceptance.

Earlier claims that rules were exhaustively tested or had policy-version golden cases described an aspiration. The readiness matrix’s Out of Scope label is not quality evidence.

7. Golden cases

Every golden case stores business scenario, normalized input, expected line breakdown, official source version/hash, expert signoff, generation date, and applicability interval. Final totals alone cannot detect a wrong bracket, date, or intermediate rounding rule.

Use official examples, regulator service guides, or independent calculations signed by legal, tax, or HR specialists. Old cases continue to test old policy after a regulatory change.

8. Property and boundary tests

  • with valid nonnegative rates, a larger amount should not produce a smaller tax or commission;
  • mortgage schedule principal sums to original principal and ends at zero;
  • allocation deductions plus Remaining equal Payment;
  • splitting an interval at the same rate/principal preserves interest under one day convention;
  • leave tiers change only at intended boundaries;
  • successful money results follow one scale and rounding contract;
  • invalid, overflowing, or over-capacity input returns a stable Error rather than an unclassified exception.

Properties prove math invariants, not correct legal applicability. Pair them with golden cases.

9. Differential and mutation tests

Compare Finance, Mortgage, and Bracket against an independent high-precision reference. Mutate one rate, boundary, date-inclusivity rule, or rounding mode and require tests to fail. A suite that stays green after a policy table changes protects only happy paths.

A second specialist should independently recalculate high-value rules so implementation and test do not share one erroneous table.

10. Shadow rollout

Run a new policy on redacted production facts without changing formal outcomes. Compare old/new totals, bracket lines, affected population, and failure rate; sample high-value deltas for human review.

Release by tenant/cohort and support immediate rollback to the old policy. Rollback marks new results Superseded and retains audit rather than deleting them.

11. Metrics and alerts

  • calculation count/failure by scenario, engine version, and policy version;
  • invalid input, overflow, and capacity rejection;
  • missing, expired, or overlapping policy;
  • bounded old/new shadow delta;
  • rounding reconciliation delta;
  • result-ledger or outbox failure;
  • deprecated policy still in use;
  • official source hash changed but not reviewed.

Do not label metrics with salary, principal, loss, or maternity facts. Use bounded buckets and avoid sensitive raw values in logs.

12. Regulatory-change response

Official-source monitoring creates a Change Candidate only. Legal interpretation, structured draft, dual approval, golden/property/differential tests, shadow operation, and EffectiveFrom publication follow. Emergency policy still retains approval and post-review.

A formal-use call must fail closed when a policy approaches EffectiveTo without a successor. Advisory use may degrade only with an explicit expiry warning.

13. Backup and recovery

The DLLs are stateless, but a commercial system backs up policy bundles, source documents/hashes, approvals, golden cases, result ledger, input-evidence hashes, engine binary versions, and outbox. A final decimal alone cannot be explained or replayed.

A recovery drill samples historical results and recomputes them with the original engine and policy. Every dependency artifact must remain in a controlled registry.

14. Commercial-GA blockers

  1. All three assemblies currently have zero automated tests;
  2. there is no policy version, source hash, effective end, approval, or result breakdown;
  3. the governance contribution can exist in a host that did not load calculator assemblies;
  4. Auction’s default brackets have no verifiable specific source;
  5. the fixed 5% rule does not distinguish Auction Law scenarios;
  6. tax and bonus APIs have no TaxYear, while the bonus policy expires in 2027;
  7. the Penalty 130% method returns an adjustment without discretion factors;
  8. InterestSegment comments and executable inclusivity disagree, with no timeline validation;
  9. HR month proration is not the official calendar formula, and presets may be stale;
  10. Leave EffectiveFrom uses process date and is not replayable across days;
  11. bracket, mortgage, and leave-policy input/overflow/capacity bounds are insufficient;
  12. there is no authorized wrapper, sensitive-data governance, audit, shadow release, or recovery evidence.

15. Release gates

Terminal window
# This currently finds no calculator tests; GA requires stable matches.
rg -n "AuctionCommissionCalculator|IncomeTaxCalculator|LeaveCalculator|MortgageCalculator" \
tests -g '*.cs'
# Inventory hard-coded and date/rate boundaries.
rg -n "DefaultAuctionBrackets|ExcessivePenaltyRatio|DateTime.Today|workedMonths / 12m|EndDate.Date -" \
src/Platform/IndustryExtensions -g '*.cs'
# Target evidence chain.
rg -n "PolicyVersion|SourceHash|EffectiveTo|GoldenCase|ShadowCalculation" \
src tests -g '*.cs'

Industry Extensions overview · Packaging and runtime · HR leave policies

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%