Skip to content

Respect ordering of --resolve arguments to avoid meta-schema ambiguity#674

Merged
jviotti merged 1 commit intomainfrom
resolve-ordering
Feb 23, 2026
Merged

Respect ordering of --resolve arguments to avoid meta-schema ambiguity#674
jviotti merged 1 commit intomainfrom
resolve-ordering

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 23, 2026

See: #672
Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@augmentcode
Copy link

augmentcode bot commented Feb 23, 2026

🤖 Augment PR Summary

Summary: This PR fixes ambiguous custom meta-schema resolution by preserving the user-provided ordering of repeated --resolve inputs.

Changes:

  • Updates for_each_json to sort only within each individual CLI argument’s contributed results (instead of globally sorting across all arguments).
  • Keeps deterministic ordering for directory/auto-discovery cases by still sorting when no explicit arguments are provided.
  • Adds a Unix validate test that reproduces the ordering-sensitive custom meta-schema scenario from unexpected error: Could not resolve the metaschema of the schema #672 and asserts the debug import order.

Technical Notes: The new behavior maintains stable inter-argument ordering while still sorting any multi-file expansions (e.g., directories) per argument to keep output deterministic.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/validate/fail_resolve_custom_metaschema_ordering.sh">

<violation number="1" location="test/validate/fail_resolve_custom_metaschema_ordering.sh:52">
P3: The test name indicates a failure case, but the expected output asserts a successful validation. Rename the test to a `pass_*` name (and update the CMake registration) or change the expected output to reflect an actual failure so the test name matches its behavior.

(Based on your team's feedback about naming methods and tests to reflect behavior.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

See: #672
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit e11bc2e into main Feb 23, 2026
13 checks passed
@jviotti jviotti deleted the resolve-ordering branch February 23, 2026 13:51
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 24, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | patch | `v14.13.3` → `v14.13.4` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sourcemeta/jsonschema (sourcemeta/jsonschema)</summary>

### [`v14.13.4`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.13.4)

[Compare Source](sourcemeta/jsonschema@v14.13.3...v14.13.4)

#### What's Changed

- Fix bundling not de-duplicating equal schemas by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;669](sourcemeta/jsonschema#669)
- Improve error handling on `--resolve` meta-schema errors by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;673](sourcemeta/jsonschema#673)
- Respect ordering of `--resolve` arguments to avoid meta-schema ambiguity by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;674](sourcemeta/jsonschema#674)

**Full Changelog**: <sourcemeta/jsonschema@v14.13.3...v14.13.4>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4zMS4xIiwidXBkYXRlZEluVmVyIjoiNDMuMzEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
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.

1 participant