Skip to content

Prefer local --resolve entries over --http fetching - #858

Merged
jviotti merged 2 commits into
mainfrom
fixes-resolve
Sep 10, 2026
Merged

jviotti merged 2 commits into
mainfrom
fixes-resolve

Conversation

@jviotti

@jviotti jviotti commented Sep 10, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Sep 10, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR makes local --resolve schemas take precedence over HTTP resolution.

Changes:

  • Temporarily disables remote fetching while importing explicitly supplied resolve entries.
  • Retries unresolved local entries so custom meta-schema dependency order remains flexible.
  • Re-enables HTTP only after a full local-import pass makes no progress.
  • Restores the command's original remote-resolution setting after import completes.
  • Adds missing-meta-schema and cyclic-dependency failure coverage.
  • Adds an invalid-instance case to confirm deferred schemas retain their constraints.
  • Adds duplicate embedded identifier coverage.
  • Adds all permutations of a custom meta-schema dependency chain.
  • Adds a --http ordering fixture to protect local-over-remote precedence.
Technical notes: Remote fallback is preserved for unresolved entries when --http was enabled, while supplied local schemas are given the first opportunity to satisfy meta-schema resolution.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot 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.

Review completed. No suggestions at this time.

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

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 9 files

Prompt for AI agents (unresolved 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_duplicate_embedded_identifier.clitest">

<violation number="1" location="test/validate/fail_resolve_duplicate_embedded_identifier.clitest:39">
P2: This test expects `Schema identifier already exists`, but these differing embedded schemas take the resolver's `SchemaIdentifierConflictError` path, which reports `Conflicting schemas for the same identifier` plus both resource locations. Update both the text and JSON expectations to match the established conflict diagnostic.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

REPLACE $CWD WITH '[CWD]' IN result_0.txt

WRITE expected_0.txt UNTIL EOF
2> error: Schema identifier already exists

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This test expects Schema identifier already exists, but these differing embedded schemas take the resolver's SchemaIdentifierConflictError path, which reports Conflicting schemas for the same identifier plus both resource locations. Update both the text and JSON expectations to match the established conflict diagnostic.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/validate/fail_resolve_duplicate_embedded_identifier.clitest, line 39:

<comment>This test expects `Schema identifier already exists`, but these differing embedded schemas take the resolver's `SchemaIdentifierConflictError` path, which reports `Conflicting schemas for the same identifier` plus both resource locations. Update both the text and JSON expectations to match the established conflict diagnostic.</comment>

<file context>
@@ -0,0 +1,59 @@
+REPLACE $CWD WITH '[CWD]' IN result_0.txt
+
+WRITE expected_0.txt UNTIL EOF
+2> error: Schema identifier already exists
+2>   at identifier https://example.com/duplicate
+2>   at file path [CWD]/duplicate.json
</file context>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit 32291fc into main Sep 10, 2026
16 checks passed
@jviotti
jviotti deleted the fixes-resolve branch September 10, 2026 16:25
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