Skip to content

Test critter's pre-generated models in pull-request CI - #4370

Merged
evanchooly merged 1 commit into
masterfrom
pr-critter-aot-leg
Oct 6, 2026
Merged

evanchooly merged 1 commit into
masterfrom
pr-critter-aot-leg

Conversation

@evanchooly

Copy link
Copy Markdown
Member

Adds a Critter (AOT) job to the Pull Requests workflow, so pull requests exercise critter's pre-generated models and not only runtime generation.

Why

  • Today's PR job: the shared workflow behind Build runs a plain install -Dmorphia.mapper=critter. Core's build doesn't run critter-maven, so there are no pre-generated models and critter generates every model at runtime. That's how Test record entities with both mappers #4366's AOT record tests failed in PR CI.
  • Push builds: branches pushed to this repo also run build.yml. That workflow generates the models and tests against them, so same-repo PRs did get AOT coverage there.
  • Forks: pull requests from forks only run this workflow, so they never tested the AOT path.

What the job does

It mirrors build.yml:

  1. install -DskipTests
  2. generate-test-models in core
  3. surefire:test -Dmorphia.mapper=critter, which doesn't recompile. Recompiling would replace the woven classes and leave stale models (NoSuchMethodError: __readXxx).

The existing Build job is unchanged. It keeps running critter with runtime generation for every model, which, together with Coverage Report (critter) in build.yml, is the only full-suite run of the runtime tier. The two jobs cover the two critter tiers.

Verified locally

  • The workflow parses.
  • I ran the job's three commands as written: BUILD SUCCESS across the reactor.
  • Core ran 1313 tests against the generated models (0 failures, 16 skipped). The Aot* record fixtures got their models, and their AOT-tier checks passed.

This PR's own CI runs the new job, since pull_request uses the workflow from the PR.

The new job isn't a required check. If it should block merges, add Critter (AOT) to master's required status checks.

Fixes #4369

The pull-request workflow's build runs a plain install, so critter has no
pre-generated models there and every model is generated at runtime. Pushes
to this repo also run build.yml, which tests against generated models, but
pull requests from forks only get this workflow. Add a job that builds,
runs critter-maven's generate-test-models and then runs the tests without
recompiling, as build.yml does.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 04:01
@evanchooly evanchooly added this to the 3.0.0 milestone Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The job follows the established AOT sequence, preserves woven classes, and has no identified blocking issues.

Review effort: Balanced
Findings: None

What changed in this PR

Adds pull-request CI coverage for Critter’s pre-generated models, closing the AOT testing gap for fork contributions.

Changes:

  • Adds a dedicated AOT job that builds, generates models, and tests without recompiling.
  • Preserves existing runtime-generation coverage and collects logs on failure.
File Description
.github/​workflows/​pull-request.yml Adds the Critter AOT test job and failure-log artifacts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@evanchooly
evanchooly merged commit 0a5812f into master Oct 6, 2026
112 of 117 checks passed
@evanchooly
evanchooly deleted the pr-critter-aot-leg branch October 6, 2026 04:17
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.

Pull-request CI doesn't generate critter AOT test models

2 participants