Skip to content

feat: TaskFrontmatter.Cluster() accessor - #115

Merged
bborbe merged 2 commits into
masterfrom
feat/task-cluster-field
Oct 20, 2026
Merged

bborbe merged 2 commits into
masterfrom
feat/task-cluster-field

Conversation

@bborbe

@bborbe bborbe commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Adds TaskFrontmatter.Cluster() for the optional cluster frontmatter field (canonical values nukedev, nukeprod, sun; absent or non-string reads as ""). It is documented in the Terminology table of docs/task-flow-and-failure-semantics.md, with Ginkgo tests for absent, string and non-string values. It changes no behaviour; consumers are bborbe/agent-task-executor#82 and the agent-task-controller publish-side filter.

Implemented through dark-factory prompt 238. A follow-up commit reverts three unrelated spec-status flips that the run made.

@bborbe
bborbe marked this pull request as ready for review October 20, 2026 21:07

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot 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.

Based on my review of the changes:

Summary: The Cluster() accessor adds a typed getter for the optional cluster frontmatter field, following the established patterns in the file. The implementation correctly handles absent keys and non-string values by returning "", and tests cover both cases. Documentation and CHANGELOG are updated appropriately.

{
  "verdict": "approve",
  "summary": "The Cluster() accessor is a clean addition following existing patterns. Absent-field and non-string cases are handled correctly and tested. CHANGELOG and docs are updated.",
  "comments": [],
  "concerns_addressed": [
    {
      "concern": "correctness: Cluster() accessor must handle absent field, non-string YAML node, and canonical value validation",
      "disposition": "not-an-issue",
      "detail": "Implementation (agent_task-frontmatter.go:62-65) handles absent field and non-string YAML node by returning empty string. Canonical value validation is not performed, consistent with other accessors like Stage() that also skip validation."
    },
    {
      "concern": "correctness: Tests cover absent, string, and non-string cases per PR description — verify edge case coverage",
      "disposition": "not-an-issue",
      "detail": "agent_task-frontmatter_test.go lines 79-94: tests cover absent key (returns \"\"), string value (\"nukedev\"), and non-string value (42 returns \"\")."
    }
  ]
}

@bborbe
bborbe merged commit df737a6 into master Oct 20, 2026
5 checks passed
@bborbe
bborbe deleted the feat/task-cluster-field branch October 20, 2026 21:18
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