Skip to content

Add µEd OpenAPI validation middleware - #17

Merged
m-messer merged 11 commits into
mainfrom
feature/mued-schema-validation
May 27, 2026
Merged

Add µEd OpenAPI validation middleware#17
m-messer merged 11 commits into
mainfrom
feature/mued-schema-validation

Conversation

@m-messer

Copy link
Copy Markdown
Member

Summary

  • Embeds the official µEd OpenAPI 3.1.0 spec (runtime/schema/mued_v0.1.0.yml) into the binary
  • Adds kin-openapi middleware (internal/server/openapi.go) that validates all µEd route traffic against the spec at the HTTP layer, wired into the server chain via fx after NormalizePath
  • Request validation is strict — invalid µEd request bodies return 400 before the handler is reached
  • Response validation is strict — responses that don't conform to the spec return 500; the original error message is preserved when the worker returns a known error shape (error response conversion to µEd format is tracked in a separate PR)

How validation is layered

The legacy / route has no matching path in the spec so the middleware passes it through entirely unchanged, including the raw worker response body. The existing gojsonschema validation of the legacy worker protocol inside RuntimeHandler is also unchanged.

Layer Route What is validated Schema
OpenAPI middleware (new) µEd routes HTTP request/response shape mued_v0.1.0.yml
RuntimeHandler gojsonschema (existing) Legacy / {response, answer, params} worker protocol request-eval.json etc.

Test plan

  • go build ./... passes
  • go test ./... passes
  • POST /evaluate with missing submission field returns 400
  • POST /evaluate with a valid µEd body reaches the worker as before
  • GET /evaluate/health continues to work
  • POST / (legacy route) bypasses the OpenAPI validator and returns the raw worker response unchanged

🤖 Generated with Claude Code

