Skip to content

cron: trim script payload fields in normalize #23

@Arry8

Description

@Arry8

Summary

coercePayload in src/cron/normalize.ts passes kind: "script" payloads through unchanged. Other payload kinds (systemEvent, agentTurn) trim their text fields during normalization. Script payloads should trim command and cwd for consistency.

Problem

Leading/trailing whitespace in command or cwd could cause file-not-found errors or unexpected cwd resolution. Other payload kinds already trim — script should follow the same pattern.

Acceptance Criteria

  • command and cwd fields are trimmed in the script branch of coercePayload
  • Existing tests still pass
  • Optional: unit test for whitespace-padded command

Files Affected

  • src/cron/normalize.ts (~3 lines)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions