Skip to content

test(runtime): verify saveGraph ledger classification and execution order #27

Description

@philipgreat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavaPull requests that update java code

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions