wallet costs currently approximates the next upload: it builds --copies storage contexts by reusing the wallet's first N active datasets and padding with new-dataset placeholder objects (cast to StorageContext; prepare()'s costing reads only dataSetId/withCDN in the pinned SDK).
The real upload path instead runs selectHealthyProviders() (reachable, unique providers) and createContexts() (matching provider + source + CDN metadata), so the estimate can diverge:
- it may reuse two datasets on the same provider, though a multi-copy upload requires unique providers;
- it may reuse a dataset whose CDN/source metadata upload would not reuse;
- it prices arbitrary historical datasets rather than the providers the next upload will select.
Divergence changes dataset-creation fees, CDN lockups, effective monthly rate, and depositNeeded. The plain-object placeholders also depend on SDK costing internals that a compatible minor upgrade could change.
Interim state (shipped in PR #30): the CLI/README/skill describe the command as an approximate requested-copies estimate — not the source of truth — and note that upload re-quotes via its own prepare() before spending.
Acceptance:
- The estimate builds contexts the same way upload does (health-checked unique provider selection + metadata-matched dataset resolution), or uses SDK support for costing hypothetical contexts without side effects.
- No plain-object
as StorageContext casts.
- Regression: estimate for a wallet with same-provider duplicate datasets and mismatched-CDN datasets matches what
upload's own prepare() quotes.
- Restore the stronger wording in README/skill once aligned.
Context: PR #30 follow-up review (2026-07-23), "wallet costs is still not the exact upload quote it claims to be".
wallet costscurrently approximates the next upload: it builds--copiesstorage contexts by reusing the wallet's first N active datasets and padding with new-dataset placeholder objects (cast toStorageContext;prepare()'s costing reads onlydataSetId/withCDNin the pinned SDK).The real
uploadpath instead runsselectHealthyProviders()(reachable, unique providers) andcreateContexts()(matching provider +source+ CDN metadata), so the estimate can diverge:Divergence changes dataset-creation fees, CDN lockups, effective monthly rate, and
depositNeeded. The plain-object placeholders also depend on SDK costing internals that a compatible minor upgrade could change.Interim state (shipped in PR #30): the CLI/README/skill describe the command as an approximate requested-copies estimate — not the source of truth — and note that upload re-quotes via its own
prepare()before spending.Acceptance:
as StorageContextcasts.upload's ownprepare()quotes.Context: PR #30 follow-up review (2026-07-23), "wallet costs is still not the exact upload quote it claims to be".