community icon indicating copy to clipboard operation
community copied to clipboard

GSOC 2026: Add Support for Reporting on the Annotation Test Suite

Open AnujAga2005 opened this issue 10 months ago • 23 comments

Project Title Add Support for Reporting on the Annotation Test Suite

Brief Description The official JSON Schema Test Suite now includes a reasonably complete suite for Annotations (metadata), but Bowtie currently only supports reporting on Validation (boolean pass/fail).

This project aims to implement full support for running and reporting on the Annotation Test Suite. Based on the original feature request by @jdesrosiers in Issue #2006, this is a full-stack engineering challenge that requires updates across three distinct layers of Bowtie:

  1. The UI Level: Creating a new "Annotations" report page in the React frontend.
  2. The Report Level: Upgrading the internal report format to store arbitrary comparison results. Unlike validation (which is binary valid/invalid), annotations return sets of values that must be compared against an expected set.
  3. The Protocol Level: Updating how Bowtie’s runner talks to test harnesses to support the specific definitions of the annotation test suite.

Expected Outcomes

  • Protocol Update: The Bowtie runner is capable of executing the official Annotation Test Suite against supported implementations.
  • Data Model Upgrade: The report schema is updated to persist annotation results (sets of values) alongside standard validation results.
  • New Reporting UI: A fully functional, interactive page on the Bowtie report site dedicated to visualizing annotation conformance.
  • Component Reusability: Extraction of shared UI logic to ensure the new Annotation page remains consistent with the existing Validation page.

Skills Required

  • Python: For updating the runner protocol and report data handling.
  • React & TypeScript: For building the new reporting interface.
  • JSON Schema: Understanding the specific mechanics of Annotations vs. Validation.

Mentors @Julian and @AgniveshChaubey

Expected Difficulty Medium

Expected Time Commitment 175 hours

AnujAga2005 avatar Jan 29 '26 05:01 AnujAga2005

This idea is proposed as part of GSoC 2026. Related to: https://github.com/json-schema-org/community/issues/964

AnujAga2005 avatar Jan 29 '26 05:01 AnujAga2005

I would love to see this done, but I don't have the bowtie experience necessary to mentor this project. I really hope it finds a mentor.

jdesrosiers avatar Jan 29 '26 06:01 jdesrosiers

I also like it, yet don't have much understanding of Bowtie. Hopefully we can get a mentor to volunteer for this!

jviotti avatar Jan 29 '26 13:01 jviotti

Hey! Sorry, slow to the gun clearly -- I'm happy to co-mentor here for the Bowtie side if one of the two of you want to join me!

Julian avatar Feb 02 '26 22:02 Julian

That is great news @Julian! Having your guidance on the Bowtie side would be amazing.

Once Jason or Juan confirms co-mentorship, should I go ahead and update the 'Mentors' section of the issue description?

AnujAga2005 avatar Feb 03 '26 05:02 AnujAga2005

So, I'm already mentoring two projects. I'm a little concerned about adding a third. I'll do it if no one else volunteers, but I'm hoping someone else might be interested.

jdesrosiers avatar Feb 03 '26 23:02 jdesrosiers

I don't have much Bowtie experience, but I do know the annotation test suite and run it for Blaze, so happy to co-mentor!

jviotti avatar Feb 04 '26 13:02 jviotti

Hi @jviotti, Since you’re already running the annotation tests in Blaze, could you briefly share how you structure the output there? I want to make sure my proposal aligns with what’s already working for you. Thanks!

AnujAga2005 avatar Feb 04 '26 13:02 AnujAga2005

Not sure what you mean by how I structure the output, but this is how I integrate with the suite: https://github.com/sourcemeta/blaze/blob/main/test/evaluator/annotationsuite.cc.

jviotti avatar Feb 04 '26 15:02 jviotti

Thanks for the link! I'll take a look at the implementation.

AnujAga2005 avatar Feb 04 '26 16:02 AnujAga2005

Hi @jviotti , I checked annotationsuite.cc and saw that has_annotation essentially matches on the {instance_location, schema_location, value} tuple. This suggests we shouldn't invent a custom Bowtie structure but instead align with the Standard JSON Schema Output Format.

Does Blaze already have a serializer that produces this Standard Output JSON? If so, my proposal can simply be to 'Extend the Bowtie Protocol to ingest the Standard Output Format.'

Also, I tried setting up a local baseline with bowtie run -i ghcr.io/sourcemeta/blaze, but I'm getting a 'Denied' error from the registry even with a PAT. Is there a public image URI I should use ?

AnujAga2005 avatar Feb 05 '26 10:02 AnujAga2005

Does Blaze already have a serializer that produces this Standard Output JSON? If so, my proposal can simply be to 'Extend the Bowtie Protocol to ingest the Standard Output Format.'

Yes, it does. You can see if you run the validate command in https://github.com/sourcemeta/jsonschema using --json. The problem though is that not all implementations will produce the exact same output using the Standard Output format. For example, evaluation order of keyword can be anything, etc. So maybe some transformation is still needed.

Also, I tried setting up a local baseline with bowtie run -i ghcr.io/sourcemeta/blaze, but I'm getting a 'Denied' error from the registry even with a PAT. Is there a public image URI I should use ?

There is no Docker image at ghcr.io/sourcemeta/blaze. If you want to run Blaze directly, you probably to build it from source and write a program that consumes it, which is what we do for Bowtie if you check the implementations directory. Otherwise its easiest through https://github.com/sourcemeta/jsonschema

