feat(deletion): Add soft-deletion with recovery and audit trail#212
Open
DAcodedBEAT wants to merge 1 commit into
Open
feat(deletion): Add soft-deletion with recovery and audit trail#212DAcodedBEAT wants to merge 1 commit into
DAcodedBEAT wants to merge 1 commit into
Conversation
- Configurable soft-delete with retention periods - Undelete recovery for accidentally deleted links - DeletedBy audit trail tracking who deleted links - Automatic schema migrations for old databases - /.deleted endpoint for link recovery The soft-deletion pattern provides a foundation for scaling golink across multiple instances with active/passive or active/active deployments. Signed-off-by: Arun Philip <dacodedbeat@gmail.com>
b06e8f0 to
67dae31
Compare
mikeodr
requested changes
Jan 14, 2026
Contributor
mikeodr
left a comment
There was a problem hiding this comment.
Thanks for the PR and the idea.
There's a lot to unpack here:
- Unused code
- Unrelated changes
- Repetitive test code
This PR isn't ready in its current state, please clean it up and simplify.
Contributor
There was a problem hiding this comment.
What or why did the SVG change? It's not called out in the commit description.
Contributor
There was a problem hiding this comment.
There is a bunch of formatting changes unrelated to the update here. Can you clean up the change.
Contributor
There was a problem hiding this comment.
Same here, I'm struggling to parse out formatting changes from updates.
| ) | ||
|
|
||
| // newTestDB creates a new SQLiteDB with a test clock for deterministic time control. | ||
| func newTestDB(t *testing.T, initialTime time.Time) (*SQLiteDB, *tstest.Clock) { |
| t.Errorf("db.LoadStats got %v, want %v", got, want) | ||
| } | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
A lot of these tests look repetitive they can be test case driven.
There is far too many sleeps here slowing up the tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users can safely delete links with a configurable recovery window, and a DeletedBy audit trail tracks who deleted each link. Soft-deletion can also provides a foundation for scaling golink across multiple instances (read: running golink as a tailscale service).
Changes
/.deletedendpoint-deleted-retention,-cleanup-interval