Repository navigation
Refactor: Resolve the project name via metadata - #233
Merged
ModeSevenIndustrialSolutions merged 1 commit intoNov 24, 2026
Merged
ModeSevenIndustrialSolutions merged 1 commit into
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The empty-name guard assertions can pass even after unintended downloads because they check the final destination rather than the download staging directories, leaving a regression undetected.
1 open issue
What changed in this PR
This PR aligns publishing with the build action’s metadata-based project naming, addressing #219 while keeping the action’s public inputs and outputs unchanged.
Changes:
- Replaces the project-name resolver with pinned
build-metadata-actionand updates consumers to useproject_name. - Adds an empty-name check before artefact downloads and a negative CI job.
- Updates the README’s naming sub-action link.
| File | Description |
|---|---|
| README.md | Repoints the naming sub-action link to build-metadata-action. |
| action.yaml | Switches name resolution, updates output references, and rejects empty names. |
| .github/workflows/testing.yaml | Adds a negative test for a directory without project metadata. |
Review effort: Balanced
5 tasks
Read the project name from build-metadata-action instead of python-project-name-action. python-build-action uploads its artefact under build-metadata-action's project_name, so downloading under the same output removes the need for two parsers to agree, and drops one of the last callers of python-project-name-action ahead of its retirement. build-metadata-action succeeds with an empty name when the directory holds no project it can name, and download-artifact given an empty name downloads every artefact in the run. Fail with an error before any download when the name is empty, and add a workflow job that runs the action against a directory without a project and expects that failure. The step's inputs skip version extraction, environment probing, release-data lookups, the metadata artefact upload and the summary table, none of which the name needs. Inputs and outputs of this action do not change. The negative job uploads a sentinel artefact before running the action and asserts that the download staging directory exists and stays empty. Checking only the artefact path could pass without the guard, since an unnamed download lands in per-artefact subdirectories that distribution selection ignores before failing (Copilot review). 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>
lf-releng-code-monkey-bot
Bot
force-pushed
the
code-monkey/issue-219
branch
from
November 23, 2026 16:07
19b5935 to
93d6bba
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues remain: Poetry-only projects are rejected because their names are not extracted, and mixed Python/Node projects can use the Node package name for PyPI release checks and trusted-publishing selection.
2 open issues
Review effort: Balanced
ModeSevenIndustrialSolutions
approved these changes
Nov 24, 2026
ModeSevenIndustrialSolutions
merged commit Nov 24, 2026
3527f8e
into
lfreleng-actions:main
14 checks passed
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #219
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLIbc9bf0ee29e8a4e188c8fc1f3591f4251be7815bbash tests/test-artefact-safety.shuvx zizmor --persona auditor --offline .github/workflows/testing.yaml action.yamlAISLOP_NO_TELEMETRY=1 aislop scan --base bc9bf0ee29e8a4e188c8fc1f3591f4251be7815b --jsonprek run --hook-stage commit-msg --commit-msg-filename /tmp/msg2.txtprek run --files .github/workflows/testing.yaml README.md action.yamlThe
github-code-monkey-botworkflow 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 1 of revision, on its base.
Replaces
python-project-name-actionwithbuild-metadata-action(pinned to the v0.13.2 commit689e136) as the source of the project name this action downloads, checks and reports by.python-build-actionuploads its artefact underbuild-metadata-action'sproject_name, so both ends now read the same parser. The action's inputs and outputs do not change.Changes
action.yaml: thenamingstep usesbuild-metadata-actionwithuse_version_extract,include_environment,artifact_uploadoff, an emptyoutput_formatandpython_offline_modeon; the download, version check and summary readsteps.naming.outputs.project_name.action.yaml: a newVerify project namestep fails with::error::when the name is empty, before any download. Given an empty name,download-artifactwould fetch every artefact in the run.README.md: the naming step row linksbuild-metadata-action..github/workflows/testing.yaml: newno-projectjob runs the action against a directory with no Python project and expects it to fail.build-metadata-actionaddsactions/setup-goand ago buildof that action to the publishing job, about half a minute.This round
Copilot pointed out that the negative test could pass without the guard: an unnamed download lands in per-artefact subdirectories under
$RUNNER_TEMP/pypi-download.*, which distribution selection ignores before it fails, sono-project/diststays absent either way. The job now uploads a sentinel artefact first and asserts that the download staging directory exists and is recursively empty. I simulated the assertion locally against a missing, an empty and a populated staging directory, and it failed or passed as expected in each case.Checks run
prek run --files .github/workflows/testing.yaml README.md action.yaml: passedzizmor --persona auditor: no findingsaislop scan --base <base>with telemetry off: empty diagnosticsbash tests/test-artefact-safety.sh: passedFor the reviewer
The
no-projectjob and the existingartefact-safetyjob only prove themselves in CI, because this runner cannot run the action end to end.