docs: record config-getter decision; close #195 #171 #170 #169 - #256
Conversation
…ccensa#170/accensa#171 All four issues are already implemented on main; this PR is the closing record. It adds the design-decision note issue accensa#195 explicitly asked for: individual read-only config getters (get_admin/get_token/get_refund_window/ is_paused, plus get_admin/get_pruned_up_to on ReceiptAnchor) were chosen over a single struct-returning get_config — compositional, ABI-stable as config grows, and capable of expressing the is_paused NotInitialized-vs-false distinction. The PR body cites the evidence for accensa#169 (FuturePaidAtLedger rejection + ADR-005 + SECURITY_MODEL + named tests), accensa#170 (unused keys/errors removed), and accensa#171 (ci.yml --locked + cache v4 + CONTRIBUTING note).
|
@aurorabini 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! 🚀 |
|
MergeKeeper review Scope: in scope for linked issue The pull request correctly records the configuration-getter design decision in README.md as requested by issue #195, matching repository documentation conventions. Reviewed commit: |
|
MergeKeeper merge status Status: blocked Reason: One or more required CI checks failed. Failing checks:
Next steps:
|
Summary
This PR closes the four assigned
accensa-contractsissues. All four are alreadyimplemented on
main(the issues were never marked closed), so this PR isintentionally small: it documents the state with evidence per issue and adds the
one thing that was genuinely missing — the design-decision argument issue #195
explicitly asked the implementer to record.
#171 — CI runs cargo without
--lockedAlready resolved on
main..github/workflows/ci.ymlrunscargo clippy --all-targets --locked -- -D warnings,cargo test --workspace --locked,cargo build --locked --target wasm32v1-none --release, and the receipt-shard builds with--locked; allactions/cachesteps arev4; andCONTRIBUTING.mddocuments thatCargo.lockis committed deliberately and must be updated in the same commit as a dependency change. CI fails rather than silently resolving against a drifted lockfile.#170 — unused storage keys and error variants
Already resolved on
main.RefundVault'sDataKeyno longer declaresMetadata,RefundMax,Admins, orThreshold— the leftover keys pointing at deliberately-unbuilt features (#31, #97, #101) are gone. The unreachableMetadataTooLong/AmountExceedsMaxerror variants are removed; the surviving error discriminants keep their numeric values.#169 — refund window /
paid_at_ledgerAlready resolved on
main.refundrejects a futurepaid_at_ledger(paid_at_ledger > env.ledger().sequence()⇒Error::FuturePaidAtLedger) before evaluating the window (contracts/refund-vault/src/lib.rs, inrefund), so a merchant cannot widen the window by restating the ledger. The decision is recorded:docs/ADR-005-refund-window.md+ aSECURITY_MODEL.md"Window Expiry Evasion" section state that the window constrains the merchant's refund authority inside the reportedpaid_at_ledger, not an absolute on-chain fact. Tests named for the chosen semantics assert it directly:refund_rejects_future_paid_at_ledgermerchant_cannot_use_future_paid_at_ledger_to_widen_windowtest_refund_outside_window_fails,test_refund_at_window_boundary_succeeds,test_zero_window_disables_expiry.#195 — config values unreadable on-chain
Already resolved on
main(individual getters, not a batchget_config):get_admin,get_token,get_refund_window,is_pausedonRefundVaultandget_admin,get_pruned_up_toonReceiptAnchor. All returnError::NotInitializedon an uninitialized contract instead of trapping, and are documented in the README function tables.What was missing and this PR adds: issue #195 asked the implementer to argue for the getter shape. That argument was nowhere recorded. This PR adds a short design note to the README (after the
RefundVaultgetter table) explaining why individual read-only getters were chosen over a single struct-returningget_config(compositional, ABI-stable as config grows, and theis_pauseduninitialized-vs-false distinction wouldn't survive aggregation).Scope / checks
README.md); nocontracts/*/srctouched, so no CHANGELOG entry required under the CI changelog rule.cargo test/clippy/fmt outcomes onmainare unaffected by this PR.Closes #195
Closes #171
Closes #170
Closes #169