Skip to content

Fix: Declare the Python project type - #294

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-293
Nov 24, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-293

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #293

Authored by an AI agent; human review required
Command Exit
git log --raw --format=%h 965bc9bf55840ed5f6d92277a02ceec638130a9c..HEAD 0
uv run --locked python -m pytest tests -q 0
uvx zizmor --persona auditor --offline .github/workflows/testing.yaml action.yaml 0
prek run --files .github/workflows/testing.yaml README.md action.yaml 0

The github-code-monkey-bot workflow opened this pull request.
Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.

Round 2 of revision, on its base. It set out to fix the failing checks: Test Custom Artefact Name.


What this does

Without artefact_name, the action asks build-metadata-action for the project name in its naming step. Until now it left that action to detect the project type itself, and the detection ranks package.json, go.mod, pom.xml and others above the Python project files. A Python project that also carried one of those files was named after it, and the action looked for the wrong artefact. This change passes project_type: 'python' to the naming step and leaves the choice between pyproject.toml, setup.cfg and setup.py to the Python extractor. The pin is unchanged.

Test Python Project Type, a new job in .github/workflows/testing.yaml, renames its copy of test-python-project to lfreleng-test-python-project-type and builds it under that artefact name. It then writes a package.json naming node-side and runs this action with no artefact_name, so the job fails if the action looks for node-side. The README documents the behaviour.

This round

No code change. The only failing check was Test Custom Artefact Name, which failed with Artifact not found for name: test-python-project-x64. That job uploads the artefact itself and downloads it a few steps later in the same job. Nothing else in the run uploads, overwrites or deletes that name, and this change doesn't touch the job. In round 1 the same error hit Test No Wheels Guard, another untouched job, and that job passed on the next run. This looks like a transient lookup failure in the artefact service, not a defect in the change. I can't reproduce it without running the workflow, so I made no blind fix.

Checks run

  • prek run --files .github/workflows/testing.yaml README.md action.yaml: passed, aislop included
  • uv run --locked python -m pytest tests -q: 59 passed
  • zizmor --persona auditor on testing.yaml and action.yaml: no findings

For the reviewer

Copilot AI 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.

🟡 Changes recommended

The new fixture reuses an artefact name uploaded by the existing tests job, causing the second upload to fail because names are workflow-scoped and overwrite is disabled.

1 open issue
What changed in this PR

This PR addresses #293 by making Python artefact-name resolution ignore competing project markers such as package.json and go.mod.

Changes:

  • Passes project_type: 'python' to the metadata action without changing its pin.
  • Adds a workflow regression test with Python and JavaScript project markers.
  • Documents the explicit Python project type.
File Description
README.md Explains how Python project naming handles competing marker files.
action.yaml Explicitly selects the Python metadata extractor.
.github/​workflows/​testing.yaml Adds regression coverage for mixed-project directories.

Review effort: Balanced

Comment thread .github/workflows/testing.yaml Resolved
Without artefact_name, the action asks build-metadata-action for the
project name but leaves it to detect the project type. That detection
ranks package.json, go.mod, pom.xml and others above the Python
project files, so a Python project carrying one of them was named
after that file and the action looked for the wrong artefact.

Pass project_type: python to the naming step, leaving the choice
between pyproject.toml, setup.cfg and setup.py to the Python
extractor. Add a workflow test that audits a Python project beside a
package.json naming another project, and note the behaviour in the
README.

The test renames its copy of the fixture project before building it.
Review found that its artefact shared the name the tests job uploads
under, and artefact names are scoped to the workflow run, so one job
replaced the other's artefact and the tests job's download failed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the change to explicitly select Python during artefact-name resolution.

No open issues 🎉

Review effort: Balanced

Copilot AI 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.

🟢 Approval recommended

No outstanding review issues were identified for the Python artefact-naming fix.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.

The change is narrowly scoped and appears sound: it explicitly selects Python metadata while preserving custom artefact names, and the regression job exercises conflicting project markers without sharing another job's artefact name. No actionable defects found.

Antagonistic round 1 of 3.


Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit c898f83 into lfreleng-actions:main Nov 24, 2026
30 of 31 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-293 branch November 24, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Declare the Python project type

2 participants