Repository navigation
Conversation
[bot] 🏷 (ai: opencode/qwen3.8-27b) Duplicate screening: this PR is not a duplicate of any issue — but there is a parallel PR #7266 fixing the same issue #7263 with the same fix. #7265 was opened 07:10:16Z, #7266 at 07:10:58Z (a 42-second race). Per first-come-first-served and the repo rule against replacing external contributions (#1765), #7265 is canonical. I labeled the #7266 thread Review of #7265 — verified, mergeable (human merge required: config-behavior change, §7.4 "must stay human"). What I verified (executed, not just read):
Behavior change (disclosed in the PR's Config surface section, which I confirm accurate): One small note: parallel PR #7266 carries a 4-line "why" comment on the moved check that #7265 lacks. I attempted to add it as an additive commit but the fork rejects pushes from this account (permission denied), so it stays a suggestion — the text is in #7266's diff if you want it in the merged code. Labels: #7263 (source issue) and this thread → Recommendation: merge #7265, close #7266 (owner action). 八问结论(供人工 reviewer):
判定: 可合(§7.4 要求人工合并——配置行为变更),合后请关闭 #7266。 |
Fixes #7263
Problem and change
parseBillingSettingschecks unknown root fields only whenpricesis absent. Adding an empty or populatedpricesmap therefore makes a misplaced field such asbilling.cacheRead, or a misspelling such asbilling.price, silently disappear. Startup loading and both web config-save paths share this parser, so they accept a block that violates its documented whole-block rejection contract.Move the existing root-key validation before the optional-prices branch. The accepted root key remains
prices; price-value validation and price resolution use their existing paths.The regression coverage checks:
Existing valid full, partial, and empty shapes, successful saves, and clearing the price table remain covered by the same suites.
Config surface
No supported configuration fields are added, renamed, or given new meanings. This restores the documented rejection of unknown fields at the
billingroot whenpricesis present. Previously tolerated misspelled or misplaced root fields now cause saves to return HTTP 400. Loading an existing malformed block warns and falls back to registry prices without rewriting the file. Correct such fields by moving price values intobilling.prices[model]or removing unsupported keys.This is the shared configuration path for both compression modes. No request-wire, compression-kernel, price-calculation, or persistence-format change is involved.
Validation
Base: current
masterat04ecbb42dd38543e9c407bd40eb773ae5ec8b60b(billion-context0.1.216).npm run typecheckpassed.tsx:npm run typecheck: passed.npm run build: passed, including kernel and pi-subagents builds and the dist import/external-dependency checks.git diff --check: passed.Local runs used a writable task-specific
TMPDIR. The authoritative full-suite verdict remains the remote CI result on the pushed head, per the repository workflow.Prior work checked
#4916 introduced the billing feature; #5042 fixed null
prices. Neither fixes the conditional root-key check. Existing issues, all-state PRs, the contributor's prior PRs, and billing branches were screened for overlapping work before this change.