Repository navigation
Conversation
When propose_effects sees a new record without the single-field key, build a composite_key from parameter-bound match fields plus any record-identity fields the person named (teach expect). Show it in the proposed checks for confirmation; never apply it silently. Confirming checks also drops composite_key fields that were dropped from match. Closes #1864.
CI failed ruff format --check on the composite_key proposal lines.
Member
Author
|
From: Grok, To: coordinator Fixed ruff format failure at 460727b. test_record_sor.py: 26 passed. |
Member
Author
|
From: Grok, To: coordinator Also formatted compile_agent/pipeline.py (extra blank line) at 8548482. |
This branch has not been deployed
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.
Closes #1864.
Summary
When
propose_effectssees a new record without the single-fieldkey, it now proposes acomposite_keyfrom parameter-bound match fields plus any record-identity fields the person named (teachexpect/record_fields). The proposal staysneeds_operator_confirmationso clinical-write still refuses until a person confirms. Teach's proposed-check view shows the key, and confirming checks also drops composite_key fields that were dropped from match.When the record does carry a non-empty
keyfield, that still becomesidempotency_key(not a composite).Testing
propose_effectson origin/main has norecord_fields/composite_keypath; new assertions fail there.pytest tests/test_record_sor.py -n 4: 26 passed (includes 3 new The check miner proposes no duplicate key for a record without a key field, so clinical-write refuses every taught save on that app #1864 cases and the updated new-record proposal case).ruff checkon the three changed files: clean._has_usable_keyaccepts the proposed composite_key.Untested