Repository navigation
docs: add the grails-datastore-developer skill, with a rule for what a pull request holds - #16995
borinquenkid wants to merge 7 commits into
Conversation
…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
| - 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. |
There was a problem hiding this comment.
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
|
Fixed in 95f3cde. The note no longer says to ignore a suite initialization failure. It now says what the entry is: a I follow this rule myself when I run the Hibernate modules, by reading the XML of each requested spec. |
jamesfredley
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
|
@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? |
…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
|
@jamesfredley You are right: a stale package selector in the suite prints the same |
…datastore-skill-scope-checklist-8.0.x
…r cases get their own issue Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
…id not cause gets its own issue Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
…datastore-skill-scope-checklist-8.0.x Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
…datastore-skill-scope-checklist-8.0.x Claude-Session: https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL
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
🔎 No tests executed 🔎🏷️ Commit: 6e1d5d2 Learn more about TestLens at testlens.app/docs. |
Adds the
grails-datastore-developerskill for changes to the Data layer (grails-datastore-core,grails-datamapping-coreand 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:
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.mdand for Claude discovery (.claude/skills), and is listed as not published in.agents/skills/README.md.validateRepositoryConventionsreports no violations.https://claude.ai/code/session_01Dmki4RzWwreEC2GkkyFnvL