Skip to content

docs: add the grails-datastore-developer skill, with a rule for what a pull request holds - #16995

Draft
borinquenkid wants to merge 7 commits into
8.0.xfrom
docs/grails-datastore-developer-skill-8.0.x
Draft

borinquenkid wants to merge 7 commits into
8.0.xfrom
docs/grails-datastore-developer-skill-8.0.x

Conversation

@borinquenkid

@borinquenkid borinquenkid commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Adds the grails-datastore-developer skill for changes to the Data layer (grails-datastore-core, grails-datamapping-core and the datastore modules): module layering, database variance, the whole-surface protocol for stateful types, cross-datastore and cross-version parity, testing and review.

The skill starts with Scope: What a Pull Request Holds, the rule proposed on dev@ in #17274. A pull request that fixes a bug is judged on the behavior it claims to fix, on any regression it causes against its base branch, and on defects in the code it adds, also behind a setting it adds. A case that behaves the same on the base branch is an optional suggestion. A finding is run on the target branch without the change before it is called a regression:

What the run shows What happens
It behaves the same without the change Optional: a new issue and a reply. It never holds the pull request.
The change breaks it, with any setting Fix it in the pull request
It is a defect in the code the pull request adds, also behind a setting Fix it in the pull request
The example in the issue still fails Fix it in the pull request

The Before You Push section and the whole-surface protocol follow it: their lists are for fixing the issue and for finding what the change breaks, not for widening the fix. They cover the dimensions of a change (the criterion, the scope it resolves in, the context, the connection, the data), the table-driven spec, what a fail-fast validator must accept, and verifying every sentence of docs or upgrade notes against the generated output.

The skill is registered in the conditional loading protocol of AGENTS.md and for Claude discovery (.claude/skills), and is listed as not published in .agents/skills/README.md.

validateRepositoryConventions reports no violations.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

…e changes

The Data layer is stateful builders, caches and per-database variance spread over the
core modules and every datastore. Review rounds on deferred criteria and on the dialect
declarations showed a pattern: each fix covered the case a reviewer tried, and the next
way into the same state came back as the next review.

The skill states the layering (core is universal; each datastore module owns what only
its engine knows; one declaration of databases per SQL module; internal types are marked),
a protocol to run before changing a type that holds state (inventory the state, inventory
the ways in, state the invariant, enforce it at a chokepoint, test it for every way in),
how to answer review comments, parity across datastores, Hibernate versions and branches,
and how to test dialect behavior against the real database.

Claude-Session: https://claude.ai/code/session_01Dmki4SQGwRSj8pRJ5KCWyX
…store-developer skill

Lists the dimensions to cover (criterion, resolution scope, context,
connection, data) before a Data layer change is pushed, names the
fail-fast and documentation checks, and registers the skill in the
conditional loading protocol of AGENTS.md and for Claude discovery.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
Copilot AI balanced review requested due to automatic review settings November 14, 2026 19:12

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jamesfredley jamesfredley 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.

Requested changes. The skill tells the reader to ignore a suite initialization failure, so a broken run can be treated as a pass.

- Pin user-visible behavior with integration scenarios in `grails-test-examples` for both `hibernate5` and `hibernate7`, and with unit specs in the owning module. Probe Hibernate 5 first, and read the reference docs, before deciding what the right answer is.
- Reproduce a bug as a failing unit spec in the module that owns it before fixing it, not through a downstream functional failure.
- Use `HibernateGormDatastoreSpec` for anything that needs real Hibernate wiring, and read the schema it produces when the bug is about the schema.
- Run Gradle one task at a time on a laptop. Use `cleanTest` and `--no-build-cache`, and judge the result from the XML under `build/test-results`, not from a piped exit code. A `--tests` filter on a module that has a suite class reports an `initializationError` for the suite: ignore that entry and read the specs.

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.

An initializationError can mean the suite did not start. This says to ignore that entry and read the specs. A reader can then treat a run that never executed the specs as a success. Ignore that entry only after checking that it is the known filter artifact and that every requested spec ran. Any other initialization failure is a failure.

