Skip to content

Wire 0113 malformed merge-arm + managed-collision fixtures - #264

Merged
chris-colinsky merged 1 commit into
mainfrom
feature/0113-merge-malformed-and-invariants
Aug 7, 2026
Merged

Wire 0113 malformed merge-arm + managed-collision fixtures#264
chris-colinsky merged 1 commit into
mainfrom
feature/0113-merge-malformed-and-invariants

Conversation

@chris-colinsky

Copy link
Copy Markdown
Member

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_extras merge arm now gates on well-formedness: a merge-managed extra (llm stop) 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 retrieval embedding_types arm's existing fallback. Previously any value was coerced into the list, so a malformed stop could reach the wire.

Changes

  • _managed_extras.py: well-formedness gate on the merge arm; the merge base now resolves via managed_values like the reject arm.
  • Un-defer parse for 072/074/075/076 and parse+run for 081; correct the deferral reasons for 073/077/078/079/080 (real streaming / Anthropic / Gemini shape blockers, not the invariants model).
  • Model the per-case invariants block (dict[str, bool]) on the llm-provider expected type.
  • conformance.toml: 0113 partial to implemented.
  • CHANGELOG entry.

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_types gate 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.

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.
Copilot AI lite review requested due to automatic review settings August 7, 2026 01:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_extras merge arm to merge only well-formed stop extras (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.

@chris-colinsky
chris-colinsky merged commit ab26634 into main Aug 7, 2026
7 checks passed
@chris-colinsky
chris-colinsky deleted the feature/0113-merge-malformed-and-invariants branch August 7, 2026 01:49
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.

2 participants