Skip to content

ci+docs: publish 0.2.3 to PyPI with the org token, and fix README examples that fail on 0.2.3 (OSS-71) - #54

Merged
adityamishra-hydradb merged 5 commits into
mainfrom
adityamishra/oss-71-release-prep
Dec 5, 2026
Merged

adityamishra-hydradb merged 5 commits into
mainfrom
adityamishra/oss-71-release-prep

Conversation

@adityamishra-hydradb

@adityamishra-hydradb adityamishra-hydradb commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

For humans

This prepares the 0.2.3 release (Linear OSS-71: "released 0.2.0 lags main"). main is 0.2.3 with 17 merged PRs that no user has, because the last release is v0.2.0. Two things blocked the release:

  1. PyPI publishing was silently off. publish.yml read secrets.PYPI_API_TOKEN, which no longer exists. The organization secret is PYPI_TOKEN. With no token, the PyPI step was skipped and the run still went green, so PyPI stayed on 0.1.0. Now the step reads PYPI_TOKEN and fails the run if the token is missing or the upload is refused. It still runs after the wheel is attached to the GitHub release, so the curl installer works even when PyPI fails. --skip-existing lets a re-run finish.

  2. Three README examples fail on 0.2.3. They were checked against a 0.2.3 wheel built from main and the prod API:

    • hydradb feedback <id> --rating positive is refused: feedback needs -f, --ground-truth-answer or --ground-truth-source-id.
    • hydradb graph query ... --output json fails with "No such option": --output is global and goes before the command.
    • hydradb list without --kind returns knowledge only; memories need --kind memory and come back under user_memories.

    The commit also adds the missing database delete-collection and connectors resource add --name rows, and fixes the test steps (pip install -e . does not install pytest; use the Makefile).

PyPI project hydradb-cli is ours (author [email protected]; its 0.1.0 source is byte-identical to commit 2d1cdfa). PyPI releases were paused in July because the old token was gone; Soham OK'd resuming them (12-02).

After merge: cut the v0.2.3 GitHub release from main (after a last user-path check), confirm the wheel is on the release and on PyPI, then update the README's "PyPI releases are paused" note and the docs pages (separate PR).

For agents

  • Linear: OSS-71 (release lag), OSS-69 (README examples found during the installer work). The curl installer fix (OSS-69) is a separate PR.
  • actionlint passes on .github/workflows/publish.yml.
  • Evidence for the README fixes: ~/oss-maintenance/p0/OSS-69-REPORT.md (0.2.3 wheel vs prod, 68 commands).

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

adityamishra-hydradb and others added 2 commits December 2, 2026 22:10
Checked against a 0.2.3 wheel built from main and the prod API:

- `hydradb feedback <id> --rating positive` is refused: feedback needs
  --feedback, --ground-truth-answer or --ground-truth-source-id. The
  example now passes -f.
- `hydradb graph query ... --output json` fails with "No such option":
  --output is a global option and goes before the command.
- `hydradb list` without --kind returns knowledge sources only, and the
  JSON for --kind memory uses `user_memories`, not `sources`.
- Add `database delete-collection` and `connectors resource add --name`,
  which the CLI has and the README did not list.
- Add feedback to the table of contents.
- Running tests: `pip install -e .` does not install pytest. Use the
  Makefile targets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adityamishra-hydradb <[email protected]>
The workflow read `secrets.PYPI_API_TOKEN`, which no longer exists. The org
secret is `PYPI_TOKEN`. With the token missing, the PyPI step was skipped and
the run still passed, so PyPI stayed on 0.1.0 while GitHub releases moved on.

The step now reads `PYPI_TOKEN` and fails the run when the token is missing
or twine refuses the upload. It still runs after the wheel is attached to
the GitHub release, so the curl installer is not blocked by a PyPI failure.
`--skip-existing` lets a re-run finish when the version is already on PyPI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adityamishra-hydradb <[email protected]>
@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

@hydra-mira-review review

@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

/devin review

@hydra-mira-review

hydra-mira-review Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Mira score 5/5 · 🟢 Good to merge

  • No findings in the code.
  • Confirm outside this PR: Repository access to a valid PYPI_TOKEN, Publish the v0.2.3 GitHub release after merge.

This PR prepares package publishing for version 0.2.3 and corrects command examples for that release. Publishing uses the organization token and reports failures, while documentation clarifies command options and test setup.

Before this ships · 2 to confirm
  • ❔ Repository access to a valid PYPI_TOKEN (config), needed in GitHub organization secrets and the PyPI hydradb-cli project. The description identifies an organization secret, but repository visibility and its current upload permission are not established. Confirm repository access and permission to publish hydradb-cli before publishing the release.
  • ❔ Publish the v0.2.3 GitHub release after merge (order), needed in GitHub Releases. The workflow runs only for published releases, and the description schedules v0.2.3 publication after merge. After the final user-path check, publish v0.2.3 from merged main, confirm both distribution channels, then update the paused-release documentation.
How this PR works · 4 changes, 2 medium risk, 2 low risk

Users cannot install the current release from PyPI, and several README examples fail with version 0.2.3. This PR restores mandatory PyPI publishing, checks the installed wheel's version before uploading artifacts, and corrects the documentation. Publishing v0.2.3 remains a separate step after merge.

1. Reject wheels that report the wrong release version · 🟠 medium risk · .github/workflows/publish.yml

Release artifacts now need to report the tagged version before publication. Previously, the workflow checked the wheel filename and metadata without running the installed command.

Risk: A faulty comparison blocks valid releases and leaves users without the new wheel on either distribution channel.

