Skip to content

Chore: [AEA-5673] - Vector clock removal#121

Merged
originalphil merged 3 commits intomainfrom
aea-5673-remove-vector-clocks
Apr 2, 2026
Merged

Chore: [AEA-5673] - Vector clock removal#121
originalphil merged 3 commits intomainfrom
aea-5673-remove-vector-clocks

Conversation

@originalphil
Copy link
Copy Markdown
Collaborator

Summary

  • Routine Change

Details

Replace vectorClock attribute with inDatastore attribute to indicate existence of an item in the datastore.

Copilot AI review requested due to automatic review settings April 1, 2026 13:08
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-5673

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the legacy vectorClock attribute from update/logging flows and replaces it with an inDatastore boolean intended to represent whether a record already exists in the datastore, aligning interactions and tests with the new flag.

Changes:

  • Replaced vectorClock with inDatastore across interaction logging and record/document “to store” payloads.
  • Updated DynamoDB datastore record-return shape to include inDatastore: True instead of a placeholder vector clock.
  • Updated unit tests to assert against the new inDatastore field.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/interactions/updates_test.py Updates smart-update tests to pass inDatastore instead of vectorClock.
tests/common/dynamodb_datastore_test.py Adjusts expected returned-record shape to include inDatastore.
src/eps_spine_shared/interactions/updates.py Updates EPS0126a/EPS0127a log payloads to emit inDatastore.
src/eps_spine_shared/interactions/create_prescription.py Updates EPS0139 log payload to emit inDatastore.
src/eps_spine_shared/interactions/common.py Replaces vectorClock usage with inDatastore for store-prep and chooses blind vs smart update using inDatastore.
src/eps_spine_shared/common/dynamodb_datastore.py Returns records with inDatastore: True instead of a synthetic vector clock.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/interactions/updates_test.py
Comment thread tests/interactions/updates_test.py
Comment thread tests/interactions/updates_test.py
Comment thread tests/interactions/updates_test.py Outdated
Comment thread src/eps_spine_shared/interactions/common.py Outdated
Comment thread src/eps_spine_shared/interactions/common.py
@sonarqubecloud

This comment was marked as off-topic.

@originalphil originalphil merged commit 6df3b29 into main Apr 2, 2026
12 of 13 checks passed
@originalphil originalphil deleted the aea-5673-remove-vector-clocks branch April 2, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants