Skip to content

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

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

fix(#1957): align optional project number inputs#7057
shairevivo wants to merge 5 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

Installation-mode context

reusable-prioritize.yml serves both the supported per-repo installation path,
where prioritize.yml is a thin caller, and the deprecated per-org installation
chain described by ADR 0044.
This change updates the shared input contract for both paths; it does not add new
per-org functionality, and 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 are running

Authorization passed for this commit. See the E2E Tests workflow for results.

@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 (0) 📜 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 ✓ Resolved 📘 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 tweak Display preferences with a live preview to see your comment before it ships

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://446ab2c4-site.fullsend-ai.workers.dev

Commit: d9bc26ed0155341993610b3e655940903dd5e499

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[MEDIUM] PR description's added deprecation framing contradicts the repo's own workflow-contracts.md

In response to the qodo bot's review comment, the PR description was updated to add a "Deprecated installation-mode context" section claiming reusable-prioritize.yml "is retained for compatibility with the deprecated per-org installation chain" (ADR 0044) and that the change "does not add new per-org functionality; it keeps the remaining contract compatible while per-repo remains the supported installation model."

This is contradicted by docs/contributing/workflow-contracts.md itself (verified on the PR head at 9a18f12), which states an explicit, named exception: "Exception: prioritize.yml is installed per-repo as a thin caller that receives workflow_dispatch from the org-level scheduler and calls reusable-prioritize.yml directly, bypassing the dispatch shim." So reusable-prioritize.yml's contract is live for the supported per-repo installation path too, not merely a deprecated per-org compatibility shim as the (already-revised) PR description now claims.

This is a new inaccuracy introduced by the fix-round reply, not something the existing qodo/human comment thread caught or addressed — that thread only asked for deprecation context to be added, and got an added-but-incorrect explanation.

Suggestion: correct the PR description's deprecation section to note that reusable-prioritize.yml also serves the supported per-repo prioritize.yml thin-caller path per workflow-contracts.md's documented exception, so reviewers don't underweight the blast radius of this contract change to a mix of "deprecated-only" cleanup.

Comment thread internal/scaffold/workflow_call_alignment_test.go
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Shai Revivo <srevivo@redhat.com>
@ralphbean

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 8, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 8:37 PM UTC · Completed 8:56 PM UTC

Commit: d9bc26e · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.85

@ralphbean ralphbean added the ok-to-test Allow e2e CI to run after maintainer review (must be re-applied after each push) label Sep 8, 2026
@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Sep 8, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Focused bug fix aligning an optional workflow input across 3 files with tests present; CI workflow change and active multi-author hotspot files add some risk, but the narrow scope, clear issue linkage, and good test ratio keep this at moderate.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [scope-gap] .github/workflows/reusable-prioritize.yml:142 — Issue Fix project_number required/optional mismatch between reusable-prioritize.yml and reusable-dispatch.yml #1957 authorized an early-exit guard for empty project_number. No such guard appears in any changed file. However, reusable-dispatch.yml already declared project_number as optional, meaning the agent/post-script already handles empty values via that path. The docs describe the conditional behavior with high specificity, suggesting the guard pre-exists.
    Remediation: Confirm the early-exit guard exists in the post-script before merging.

  • [API shape patterns] internal/scaffold/workflow_call_alignment_test.go:414assert.True(t, strings.Contains(s, ...)) is used for a substring containment check, inconsistent with the established assert.Contains(t, s, ...) idiom. The assert.True form produces less helpful failure output.
    Remediation: Replace with assert.Contains(t, s, "PRIORITIZE_PROJECT_NUMBER: ${{ inputs.project_number }}", "prioritize job should thread project_number to PRIORITIZE_PROJECT_NUMBER env var")

  • [stale-description] docs/agents/README.md:17 — The agent summary "Scores issues using the RICE framework for project board ranking" implies a project board is always involved. The PR makes project board integration optional but does not update this one-liner to match the changes in prioritize.md.
    Remediation: Update to: | [Prioritize](prioritize.md) | Scores issues using the RICE framework; updates project board ranking when configured |


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • .github/workflows/reusable-prioritize.yml (file-level): Line 142 · [low] scope-gap

Issue #1957 authorized an early-exit guard for empty project_number. No such guard appears in any changed file. However, reusable-dispatch.yml already declared project_number as optional, meaning the agent/post-script already handles empty values via that path. The docs describe the conditional behavior with high specificity, suggesting the guard pre-exists.

Suggested fix: Confirm the early-exit guard exists in the post-script before merging.

  • internal/scaffold/workflow_call_alignment_test.go (file-level): Line 414 · [low] API shape patterns

assert.True(t, strings.Contains(s, ...)) is used for a substring containment check, inconsistent with the established assert.Contains(t, s, ...) idiom. The assert.True form produces less helpful failure output.

Suggested fix: Replace with: assert.Contains(t, s, "PRIORITIZE_PROJECT_NUMBER: ${{ inputs.project_number }}", "prioritize job should thread project_number to PRIORITIZE_PROJECT_NUMBER env var")

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Allow e2e CI to run after maintainer review (must be re-applied after each push) risk/moderate PR risk: moderate

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

3 participants