fix(dreaming): do not compute approval friction against a missing denominator (v0.281.5) - #504
Merged
Merged
Conversation
…ominator (v0.281.5) v0.280.0 started recording `approved` so friction could be a rate rather than a raw count. Per-pass entries written BEFORE that carry rejections with no denominator, and recentTally summed them anyway — a window of mostly-legacy entries reads as ~100% rejection. Live instapods was telling every agent "recent actions were rejected at human approval" while its true 7-day rate was 5.4% (35 approved / 2 rejected). Entries lacking the denominator now contribute to neither side of the ratio; their budget/error signals still count. Verified against both live tenants real window shapes: the false instapods nag stops, instawp goes quiet until it has a real denominator (conservative — silence beats wrong advice), genuine friction with a good sample still fires. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by checking whether the approval nag the live tenants are serving is actually true. On instapods it is not.
Cause
v0.280.0 (#492) made friction a rate and started recording the
approvedcount to divide by. Per-passrecententries written before that carryrejectedwith noapprovedfield — andrecentTallysummed them regardless, soapprovedstayed 0 while rejections accumulated. Six of instapods' seven window entries are legacy, so the computed rate was ~100% against a denominator that doesn't exist.This was flagged as a known one-pass caveat in #492. It is worse than that in practice: the window holds 7 entries, so a tenant keeps mis-firing until legacy entries roll off — and it fires in the wrong direction, telling agents to expect rejection on a workspace that approves ~95% of requests.
Fix
An entry without the denominator contributes to neither side of the ratio. Its budget/error signals still count — only the approval ratio skips it.
Verified against both tenants' real window shapes
policy.reviewoninstawp going quiet is the conservative direction: its true rate does warrant the nag, but the recorded evidence is 3 decisions, and it re-fires once enough passes have recorded the denominator. Silence beats confidently wrong advice in every agent's prompt.
137/137 governance + 18/18 tier-A policy.
🤖 Generated with Claude Code