Skip to content

[plan] Fix expires field schema-implementation mismatch #7198

@github-actions

Description

@github-actions

Overview

This tracking issue addresses the schema documentation issue discovered in Discussion #7174 where the expires field pattern advertises hour support but the implementation doesn't provide it.

Source: Discussion #7174

Problem

The schema pattern ^[0-9]+[hHdDwWmMyY]$ includes h and H for hours, but the parseRelativeTimeSpec() function in pkg/workflow/config_helpers.go only handles d, w, m, y.

Impact:

  • User writes expires: "20h" → Passes schema validation ✓
  • Runtime processes it → Rejects with "Invalid expires time spec unit" ✗
  • Function returns 0 → Expires field effectively disabled
  • Inconsistent UX: schema says valid but fails at runtime

Affected Components

  • Schema: pkg/parser/schemas/main_workflow_schema.json
  • Code: pkg/workflow/config_helpers.go
  • All safe-outputs configurations (issues, discussions, comments, etc.)

Planned Tasks

  1. Update schema pattern to remove hour support
  2. Rebuild binary with updated schema
  3. Add test coverage for expires field validation
  4. Update documentation if needed

Decision

Following the discussion recommendation, we'll update the schema pattern (simpler than adding hours support) since the expires feature is for managing long-lived issues/discussions where hour-level granularity isn't necessary.

AI generated by Plan Command for discussion #7174

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions