Repository navigation
pasientsikkerhet_no: record where the scenario's ceiling came from - #170
Merged
kelkalot merged 1 commit intoNov 20, 2026
Merged
Conversation
When the scenario has a severity, write designed_severity_source as the checklist judge does: the caller's severity_source when set, else "scenario". reframing.rejudge reads a stored ceiling only when this field says it came from the scenario, a lookup or a stored record. Without a scenario severity the output is unchanged.
Collaborator
|
I am reviewing it but also work on another pack that builds on this, so it will go all in one go once I am done! Thanks for the input! |
Collaborator
|
Thanks, this is correct. I ran it with #169 and #173 applied on current Merging. Reviewed with support from Claude Fable 5.2 (claude-fable-5-2) in Claude Code. |
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.
postprocess_pasientsikkerhetwritesdesigned_severitywhen the scenario has a severity, but notdesigned_severity_source. The checklist judge writes both: the caller'sseverity_sourcewhen set, otherwise"scenario"(checklist.py:331,:503).reframing._stored_designed_severity(reframing.py:231) reads a stored ceiling only when that field isscenario,lookuporstored. Without the field,_stored_designed_severityreturns None for this judge's output, so a rejudge from stored results cannot reuse the ceiling the judge applied.This PR adds that one field, set the same way as in the checklist judge (
judges/pasientsikkerhet_no.py:188). Without a scenario severity the behaviour is unchanged: no ceiling, and neither field is written.test_no_ceiling_without_a_scenario_severityis unchanged.Tests (
tests/test_pasientsikkerhet_judge.py)severity_sourceis recorded as"scenario";"stored"and"lookup"are passed through;None,{},{"severity": None},{"severity_source": "lookup"}) the output is unchanged and has neither field;_stored_designed_severityreturns the ceiling from this judge's output.The first, second and fourth fail on dev (6e3e6d4) and pass here; the third passes on both.
Checked
pytest -p no:cacheprovider): 2630 passed, 13 skipped on this branch; 2625 passed, 13 skipped on dev (6e3e6d4). The five extra tests are the new ones.AI disclosure: implemented with Claude Code.