Wire 0113 malformed merge-arm + managed-collision fixtures - #264
Merged
Conversation
Gate the shared apply_managed_extras merge arm on well-formedness so a malformed caller extra for a merge-managed field is treated as absent rather than coerced onto the wire. A merge extra is well-formed only as a string or a list of strings; otherwise the managed value stands alone, all-or-nothing, with no raise. This closes the malformed edge of the proposal 0113 collision rule, matching the retrieval embedding_types arm that already fell back deterministically. The merge base now resolves via managed_values like the reject arm. Wire the managed-collision conformance fixtures the invariants model was blocking: parse for 072/074/075/076/081 and run for 081. Model the per-case invariants block as dict[str, bool] on the llm-provider expected type, and flip conformance.toml 0113 to implemented. Hold 075/052 (same-name declared collision, unreachable via the caller path) and 073/077/078/079/080 (streaming / Anthropic / Gemini), with corrected deferral reasons naming the real blocker in each case.
There was a problem hiding this comment.
Pull request overview
Implements spec proposal 0113’s “malformed merge-arm extras are treated as absent” behavior in the shared managed-extras resolver, and unblocks the related managed-collision conformance fixtures by modeling the per-case invariants block and updating fixture deferrals/status.
Changes:
- Update
apply_managed_extrasmerge arm to merge only well-formedstopextras (string or list of strings), otherwise treat the extras value as absent (all-or-nothing, no raise). - Add unit tests covering malformed/empty-edge merge behavior for
stop. - Wire fixture parsing and conformance bookkeeping for the managed-collision/0113 cases (expected-type model, deferral notes, proposal status, changelog).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/openarmature/_managed_extras.py |
Gates merge-managed extras on well-formedness and resolves merge base consistently with the reject arm. |
tests/unit/test_managed_extras.py |
Adds focused unit coverage for malformed and edge-case merge inputs (stop). |
tests/conformance/harness/expectations.py |
Models expected.invariants as dict[str, bool] for managed-collision fixtures. |
tests/conformance/test_fixture_parsing.py |
Updates deferral inventory to reflect invariants now being parsed and clarifies remaining deferral causes. |
tests/conformance/test_llm_provider.py |
Removes now-obsolete deferral entry for the 0113 malformed-stop fixture and updates held-collision messaging. |
tests/conformance/test_retrieval_provider.py |
Updates held-collision deferral messaging for fixture 052 to reflect current rationale. |
conformance.toml |
Marks proposal 0113 as implemented and updates the implementation note accordingly. |
CHANGELOG.md |
Adds a release note describing the new malformed-merge behavior and its impact. |
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.
Summary
PR 6e of the v0.17.0 fixture-wiring series. Implements proposal 0113's general merge-arm malformed handling and wires the managed-collision conformance fixtures behind it.
The shared
apply_managed_extrasmerge arm now gates on well-formedness: a merge-managed extra (llmstop) merges only when it is a string or a list of strings. A malformed value is treated as absent (all-or-nothing, no salvage, no raise), matching spec 0113 and the retrievalembedding_typesarm's existing fallback. Previously any value was coerced into the list, so a malformedstopcould reach the wire.Changes
_managed_extras.py: well-formedness gate on the merge arm; the merge base now resolves viamanaged_valueslike the reject arm.invariantsblock (dict[str, bool]) on the llm-provider expected type.conformance.toml: 0113 partial to implemented.Held
075 (llm) and 052 (retrieval) same-name declared collisions stay run-deferred: the reject is unreachable via the real caller path. Parked for the batched spec review, along with an empty-string element edge where the Cohere
embedding_typesgate is stricter than 0113's structural-only rule.Testing
Full suite: 1974 passed, 500 skipped. ruff + pyright clean. Pre-merge adversarial review run; findings addressed.