Skip to content

fix(container): preserve LogSight package metadata - #15

Merged
CoreyLeath-code merged 2 commits into
mainfrom
fix/container-package-metadata
Aug 3, 2026
Merged

fix(container): preserve LogSight package metadata#15
CoreyLeath-code merged 2 commits into
mainfrom
fix/container-package-metadata

Conversation

@CoreyLeath-code

@CoreyLeath-code CoreyLeath-code commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Repairs the container build context for setuptools package metadata and verifies the metadata of the package installed in the final image.

Addresses part of #13.

Problem

The Docker builder invoked the project build while omitting README.md, even though pyproject.toml declares it as the package readme. This makes the container build context diverge from the source-package build and risks incomplete package metadata.

Root cause

The Dockerfile copied the build configuration and package directory but not all files required by the declared build metadata.

Changes

  • Copy README.md into the Docker builder stage.
  • Add a CI assertion against the installed container package metadata: Requires-Python and Markdown description content type.

Reproducibility

GitHub Actions runs docker build, logsight health inside the final image, and the new metadata assertion on this exact PR commit.

Metrics

No benchmark, coverage, latency, or security metric is added or modified.

Risk

Low. The runtime command and dependencies are unchanged; the image build now receives the declared metadata source file.

Rollback

Revert commits 1e5c58f and 166e913.

Remaining work

Issue #13 remains the tracker for full end-to-end AIOps evaluation, clean-clone validation, and broader evidence work.

Summary by CodeRabbit

  • Tests

    • Added validation that packaged container metadata includes the required Python version and Markdown description content type.
  • Bug Fixes

    • Ensured the project README is included during package builds so published metadata contains the expected description.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 37c18cf3-6e68-4930-8977-27edef109a4e

📥 Commits

Reviewing files that changed from the base of the PR and between cf3a791 and 166e913.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • Dockerfile

📝 Walkthrough

Walkthrough

The Docker builder now includes README.md when building the wheel. CI verifies the installed package metadata for the required Python version and Markdown description content type.

Changes

Package metadata validation

Layer / File(s) Summary
Build and validate package metadata
Dockerfile, .github/workflows/ci.yml
The Docker build copies README.md with the project metadata. CI checks Requires-Python is >=3.10 and Description-Content-Type is text/markdown for the installed logsight-ai package.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: preserving LogSight package metadata in the container build.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/container-package-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CoreyLeath-code
CoreyLeath-code marked this pull request as ready for review August 3, 2026 15:51
@CoreyLeath-code
CoreyLeath-code merged commit 975296b into main Aug 3, 2026
7 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 166e913d74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
- name: Verify installed package metadata
run: |
docker run --rm --entrypoint python logsight-ai:${{ github.sha }} -c \
"from importlib.metadata import metadata; package = metadata('logsight-ai'); assert package['Requires-Python'] == '>=3.10'; assert package['Description-Content-Type'] == 'text/markdown'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Assert the packaged README body

When README.md is omitted from the Docker build context, setuptools can still infer Description-Content-Type: text/markdown from the .md filename in pyproject.toml and copy Requires-Python directly from that file, while warning and producing an empty long description. Consequently, both assertions pass against the behavior this commit is meant to prevent; assert that the installed metadata payload contains a known README passage so CI detects a recurrence.

Useful? React with 👍 / 👎.

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.

1 participant