Skip to content
Open
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
689d6f4
Refactor GORM 7 to a stateless class-singleton architecture
borinquenkid Apr 24, 2026
88f33ae
Enhance GORM 7 stateless refactor and SimpleMap persistence
borinquenkid Apr 25, 2026
98340fa
Enhance GORM 7 stateless refactor and SimpleMap persistence
borinquenkid Apr 25, 2026
b0730c9
Stabilize core AST transformations and stateless persistence for Groo…
borinquenkid Apr 25, 2026
c4acdbe
Stabilize GORM 7 Core APIs and Transformations for Groovy 4 / Java 24
borinquenkid Apr 25, 2026
75ae380
Core: Stabilize GORM 7 APIs and Transformations for Groovy 4 / Java 24
borinquenkid Apr 25, 2026
2820066
Hibernate 7: Stabilize module for GORM 7 stateless refactor
borinquenkid Apr 25, 2026
a06e77e
Temp
borinquenkid Apr 26, 2026
77fd547
Revert "Stabilize GORM 7 Core APIs and Transformations for Groovy 4 /…
borinquenkid Apr 26, 2026
ff3a2df
Fixing Multitenancy
borinquenkid Apr 27, 2026
3a3736c
Refactor Simple Map datastore for stateless multi-tenancy and correct…
borinquenkid Apr 29, 2026
e0e36a7
Cleanup debug logs and finalize Simple Map refactoring and transactio…
borinquenkid Apr 29, 2026
e3ac267
Fixed core
borinquenkid Apr 29, 2026
32f3837
Fix Hibernate 7 multi-datasource entity registration and transaction …
borinquenkid Apr 30, 2026
f59776c
Implement core SessionResolver infrastructure
borinquenkid Apr 30, 2026
588c22a
Finalize SessionResolver integration in grails-datastore-core
borinquenkid Apr 30, 2026
c13548a
Refactor GrailsSessionContext to use ServiceRegistry for Datastore re…
borinquenkid Apr 30, 2026
a582a77
Refactor DatastoreUtils to use idempotent bindSession
borinquenkid Apr 30, 2026
11ade93
Stabilize Hibernate 7 implementation and fix multi-datasource routing
borinquenkid May 1, 2026
216983e
fix(hibernate7): resolve compilation blockers and document runtime fa…
borinquenkid May 1, 2026
af30a8b
fix(h7): resolve multi-datasource routing and H7 session.contains() b…
borinquenkid May 2, 2026
3ffbbba
fix(h7): fix all HibernateGormStaticApiSpec failures (68/68 pass)
borinquenkid May 2, 2026
a685d07
fix(h7): fix HibernatePagedResultList type and lastUpdated with dynam…
borinquenkid May 2, 2026
35d0cdd
fix(h7): return managed Hibernate instance from performMerge; handle …
borinquenkid May 2, 2026
a4b6a26
fix(h7): fix withNewSession to open native Hibernate session before b…
borinquenkid May 2, 2026
a7539bc
docs: update ISSUES.md with H7 critical fixes and MongoDB migration g…
borinquenkid May 2, 2026
2a4fe25
fix(h7): improve named parameter binding and fix ValidationException …
borinquenkid May 2, 2026
bc94253
Fix @Query named parameter binding in Data Services for H7 strict val…
borinquenkid May 2, 2026
475b96c
Fix H7 veto exceptions for deepValidate:false and insert() validation
borinquenkid May 2, 2026
ca71889
fix(h7): resolve proxy routing and Instance API test failures
borinquenkid May 3, 2026
cc1c713
fix(h7): fix connection leak spec and nested session binding
borinquenkid May 3, 2026
099fb9d
fix(h7): Achieve 100% test pass rate for Hibernate 7 module
borinquenkid May 3, 2026
2b2cd20
chore: implement coordinated session management and stabilize Hiberna…
borinquenkid May 4, 2026
a93bffe
fix: resolve native SQL parameter binding and compilation errors in H…
borinquenkid May 4, 2026
3ee7bf7
more progress
borinquenkid May 5, 2026
2045336
fix: SCHEMA multi-tenancy session routing for H7 child datastores
borinquenkid May 5, 2026
3d9c30b
clean up artifacts not needed
borinquenkid May 5, 2026
1ddb603
test(h7): add GormRegistryScalabilitySpec to verify O(M+N) memory gua…
borinquenkid May 5, 2026
1be3415
test(core): add GormRegistryScalabilitySpec to verify O(M+N) memory g…
borinquenkid May 5, 2026
63cfe6b
docs: update ISSUES.md — H7 core 100% passing, document core regressions
borinquenkid May 5, 2026
89def8b
fix: repair GormEnhancer regressions from O(M+N) refactor
borinquenkid May 5, 2026
02d9cb7
fix(test): make GormRegistryScalabilitySpec parallel-safe
borinquenkid May 5, 2026
b6a9340
docs: update ISSUES.md — all datamapping modules passing, pivot to H7…
borinquenkid May 5, 2026
33a70b9
docs+fix: consolidate ISSUES.md; fix MongoStaticApi missing Connectio…
borinquenkid May 6, 2026
bcdeb94
fix(mongodb): fix 20 MongoDB core test failures (54 -> 34)
borinquenkid May 6, 2026
c9c5a72
fix(h7): fix GrailsHibernateTemplate and TransactionalTransform for D…
borinquenkid May 6, 2026
717a0ea
docs(h7): add Javadoc to GrailsHibernateTemplate.executeWithNewSession()
borinquenkid May 6, 2026
b83e3e3
docs: update ISSUES.md with GeoJSON investigation status
borinquenkid May 7, 2026
5a66efc
docs: update ISSUES.md with GeoJSON debug findings
borinquenkid May 7, 2026
21ba724
mongodb: - ✅ Fixed two codec issues (return statements and class mism…
borinquenkid May 7, 2026
657bf74
Fix MongoDB embedded collection updates and dirty collection detection
borinquenkid May 7, 2026
78aaac8
Update ISSUES.md with final test results - 553/560 passing (98.8%)
borinquenkid May 7, 2026
4ccbb4d
Fix Mongo query/update regressions and DynamicFinder BuildableCriteri…
borinquenkid May 7, 2026
3637f56
Fix MongoDB versioning, dirty checking, and embedded update conflicts
borinquenkid May 8, 2026
68bfd37
UPdate ISSUES.md
borinquenkid May 9, 2026
b92af98
Fix H5 core compilation and port scalability tests to Mongo/H5
borinquenkid May 9, 2026
62c4dee
chore: update issue tracker for Hibernate5 core regressions
borinquenkid May 10, 2026
43397a9
Fix ListOrderBySpec: implement clearOrders in HibernateQuery for H5. …
borinquenkid May 10, 2026
5b8c6ba
Fix Hibernate 5 session state and GORM API regressions. Collaborator:…
borinquenkid May 10, 2026
a1ec82a
Stabilize Hibernate 5.6: fix multi-tenancy, manual IDs, and version i…
borinquenkid May 10, 2026
1235baf
Fix DetachedCriteriaProjectionAliasSpec test failures
borinquenkid May 11, 2026
36faaee
Fix primitive ID insertion in performUpsert for Hibernate 5
borinquenkid May 11, 2026
505d90a
Fix WhereQueryWithAssociationSortSpec and ClosureEventTriggeringInter…
borinquenkid May 11, 2026
e13355d
Fix MultipleOneToOneSpec test failure
borinquenkid May 11, 2026
2ea64a2
Fix DeepValidationSpec by enabling deepValidate support in Grails 7 J…
borinquenkid May 11, 2026
89b5d58
Fix hib5 O(M+N)
borinquenkid May 11, 2026
7e1196d
more fixes
borinquenkid May 12, 2026
3993c67
1 Fix GormEnhancer to enforce TenantNotFoundException in SCHEMA mode
borinquenkid May 12, 2026
5fb8952
docs: Update ISSUES.md to reflect 100% pass rate for MongoDB sibling …
borinquenkid May 12, 2026
24a87de
Update GrailsTestPlugin
borinquenkid May 12, 2026
01149ed
fix plugins
borinquenkid May 12, 2026
01cd412
RAT changes
borinquenkid May 12, 2026
6f66842
Merge branch '8.0.x-hibernate7' into 8.0.x-hibernate7.gorm-scaling an…
borinquenkid May 12, 2026
d1efb91
Updated ISSUES.md to cover O(M+N) fixes and future improvements
borinquenkid May 12, 2026
8632318
Stabilize GORM and Hibernate test failures
borinquenkid May 13, 2026
ab679e1
Refactor GormEnhancer to singleton pattern for state management
borinquenkid May 13, 2026
cf1d155
Remove unused NAMED_QUERIES and add GormEnhancerRegistry spec
borinquenkid May 13, 2026
358e41e
refactor: Consolidate GormEnhancer constructors to reduce redundancy
borinquenkid May 13, 2026
02d25c9
fix: H5 HibernateGormEnhancer must pass transactionManager to parent
borinquenkid May 13, 2026
c7af18c
Add factory specs for GormApiFactory and MongoGormApiFactory
borinquenkid May 13, 2026
2c855c8
Add getStaticApi override to MongoGormEnhancer to directly create Mon…
borinquenkid May 13, 2026
8ae5e8d
Fix MongoDB persistence: Add flush to GormStaticApi.saveAll()
borinquenkid May 13, 2026
4f8b05b
Add MongoGormInstanceApi with auto-flush on save()
borinquenkid May 13, 2026
21aeec0
Fix MongoGormInstanceApi: return result from super.save()
borinquenkid May 13, 2026
f63c9f2
Fix MongoDB persistence: Use MongoGormInstanceApi in MongoDatastore
borinquenkid May 13, 2026
0c0e16e
Add comprehensive test specs for transaction template factories and M…
borinquenkid May 13, 2026
9297976
MongoDB transaction rollback with factory-pattern gate and context-aw…
borinquenkid May 13, 2026
1be49d8
Fix jline dependency version in documentation configs
borinquenkid May 13, 2026
0218d11
Tighten GormEnhancer constructor API
borinquenkid May 13, 2026
81adbaf
Add precondition assertions to GormEnhancer constructor
borinquenkid May 13, 2026
aa5a5f3
Extract ConnectionSourceNameResolver class
borinquenkid May 13, 2026
912d202
Fix jline:jline version in grails-console
borinquenkid May 13, 2026
8998d72
Fix GormEnhancer constructor API and test compatibility
borinquenkid May 13, 2026
0dc115e
Add tests for GormRegistry entity registration methods
borinquenkid May 13, 2026
e1c8f76
Fix Hibernate dependency resolution in grails-plugin and docs
borinquenkid May 13, 2026
f3d99dc
Delegate constraint registration to GormRegistry
borinquenkid May 13, 2026
34f7b9c
Fix entity registration to delegate orchestration while preserving en…
borinquenkid May 13, 2026
4f157e3
Fix Hibernate dependency resolution and registerConstraints override …
borinquenkid May 13, 2026
6bbaef2
Refactor GormEnhancer.registerEntity to delegate to GormRegistry
borinquenkid May 13, 2026
883906a
Refactor to GormRegistry
borinquenkid May 14, 2026
68afa58
Refactor GORM API resolution to registry factories
borinquenkid May 14, 2026
acf9de2
Merge remote-tracking branch 'origin/8.0.x-hibernate7' into 8.0.x-hib…
borinquenkid May 14, 2026
88174ef
compile error
borinquenkid May 14, 2026
225377f
refactor: clean up Gorm enhancer registry ownership
borinquenkid May 14, 2026
cb608f4
refactor: split GORM API registries
borinquenkid May 14, 2026
1f43b5c
refactor: move API lookup to registries
borinquenkid May 14, 2026
2d57504
fix: call public API finder methods instead of resolver directly
borinquenkid May 14, 2026
a391700
refactor: remove unused get*Api(String, String) overloads
borinquenkid May 14, 2026
eba68bd
refactor: remove unused onlyExtendedMethods parameter
borinquenkid May 14, 2026
2025bc1
refactor: remove unused empty enhance() method
borinquenkid May 14, 2026
49a596e
refactor: remove unused parameters and public wrapper from GormEnhancer
borinquenkid May 14, 2026
6ebd81c
refactor: remove unused enhance(PersistentEntity) method
borinquenkid May 14, 2026
229b919
refactor: remove unused enhance(PersistentEntity) method
borinquenkid May 15, 2026
4f5e4c9
Merge branch '8.0.x-hibernate7' into 8.0.x-hibernate7.gorm-scaling
borinquenkid May 15, 2026
73658df
Fix GormEnhancer constructor call in GrailsDataCoreTckManager
borinquenkid May 15, 2026
d9bd4eb
Fix GormEnhancer constructor calls in SimpleMapQuerySpec
borinquenkid May 15, 2026
4a43ad6
Fix registry factory resolution and qualifier API regressions
borinquenkid May 15, 2026
b65d48a
Fix Hibernate 7 core regression specs
borinquenkid May 15, 2026
a8dd84c
refactor: remove unused enhance(PersistentEntity) method
borinquenkid May 15, 2026
184081c
Codenarc and CodeStyle
borinquenkid May 15, 2026
7baeeab
Fix Hibernate test syntax regressions
borinquenkid May 15, 2026
1c6d98a
Move code-style violation reports to build/reports/style-violations/
borinquenkid May 16, 2026
f59eb0d
Fix date parsing error message expectations in databinding tests
borinquenkid May 16, 2026
807ad17
Fix quoting issues and test compatibility updates
borinquenkid May 16, 2026
15880d5
Add missing service initialization in H7 database-per-tenant test
borinquenkid May 16, 2026
5ef85eb
Ensure H7 database-per-tenant test matches H5 structure
borinquenkid May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .agents/skills/test-fixer/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,68 @@ All tests passed! 🎉

---

## Isolated Testing (local.properties)

The project supports an **Isolation Mode** for focused development. By configuring `local.properties`, you can limit test execution to specific modules and enable aggressive heap settings for those tests.

### Configuration

In `local.properties`:
```properties
# List the modules you want to focus on
grails.test.modules=:grails-datamapping-core-test,:grails-data-simple
```

### Usage

```bash
# Runs ONLY the modules defined in grails.test.modules
# Automatically aggregates failures and style violations
# MANDATORY: Must include the local-init.gradle initialization script
./gradlew -I local-init.gradle testSelected
```

When `testSelected` is run:
- Only tests in the specified modules are enabled.
- `maxParallelForks` is set to `1` (serial) for stability.
- Heap size is increased to `3g`.
- `ignoreFailures` is set to `true` to ensure aggregation tasks run.
- Non-selected modules have their test and quality tasks disabled.

---

## Iterative Test Fixing Workflow

When tasked with fixing a large number of test failures (especially in isolation mode), adhere to this highly efficient, iterative loop:

**Step 1: The Initial Assessment**
Run the full isolated test suite once to generate the master list of all current failures in `TEST_FAILURES.md`.
```bash
./gradlew -I local-tasks.gradle clean testSelected aggregateTestFailures
```

**Step 2: The Inner Loop (One by One)**
Take the generated list of failures and iterate through it **one test at a time**.
For *each* individual test (or closely related group of tests in the same class) on the list:
1. Investigate the specific failure.
2. Apply a targeted code fix.
3. Verify the fix by running **only that single test** to maintain a fast feedback loop. Do NOT rerun the entire suite.
```bash
./gradlew :<module_name>:test --tests "<fully_qualified_class_name>.<test_method_name>"
```
4. Once that single test passes locally, move on to the *next* failing test on the list and repeat the process.

**Step 3: The Outer Loop (Full Verification)**
Only after you have gone through the entire list and fixed every test *individually* in the inner loop, run the full aggregated suite again to verify no regressions were introduced and to update the master list.
```bash
./gradlew -I local-tasks.gradle clean testSelected aggregateTestFailures
```

**Step 4: Iterate**
If the full suite reveals any new or remaining failures in `TEST_FAILURES.md`, repeat the entire process starting from Step 2, continuing until the final aggregated run produces zero failures.

---

## Interpreting Failures

Each row in the table gives you:
Expand Down Expand Up @@ -186,3 +248,34 @@ Gradle writes JUnit XML test results to:
```

`aggregateTestFailures` scans all these directories automatically.

# Iterative Test Fixing Workflow

When tasked with fixing a large number of test failures (especially in isolation mode), adhere to this highly efficient, iterative loop:

**Step 1: The Initial Assessment**
Run the full isolated test suite once to generate the master list of all current failures in `TEST_FAILURES.md`.
```bash
./gradlew -I local-tasks.gradle clean testSelected aggregateTestFailures
```

**Step 2: The Inner Loop (One by One)**
Take the generated list of failures and iterate through it **one test at a time**.
For *each* individual test (or closely related group of tests in the same class) on the list:
1. Investigate the specific failure.
2. Apply a targeted code fix.
3. Verify the fix by running **only that single test** to maintain a fast feedback loop. Do NOT rerun the entire suite.
```bash
./gradlew :<module_name>:test --tests "<fully_qualified_class_name>.<test_method_name>"
```
4. Once that single test passes locally, move on to the *next* failing test on the list and repeat the process.

**Step 3: The Outer Loop (Full Verification)**
Only after you have gone through the entire list and fixed every test *individually* in the inner loop, run the full aggregated suite again to verify no regressions were introduced and to update the master list.
```bash
./gradlew -I local-tasks.gradle clean testSelected aggregateTestFailures
```

**Step 4: Iterate**
If the full suite reveals any new or remaining failures in `TEST_FAILURES.md`, repeat the entire process starting from Step 2, continuing until the final aggregated run produces zero failures.

10 changes: 9 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export GRADLE_OPTS="-Xms2G -Xmx5G"
11. **Every code touch must update all tests for the changed class** - When a class is modified, find and update every test that covers it — unit, integration, and TCK. Do not leave any existing test out of sync with the new code.
12. **Clean violations before commit** - Before every automated commit, run `./gradlew clean aggregateStyleViolations test aggregateTestFailures --continue` from the root and ensure that `CHECKSTYLE_VIOLATIONS.md`, `CODENARC_VIOLATIONS.md`, `PMD_VIOLATIONS.md`, and `TEST_FAILURES.md` report no issues and are removed.
13. **Mandatory test coverage** - Any class touched in a commit MUST be covered with tests that verify all behavior. You must run ALL tests in the affected module(s) and ensure they pass before committing.
14. **NEVER delete `local*` files and DO NOT remove values** - Files prefixed with `local` (e.g., `local.properties`, `local-tasks.gradle`) must NEVER be deleted. When modifying these files, NEVER remove existing values; instead, comment them out and append new values to maintain history and prevent loss of local configuration.

## Available Skills

Expand Down Expand Up @@ -267,6 +268,11 @@ See `CONTRIBUTING.md` for full details.
| Deprecation details | `./gradlew <task> --warning-mode all` |


## Local Configuration

- **Local File Preservation**: NEVER delete files prefixed with `local` (e.g., `local.properties`, `local-tasks.gradle`). These files are used for local developer overrides and environment-specific tasks and must be maintained.
- **Commenting over Deletion**: When instructed to modify any `local*` files or similar configuration files, DO NOT delete the existing lines. Instead, comment out the old entries and append the new ones. This ensures a traceable history of local configuration changes.

### Reporting Vulnerabilities

Please see the page of the [ASF Security Team](https://www.apache.org/security/) for further information and contact information.
Expand All @@ -278,4 +284,6 @@ Please see the page of the [ASF Security Team](https://www.apache.org/security/)
- **Spock 2.3 Docs**: https://spockframework.org/spock/docs/2.3/all_in_one.html
- **GORM Docs**: https://grails.apache.org/docs/latest/grails-data/
- **Issues**: https://github.com/apache/grails-core/issues
- **Slack**: https://grails.slack.com

## Agent Commit Policy
When committing changes assisted by an AI agent, you MUST include a note in the commit message stating that the agent acted as a collaborator and that the user (borinquenkid) is the primary author and remains responsible for the changes. Do not present the agent as the sole author of the code.
Loading
Loading