m-messer and others added 5 commits May 14, 2026 16:51
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@m-messer m-messer assigned m-messer and unassigned neagualexa May 26, 2026
m-messer and others added 4 commits May 26, 2026 10:27
Pass IsOpenAPI31OrLater and AllowExtraSiblingFields options to the
legacy router so description/summary siblings on $ref objects (valid
in 3.1.0) don't fail validation. Also propagate errors from
OpenAPIMiddleware and NewHttpServer instead of ignoring them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use `writeJSONError` helper for consistent JSON error responses in µEd handler. Enhance OpenAPI response validation to prevent buffer drainage during snapshot handling.
@m-messer m-messer assigned neagualexa and unassigned m-messer May 27, 2026
@neagualexa neagualexa assigned m-messer and unassigned neagualexa May 27, 2026
@m-messer
m-messer merged commit 6940711 into main May 27, 2026
8 checks passed
@m-messer
m-messer deleted the feature/mued-schema-validation branch May 27, 2026 09:55
m-messer added a commit that referenced this pull request Jun 15, 2026
* Added GitHub Actions release workflow and updated build workflow to trigger on version tags (#18)

* Feature/release workflow (#20)

* Added GitHub Actions release workflow and updated build workflow to trigger on version tags

* Triggered evaluation-function-base release from release workflow

* Updated GitHub Actions build workflow to enable `latest` image tagging only for tag refs (#22)

* Add µEd OpenAPI validation middleware (#17)

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update Go version to 1.25 in Dockerfile for builder stage

* Support OpenAPI 3.1.0 spec in router validation

Pass IsOpenAPI31OrLater and AllowExtraSiblingFields options to the
legacy router so description/summary siblings on $ref objects (valid
in 3.1.0) don't fail validation. Also propagate errors from
OpenAPIMiddleware and NewHttpServer instead of ignoring them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Refactor error responses and improve OpenAPI middleware robustness

Use `writeJSONError` helper for consistent JSON error responses in µEd handler. Enhance OpenAPI response validation to prevent buffer drainage during snapshot handling.

* Add health status response to µEd handler based on test results

* Update µEd test assertion to verify "status" field instead of "tests_passed" field

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/sandboxed workers (#21)

* Added Linux-only nsjail-based sandboxing for worker processes, including CLI support, configuration, and testing.

* Added validation for `Content-Length` in `headerPrefixPipe` and tests for oversized and negative values

* Enhanced `build.yml` to compile and install nsjail from source instead of using system package.

* Switched nsjail mode from "once" to "exec" for direct command execution with inherited stdio.

* Replaced `--time_limit` with `--rlimit_cpu` in nsjail arguments to ensure compatibility in containers without cgroupv2.

* Updated sandbox test to replace `--time_limit` with `--rlimit_cpu` and adjusted workflow to run integration tests with elevated permissions.

* Feature/mu ed versioning (#14)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Simplify µEd response encoding by removing unnecessary "status" field logic

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/mu ed error handling (#15)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Refactored `/evaluate` and `/evaluate/health` error handling to standardize JSON responses with `writeMuEdError` and included `X-Api-Version` header validation and degraded health status support.

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update µEd handler to use dynamic status codes for responses

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix referenceSolution content extraction to match µEd spec

The spec defines task.referenceSolution as a plain object with
additionalProperties, not a typed Submission wrapper. Change
MuEdTask.ReferenceSolution from *MuEdSubmission to map[string]any
and extract its content directly using the submission's type to
determine the expected key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix flaky test by replacing time.After with m.Shutdown for synchronization

Replace the 1ms timing-based wait with pool.Close() via m.Shutdown,
consistent with all other tests in the file that rely on the same
background goroutine pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
m-messer added a commit that referenced this pull request Jun 15, 2026
* Added GitHub Actions release workflow and updated build workflow to trigger on version tags (#18)

* Feature/release workflow (#20)

* Added GitHub Actions release workflow and updated build workflow to trigger on version tags

* Triggered evaluation-function-base release from release workflow

* Updated GitHub Actions build workflow to enable `latest` image tagging only for tag refs (#22)

* Add µEd OpenAPI validation middleware (#17)

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update Go version to 1.25 in Dockerfile for builder stage

* Support OpenAPI 3.1.0 spec in router validation

Pass IsOpenAPI31OrLater and AllowExtraSiblingFields options to the
legacy router so description/summary siblings on $ref objects (valid
in 3.1.0) don't fail validation. Also propagate errors from
OpenAPIMiddleware and NewHttpServer instead of ignoring them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Refactor error responses and improve OpenAPI middleware robustness

Use `writeJSONError` helper for consistent JSON error responses in µEd handler. Enhance OpenAPI response validation to prevent buffer drainage during snapshot handling.

* Add health status response to µEd handler based on test results

* Update µEd test assertion to verify "status" field instead of "tests_passed" field

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/sandboxed workers (#21)

* Added Linux-only nsjail-based sandboxing for worker processes, including CLI support, configuration, and testing.

* Added validation for `Content-Length` in `headerPrefixPipe` and tests for oversized and negative values

* Enhanced `build.yml` to compile and install nsjail from source instead of using system package.

* Switched nsjail mode from "once" to "exec" for direct command execution with inherited stdio.

* Replaced `--time_limit` with `--rlimit_cpu` in nsjail arguments to ensure compatibility in containers without cgroupv2.

* Updated sandbox test to replace `--time_limit` with `--rlimit_cpu` and adjusted workflow to run integration tests with elevated permissions.

* Feature/mu ed versioning (#14)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Simplify µEd response encoding by removing unnecessary "status" field logic

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/mu ed error handling (#15)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Refactored `/evaluate` and `/evaluate/health` error handling to standardize JSON responses with `writeMuEdError` and included `X-Api-Version` header validation and degraded health status support.

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update µEd handler to use dynamic status codes for responses

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix referenceSolution content extraction to match µEd spec

The spec defines task.referenceSolution as a plain object with
additionalProperties, not a typed Submission wrapper. Change
MuEdTask.ReferenceSolution from *MuEdSubmission to map[string]any
and extract its content directly using the submission's type to
determine the expected key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix flaky test by replacing time.After with m.Shutdown for synchronization

Replace the 1ms timing-based wait with pool.Close() via m.Shutdown,
consistent with all other tests in the file that rely on the same
background goroutine pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix release workflow to trigger build.yml on tag push

Use SHIMMY_DEPLOY_TOKEN (PAT) for checkout so the tag push is treated
as a user action and triggers the build.yml Docker image workflow.
GITHUB_TOKEN-initiated pushes are blocked from triggering other workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
m-messer added a commit that referenced this pull request Jun 15, 2026
* Added GitHub Actions release workflow and updated build workflow to trigger on version tags (#18)

* Feature/release workflow (#20)

* Added GitHub Actions release workflow and updated build workflow to trigger on version tags

* Triggered evaluation-function-base release from release workflow

* Updated GitHub Actions build workflow to enable `latest` image tagging only for tag refs (#22)

* Add µEd OpenAPI validation middleware (#17)

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update Go version to 1.25 in Dockerfile for builder stage

* Support OpenAPI 3.1.0 spec in router validation

Pass IsOpenAPI31OrLater and AllowExtraSiblingFields options to the
legacy router so description/summary siblings on $ref objects (valid
in 3.1.0) don't fail validation. Also propagate errors from
OpenAPIMiddleware and NewHttpServer instead of ignoring them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Refactor error responses and improve OpenAPI middleware robustness

Use `writeJSONError` helper for consistent JSON error responses in µEd handler. Enhance OpenAPI response validation to prevent buffer drainage during snapshot handling.

* Add health status response to µEd handler based on test results

* Update µEd test assertion to verify "status" field instead of "tests_passed" field

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/sandboxed workers (#21)

* Added Linux-only nsjail-based sandboxing for worker processes, including CLI support, configuration, and testing.

* Added validation for `Content-Length` in `headerPrefixPipe` and tests for oversized and negative values

* Enhanced `build.yml` to compile and install nsjail from source instead of using system package.

* Switched nsjail mode from "once" to "exec" for direct command execution with inherited stdio.

* Replaced `--time_limit` with `--rlimit_cpu` in nsjail arguments to ensure compatibility in containers without cgroupv2.

* Updated sandbox test to replace `--time_limit` with `--rlimit_cpu` and adjusted workflow to run integration tests with elevated permissions.

* Feature/mu ed versioning (#14)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Simplify µEd response encoding by removing unnecessary "status" field logic

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Feature/mu ed error handling (#15)

* Added `MuEdHandler` to handle `/evaluate` and `/evaluate/health` endpoints with authentication and runtime integration, along with associated tests

* Added `workflow_dispatch` trigger to GitHub Actions build workflow

* Removed `NewCommandRoute` and corrected route definitions for `/evaluate` and `/evaluate/health`

* Added `NormalizePath` middleware to canonicalize `/evaluate` and `/evaluate/health` paths across server and lambda integrations

* Added API versioning support for `/evaluate` and `/evaluate/health` endpoints with header validation, default version handling, and capability reporting

* Refactored `/evaluate` and `/evaluate/health` error handling to standardize JSON responses with `writeMuEdError` and included `X-Api-Version` header validation and degraded health status support.

* Added OpenAPI request/response validation middleware and integrated OpenAPI specification

* Add embedded µEd OpenAPI specification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Move µEd OpenAPI spec into runtime/schema

Relocates the spec from api/ into runtime/schema/ alongside the existing
JSON schema files, and renames it to mued_v0.1.0.yml to make the version
explicit. Removes the api/ package; embed is now owned by runtime/schema.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Ignore .idea/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Make OpenAPI response validation strict for µEd routes

Previously, responses that failed spec validation were only logged as
warnings and forwarded anyway. Now a failed µEd response validation
returns 500 to the caller. The legacy / route is unaffected — it has
no matching path in the spec so the middleware passes it through
unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update µEd handler to use dynamic status codes for responses

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix referenceSolution content extraction to match µEd spec

The spec defines task.referenceSolution as a plain object with
additionalProperties, not a typed Submission wrapper. Change
MuEdTask.ReferenceSolution from *MuEdSubmission to map[string]any
and extract its content directly using the submission's type to
determine the expected key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix flaky test by replacing time.After with m.Shutdown for synchronization

Replace the 1ms timing-based wait with pool.Close() via m.Shutdown,
consistent with all other tests in the file that rely on the same
background goroutine pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix release workflow to trigger build.yml on tag push

Use SHIMMY_DEPLOY_TOKEN (PAT) for checkout so the tag push is treated
as a user action and triggers the build.yml Docker image workflow.
GITHUB_TOKEN-initiated pushes are blocked from triggering other workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Use SHIMMY_DEPLOY_TOKEN for evaluation-function-base dispatch

Replace expired EVALUATION_FUNCTION_BASE_BUILD_TRIGGER_TOKEN with
SHIMMY_DEPLOY_TOKEN which has access to all org repos.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Replace peter-evans/repository-dispatch with gh api calls

Fine-grained PATs are incompatible with the action. Use gh api directly
with SHIMMY_DEPLOY_TOKEN for both release and trigger-build dispatches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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