Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

HAR: Poetry source name overwrites Python project metadata in build info

Open Beginner friendly
#311 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, python

Research direction

Read pythonProjectFields in modules/har/pkg/har/pkgmgr_buildinfo.go and inspect the existing tests for detectPythonRootPackage or pythonProjectFields. Reproduce with [tool.poetry] metadata followed by [[tool.poetry.source]]; add a regression test showing the project name and version are retained, then confirm the test passes.

Written by the indexing model from the issue text.

Description

Problem

pythonProjectFields reads the last name and version assignments from any section. A later Poetry package-source section can overwrite the project name, producing incorrect RootPackage.Name and dependency parent keys in uploaded build info.

Reproduction

  1. In pyproject.toml, set [tool.poetry] to name = "my-app" and version = "1.2.3".
  2. Add a later [[tool.poetry.source]] section with name = "private-index" and url = "https://packages.example.com/simple/".
  3. Pass the file contents to pythonProjectFields, as detectPythonRootPackage does.

Actual: returns private-index, 1.2.3. Expected: returns my-app, 1.2.3.

Follow-up

Read metadata from the appropriate project section rather than unrelated sections, and add a regression test for a Poetry source declared after project metadata.

Context

Found in PR #288; original review finding. Implementation: pythonProjectFields.

Dominant language
Go
Stars
28
Forks
16
Avg merge
2d 6h
Merged PRs (30d)
63

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harness/cli

All issues in harness/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.