Skip to content

chore: PyPI release prep (v0.1.0) - #8

Merged
Mhemd139 merged 1 commit into
mainfrom
chore/pypi-release
Jul 5, 2026
Merged

chore: PyPI release prep (v0.1.0)#8
Mhemd139 merged 1 commit into
mainfrom
chore/pypi-release

Conversation

@Mhemd139

@Mhemd139 Mhemd139 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Prepares the repo to publish covenant-mcp to PyPI via trusted publishing.

Changes

  • README: the "MCP has had nothing equivalent" claim is now falsifiable (Specmatic MCP Auto-Test, MCPTrust, Bellwether, mcp-scan all exist) — replaced with honest positioning: existing scanners tell you that a tool changed, Covenant classifies whether it breaks the agent and enforces the verdict. All relative links/images absolutized so the PyPI project page renders them (PyPI does not resolve relative paths).
  • pyproject: explicit sdist allowlist — hatchling's default packs everything not gitignored, including untracked local files. Verified: sdist now contains only covenant/, tests/, examples/, the two config files, README and LICENSE; wheel contains only the package.
  • release.yml: on v* tag — build, twine check, publish to PyPI via OIDC trusted publishing (environment pypi, no API token). Both artifacts pass twine check locally.

After merge

  1. PyPI account → Publishing → pending publisher: project covenant-mcp, owner Mhemd139, repo Covenant, workflow release.yml, environment pypi
  2. Tag v0.1.0 on main → workflow publishes → pip install covenant-mcp

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added automated release publishing for tagged versions, including package validation and PyPI upload.
  • Documentation

    • Updated links in the README to use stable, direct GitHub and raw file URLs.
    • Fixed several resource and reference links for easier access.
  • Chores

    • Improved source distribution packaging to include the intended project files.

- README: replace the now-false 'nothing equivalent' claim with honest
  positioning against existing MCP scanners; absolutize all relative
  links/images so the PyPI project page renders them
- pyproject: explicit sdist allowlist (hatchling's default packs
  untracked local files)
- release.yml: build + twine check + publish via PyPI trusted
  publishing (OIDC, no token) on v* tags

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new GitHub Actions release workflow that builds, validates, and publishes packages to PyPI on version tag pushes, updates pyproject.toml with a Hatchling sdist packaging allowlist, and converts relative README links/images to absolute GitHub URLs.

Changes

Release Workflow and Packaging

Layer / File(s) Summary
Release workflow
.github/workflows/release.yml
New Release workflow triggers on v* tag pushes; build job builds and checks the package with twine and uploads dist/, and publish job downloads it and publishes to PyPI via OIDC trusted publishing.
Sdist packaging configuration
pyproject.toml
Adds [tool.hatch.build.targets.sdist] with an only-include allowlist covering the package, tests, examples, config/lock files, and README/LICENSE.

README Link Updates

Layer / File(s) Summary
Absolute GitHub link conversion
README.md
License badge, diagram/screenshot images, config and design spec links, CI workflow reference, and architecture links are switched from relative paths to absolute GitHub URLs.

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

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub Tag Push
  participant BuildJob as build job
  participant PublishJob as publish job
  participant PyPI

  GitHub->>BuildJob: trigger on v* tag push
  BuildJob->>BuildJob: python -m build, twine check
  BuildJob->>PublishJob: upload dist artifact
  PublishJob->>PublishJob: download dist artifact
  PublishJob->>PyPI: publish via OIDC trusted publishing
Loading

Related Issues: None specified.

Related PRs: None specified.

Suggested labels: ci, documentation, packaging

Suggested reviewers: Mhemd139

Poem

A tag is pushed, a rabbit hops,
Builds and checks, then never stops.
To PyPI it sends its wares,
While README links now point elsewhere.
Hatchling packs with careful care —
A tidy release, beyond compare! 🐇📦

