Skip to content

feat(checkin): authoritatively enforce real-time timestamp when manualLocation is disabled - #76

Merged
lucas-matw-unq merged 1 commit into
mainfrom
feature/enforce-manual-location-server-side
Oct 3, 2026
Merged

lucas-matw-unq merged 1 commit into
mainfrom
feature/enforce-manual-location-server-side

Conversation

@lucas-matw-unq

Copy link
Copy Markdown
Collaborator

Summary of Changes

  • Authoritative Server-side Enforcement: In CheckinService.create, when project.manualLocation === false (deferred check-ins disabled), the server overrides checkin.date with real-time new Date(). This guarantees that arbitrary, retroactive or client-manipulated submission timestamps cannot bypass project configuration, aligning with the rule defined in AGENTS.md ("Backend as Authoritative Source of Truth").
  • Unit Tests: Added unit test coverage in checkin.service.spec.ts verifying that:
    • When manualLocation: false, submitted custom timestamps are replaced with the server's real-time timestamp.
    • When manualLocation: true, submitted custom timestamps are preserved.

@lucas-matw-unq
lucas-matw-unq merged commit 832a7b9 into main Oct 3, 2026
2 checks passed
@lucas-matw-unq
lucas-matw-unq deleted the feature/enforce-manual-location-server-side branch October 3, 2026 21:49
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.

1 participant