Skip to content

fix(#1957): align optional project number inputs - #7057

Open
shairevivo wants to merge 4 commits into
fullsend-ai:mainfrom
shairevivo:srevivo/1957-project-number-contract
Open

fix(#1957): align optional project number inputs#7057
shairevivo wants to merge 4 commits into
fullsend-ai:mainfrom
shairevivo:srevivo/1957-project-number-contract

Conversation

@shairevivo

@shairevivo shairevivo commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Make project_number optional for prioritize workflows so comment-only RICE
runs work when no GitHub Projects board is configured. Update the prioritize
agent documentation to explain that behavior.

Related Issue

Fixes #1957

Changes

  • declare an empty default for project_number in both reusable workflow contracts
  • keep dispatch environment forwarding aligned with the optional input
  • document that the RICE comment is still posted when board updates are skipped

Deprecated installation-mode context

reusable-prioritize.yml is retained for compatibility with the deprecated
per-org installation chain described by ADR 0044.
This change does not add new per-org functionality; it keeps the remaining
contract compatible while per-repo remains the supported installation model.

Testing

  • make lint passes (changes staged first)
  • go test ./internal/scaffold -run TestProjectNumberInputsAreOptional -count=1
  • Tests added/updated for the modified workflow contracts

Checklist

  • PR title follows Conventional Commits
  • Commits are signed off (DCO)
  • I wrote this contribution myself and can explain all changes in it

Allow runs without a project board while retaining the existing RICE comment.

Signed-off-by: Shai Revivo <srevivo@redhat.com>
Co-authored-by: Codex <noreply@openai.com>
@shairevivo
shairevivo requested a review from a team as a code owner September 6, 2026 13:37
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

1 similar comment
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Align optional project number contracts for prioritize workflows

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Makes the prioritize workflow’s project number optional for comment-only RICE runs.
• Defaults omitted project numbers to an empty string, matching reusable dispatch.
• Expands contract tests to enforce optional inputs and dispatch environment forwarding.
Diagram

graph TD
  T["Contract tests"] -.-> D["Reusable dispatch"] --> A["Prioritize agent"] --> C["RICE comment"]
  T -.-> P["Reusable prioritize"] --> A
  A --> Q{"Project configured?"}
  Q -->|Yes| B["Project board"]
  Q -->|No| C
Loading
High-Level Assessment

The PR’s explicit optional declaration and empty default are the clearest way to align the reusable workflow contracts. Testing both workflows in one table-driven test prevents future drift; relying only on implicit GitHub Actions defaults would make the contract less visible and weaker to validate.

Files changed (2) +20 / -11

Bug fix (1) +2 / -1
reusable-prioritize.ymlMake the project number input optional +2/-1

Make the project number input optional

• Changes 'project_number' from required to optional and assigns an empty-string default. This allows prioritize runs without a GitHub Projects board while preserving comment-only RICE output.

.github/workflows/reusable-prioritize.yml

Tests (1) +18 / -10
workflow_call_alignment_test.goEnforce optional project number contracts across workflows +18/-10

Enforce optional project number contracts across workflows

• Expands the project-number contract test to cover both reusable dispatch and prioritize workflows, asserting optionality and empty defaults. Retains verification that dispatch forwards the value through 'PRIORITIZE_PROJECT_NUMBER'.

internal/scaffold/workflow_call_alignment_test.go

@qodo-code-review

qodo-code-review Bot commented Sep 6, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Users get outdated board guidance ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
project_number is now optional in reusable-prioritize.yml, but docs/agents/prioritize.md still
says the post-script updates the project board directly. When a run omits the input, it follows the
new comment-only path while the agent overview and control-label guidance continue to describe a
mandatory board update.
Code

.github/workflows/reusable-prioritize.yml[R28-30]

+        required: false
        type: string
+        default: ""
Relevance

●●● Strong

Recent accepted precedents consistently require docs updates when user-facing workflow behavior
changes.

PR-#1017
PR-#2473
PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2748504 requires documentation to be updated when user-facing behavior changes. The
workflow makes project_number optional, while the prioritize guide still unconditionally says that
the post-script updates the project board.

Rule 2748504: Update docs when changing CLI behavior or public API
.github/workflows/reusable-prioritize.yml[26-30]
docs/agents/prioritize.md[9-15]
docs/agents/prioritize.md[35-39]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Update the prioritize-agent documentation to explain that the project number is optional and that runs without a project board still produce the RICE comment while skipping the board update.

## Issue Context
The reusable workflow now defaults `project_number` to an empty value, but the user-facing overview and control-label sections still describe every run as updating a project board.

## Fix Focus Areas
- docs/agents/prioritize.md[9-39]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Reviewers miss a deprecated mode change 📘 Rule violation § Compliance
Description
reusable-prioritize.yml changes the input contract of a workflow that still serves the deprecated
per-org chain, while the PR description does not mention that mode or ADR 0044. Reviewers evaluating
this fix therefore receive no explicit deprecation context even though the same contract change
reaches per-org callers.
Code

.github/workflows/reusable-prioritize.yml[R28-30]

+        required: false
        type: string
+        default: ""
Relevance

●● Moderate

Deprecation documentation is accepted, but no close precedent requires PR descriptions to mention
deprecated per-org impact.

PR-#5462
PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2795055 requires any PR touching deprecated per-org functionality to call out that
impact and reference ADR 0044. Repository documentation identifies standalone reusable stage
workflows as serving the per-org chain, but the supplied PR description contains neither the
required deprecation notice nor the ADR reference.

Rule 2795055: Flag and avoid changes to deprecated per-org installation mode content (ADR 0044)
.github/workflows/reusable-prioritize.yml[26-40]
docs/contributing/workflow-contracts.md[8-8]


Grey Divider

Context sources
✅ Compliance rules (platform): 67 rules
Review mode: ⚖️ Balanced: This changes a reusable GitHub Actions workflow input contract and its cross-workflow validation, so a careful review is warranted despite the small, localized diff.

Grey Divider

Tip of the day
💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/reusable-prioritize.yml
Comment thread .github/workflows/reusable-prioritize.yml
@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

shairevivo and others added 2 commits September 7, 2026 14:28
Document comment-only RICE runs and optional board updates.

Record deprecated per-org compatibility context in the PR history.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Shai Revivo <srevivo@redhat.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Site preview

Preview: https://199f6f47-site.fullsend-ai.workers.dev

Commit: 9a18f12bcf16f30701079c530d22dd72115c8cf3

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.

Fix project_number required/optional mismatch between reusable-prioritize.yml and reusable-dispatch.yml

1 participant