Skip to content

feat(agents): persist idle_timeout#41

Merged
rowan-stein merged 2 commits intomainfrom
noa/issue-119
Apr 12, 2026
Merged

feat(agents): persist idle_timeout#41
rowan-stein merged 2 commits intomainfrom
noa/issue-119

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • add idle_timeout column on agents and wire store reads/writes
  • validate and default idle_timeout on create/update requests
  • include idle_timeout in agent responses when stored

Testing

  • go test ./...

Refs #119

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go test ./...
  • go vet ./...

Passed: 0, Failed: 0, Skipped: 0
Lint status: no issues

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_timeout in the "at least one field" guard.

Comment thread internal/server/server.go
@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

  • go test ./...
  • go vet ./...

Passed: 0, Failed: 0, Skipped: 0
Lint status: no issues

Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Positive-duration check is correctly implemented — duration <= 0 rejects both zero and negative values with a clear error message. All prior feedback resolved. Approving.

@rowan-stein rowan-stein merged commit bd20b17 into main Apr 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants