[P1][journal] Unifier ouverture sûre, encodage validé et borne stricte #13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Constat
Le journal suit un symlink ou peut bloquer sur un FIFO (
internal/events/journal.go:63-81,:126-144). Il sérialise sansEvent.Validate(:173-181) et écrit même si rotation/stat échoue ou si une ligne dépasseMaxBytes(:182-192). Trois chemins distincts contournent donc le contrat du journal.Tâche
Ramener l'écriture à un append unique: ouverture
O_NOFOLLOWnon bloquante avecfstatregular/EUID/nlink/mode, encodage JSONL canonique validé, puis refus d'écriture si la borne ne peut être garantie.Critères d'acceptation
Event.Validate.MaxBytes, même si rotation échoue.Validation
go test -race -count=50 ./internal/events ./internal/sessionCorrectif proposé et validé dans la PR #44 : #44.