Skip to content

Add modular module upgrade: jsonschema v1.4.0#200

Merged
intel352 merged 5 commits intomainfrom
copilot/upgrade-modular-versions
Feb 27, 2026
Merged

Add modular module upgrade: jsonschema v1.4.0#200
intel352 merged 5 commits intomainfrom
copilot/upgrade-modular-versions

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Adds github.com/CrisisTextLine/modular/modules/jsonschema v1.4.0 to the project and wires it into the engine via the modularcompat plugin. This module is already referenced in the e2e test fixtures and CHANGELOG as an integrated module type.

auth v0.4.0, cache v0.4.0, scheduler v0.4.0 were already at the required versions.

Dependencies added (go.mod)

Module Version
modules/jsonschema v1.4.0

plugins/modularcompat/plugin.go

Added factory for jsonschema.modular:

"jsonschema.modular": jsonschema.NewModule()

schema/schema.go

Added jsonschema.modular to coreModuleTypes (alphabetical order maintained).

schema/module_schema.go

Added schema entry for jsonschema.modular with service inputs/outputs and validation category.

plugins/modularcompat/jsonschema_test.go

Added integration tests validating real-world jsonschema.modular usage within workflow:

  • TestJSONSchemaModuleWiredIntoApp — verifies the factory from the modularcompat plugin boots inside a modular.Application and the jsonschema.service is accessible.
  • TestJSONSchemaValidateBytes — 7-case table covering valid payloads, missing required fields, extra properties (additionalProperties: false), wrong types, and empty objects.
  • TestJSONSchemaValidateReader — validates JSON streamed through an io.Reader (mirrors HTTP request body validation).
  • TestJSONSchemaValidateInterface — validates pre-unmarshaled Go map[string]any payloads directly.
  • TestJSONSchemaRegistryWorkflow — end-to-end schema-registry scenario: compile multiple schemas (user, product) once into an in-memory registry map, then route payload validation calls to the correct schema by name (6 valid/invalid cases). This is the minimal pattern for building a workflow-based schema registry.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 27, 2026 13:53
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade modular versions for multiple modules Add modular module upgrades: chimux, httpclient, httpserver, jsonschema, letsencrypt, logmasker Feb 27, 2026
@intel352
Copy link
Contributor

@copilot don't add "new" modules just because. I don't know that we have any justification for adding httpclient, httpserver, chimux, if we're not already using them. Rather just ensure existing modular dependencies are at their latest version. jsonschema, logmasker, and letsencrypt may be valid to add, but judge that based on what functionality they unlock and whether it's true value adds.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot don't add "new" modules just because. I don't know that we have any justification for adding httpclient, httpserver, chimux, if we're not already using them. Rather just ens...

Removed chimux, httpclient, httpserver, logmasker, and letsencrypt — none had existing Go code usage to justify the additions. Kept only jsonschema v1.4.0 since jsonschema.modular is already referenced in the e2e test fixture (ui/e2e/fixtures/phase6-all-modules.yaml) and the CHANGELOG.

The net change to go.mod is now just jsonschema v1.4.0 plus its transitive dep. Existing auth v0.4.0, cache v0.4.0, and scheduler v0.4.0 were already at the required versions. (commit cc04bdc)

Copilot AI changed the title Add modular module upgrades: chimux, httpclient, httpserver, jsonschema, letsencrypt, logmasker Add modular module upgrade: jsonschema v1.4.0 Feb 27, 2026
@intel352 intel352 marked this pull request as ready for review February 27, 2026 14:24
Copilot AI review requested due to automatic review settings February 27, 2026 14:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds the jsonschema.modular module (v1.4.0) from CrisisTextLine/modular to the workflow engine, integrating JSON Schema validation capabilities. The module was already referenced in e2e test fixtures and CHANGELOG but hadn't been wired into the engine.

Changes:

  • Added github.com/CrisisTextLine/modular/modules/jsonschema v1.4.0 dependency
  • Registered jsonschema.modular factory in the modularcompat plugin
  • Added jsonschema.modular to core module types schema registry

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Added jsonschema v1.4.0 direct dependency and updated transitive dependencies
go.sum Added checksums for jsonschema v1.4.0 and its dependencies (dlclark/regexp2, santhosh-tekuri/jsonschema/v6, json-iterator update)
plugins/modularcompat/plugin.go Added jsonschema.NewModule() factory, updated descriptions and ModuleTypes manifest (maintained alphabetical order)
plugins/modularcompat/plugin_test.go Updated tests to expect 3 modules instead of 2, added TestJSONSchemaModuleFactory
schema/schema.go Added "jsonschema.modular" to coreModuleTypes list in alphabetical position
schema/module_schema.go Registered ModuleSchema for jsonschema.modular with validation category, inputs/outputs, and description
example/go.mod Updated with jsonschema v1.4.0 indirect dependency and many transitive dependencies
example/go.sum Added checksums for all new transitive dependencies

@intel352
Copy link
Contributor

@copilot You added jsonschema, make sure we have ample tests to validate it's functionality in workflow usage. Such as, if I wanted to build a schema registry using workflow, and use jsonschema to validate payloads against the schema registry, how would we make that happen? we'd need to load a schema and then run the validator, right? Make sure there's tests that replicate this type of usage to ensure the implementation here is complete enough.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

@copilot You added jsonschema, make sure we have ample tests to validate it's functionality in workflow usage. Such as, if I wanted to build a schema registry using workflow, and use...

Added plugins/modularcompat/jsonschema_test.go (commit a9e4508) with tests that cover the schema-registry pattern you described:

  • TestJSONSchemaModuleWiredIntoApp — verifies the factory from the modularcompat plugin boots inside a modular.Application and the jsonschema.service is accessible.
  • TestJSONSchemaValidateBytes — 7-case table: valid payloads pass, missing required fields / extra properties / wrong types all return errors.
  • TestJSONSchemaValidateReader — same via io.Reader (simulates HTTP request body validation).
  • TestJSONSchemaValidateInterface — same against a Go map[string]any (already-unmarshaled payloads).
  • TestJSONSchemaRegistryWorkflow — mirrors the "load schema, validate payload" scenario: two schemas (user, product) are compiled once into an in-memory registry map, then 6 payloads (valid + invalid variants of each) are routed to the correct schema by name. All 6 pass/fail as expected.

@intel352 intel352 merged commit 01e9c18 into main Feb 27, 2026
14 checks passed
@intel352 intel352 deleted the copilot/upgrade-modular-versions branch February 27, 2026 15:07
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.

3 participants