Files
gosentry/docs/STANDARDS.md
T
mixeme e85cbc4eb1 feat: make per-job timeout 0 mean "no timeout" instead of inherit
A per-job timeout now has three distinct states: unset inherits the global
default, an explicit 0 means no timeout and does not inherit, and a positive
value is the per-job limit. Job.TimeoutSeconds became *int so unset and 0 stay
distinguishable in jobs.json.

Also fixes the global default, which could not persist a 0. loadOrCreateConfig
normalized DefaultTimeoutSeconds <= 0 back to 30 on every read of an existing
gosentry.json, so "no timeout" only held until the next restart. The field is
now written unconditionally (no omitempty) and read back as-is.

Existing jobs and configs are unaffected: a job with no timeout_seconds still
inherits, and a saved global default of 30 stays 30.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 22:44:30 +03:00

1.5 KiB

GoSentry — Standards

Quality rules and intentional behavior for contributors. Package contracts live in ARCHITECTURE.md; test conventions in TESTS.md.

Code quality

  • Follow package contracts in ARCHITECTURE.md.
  • User-facing errors → dialog.ShowError or a History event, never a silent return.
  • Pure helpers → unit test in the same package.
  • Fixes with severity ≥ medium → regression test.
  • Documented intentional behavior → section below, not a backlog bug.
  • UI view constructors accept *app.Service; call app.Open() only from run.go.

Intentional behavior (not bugs)

  • RunNow is allowed during global pause and for disabled jobs.
  • Sequential mode runs jobs FIFO by order in jobs.json.
  • Scheduler tick is 1s — sub-second @every intervals are not supported.
  • Command timeout defaults to no timeout globally (Config.DefaultTimeoutSeconds = 0) and is overridable per job (Job.TimeoutSeconds *int: unset = inherit the global default, 0 = no timeout, positive = seconds). Neither zero may be normalized away on load — 0 is a value, not a missing field.
  • History tab is session-only. JobRuntime.Logs exists only in memory for the current process. Log files on disk feed aggregate statistics via SeedStats only. See ARCHITECTURE.md.

Out of scope

Larger or blocked work is tracked in ROADMAP.md (window size persistence, History column filters, CI coverage gate).