Skip to content

feat(temples): make recovery pricing need-aware - #211

Draft
zoeyrose wants to merge 4 commits into
atrinik:mainfrom
zoeyrose:feat/temple-service-pricing
Draft

feat(temples): make recovery pricing need-aware#211
zoeyrose wants to merge 4 commits into
atrinik:mainfrom
zoeyrose:feat/temple-service-pricing

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Aug 13, 2026

Copy link
Copy Markdown
Member

Status

Draft and blocked pending the work-aware service contract in
atrinik/classic#264. The current
head is a validated prototype, but it still contains the superseded hard-coded
provider registry, exact-price quote, pre/postcondition inference, and no
provider-credit support.

Revised target

  • author a unique canonical npc_id and custom key/value
    temple_service_rank on every provider NPC;
  • remove map/name/provider dispatch from Python and validate the authored
    identity/rank inventory;
  • query bounded named spell-work components and convert them into a
    deterministic minimum/maximum monetary quote;
  • bind state evidence, provider identity/rank, price range, existing debt, and
    maximum possible new debt into confirmation;
  • re-query on confirmation and re-quote any drift without casting;
  • calculate the final charge from the actual beneficial work reported by the
    cast, with zero cash and zero debt for zero work; and
  • when explicitly confirmed work exceeds available funds, collect the
    available amount and record the bounded interest-free remainder against that
    provider's npc_id.

An indebted provider requires full repayment before another paid service.
Other providers are independent, and eligible newcomer-essential care remains
free and never creates debt. The actual cash plus debt can never exceed the
confirmed maximum.

Dependencies

The same APIs will support future per-item Smith identification pricing under
#217, which does not block this
temple PR.

Required validation after revision

  • python3 tools/validate.py and git diff --check
  • complete provider npc_id/rank and save-enabled-map audit
  • exact/ranged quote, actual-work, zero-work, partial-funding, debt, and
    repayment unit/runtime coverage
  • derived Classic server build and complete CTest suite
  • isolated low/high patient and provider scenarios with reconnect/cleanup
  • fresh independent whole-diff reviews with zero actionable findings
  • latest-head required PR checks

Superseded current-head evidence

Head 1dce4f43ebe4d5d8d5582d3f06f395da70254455 previously passed full content
validation, the derived Classic test suite, an isolated server scenario, two
whole-diff reviews, and all required checks. Those results describe only the
superseded prototype and are not acceptance evidence for the revised design.

Closes #106

@zoeyrose zoeyrose moved this to Review in Atrinik work Aug 13, 2026
@zoeyrose

Copy link
Copy Markdown
Member Author

Delivery review complete at 1dce4f43ebe4d5d8d5582d3f06f395da70254455.

  • Full content validation passed (174 tests plus provider, map, schema, catalog, syntax, resource, and licensing stages).
  • Derived Classic server validation passed all 48 CTest targets; the 441-test Python plugin run includes five live temple pricing/treatment cases.
  • Isolated issue-106-temple-pricing / basic-player scenario reached server-ready state and was shut down.
  • Two fresh post-fix whole-diff reviews completed with zero actionable findings.
  • All four latest-head GitHub checks passed.

The nonblocking native Cast() outcome follow-up remains tracked in atrinik/classic#248.

@zoeyrose
zoeyrose marked this pull request as ready for review August 13, 2026 16:04
@zoeyrose
zoeyrose marked this pull request as draft August 13, 2026 16:27
@zoeyrose

Copy link
Copy Markdown
Member Author

This PR is paused for the review-directed dependency work tracked by
atrinik/classic#264 and has been
returned to draft.

Before it becomes ready again, the implementation will:

  • replace the hard-coded provider registry with an authored
    temple_service_rank key/value attribute on each provider NPC;
  • use the native side-effect-free query to reject services that cannot change
    the target under the provider's authored rank;
  • settle from the actual Cast()/CastIdentify() result so probabilistic and
    deterministic no-ops are never charged; and
  • rerun content validation, derived Classic runtime coverage, latest-head PR
    checks, and fresh whole-diff reviews.

The current successful checks describe the existing head only and are not the
acceptance evidence for the revised implementation.

@zoeyrose

Copy link
Copy Markdown
Member Author

Scope amendment recorded: this draft will move from one exact pre-cast price to
a bounded work-based range and final actual-work settlement.

The eventual confirmation will show the range, available funds, existing debt,
and maximum possible new debt. A successful cast charges only for reported
beneficial work; any unaffordable remainder is recorded—only with explicit
consent—against the provider's stable npc_id. Zero work remains free.

The PR body now lists the revised Classic dependencies (#265, #266, #248,
#267), the authored metadata changes, and the complete validation/review cycle
required before it can return to review. Identification adoption is tracked in
#217 without blocking this temple PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

feat(temples): make church-service pricing level- and capability-aware

1 participant