Skip to content

GH : 443 | Invalidating attributes after the given startTime and endTime period#467

Open
yasandu0505 wants to merge 7 commits intoLDFLK:mainfrom
yasandu0505:attribute/save-relation-endtime
Open

GH : 443 | Invalidating attributes after the given startTime and endTime period#467
yasandu0505 wants to merge 7 commits intoLDFLK:mainfrom
yasandu0505:attribute/save-relation-endtime

Conversation

@yasandu0505
Copy link
Copy Markdown
Member

@yasandu0505 yasandu0505 commented Mar 25, 2026

  • EndTime accepted saved for the attribute node as well as the relationship with the parent node
  • restrict StartTime to have a valid time stamp
  • Tests added to core and read
  • Tests fixed(updated) on read api and ingestion api

this PR closes #443 #471

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces temporal validity to attributes and their relationships within the system. By incorporating endTime into attribute processing and graph metadata, attributes can now be automatically invalidated after a specified period. This enhancement allows for more precise management of attribute lifecycles and ensures that historical or time-bound data is accurately represented and queried.

Highlights

  • Temporal Attribute Validity: The handleAttributeLookUp function signature was updated to accept an endTime parameter, enabling time-based attribute invalidation.
  • Attribute Metadata Enhancement: The AttributeMetadata structure was extended to store the EndTime for attributes.
  • Graph Node Termination: The attribute node's Terminated field in the graph was populated using the provided EndTime, marking its validity period.
  • Relationship Temporal Scope: The IS_ATTRIBUTE relationship between an entity and its attribute now includes an EndTime, defining the relationship's temporal validity.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@yasandu0505 yasandu0505 removed the request for review from vibhatha March 25, 2026 10:36
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request extends the attribute processing logic to include an EndTime for attributes, allowing for more precise time-based tracking. The changes involve parsing EndTime from input values, updating the handleAttributeLookUp function and AttributeMetadata to incorporate this new field, and utilizing it to set the Terminated field in the attribute lookup graph and the EndTime for IS_ATTRIBUTE_RELATIONSHIP in the graph metadata manager. Feedback indicates that error handling for time.Parse of both StartTime and EndTime should be made explicit to prevent silent failures. Additionally, it's recommended to check if metadata.EndTime is a zero value before formatting it, to avoid ambiguous "0001-01-01T00:00:00Z" timestamps and maintain the previous behavior of using an empty string when no end time is specified for Terminated and relationship EndTime fields.

@vibhatha
Copy link
Copy Markdown
Member

@zaeema-n why do we have a mix of EndTime and Terminated

@yasandu0505 yasandu0505 force-pushed the attribute/save-relation-endtime branch from fd9cb22 to 0bce040 Compare March 30, 2026 04:34
@yasandu0505
Copy link
Copy Markdown
Member Author

@zaeema-n why do we have a mix of EndTime and Terminated

I already fixed that

@yasandu0505 yasandu0505 requested a review from zaeema-n March 31, 2026 13:28
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.

[ATTRIBUTES] Relation to attribute name does not save an end time

4 participants