Repository navigation
refactor(oc-path): reuse YAML path resolution - #107340
Merged
Merged
Conversation
Contributor
Author
|
Land-ready at Work completed:
Proof on the rebased head:
Known proof gap: hosted CI and the full repository suite were not awaited per maintainer instruction. Exact |
steipete
force-pushed
the
codex/yaml-native-helpers
branch
from
July 14, 2026 09:32
9d27c74 to
b732062
Compare
This was referenced Oct 11, 2026
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.
What Problem This Solves
OC Path's YAML editor duplicated the reader's path splitting, positional-token resolution, and map/sequence traversal. The two implementations could drift while adding 90 avoidable lines.
Why This Change Was Made
Reuse
resolveYamlOcPathas the canonical addressing pass, then feed its concrete path into YAML's nativehasIn,getIn,setIn, andaddInmutation APIs. This preserves OC Path's stricter sequence-index and typed-map-key rules, which raw YAML path lookup does not provide.User Impact
No intended user-visible behavior change. YAML reads and edits now share one path-resolution implementation. Net reduction: 90 lines.
Evidence
node scripts/run-vitest.mjs extensions/oc-path/src— 40 files, 696 tests passedgit diff --check— clean[email protected]source inspected forDocumentpath methods, typed map-key equality, sequence-index coercion, and clone range behaviorHosted CI and the full repository suite were not awaited per maintainer instruction.