Skip to content

feat(config): add GOCLAW_CRON_JOB_TIMEOUT env var override - #1114

Open
nguyennguyenit wants to merge 1 commit into
devfrom
fix/cron-job-timeout-env
Open

feat(config): add GOCLAW_CRON_JOB_TIMEOUT env var override#1114
nguyennguyenit wants to merge 1 commit into
devfrom
fix/cron-job-timeout-env

Conversation

@nguyennguyenit

Copy link
Copy Markdown
Contributor

Summary

  • Add GOCLAW_CRON_JOB_TIMEOUT env var to override cron.job_timeout from config file.
  • Aligns with existing GOCLAW_* env var convention.

Closes #1098.

Test plan

  • go build ./...
  • go test ./internal/config/...
  • Verify GOCLAW_CRON_JOB_TIMEOUT=1h ./goclaw overrides default 10m at runtime.

Closes #1098. Aligns with existing GOCLAW_* env-var convention so deployments
can override cron.job_timeout without modifying config files.
@mrgoonie

Copy link
Copy Markdown
Contributor

Backlog triage note: this is the cleaner merge candidate for GOCLAW_CRON_JOB_TIMEOUT / #1098, but #1099 contains useful env override tests that this PR does not include. Recommended next step before merge: add equivalent tests here or explicitly decide the duplicate test coverage is not needed, then #1099 can be closed.

@mrgoonie

Copy link
Copy Markdown
Contributor

Cron-safe maintainer check: this is a tiny, clean implementation for #1098 and CI is green, but I am not merging it yet because duplicate PR #1099 already carries useful internal/config/config_load_test.go coverage for the same env override.nnDecision: defer / needs consolidationnEvidence:n- This PR only adds envStr("GOCLAW_CRON_JOB_TIMEOUT", &c.Cron.JobTimeout) in internal/config/config_load.go.n- #1099 implements the same override and adds targeted tests for env override, invalid fallback, unset default, and env-over-file precedence.n- CronConfig.JobTimeoutDuration() already has duration/default/invalid parsing tests, but this PR does not directly test the env mapping path.nnNext step: please port the relevant config-load env override tests from #1099 into this cleaner PR, then #1099 can be closed as duplicate and this PR should be mergeable if CI stays green.

@mrgoonie mrgoonie added agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow status:blocked Blocked by external dependency or decision labels Jun 21, 2026

@mrgoonie mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary: This is the right underlying config change, but this PR should not be the merge target as-is because it duplicates the older, more complete PR #1099 for the same issue #1098.

Risk level: Low

Mandatory gates:

  • Duplicate/prior implementation: duplicate found — #1099 already implements GOCLAW_CRON_JOB_TIMEOUT for #1098 and includes focused config-load tests.
  • Project standards: issue found — this PR adds the env mapping but no regression test for env override precedence or duration fallback behavior.
  • Strategic necessity: clear value, but should be consolidated into one PR.
  • CI/checks: green

Findings:

  • Important: Please coordinate with #1099 or close this PR in favor of it. #1099 covers the same env var mapping and also adds tests for env override, invalid duration fallback, unset default, and env-over-file precedence. Keeping two open PRs for the same one-line config surface creates duplicate review/merge risk.
  • Important: If this PR remains the chosen successor, add equivalent tests in internal/config/config_load_test.go before re-review.

Verdict: REQUEST_CHANGES

Next step: either close this PR in favor of #1099, or explicitly supersede #1099 and bring over the regression tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow status:blocked Blocked by external dependency or decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(config): add GOCLAW_CRON_JOB_TIMEOUT env var for configurable cron timeout

2 participants