Data format
Comments live under COMMENTS_PATH (default comments/).
One aggregate file per post, not one file per comment: the proxy read would otherwise cost one request per comment.
Post file
When no email is provided, all three email fields are omitted.
Index file
The index is a convenience counter. Reads never depend on it, and it may briefly lag.
Slug rules
- Lowercase letters, digits,
-,_,/ - Starts with a letter or digit
- At most 179 characters
- No
.., no absolute path - A trailing
.jsonis stripped
Concurrency
Writes use the file sha as an optimistic lock. A conflicting approval re-reads and retries a bounded number of times. The index write is independent and never fails the approval.
History is permanent
Deleting a comment removes the current version only. Git history keeps it.
