Skip to content

Upgrade Core to 56eab6ef118e9731df539d3a507db1c23241f911#908

Merged
jviotti merged 1 commit intomainfrom
double-roundings
Mar 26, 2026
Merged

Upgrade Core to 56eab6ef118e9731df539d3a507db1c23241f911#908
jviotti merged 1 commit intomainfrom
double-roundings

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Mar 26, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

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

No issues found across 13 files

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 26, 2026

🤖 Augment PR Summary

Summary: This PR updates the vendored sourcemeta/core dependency to commit 56eab6e….

Changes:

  • Bumps the Core revision in DEPENDENCIES and updates the vendored Core build/config to expose a new error component.
  • Adds a new Core language module src/lang/error with a FileError<T> helper for attaching a filesystem path to exceptions.
  • Updates JSON number stringification for non-integral double values to use std::to_chars (instead of iostream formatting).
  • Improves JSON Schema dialect resolution by adding cycle detection when traversing metaschema chains.
  • Refines URI parsing/recomposition/canonicalization: introduces a dedicated path escaping mode, preserves existing percent-encoded sequences during recompose, and adds more structured percent-normalization/unescaping helpers.

Technical Notes: The URI changes aim to better align percent-encoding behavior with RFC 3986 component grammar and avoid incorrect escaping (e.g., treating path as fragment).

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@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. 3 suggestions posted.

Fix All in Augment

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

const auto result{
std::to_chars(buffer.data(), buffer.data() + buffer.size(), value)};
// This can't realistically happen on production given the buffer size
assert(result.ec == std::errc{});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

assert(result.ec == std::errc{}) is the only guard here; when assertions are disabled, a std::to_chars failure (e.g., NaN/Inf or unexpected buffer exhaustion) could still flow into stream.write(...) with an unspecified result.ptr. Consider handling result.ec explicitly (or falling back) to avoid UB/invalid output in release builds.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

if (this->query_.has_value()) {
uri_normalize_percent_encoding_inplace(this->query_.value());
uri_unescape_if_inplace(this->query_.value(), [&](char character) {
return is_pchar(character) || character == URI_SLASH ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In canonicalize(), unescaping percent-encoded reserved characters in the query/fragment (via is_pchar including sub-delims, plus /?) can change URI semantics (e.g., %26& in query strings). RFC 3986 normalization typically only decodes percent-encoded unreserved characters, so it may be worth double-checking the intended behavior here.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

template <typename... Args>
FileError(std::filesystem::path path, Args &&...args)
: T{std::forward<Args>(args)...}, path_{std::move(path)} {
assert(std::filesystem::exists(this->path_));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The constructor asserts std::filesystem::exists(this->path_), which can fire in debug builds for common error cases like “file not found” / permission issues where you still want to attach the path. If FileError is meant to wrap I/O failures, this precondition may be too strict.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@jviotti jviotti merged commit c1897f4 into main Mar 26, 2026
14 checks passed
@jviotti jviotti deleted the double-roundings branch March 26, 2026 15: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