Skip to content

Fix OpenClaw cron timeouts and portable memory permissions#142

Merged
mostlydev merged 2 commits intomasterfrom
issue-140-141-timeout-memory
Apr 15, 2026
Merged

Fix OpenClaw cron timeouts and portable memory permissions#142
mostlydev merged 2 commits intomasterfrom
issue-140-141-timeout-memory

Conversation

@mostlydev
Copy link
Copy Markdown
Owner

@mostlydev mostlydev commented Apr 10, 2026

This pull request introduces two main improvements: (1) it allows the job invocation timeout to be configured via the agents.defaults.timeoutSeconds setting, with robust validation and tests, and (2) it ensures that all files and directories in the portable memory directory have normalized, permissive permissions, also with thorough test coverage.

Job invocation timeout configurability and validation:

  • Added support for configuring the job payload timeoutSeconds via the agents.defaults.timeoutSeconds setting in the resolved configuration, falling back to a default of 300 seconds if not set. The value is parsed and validated to ensure it is a positive integer, with error handling for invalid values. [1] [2] [3] [4]
  • Added tests to verify the default timeout, the use of a configured timeout, and proper error handling for invalid timeout values. [1] [2]

Portable memory permissions normalization:

  • Modified PreparePortableMemory to ensure all files are set to 0666 and directories to 0777 permissions, regardless of their previous state, by adding a normalizePortableMemoryPermissions function.
  • Added a test to confirm that existing files and directories in the portable memory directory are normalized to the correct permissions.

@mostlydev
Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Resolve test ordering conflict in jobs_test.go by keeping both the
configured-timeout tests from this branch and the resolved-timezone
test from master.
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.

1 participant