🚥 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 accurately summarizes the release-prep and PyPI publishing changes in the pull request.
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 chore/pypi-release
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch chore/pypi-release

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 3-9: The workflow lacks an explicit least-privilege permissions
block, so the `build` job is using default `GITHUB_TOKEN` scopes instead of only
what checkout/build needs. Add a workflow-level or `build` job-level
`permissions` section in the release workflow, keeping it minimal and aligned
with the existing `publish` job’s approach, and ensure the `build` and `publish`
jobs each request only the specific scopes they require.
- Line 11: Update the checkout step in the release workflow to disable
credential persistence by setting persist-credentials to false on the
actions/checkout usage. This is a workflow-only change in the build job, and the
relevant symbol to locate is the checkout step in the release workflow; no other
git or artifact steps should need changes.

In `@README.md`:
- Line 7: The license badge/footer links in README are pointing to the
repository tree view instead of the file-view URL, which makes the destination
misleading or broken. Update the existing MIT license link(s) in README so they
use the file-content/blob form for the LICENSE target, and make the same change
wherever the license footer/link is repeated, using the badge/link markup
already present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7dff937e-11c4-4f6c-a7d7-84af48eaa7e6

📥 Commits

Reviewing files that changed from the base of the PR and between f58fdf9 and 30974a0.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • README.md
  • pyproject.toml

Comment on lines +3 to +9
on:
push:
tags: ["v*"]

jobs:
build:
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Add an explicit least-privilege permissions block.

No permissions: key is set at the workflow or build job level, so GITHUB_TOKEN receives the repository's default permissions rather than the minimum needed for checkout/build/twine-check. The publish job already does this correctly (id-token: write only).

🔒 Suggested fix
 on:
   push:
     tags: ["v*"]
+
+permissions:
+  contents: read

Flagged by static analysis (zizmor excessive-permissions).

Also applies to: 8-21

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 3 - 9, The workflow lacks an
explicit least-privilege permissions block, so the `build` job is using default
`GITHUB_TOKEN` scopes instead of only what checkout/build needs. Add a
workflow-level or `build` job-level `permissions` section in the release
workflow, keeping it minimal and aligned with the existing `publish` job’s
approach, and ensure the `build` and `publish` jobs each request only the
specific scopes they require.

Source: Linters/SAST tools

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on checkout.

The build job checks out the repo and later uploads dist/ as an artifact; the checkout action persists the GITHUB_TOKEN credential on disk by default, which is unnecessary here since no further git operations are performed.

🔒 Suggested fix
       - uses: actions/checkout@v4
+        with:
+          persist-credentials: false

Flagged by static analysis (zizmor artipacked).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 11-11: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 11, Update the checkout step in the
release workflow to disable credential persistence by setting
persist-credentials to false on the actions/checkout usage. This is a
workflow-only change in the build job, and the relevant symbol to locate is the
checkout step in the release workflow; no other git or artifact steps should
need changes.

Source: Linters/SAST tools

Comment thread README.md
[![CI](https://github.com/Mhemd139/Covenant/actions/workflows/ci.yml/badge.svg)](https://github.com/Mhemd139/Covenant/actions/workflows/ci.yml)
![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/Mhemd139/Covenant/tree/main/LICENSE)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the file-view URL for the license links.

LICENSE is a file, but these targets use the tree form. GitHub’s file-content links use the blob/file-view form, so this is likely a broken or misleading destination for the badge/footer links. (docs.github.com)

Proposed fix
-[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/Mhemd139/Covenant/tree/main/LICENSE)
+[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/Mhemd139/Covenant/blob/main/LICENSE)

-[MIT](https://github.com/Mhemd139/Covenant/tree/main/LICENSE)
+[MIT](https://github.com/Mhemd139/Covenant/blob/main/LICENSE)

Also applies to: 159-159

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 7, The license badge/footer links in README are pointing
to the repository tree view instead of the file-view URL, which makes the
destination misleading or broken. Update the existing MIT license link(s) in
README so they use the file-content/blob form for the LICENSE target, and make
the same change wherever the license footer/link is repeated, using the
badge/link markup already present.

@Mhemd139
Mhemd139 merged commit 58ceaf2 into main Jul 5, 2026
5 checks passed
@Mhemd139
Mhemd139 deleted the chore/pypi-release branch July 8, 2026 20:21
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