Contract — R93 B6 stake_discount_bps Rename
Round: R93 debug-sweep · XS scope
Audit: docs/audits/r93-b6-reputation-field-rename-audit.md
β task: 2e8978e9-e83d-4c3a-a20a-bf66cacc9251
§1. Invariants
| ID | Invariant |
|---|---|
| I-1 | reputation_check_gates MCP output uses field name effective_stake_bps (not stake_discount_bps). |
| I-2 | The underlying stake_discount(...) function name at src/domains/reputation/limits.ts:172 is unchanged. |
| I-3 | The arithmetic is unchanged. For an unknown node (score=0, stake=10000), the output value remains 100000. |
| I-4 | src/__tests__/domains/reputation/tools.test.ts references the new field name; tests pass. |
| I-5 | MCP tool description string in registerColibriTool reflects the new field name. |
| I-6 | Build + lint + test gates remain green. |
§2. Non-invariants
- N-1. The underlying
stake_discount(...)function name is preserved (it describes the formula). - N-2. Heritage chain docs (
docs/contracts/p2-5-1-tools-contract.md,docs/audits/p2-5-1-tools-audit.md) — field-name references updated to match the new wire shape, but the historical sub-task numbering stays. - N-3. CLAUDE.md / README / quick-start changelog entries — not modified in this slice.
§3. Acceptance criteria
- AC-1.
git grep stake_discount_bpsreturns 0 hits in the worktree HEAD. - AC-2.
git grep effective_stake_bpsreturns the same locations the old name occupied (5 files). - AC-3.
npm run build && npm run lint && npm testexit 0.
Proceeding to packet.