Skip to content

µEd API support with /evaluate, /preview, and /health endpoints#13

Open
m-messer wants to merge 5 commits intomainfrom
feature/muEd
Open

µEd API support with /evaluate, /preview, and /health endpoints#13
m-messer wants to merge 5 commits intomainfrom
feature/muEd

Conversation

@m-messer
Copy link
Copy Markdown
Member

@m-messer m-messer commented May 8, 2026

Summary

This PR integrates the µEd API (openapi-v0_1_0) into the base evaluation layer alongside the existing legacy API, enabling evaluation functions to serve µEd-compliant requests without breaking backward compatibility.

What changed

New µEd routing in handler.py

  • POST /evaluate — validates the request against the EvaluateRequest schema, delegates to commands.evaluate_muEd, and validates the response against the EvaluateResponse schema before returning.
  • POST /preview — delegates to commands.preview_muEd, returning a pre-submission feedback item.
  • GET /evaluate/health — returns service capabilities (supported artefact types, formats, and feature flags).
  • Legacy routes (/) are unchanged and continue to work as before.

Schema reorganisation

  • Legacy JSON schemas moved under schemas/legacy/ to make room for the new µEd OpenAPI spec at schemas/muEd/openapi-v0_1_0.yml.

feedbackId made optional

  • The Feedback schema previously required feedbackId. This field is now optional — evaluation functions are not required to generate IDs, and the platform is not required to consume them. This matches the intent of the µEd spec, where feedbackId is a convenience for clients that need to correlate feedback items, not a mandatory field.
  • Removed hardcoded "feedbackId": "fb-1" and "feedbackId": "preSubmissionFeedback" from commands.py.
  • Removed the required: [feedbackId] constraint from both the OpenAPI schema and the inline validation schema in validate.py.

Validation

  • validate.py now supports OpenAPI-backed validation for µEd schemas using jsonschema.RefResolver, in addition to the existing file-based JSON Schema validators for legacy schemas.

Tests

  • Full test coverage for µEd request/response validation (mued_requests_test.py, mued_responses_test.py).
  • Integration-style handler tests for all three µEd endpoints (mued_handling_test.py).

m-messer added 5 commits May 6, 2026 11:01
…oints with authentication and runtime integration, along with associated tests
…aluate/health` paths across server and lambda integrations
# Conflicts:
#	.github/workflows/build.yml
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