Skip to content

Conversation

@kptdobe
Copy link
Contributor

@kptdobe kptdobe commented Nov 17, 2025

Remove empty version files.

This PR includes #188.

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/storage/version/put.js 91.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kptdobe kptdobe marked this pull request as draft November 17, 2025 15:35
@kptdobe
Copy link
Contributor Author

kptdobe commented Nov 17, 2025

Moved to draft PR to get time to brainstorm.
As @chrischrischris mentioned, we could use the document metadata to store the info represented by those empty version files: who changed something and when. We never store the "what has changed".

@kptdobe
Copy link
Contributor Author

kptdobe commented Nov 18, 2025

If a file is edited a lot, we can have a lot of empty version files - found examples with 250+. And there is no limit.
Another approach could be to have one single history.json file in .da-version/<id>/ that smartly stores the timestamp history (if we want to keep the feature): read history.json, check if last edit was the same user, if yes, replace with current timestamp, if not, add a new entry, write history.json back. But this can be hell in a multi editor context... (high concurrency?)

Copy link
Member

@auniverseaway auniverseaway left a comment

Choose a reason for hiding this comment

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

Seems good to me minus one big question: are "empty version files" different than our audits? I thought audits were basically empty with a few custom metadata properties.

If this is only for true versions, I think this is great. If it's not and this effectively removes audits, we probably need to have a bigger conversation. I'm not opposed to removing audits, but I think we need to discuss as a larger team to decide what replaces them.

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.

3 participants