Skip to content

grammar: preserve tagged unions through singleton allOf - #66

Closed
joelteply wants to merge 4 commits into
dc3a1f4c/container-reader-custodyfrom
25c6a4dd/preserve-tagged-union-through-singleton
Closed

joelteply wants to merge 4 commits into
dc3a1f4c/container-reader-custodyfrom
25c6a4dd/preserve-tagged-union-through-singleton

Conversation

@joelteply

@joelteply joelteply commented Oct 17, 2026 •

Copy link
Copy Markdown

A tagged edit argument expressed as allOf: [{"$ref": "#/definitions/EditMode"}], where EditMode is a oneOf union, currently becomes an empty-object-only grammar. The union is ignored by the allOf property collector, so a valid search_replace argument is rejected while {} is admitted.

Delegate a transparent singleton union wrapper to the existing union visitor. Only annotation/definition siblings are allowed; semantic siblings and general allOf intersections retain their existing behavior. The Qwen3.5 fixture uses the captured full edit schema and exercises actual grammar acceptance/rejection plus XML argument round-tripping.

Validation on Windows MSVC Release CPU-only:

  • Same always-active fixture with the old converter rejects valid search_replace (Expected 1, Actual 0).
  • Restored fix passes the Qwen3.5 template tests, including append/search_replace, empty/unknown rejection, and sibling constraints.
  • Existing test-json-schema-to-grammar passes.

This PR is stacked on dc3a1f4c/container-reader-custody at 3794294, the current reviewed native pin. It does not promote an engine or change serving settings. The native bug also exists in the older 178 baseline; newer wrapped tool schemas expose it. This does not establish that every observed coding stall has the same cause.

AI assistance: Codex implemented and reviewed the narrow fix under the maintainer's explicit direction; independent agent source review and compiled before/after evidence are recorded in the governed task25c6a4dd.

Fresh ARM64 CI found two existing speculative batch aggregates missing the final label_weight initializer under -Werror. Both now explicitly initialize nullptr, preserving their prior zero initialization without warning suppression. Focused Windows compilation and Qwen regression pass after this correction; fresh hosted checks remain required.

Further fresh CI exposed preexisting test-walk-exact build defects: unsigned window bound compared to signed loop index, and private symbols linked from a Windows DLL. The loop now uses uint32_t; the unchanged target is registered beside existing internal tests under NOT WIN32 OR NOT BUILD_SHARED_LIBS, retaining Linux and Windows static coverage. Windows static test-walk-exact compiles and links; no assertion or model scenario was removed.

@joelteply
joelteply marked this pull request as ready for review October 17, 2026 18:39
@joelteply

Copy link
Copy Markdown
Author

Closing as landed: every commit on this branch is already in codex/s4-per-mind-integration (canary's engine line) by patch identity, git cherry = 0 unmerged at 20b108f (Fable's queue triage, 2026-11-16). Nothing is lost; reopen if a commit is missing.

@joelteply joelteply closed this Nov 16, 2026
joelteply added a commit that referenced this pull request Nov 17, 2026
…ed builds do not export llama_context internals); CI runs it on the generated hybrid and with rollback groups

Windows CI (lld-link: undefined llama_context::persona_* / llama_persona_move_name) linked the test
against a llama.dll that exports only LLAMA_API. It now builds in the existing
'NOT WIN32 OR NOT BUILD_SHARED_LIBS' block, beside test-llama-archs, and CI runs it three ways:
- test-persona-blocks: stories15M (download fixture)
- test-persona-blocks-hybrid: generated qwen35moe (generate-models fixture)
- test-persona-blocks-rollback: generated qwen35moe --test-rs-seq 4

Checked by configure + ctest -N (tests #40, #41, #66 registered); no build beside serving.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant