fix(policy): refuse Fee.payer, Fee.granter and AuthInfo.tip instead of dropping them (regalia-kms-bim) #789
All Vouch review confidence checks passed
Residual risk 0.37 = Change Risk (0.69) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.69 · 466 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.368
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.069
Real PR Conversation Timeline
1 comments
"Review active on #789"
general
weight: 0.35
jobordu
Bead: regalia-kms-bim (security). Treat this as security-critical: it needs Sentinel and a council deep read when it goes ready.
Summary
parseFeeacceptedFeefields 3 and 4 and dropped their values, so policy capped a fee without knowing who pays it. Per cosmos-sdkproto/cosmos/tx/v1beta1/tx.proto, they areFee.payer(3) andFee.granter(4). The tip is a separate message,AuthInfo.tip(3). It was already refused, but only by the unknown-field arm.Fee.payerandFee.granterare refused in any form (even empty), with the field named.AuthInfo.tipis refused by name, in its own arm. It is refused outright, not added to the fee: a tip goes to the fee payer, its tipper need not be the signer, and no policy setting covers either.ErrCosmosSignDoc, audit outcomepolicy-cosmos-malformed), so no nonce, sequence or quota is spent. The fee policy judges is now exactly the fee the chain charges.This follows the "refuse now, decode later" decision of the OpenSpec change
refuse-unknown-cosmos-fee-fields. That spec mislabels Fee 3/4 as tip and fee payer; regalia-4kep corrects it. The audit record has never carried a fee: adding one is an audit-schema change with a Python mirror, regalia-kms-4v6. The ModeInfo arm-3 refusal is regalia-kms-b1j.Tests
- a tip over MaxFee;
- a tip in a foreign denomination;
- a tip from another tipper;
- any tip refused by name;
- payer and granter in any form, and on any wire type;
- a clean control;
- the fee policy judges: a 3500 cap admits it, a 3499 cap denies it as
cosmos-fee.policy-cosmos-malformedand reaches neither policy nor token. The clean control signs and hands policy the full two-entry fee.Heavy proof (owner pre-run rule; bar amendment 7)
heavy-pool-h4i-2, run
20261125T133527-Jonathans-MacBook-Pro-69259, at HEAD2e200a0aa7a458d25ec0bf7abf4a26b8cb13538b.Amendment 7.
b17a093dcc37bc86b596889af35e80016fe5316c, printed far-side.b17a093d…: a match.git diff --name-onlyequals the refused list exactly. List sha256:572cbc90a6e6348f48ad099eeb0b72f22af5e89a6bf41e41ede37985e4efc829.Environment.
0000000000000001.GOPROXY=off(no download).Suite.
internal/policy: ok, 141 PASS, 0 FAIL.Mutants, each killed by named tests.
| Mutant | Killed by |
|---|---|
| M1 tip ignored | TipFromAnotherTipper, TipInAForeignDenomination, TipThatPushesFeeOverTheCap, ParseAuthInfoRefusesAnyTipByName |
| M2 foreign-denom tip admitted | TipFromAnotherTipper, TipInAForeignDenomination, ParseAuthInfoRefusesAnyTipByName |
| M3 payer/granter admitted | ParseFeeRefusesPayerInAnyForm and ParseFeeRefusesGranterInAnyForm, with subtests |
| M4 fee judged is not the fee charged | FeeThePolicyJudgesIsTheFeeTheChainCharges, ParseFeeSumsRepeatedAmountEntriesForOneDenomination |
GAP, stated plainly.
internal/operationscannot build on heavy. It importsinternal/secrets, and heavy refuses everyinternal/secrets/*.gopath, so it reported[setup failed](diagnosis run20261125T133555). The operations audit test is therefore unproven on heavy. Hosted CI confirms that package here, as a confirm-only use the GA approved. The heavy refusal is filed with dfat by the GA.A first run,
20261125T133444, is invalid and not cited: the host's go1.26.10 refused go.mod's 1.26.11.🤖 Generated with Claude Code