Check:

  • Confirm a v0.2.3 wheel reports 0.2.3 when installed in a fresh environment.
  • Confirm a mismatched runtime version stops the job before Attach artifacts to the GitHub release.

In publish.yml:44-61.

2. Make PyPI publishing mandatory and safe to retry · 🟠 medium risk · .github/workflows/publish.yml

Release runs now fail when PyPI credentials are absent or an upload fails. Previously, a token condition could skip publication while leaving the run green.

Risk: A publishing failure leaves PyPI users on an older release while GitHub artifacts remain available.

Check:

  • Confirm PYPI_TOKEN is visible to this repository and can upload to the hydradb-cli project.
  • Check that missing credentials fail after GitHub attachment and that an already-uploaded artifact does not prevent retry completion.

In publish.yml:12-15, publish.yml:63-84.

3. Correct command examples and document existing options · 🟢 low risk · README.md

Readers get feedback and graph examples that satisfy existing CLI validation, plus explicit memory filters and JSON keys. Command tables also document collection deletion and connector resource names.

Risk: Incorrect examples cause command errors or lead readers to overlook stored memories.

Check:

  • Check the examples against canonical.feedback, main, and canonical.list_items, including the user_memories response key.

In README.md:266-271, README.md:348-368, README.md:399-400 and 2 more.

4. Supporting changes · 🟢 low risk · README.md

Contributors are directed to the existing bootstrap, lint, and test targets instead of installing without development dependencies. The README also links feedback and names both test directories.

Risk: Incorrect setup instructions prevent contributors from installing or invoking the development tools.

Check:

  • Confirm make bootstrap installs the development extras and make test discovers both tests/ and conformance/.

In README.md:17, README.md:663-671.

Not explained by the ticket or the description:

  • The installed CLI version gate adds a release-blocking check that the PR description does not mention.
Requirement check · 7 met, 2 for another PR · from the PR description
  • ✅ Use the organization PyPI token instead of the obsolete secret (met). .github/workflows/publish.yml reads secrets.PYPI_TOKEN and removes the old token condition.
  • ✅ Fail the release run when credentials are missing or PyPI rejects publication (met). The Publish to PyPI step exits for an empty password and does not suppress upload failures, except existing artifacts.
  • ✅ Attach GitHub artifacts before attempting PyPI publication (met). Attach artifacts to the GitHub release precedes Publish to PyPI.
  • ✅ Allow publishing retries when artifacts already exist (met). GitHub attachment uses --clobber; PyPI upload adds --skip-existing.
  • ✅ Correct the feedback example, graph output option placement, and memory listing guidance (met). README.md adds feedback text, moves -o json before graph, and documents --kind memory with user_memories.
  • ✅ Document collection deletion and connector resource naming (met). README.md adds database delete-collection and lists --name, matching existing command definitions.
  • ✅ Use the Makefile to install development tools and run checks (met). README.md now lists make bootstrap, make lint, and make test; their targets already exist.
  • ➖ Publish version 0.2.3 and then update the paused-release note and documentation pages (for another PR). The description schedules release publication after merge and assigns the remaining documentation updates to a separate PR.
  • ➖ Deliver the curl installer fix (for another PR). The description assigns the installer work to a separate PR for OSS-69.
Check by hand · 1
  • Confirm the organization secret PYPI_TOKEN is available to this repository and authorizes uploads to the hydradb-cli PyPI project.

Comment @hydra-mira-review help for commands.

@openhack-agent

openhack-agent Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

OpenHack Summary

Security review of ci+docs: publish 0.2.3 to PyPI with the org token, and fix README examples that fail on 0.2.3 (OSS-71). 2 changed files; 0 findings at or above the low reporting threshold.

P1: Critical 0   P2: High 0   P3: Medium 0   P4: Low 0

Confidence Score: 5/5

No reportable security findings were detected in this scan.

Security merge-readiness rubric: 1 = critical, 2 = high, 3 = medium, 4 = low, 5 = no reportable findings. This score reflects scan findings, not a guarantee of correctness or complete coverage.

Files Needing Attention: None

Important Files Changed
  • .github/workflows/publish.yml (modified)
  • README.md (modified)

Last reviewed commit: 91167e7 · View review on OpenHack


TIP: Mention @openhack-agent in a PR comment to request a review or ask a question. Use @openhack-agent fix all for every finding, or @openhack-agent fix unresolved threads for open review threads only.

@openhack-agent openhack-agent 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.

OpenHack reviewed this commit. See the OpenHack Summary for the confidence score and fix actions.

@devin-ai-integration

Copy link
Copy Markdown

Starting Devin Review.

Devin Review

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

…g (OSS-71)

`hydradb --version` prints `__version__` from src/hydradb_cli/__init__.py,
which is kept by hand next to pyproject.toml. The workflow only checked the
wheel's file name, which comes from pyproject.toml. The new curl installer
(OSS-69) checks `hydradb --version` after install, so one missed bump would
make every curl install of that release fail. The workflow now installs the
built wheel in a fresh venv and requires the last word of `--version` to equal
the tag, before anything is published. Found in the OSS-69 review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: adityamishra-hydradb <[email protected]>
@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

@hydra-mira-review review

@adityamishra-hydradb

Copy link
Copy Markdown
Contributor Author

/devin review

@devin-ai-integration

Copy link
Copy Markdown

Starting Devin Review.

Devin Review

Signed-off-by: Aditya Mishra <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adityamishra-hydradb
adityamishra-hydradb force-pushed the adityamishra/oss-71-release-prep branch from 7c5131b to 5188ea7 Compare December 4, 2026 14:10
@adityamishra-hydradb
adityamishra-hydradb merged commit 1277c57 into main Dec 5, 2026
7 of 8 checks passed
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.

2 participants