Skip to content

feat(governance): formalise issue fields v2 model and validation#437

Merged
ashleyshaw merged 2 commits into
developfrom
codex/issue-fields-governance-rollout-v2
May 27, 2026
Merged

feat(governance): formalise issue fields v2 model and validation#437
ashleyshaw merged 2 commits into
developfrom
codex/issue-fields-governance-rollout-v2

Conversation

@ashleyshaw
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@ashleyshaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: c6b119b5-7a76-4c44-99bb-80b1603c566f

📥 Commits

Reviewing files that changed from the base of the PR and between 404de18 and 978e41d.

📒 Files selected for processing (4)
  • .github/issue-fields.yml
  • CHANGELOG.md
  • docs/ISSUE-FIELDS.md
  • scripts/validation/validate-issue-fields.cjs

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized keys: "auto_labels", "auto_assign", "auto_review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-fields-governance-rollout-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #437

CI Status:success
Files changed: 3

Recommendations

  • Ready to proceed pending human review

@mergify
Copy link
Copy Markdown

mergify Bot commented May 27, 2026

⚠️ The sha of the head commit of this PR conflicts with #435. Mergify cannot evaluate rules on this PR. Once #435 is merged or closed, Mergify will resume processing this PR. ⚠️

@github-actions github-actions Bot added area:documentation Docs & guides area:scripts Scripts & tooling lang:md Markdown content/docs status:needs-review Awaiting code review priority:normal Default priority type:chore Chore / small hygiene change type:bug Bug or defect meta:needs-changelog Requires a changelog entry before merge labels May 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the canonical issue and project field configuration to version 2, introducing organization-level issue fields (such as custom fields for Domain, Team, and Effort) and project-specific iteration settings. It also updates the corresponding documentation and the validation script to enforce these new schemas. Feedback on these changes highlights a potential crash in the validation script if custom fields are malformed or missing options, and recommends documenting the mentioned migration procedures in a central /docs/MIGRATION.md file.

Comment on lines +125 to +144
const keySet = new Set(customFields.map((f) => f.key));
for (const key of requiredCustomKeys) {
if (!keySet.has(key)) fail(`Missing required custom field definition: ${key}`);
}

const validTypes = new Set(['single_select', 'number', 'date', 'text']);
for (const field of customFields) {
if (!field.key || typeof field.key !== 'string') fail('Each custom field requires a string key');
if (!field.type || !validTypes.has(field.type)) {
fail(`Custom field "${field.key || 'unknown'}" has invalid type "${field.type}"`);
}
if (field.type === 'single_select') {
if (!Array.isArray(field.options) || field.options.length === 0) {
fail(`Single select custom field "${field.key}" must include options`);
}
if (field.options.length > 50) {
fail(`Single select custom field "${field.key}" exceeds 50 options`);
}
}
}
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.

medium

The validation script does not safely handle cases where elements of customFields are null or not objects. If a custom field is malformed (e.g., defined as null or a primitive value in the YAML), calling f.key or accessing field.key / field.type will throw a TypeError and crash the validation process instead of failing gracefully with a clean error message.

Additionally, because fail does not stop execution, if field.options is undefined or not an array, checking field.options.length on line 140 will throw a TypeError and crash the script.

We should safely map the keys and check that each field is a valid object before accessing its properties, and use else if to avoid evaluating length on non-arrays.

    const keySet = new Set(customFields.map((f) => f && typeof f === 'object' ? f.key : undefined));
    for (const key of requiredCustomKeys) {
      if (!keySet.has(key)) fail(`Missing required custom field definition: ${key}`);
    }

    const validTypes = new Set(['single_select', 'number', 'date', 'text']);
    for (const field of customFields) {
      if (!field || typeof field !== 'object') {
        fail('Each custom field must be an object');
        continue;
      }
      if (!field.key || typeof field.key !== 'string') {
        fail('Each custom field requires a string key');
        continue;
      }
      if (!field.type || !validTypes.has(field.type)) {
        fail(`Custom field "${field.key}" has invalid type "${field.type}"`);
        continue;
      }
      if (field.type === 'single_select') {
        if (!Array.isArray(field.options) || field.options.length === 0) {
          fail(`Single select custom field "${field.key}" must include options`);
        } else if (field.options.length > 50) {
          fail(`Single select custom field "${field.key}" exceeds 50 options`);
        }
      }
    }

Comment thread .github/issue-fields.yml
Comment on lines +180 to +183
operational_guidance:
- Keep issue and project fields aligned; labels remain automation fallback.
- Renaming custom fields is allowed; update this YAML + docs + validators in same PR.
- Deleting custom fields requires migration of existing data and view updates first.
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.

medium

To ensure contributors can easily follow migration rules across the repository, please document these migration notes and procedures in a central /docs/MIGRATION.md file as per our general guidelines.

References
  1. Document migration maps and notes in a central /docs/MIGRATION.md file to ensure contributors can follow migration rules mentioned in README files across the repository.

@ashleyshaw ashleyshaw marked this pull request as ready for review May 27, 2026 16:31
@ashleyshaw ashleyshaw added the meta:no-changelog No changelog needed label May 27, 2026
@github-actions github-actions Bot removed the type:chore Chore / small hygiene change label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #437

CI Status:pending
Files changed: 4

Recommendations

  • CI checks not green

@ashleyshaw ashleyshaw merged commit cc5a8d2 into develop May 27, 2026
12 checks passed
@ashleyshaw ashleyshaw deleted the codex/issue-fields-governance-rollout-v2 branch May 27, 2026 16:33
@ashleyshaw ashleyshaw restored the codex/issue-fields-governance-rollout-v2 branch May 27, 2026 16:46
@ashleyshaw ashleyshaw deleted the codex/issue-fields-governance-rollout-v2 branch May 27, 2026 19:43
@ashleyshaw ashleyshaw removed the meta:no-changelog No changelog needed label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:documentation Docs & guides area:scripts Scripts & tooling lang:md Markdown content/docs meta:needs-changelog Requires a changelog entry before merge priority:normal Default priority status:needs-review Awaiting code review type:bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant