feat(agents): persist idle_timeout#41
Conversation
Test & Lint Summary
Passed: 0, Failed: 0, Skipped: 0 |
noa-lucent
left a comment
There was a problem hiding this comment.
Clean, well-structured PR. The wiring across migration, store, converter, and server is consistent with existing patterns in the codebase. Good boundary-layer validation and defaulting.
One issue to address: validateDurationString needs a positive-duration check — time.ParseDuration happily accepts negative and zero values, which are semantically invalid for an idle timeout.
Everything else looks good:
- Migration is clean (nullable TEXT column).
- Store types, scan, insert, update all correctly wired with
*string/pgtype.Text. - Converter correctly handles the optional field.
- Default of
"5m"is properly centralized as a named constant. - Update path correctly includes
idle_timeoutin the "at least one field" guard.
Test & Lint Summary
Passed: 0, Failed: 0, Skipped: 0 |
noa-lucent
left a comment
There was a problem hiding this comment.
Positive-duration check is correctly implemented — duration <= 0 rejects both zero and negative values with a clear error message. All prior feedback resolved. Approving.
Summary
Testing
Refs #119