Skip to content

Actual FunnyPvZ 2-4 bill in Dave conversations

At the original market checkout, the game knows the committed offers, total bill and amount collected. Previously the conversation received the spoken lines and current sun counter but not the bill. A negative counter could therefore coexist with a fully paid bill without the model knowing that distinction.

The new optional source-shopping-bill-v1 capability carries the native initialized receipt. Shared validation checks the five original purchase flags, original face prices and difficulty multiplier, the total, and native payment chunks. The prompt derives the remaining amount and names only accepted offers. It explicitly distinguishes an accepted offer from pickup collection/survival and prevents a paid bill becoming a new debt or refund capability.

The optional notebook observation survives conversation/reload in the same run and level attempt, clears on replay/rewind, and can be recalled in subsequent authored or classic chapters in the same Adventure cycle. Empty event history can retain an actual receipt within the existing prompt budget. Old notebooks remain valid. No DB migration, billing-provider change, native save-layout change or new UI is required. This does not initiate an AI request.

Verification:

  • Four focused cases cover exact figures, original difficulty prices, partial collection, impossible receipts, action authority, notebook/replay/cycle isolation and receipt-only prompt budgets.
  • The broader isolated NPC suite passes 437 checks before the fourth focused budget case was added; the final four focused checks pass separately. The first broad invocation omitted the local-test environment and three environment-dependent files failed on missing BETTER_AUTH_SECRET; rerunning with the repository's isolated runner passed without changing application code.
  • Hosted build, typecheck and local OSS export verification pass.
  • Real compiled EN desktop and ZH touch-emulated 2-4 requests pass the shared request schema and actual provider-prompt assembly. Both pre-payment requests carry total 100, paid 0 and remaining 100. After the real Chinese hammer hit, the wallet is −99 and the request carries total 100, paid 100 and remaining 0. The current line and original readable pause remain intact.
  • The native chapter audit verifies payment/hammer/save behavior; all 626 browser/UI/packaging tests pass. Compiled replies are intercepted transport fixtures, not live-provider writing samples or natural full-level wins.

Game evidence: output/shopping-bill-compiled/{result,requests,host}.json, output/shopping-bill-web.log, output/shopping-bill-native.log. Host evidence: output-pvz-shopping-bill-{final,npc-isolated,build,typecheck,oss}.log.

Publish the host capability before the game client. Older clients omit the optional field; the new client omits it on older hosts. To roll back the game, keep this host's notebook reader and use the previous game package. Reverting the host to a version predating this optional notebook field needs a compatibility review.