Files
coder/coderd/database
Sas Swart 71defbc7ff fix(coderd/agentapi): correctness and validation fixes for boundary log persistence
- Handle nil l.Time by falling back to dbtime.Now() instead of storing
  year-0001 timestamp.
- Wrap matched_rule with NULLIF in InsertBoundaryLogs SQL so empty
  strings are stored as NULL, preserving IS NULL query semantics.
- Make ensureSession check for sql.ErrNoRows specifically; transient DB
  errors, auth failures, and context cancellation no longer fall through
  to an unnecessary INSERT attempt.
- Add maxBoundaryLogsPerBatch (1000) limit to reject oversized batches
  that could cause unbounded memory allocation or query timeouts.
- Return early on empty req.Logs to avoid unnecessary session creation
  and DB round-trips.
2026-06-02 09:31:58 +00:00
..
2026-06-02 09:16:27 +00:00