…it is the filter artifact

Answers the review of #16995: the skill told the reader to ignore the entry, so a run that never executed the specs could pass. Now the message has to be the known one, and every requested spec has to show its tests in its own XML.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
@borinquenkid

Copy link
Copy Markdown
Member Author

Fixed in 95f3cde. The note no longer says to ignore a suite initialization failure.

It now says what the entry is: a --tests filter on a module with a suite class leaves the suite nothing to discover, so the report holds an initializationError with the message NoTestsDiscoveredException: Suite [...] did not discover any tests. That one entry is ignored only after checking that the message is exactly that and that the XML of every requested spec shows the tests you expect, none skipped and none missing. Any other initialization failure is a failure, and a run in which a requested spec has no XML did not run it.

I follow this rule myself when I run the Hibernate modules, by reading the XML of each requested spec.

https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL

@jamesfredley jamesfredley 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.

Requested changes. The instruction would hide a suite failure that is not caused by the filter.

- Pin user-visible behavior with integration scenarios in `grails-test-examples` for both `hibernate5` and `hibernate7`, and with unit specs in the owning module. Probe Hibernate 5 first, and read the reference docs, before deciding what the right answer is.
- Reproduce a bug as a failing unit spec in the module that owns it before fixing it, not through a downstream functional failure.
- Use `HibernateGormDatastoreSpec` for anything that needs real Hibernate wiring, and read the schema it produces when the bug is about the schema.
- Run Gradle one task at a time on a laptop. Use `cleanTest` and `--no-build-cache`, and judge the result from the XML under `build/test-results`, not from a piped exit code. A `--tests` filter on a module that has a suite class reports an `initializationError` for the suite, because the filter leaves the suite nothing to discover (the message is `NoTestsDiscoveredException: Suite [...] did not discover any tests`). Ignore that one entry only after checking that the message is exactly that and that the XML of every requested spec shows the tests you expect, none skipped and none missing. Any other initialization failure is a failure, and a run in which a requested spec has no XML did not run it.

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.

The suite has a stale package selector. Every spec passes on its own, and the reports are complete. The suite still says no tests were discovered, and that same failure happens without the filter. Do not tell an agent to ignore that failure just because the message matches.

@borinquenkid

Copy link
Copy Markdown
Member Author

@sbglasius: this adds a skill file only, so one approval is enough. It lists what to cover before pushing a criteria change. Does it read clearly to someone outside the data layer?

@borinquenkid
borinquenkid marked this pull request as draft November 23, 2026 01:42
…ide only when the same module run without the filter is clean

The skill told an agent to ignore the suite's NoTestsDiscoveredException when the message matched, but a suite with a stale package
selector prints the same message with no filter at all, and its failure would be hidden. The unfiltered run tells the two apart.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
@borinquenkid

Copy link
Copy Markdown
Member Author

@jamesfredley You are right: a stale package selector in the suite prints the same NoTestsDiscoveredException, so telling an agent to set the entry aside because the message matches would hide it. The skill now says the message does not tell the two apart. The agent runs the module once without the filter; if the suite reports the same failure there, it is the suite's failure to report, and no spec result excuses it. The entry is set aside only when the unfiltered run has no such failure and the XML of every requested spec shows the tests it expects, none skipped and none missing.

borinquenkid added a commit that referenced this pull request Nov 23, 2026
@borinquenkid borinquenkid changed the title docs: add the grails-datastore-developer skill with a Before You Push scope matrix docs: add the grails-datastore-developer skill, with a rule for what a pull request holds Nov 30, 2026
borinquenkid added a commit that referenced this pull request Nov 30, 2026
borinquenkid added a commit that referenced this pull request Nov 30, 2026
A defect in the code a pull request adds is in scope, also behind a setting it
adds, and a finding that behaves the same on the base branch is optional.

Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
@testlens-app

testlens-app Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🔎 No tests executed 🔎

🏷️ Commit: 6e1d5d2
▶️ Tests: 0 executed
⚪️ Checks: 44/44 completed


Learn more about TestLens at testlens.app/docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants