Skip to content

fix(epistemic): return the validated assignment without rounding - #100

Merged
ctoth merged 3 commits into
mainfrom
fix/assignment-rounding
Sep 27, 2026
Merged

ctoth merged 3 commits into
mainfrom
fix/assignment-rounding

Conversation

@ctoth

@ctoth ctoth commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #16

update_assignment checked the constraints and then returned round(value, 12). Rounding can push a value just outside an exact bound: the reopened repro uses a == 0.1234567890123, which comes back as 0.123456789012 and fails belief_assignment_satisfies. Rounding and then clamping would not be enough either, because it can still break coupled constraints such as b <= 1 - a. The function now returns exactly the values it validated.

The fix was implemented by the gradual worker; the supervisor published it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V4tAVyyKcs1sYcsEzL7Bzg

ctoth and others added 3 commits September 27, 2026 01:50
update_assignment validated the propagated assignment and then returned
round(value, 12), which can move a value across an exact constraint
bound (a = 0.1234567890123 came back as 0.123456789012 and violated its
own constraint). Rounding and clamping afterwards would still break
influence constraints such as b <= 1 - a. The function now returns
exactly the values it validated, so the result satisfies the graph
constraints (Hunter & Thimm 2017, P^beta). An existing test that
compared 1 - 0.8 to a rounded 0.2 now uses pytest.approx.

Closes #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V4tAVyyKcs1sYcsEzL7Bzg
@ctoth
ctoth merged commit 35b587a into main Sep 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update_assignment returns assignments that violate explicit graph constraints

1 participant