Exercise 2: What addedAt == request.time Actually Enforces — Possible Solution ==================================================================== WHAT IT VERIFIES ------------------------------ `request.resource.data.addedAt == request.time` checks that the addedAt value in the document being written exactly matches request.time, which represents Firestore's own server clock at the moment the write is evaluated. A client that used Firestore's serverTimestamp() sentinel for addedAt will have that value resolve to exactly the server's current time when the write is processed, satisfying this check automatically. A client that instead sent its own locally-generated Date value would almost certainly NOT match the server's exact evaluation-time timestamp, and the write would be rejected. WHICH EARLIER RECOMMENDATION THIS NOW ENFORCES ------------------------------ Chapter 5's own tip-box recommended using serverTimestamp() for addedAt instead of a client-generated new Date(), specifically so the recorded time couldn't be wrong or manipulated by an untrustworthy client clock. That was only a recommendation in Chapter 5 - nothing stopped a client from ignoring it and sending its own Date value anyway. This chapter's rule turns that recommendation into an actual requirement: any write that doesn't use serverTimestamp() for addedAt now fails outright, rather than merely being discouraged. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that the rule compares the submitted addedAt against the server's own evaluation-time clock, correctly identifies that only a genuine serverTimestamp() value can satisfy this, and correctly connects this back to Chapter 5's own serverTimestamp() recommendation as the thing now being actually enforced rather than merely suggested.