Skip to content

Fix annotate-specification-links crash, CI trigger path, and UTF-8 file loading - #1192

Merged
jdesrosiers merged 1 commit into
json-schema-org:unifyfrom
ApurveKaranwal:fix/unify-annotations-and-encoding
Sep 19, 2026
Merged

jdesrosiers merged 1 commit into
json-schema-org:unifyfrom
ApurveKaranwal:fix/unify-annotations-and-encoding

Conversation

@ApurveKaranwal

Copy link
Copy Markdown

Resolves #1190

Summary of Changes

This PR addresses three related tooling, cross-platform, and CI issues identified on the unify branch:

  1. Fix TypeError and external template lookups in validation/annotate-specification-links:

    • Cast dialect to int(dialect) in applicable_dialects so checker.dialect_applies compares numeric versions against integers rather than strings.
    • Resolve external templates (rfc, iso, ecma262, perl5) directly from URLS["external"], which avoids false-positive missing template errors on future dialect placeholders ("compatibility": "9999").
    • Prevent in-place mutation of specification dictionaries (each = dict(each)).
    • Use .as_posix() for emitted annotation file paths to guarantee forward slashes across all operating systems.
  2. Fix disconnected CI path filter in .github/workflows/show_specification_annotations.yml:

    • Update paths from 'tests/**' to 'validation/tests/**' so pull requests modifying the unified test suite properly trigger specification link checks.
  3. Cross-platform UTF-8 file loading:

    • Add explicit encoding="utf-8" to path.read_text() and path.open() in check_validation_suite.py and annotate-specification-links to prevent UnicodeDecodeError on Windows environments defaulting to cp1252.

Verification

  • python validation/annotate-specification-links runs end-to-end and exits cleanly with code 0, emitting all notices with POSIX paths.
  • python validation/check_validation_suite.py passes all 11 test suites across all 114 test files on Windows and POSIX systems.
  • python -m py_compile validation/annotate-specification-links validation/check_validation_suite.py confirms no syntax errors.

@ApurveKaranwal
ApurveKaranwal requested a review from a team as a code owner September 12, 2026 21:37
@jdesrosiers
jdesrosiers merged commit a7c9fda into json-schema-org:unify Sep 19, 2026
2 checks passed
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.

2 participants