Skip to content

test(hub): stabilize share expiration fixture - #306

Merged
alliscode merged 1 commit into
build/hub/newfrom
alliscode-fix-share-expiration-test
Nov 19, 2026
Merged

alliscode merged 1 commit into
build/hub/newfrom
alliscode-fix-share-expiration-test

Conversation

@alliscode

Copy link
Copy Markdown
Contributor

Why

The share-link expiration repository test depended on the wall clock. Its shortened expiration eventually became earlier than the row creation time, so PostgreSQL correctly rejected the update under the existing expiration constraint.

What changes

The fixture now sets an explicit creation time and derives its original, shortened, and stale expirations from that time. The production constraint and the stale-update assertion remain unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alliscode
alliscode requested review from a team and nshki as code owners November 19, 2026 20:40
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 20:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The review found no active issues, and the test-only change deterministically fixes the fixture without altering production behavior or existing assertions.

No open issues 🎉

What changed in this PR

This test-only Hub change makes the share-link expiration repository fixture deterministic by removing its dependence on the wall clock while preserving the existing expiration constraint and stale-update behavior.

Changes:

  • Sets an explicit share-link creation timestamp.
  • Derives original, shortened, and stale expirations from that timestamp.
  • Keeps production behavior and assertions unchanged.
File Description
hub/​server/​repositories/​public-sharing/​update-share-link-expirations/​index.db.test.ts Stabilizes the share-link expiration fixture by explicitly setting its creation time and deriving deterministic expiration timestamps.

Review effort: Lite (adaptive)

@alliscode
alliscode merged commit 39657ad into build/hub/new Nov 19, 2026
52 checks passed
@alliscode
alliscode deleted the alliscode-fix-share-expiration-test branch November 19, 2026 20:46
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