jviotti avatar Feb 05 '26 15:02 jviotti

Got it! I assumed Blaze followed the python-jsonschema naming convention on GHCR, hence the confusion. I'll switch to testing with sourcemeta/jsonschema.

Regarding the output, that makes perfect sense. Since the spec doesn't mandate evaluation order, it seems Bowtie will need a 'Normalization Layer' to sort and unify the Standard Output from different runners before reporting.

This really helps define my proposal scope. Please let me know if there is anything wrong in my understanding or approach! Thanks.

AnujAga2005 avatar Feb 05 '26 15:02 AnujAga2005

I’m very interested in contributing to this project.

The extension from simple validation reporting (boolean pass/fail) to structured annotation result comparison across protocol, data model, and UI layers makes this particularly compelling. I’m especially interested in understanding how annotation result sets are currently represented internally and how the runner protocol would need to evolve to support them consistently.

I’ll start by reviewing the existing Bowtie runner flow, report schema, and annotation test definitions to better understand the current architecture and constraints. Looking forward to engaging further on this.

SHUBHANSHU602 avatar Feb 22 '26 03:02 SHUBHANSHU602

REQUIRED QUALIFICATION TASK

Anyone hoping to be selected for this project must complete this qualification task. Any proposals we receive who have not completed the qualification task will not be considered.

Qualification task submission will be accepted up until the proposal deadline

Candidates for this project should have experience writing a test harness for the annotation test suite in the official JSON Schema Test Suite repo.

Your task is to write a test harness for the annotation test suite for any JSON Schema implementation you choose that supports annotations. Ideally, this should be for an implementation that doesn't already use the annotation test suite. We don't have a list of suitable implementations, so you're going to have to go out and look for them. That's part of your task.

Use the #gsoc-bowtie-annotations channel if you have a question. Don't DM mentors. Others probably have the same question and we want to answer in a public space so everyone can benefit from the answer.

jdesrosiers avatar Feb 27 '26 00:02 jdesrosiers

@jdesrosiers ,I’ve started sketching out a harness structure for the annotation test suite (starting with annotations/tests/applicators.json) and wanted to check whether this direction matches what you expect for the qualification task.

My current plan looks roughly like this:

  1. Test loading and dialect filtering

Load the test file (e.g. annotations/tests/applicators.json). For each entry in suite: Read compatibility.

Based on the dialect currently under test, skip cases that don’t match.

This allows the harness to be run against multiple drafts cleanly.

  1. Schema preparation

For each test case: Load the main schema. If externalSchemas is present: Register those schemas using their retrieval URIs. Ensure resolution works without relying on $id unless required.

Instantiate the correct validator class for the active dialect.

  1. Annotation collection

For each instance:

Run validation in a mode that produces annotation output. Collect annotations grouped by: instance location (JSON Pointer format, e.g. /foo, /1) keyword (e.g. "title") Normalize schema locations into fragment form (e.g. #/properties/foo).

Produce a structure like: { "/foo": { "title": { "#/properties/foo": "Foo" } } } Ensure ordering follows the suite convention: most recently encountered annotation first (top-down evaluation order).

  1. Assertion evaluation

For each assertion:

Extract: location keyword expected

Compare normalized actual output to expected using strict equality.

An empty object {} means the annotation must not appear.

  1. Reporting

Print per-test pass/fail results. Provide summary totals. Exit with non-zero code on failure.

The goal is to keep dialect handling, schema setup, annotation extraction, and assertion comparison clearly separated so the harness remains predictable and reusable.

Does this structure align with what you’re expecting for the qualification task, or is there a specific integration/reporting format you’d prefer the harness to follow?

SHUBHANSHU602 avatar Mar 01 '26 07:03 SHUBHANSHU602

Please ask your questions in the #gsoc-bowtie-annotations slack channel. But, keep in mind that mentors will not tell you how to do the task. Try to stick to clarifying questions only.

Also, please don't tag me. I know it was confusing that I posted the qualification task, but I'm not a mentor on this project.

jdesrosiers avatar Mar 03 '26 20:03 jdesrosiers

Ohk @jdesrosiers

SHUBHANSHU602 avatar Mar 03 '26 22:03 SHUBHANSHU602

Hi everyone, My name is Zohaib Arif, a Software Engineering student interested in applying for GSoC 2026 with the project “Add Support for Reporting on the Annotation Test Suite.” This project strongly aligns with my interests in developer tooling and JSON Schema. I am currently working on the qualification task and am in the final stages of implementing a test harness for the JSON Schema annotation test suite.

Looking forward to learning more about Bowtie and contributing to the project. Thank you.

Zohaibarif69 avatar Mar 10 '26 07:03 Zohaibarif69

Hi @jdesrosiers and @AgniveshChaubey! 👋

I am preparing my GSoC 2026 proposal and have completed the required qualification task for this project.

I built a standalone, CI/CD-ready Python test harness targeting the jschon implementation (Draft 2020-12). It successfully parses the basic output format, extracts the annotations by instance/keyword location, and asserts them against the expected results using strict equality.

To ensure it doesn't crash during automated runs, I also implemented error handling to catch the ECMA-262 \p Unicode escape errors that Python's native re module throws during the pattern tests.

You can view the execution harness and the README here: https://github.com/DastanZar/jsonschema-task

I'll be detailing the architecture and my plans for integrating this into the broader ecosystem in my official GSoC proposal. Looking forward to your feedback!

DastanZar avatar Mar 18 '26 05:03 DastanZar