Skip to content

DB billing and credits UI#25

Draft
humandebri wants to merge 25 commits into
mainfrom
db-billing-safety-ui
Draft

DB billing and credits UI#25
humandebri wants to merge 25 commits into
mainfrom
db-billing-safety-ui

Conversation

@humandebri
Copy link
Copy Markdown
Collaborator

@humandebri humandebri commented May 21, 2026

Summary

  • Adds overflow/config validation around credit preview and purchase amount calculation.
  • Preserves original ledger transfer arguments for retry repair and validates ambiguous completion against the expected ledger block data.
  • Keeps cancel repair governance-only and tightens suspended/pending DB write gating.
  • Updates browser, clipper, worker, CLI, generated IDL, Candid drift checks, and docs for the current credit purchase flow.
  • Adds browser credits UI/state helpers and wallet approval/purchase handling for database top-ups.
  • Adds URL ingest session/source-run auth gating used by raw source saves.

Safety Model

  • External ledger calls remain limited to DB credit purchase.
  • Credit purchase stores and verifies payment amount, ledger fee/account, memo, timestamp, and ledger block index where applicable.
  • Retry repair reuses the exact original ledger arguments, so duplicate ledger responses complete against the original block.
  • Ambiguous completion mutates runtime state only after ledger block validation succeeds.
  • Suspended or unfunded DBs are blocked before new metered writes.

@humandebri humandebri changed the title DB ライフサイクル安全化と UI 文言整理を反映 Add KINIC billing for metered database updates May 21, 2026
@humandebri humandebri changed the base branch from main to feature/hermes-skill-evolution May 21, 2026 08:46
Base automatically changed from feature/hermes-skill-evolution to main May 22, 2026 06:08
humandebri added 15 commits May 22, 2026 15:47
# Conflicts:
#	Cargo.lock
#	README.md
#	crates/vfs_canister/src/lib.rs
#	crates/vfs_canister/vfs.did
#	crates/vfs_cli_core/src/commands.rs
#	crates/vfs_runtime/src/lib.rs
#	crates/vfs_runtime/tests/database_service.rs
#	docs/internal/KINIC_WIKI_OPERATIONS.md
#	docs/internal/WIKI_CANONICALITY.md
#	extensions/wiki-clipper/README.md
#	extensions/wiki-clipper/popup/popup.html
#	extensions/wiki-clipper/popup/popup.js
#	extensions/wiki-clipper/scripts/check-candid-drift.mjs
#	extensions/wiki-clipper/scripts/generate-store-assets.mjs
#	extensions/wiki-clipper/src/offscreen.js
#	extensions/wiki-clipper/src/vfs-actor.js
#	extensions/wiki-clipper/store-listing/assets/promo-small-440x280.png
#	extensions/wiki-clipper/store-listing/screenshots/chatgpt-export-1280x800.png
#	extensions/wiki-clipper/store-listing/screenshots/options-1280x800.png
#	extensions/wiki-clipper/tests/offscreen.test.mjs
#	extensions/wiki-clipper/tests/service-worker.test.mjs
#	extensions/wiki-clipper/tests/settings.test.mjs
#	wikibrowser/README.md
#	wikibrowser/app/dashboard/dashboard-client.tsx
#	wikibrowser/app/dashboard/dashboard-ui.tsx
#	wikibrowser/app/home-ui.tsx
#	wikibrowser/app/page.tsx
#	wikibrowser/lib/vfs-idl.ts
#	wikibrowser/scripts/candid-shapes.mjs
#	wikibrowser/scripts/check-candid-drift.mjs
#	wikibrowser/scripts/check-dashboard.mjs
#	workers/wiki-generator/src/processing.ts
#	workers/wiki-generator/src/url-ingest.ts
#	workers/wiki-generator/tests/processing.test.ts
#	workers/wiki-generator/tests/url-ingest.test.ts
@humandebri humandebri self-assigned this May 28, 2026
@humandebri humandebri changed the title Add KINIC billing for metered database updates Add DB-scoped KINIC credits for metered writes May 28, 2026
@humandebri humandebri changed the title Add DB-scoped KINIC credits for metered writes Switch DB billing to cycle-denominated credits May 28, 2026
@humandebri humandebri changed the title Switch DB billing to cycle-denominated credits Harden DB billing safety and credits UI May 28, 2026
# Conflicts:
#	crates/vfs_runtime/src/lib.rs
#	wikibrowser/scripts/check-paths.mjs
@humandebri humandebri changed the title Harden DB billing safety and credits UI DB billing and credits UI May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant