Skip to content

feat(governance): canonical issue fields + metadata backfill automation#433

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

feat(governance): canonical issue fields + metadata backfill automation#433
ashleyshaw merged 4 commits into
developfrom
codex/issue-fields-governance-rollout

Conversation

@ashleyshaw
Copy link
Copy Markdown
Member

Summary\n- add canonical .github/issue-fields.yml values and docs/ISSUE-FIELDS.md\n- wire project-meta-sync to derive project fields from canonical config\n- add validate-issue-fields CI check and labeling workflow guardrail\n- backfill metadata governance support with audit artefacts for issues/PRs #300+\n\n## Linked issue\n- Closes #431\n\n## Validation\n- npm run validate:issue-fields\n- npm run validate:workflows\n

@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 40 minutes and 3 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: 3e8c30d9-9d80-429c-b0aa-b9551a23d937

📥 Commits

Reviewing files that changed from the base of the PR and between 4e11a3d and dc29788.

⛔ Files ignored due to path filters (1)
  • .github/reports/audits/issues-prs-300plus-metadata.csv is excluded by !**/*.csv
📒 Files selected for processing (12)
  • .github/issue-fields.yml
  • .github/reports/audits/issue-pr-metadata-audit-300plus-2026-05-27.md
  • .github/reports/audits/issues-300plus-snapshot.json
  • .github/reports/audits/prs-300plus-snapshot.json
  • .github/workflows/issue-close-label-hygiene.yml
  • .github/workflows/labeling.yml
  • .github/workflows/project-meta-sync.yml
  • CHANGELOG.md
  • docs/ISSUE-FIELDS.md
  • package.json
  • scripts/agents/includes/derive-project-fields.cjs
  • 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

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 github-actions Bot added area:ci Build and CI pipelines area:dependencies Composer/npm dependency work area:documentation Docs & guides area:scripts Scripts & tooling lang:js JavaScript/TypeScript lang:md Markdown content/docs lang:json JSON config/content status:needs-review Awaiting code review labels May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #433

CI Status:success
Files changed: 12

Recommendations

  • Ready to proceed pending human review

@github-actions github-actions Bot added 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
@ashleyshaw ashleyshaw force-pushed the codex/issue-fields-governance-rollout branch from 5f13eac to 3d0047c Compare May 27, 2026 15:41
@ashleyshaw ashleyshaw added the meta:no-changelog No changelog needed label 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 introduces a canonical issue and PR field model along with supporting automation, audits, and documentation. Key additions include the .github/issue-fields.yml configuration, a documentation guide in docs/ISSUE-FIELDS.md, a script to derive project fields from labels, and a validation script to ensure consistency between the configuration and documentation. Feedback from the review highlights several improvement opportunities: the validation script and documentation currently omit Type labels, which should be added to ensure complete coverage. Additionally, robust defensive checks should be added to both derive-project-fields.cjs and validate-issue-fields.cjs to prevent potential runtime TypeError exceptions when parsing empty or invalid YAML configurations.

Comment on lines +97 to +98
...collectKeys(fieldMappings.Status),
...collectKeys(fieldMappings.Priority),
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 currently checks for the presence of canonical Status and Priority labels in docs/ISSUE-FIELDS.md, but it completely omits the Type labels (e.g., type:bug, type:feature, etc.). To ensure complete documentation coverage, we should add ...collectKeys(fieldMappings.Type) to canonicalDocAnchors. Note that you will also need to update docs/ISSUE-FIELDS.md to document these canonical Type mappings so the validation passes.

    ...collectKeys(fieldMappings.Status),
    ...collectKeys(fieldMappings.Priority),
    ...collectKeys(fieldMappings.Type),

Comment thread docs/ISSUE-FIELDS.md
Comment on lines +56 to +62
Canonical `Priority` label mappings:

- `priority:critical` -> `Critical`
- `priority:important` -> `Important`
- `priority:normal` -> `Normal`
- `priority:minor` -> `Minor`

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 documentation lists the canonical mappings for Status and Priority, but it completely omits the mappings for Type (e.g., type:bug -> Bug, type:feature -> Feature, etc.), even though Type is listed as a synced field. Please add the canonical Type mappings to this document to keep it aligned with .github/issue-fields.yml and to support the validation script once Type validation is enabled.

Canonical `Priority` label mappings:

- `priority:critical` -> `Critical`
- `priority:important` -> `Important`
- `priority:normal` -> `Normal`
- `priority:minor` -> `Minor`

Canonical `Type` label mappings:

- `type:bug` -> `Bug`
- `type:feature` -> `Feature`
- `type:documentation` -> `Documentation`
- `type:task` -> `Task`
- `type:chore` -> `Task`
- `type:test` -> `Task`
- `type:maintenance` -> `Task`
- `type:security` -> `Task`
- `type:performance` -> `Task`
- `type:a11y` -> `Task`
- `type:design` -> `Task`
- `type:integration` -> `Task`
- `type:release` -> `Task`
- `type:automation` -> `Task`
- `type:qa` -> `Task`
- `type:ai-ops` -> `Task`
- `type:audit` -> `Task`
- `type:research` -> `Task`
- `type:compatibility` -> `Task`
- `type:epic` -> `Task`
- `type:question` -> `Task`
- `type:support` -> `Task`
- `type:content-modelling` -> `Task`
- `type:story` -> `Task`
- `type:improve` -> `Task`
- `type:review` -> `Task`

? path.resolve(process.env.ISSUE_FIELDS_CONFIG)
: path.resolve(".github/issue-fields.yml");

const cfg = readConfig(configPath);
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

If the configuration file .github/issue-fields.yml is empty or invalid, yaml.load(raw) can return null or undefined. In that case, accessing cfg.project_field_mappings on line 37 will throw a TypeError: Cannot read properties of null. We should add a defensive check to ensure cfg is a valid object before proceeding.

  const cfg = readConfig(configPath);
  if (!cfg || typeof cfg !== "object") {
    console.error("Error: Invalid or empty configuration file.");
    process.exit(1);
  }

Comment on lines +46 to +47
const cfg = parseYaml(cfgRaw);
if (!cfg) return;
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

If .github/issue-fields.yml contains a non-object value (like a plain string or number), parseYaml will return that value. The check if (!cfg) return; will pass, but the subsequent 'version' in cfg check on line 51 will throw a TypeError: Cannot use 'in' operator to search for 'version' in .... We should strengthen the defensive check to ensure cfg is a plain object and not an array.

  const cfg = parseYaml(cfgRaw);
  if (!cfg || typeof cfg !== 'object' || Array.isArray(cfg)) {
    fail('Configuration must be a YAML object');
    return;
  }

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f13eacf97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/issue-fields.yml
Comment on lines +37 to +39
type:task: Task
type:chore: Task
type:test: Task
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Map build labels before deriving project Type

For build/* or ci/* PRs, the unified labeler applies type:build from .github/labeler.yml, and derive-project-fields.cjs now only emits a project Type when the label exists in this canonical Type mapping. Because type:build is omitted here, those PRs produce an empty type= and update-project-fields receives a blank Type value, regressing the previous workflow logic that mapped build/* branches to Task. Please include type:build in the canonical mapping so build/CI PRs keep a project Type.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #433

CI Status:success
Files changed: 12

Recommendations

  • Ready to proceed pending human review

@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 #433

CI Status:success
Files changed: 13

Recommendations

  • Ready to proceed pending human review

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #433

CI Status:success
Files changed: 13

Recommendations

  • Ready to proceed pending human review

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #433

CI Status:success
Files changed: 13

Recommendations

  • Ready to proceed pending human review

@ashleyshaw ashleyshaw merged commit a16fb64 into develop May 27, 2026
12 checks passed
@ashleyshaw ashleyshaw deleted the codex/issue-fields-governance-rollout branch May 27, 2026 15:47
@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:ci Build and CI pipelines area:dependencies Composer/npm dependency work area:documentation Docs & guides area:scripts Scripts & tooling lang:js JavaScript/TypeScript lang:json JSON config/content 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.

[Documentation] Implement canonical issue field values & enforce metadata consistency (#300+)

1 participant