Background
The current TeaQLRuntimeTest.testSaveGraph only verifies that a mutation executor was called. executeLedgerPlan now performs ordered delete, insert, and update work that is otherwise unprotected.
Scope
Add a recording MutationExecutor and metadata fixtures that verify ledger planning without a database. Related-entity root merging is tracked separately.
Test cases
- Deleted keys produce
DELETE mutation requests.
- New keys with changes produce
SAVE requests for newly created entities.
- Existing keys with changes produce update-style
SAVE requests.
- A key marked deleted is not also inserted or updated.
- Deletes execute before inserts, and inserts before updates.
- Entity types and keys are processed deterministically.
- Root comments are propagated to mutation entities.
- The current change set is cleared after a successful save.
Acceptance criteria
- Assertions inspect recorded mutation requests, not private methods.
- The test uses in-memory stubs only.
- Existing smoke tests remain intact or are strengthened rather than duplicated.
Background
The current
TeaQLRuntimeTest.testSaveGraphonly verifies that a mutation executor was called.executeLedgerPlannow performs ordered delete, insert, and update work that is otherwise unprotected.Scope
Add a recording
MutationExecutorand metadata fixtures that verify ledger planning without a database. Related-entity root merging is tracked separately.Test cases
DELETEmutation requests.SAVErequests for newly created entities.SAVErequests.Acceptance criteria