Skip to content

Delete the broken blueprints, fix the README, bump to 0.2.0 - #25

Merged
pierrebrunelle merged 2 commits into
mainfrom
chore/release-0.2.0
Sep 10, 2026
Merged

pierrebrunelle merged 2 commits into
mainfrom
chore/release-0.2.0

Conversation

@pierrebrunelle

Copy link
Copy Markdown
Member

Follow-up to #24. Two things it left behind, plus the version bump.

The blueprints were the last copy of the bugs

blueprints/single_provider/ still carried everything #24 fixed. All four agent.py files declared "image": pxt.Image, passed system= to anthropic's messages(), and splatted **chat_kwargs — and the four README.md files embedded that same broken code inline, under a heading telling people to connect them to Cursor, Windsurf and Cline. Anyone following that instruction pasted code that cannot run.

Deleted: 15 files, ~3,200 lines. Same reasoning as multi_provider in #24 — all four providers ship in the package, so a blueprint is one import away from pip install pixelagent. That README section is now the install line and a five-line Quick Start.

The ReAct example had never executed

It defined a @pxt.udf in a script's global namespace (a hard error since the UDF must be importable by name), and twice called Agent(name="financial_planner") without the required system_prompt. After #24 it would also have hit SchemaConflict, since it rebuilt the same agent name with a different toolset.

Rewritten around what #24 made possible. The loop existed to vary the system prompt per step, which used to mean reconstructing the agent; the prompt is row data now, so it is one agent and a per-call override:

response = agent.chat(question, system_prompt=REACT_PROMPT.format(step=step, ...))

The loop gets shorter and the example demonstrates the change instead of working around it. All five README python blocks now compile.

Version

0.1.6 → 0.2.0, plus a Migrating from 0.1.x section covering the four caller-visible changes: Python 3.11+, SchemaConflict on a changed model/toolset, per-turn config overrides, and the new conversation_id.

This still needs publishing to reach anyone. PyPI serves 0.1.5 with an unbounded pixeltable>=0.3.15, so a fresh pip install pixelagent today resolves Pixeltable 0.7.6 and gets the broken code. The merge fixed the repo, not the install. I have not published — that is yours to run.

Unchanged from #24's open items

  • live job still needs OPENAI_API_KEY / ANTHROPIC_API_KEY / GEMINI_API_KEY secrets. Two things stay unverified without it: whether anthropic's model_kwargs={"system": ...} reaches the SDK as a top-level system, and whether bedrock's inference_config= maps temperature as the old splat did.
  • Default model ids are stale — bedrock's amazon.nova-pro-v1:0 returns ValidationException on on-demand throughput.
  • Separately: GitHub reports 40 dependabot vulnerabilities on main (1 critical, 23 high). Pre-existing, unrelated to this work.

81 keyless tests, ruff clean.

🤖 Generated with Claude Code

pierrebrunelle and others added 2 commits September 10, 2026 10:34
blueprints/single_provider/ was the last place carrying the bugs fixed in
#24. All four agent.py files still declared `"image": pxt.Image`, still
passed `system=` to anthropic's messages(), and still splatted
`**chat_kwargs` -- and the four README.md files embedded that same broken
code inline, under a heading telling people to connect them to Cursor,
Windsurf and Cline. Anyone following that instruction pasted code that
cannot run.

Deleted, 15 files and ~3200 lines. Same reasoning as multi_provider in #24:
all four providers ship in the package, so the blueprint is one import away
from `pip install pixelagent` and teaches nothing the package does not. That
section of the README is now the install line and a five-line Quick Start.

The ReAct example in the README had never executed either: it defined a
@pxt.udf in a script's global namespace (a hard error), and twice called
`Agent(name="financial_planner")` without the required system_prompt. After
#24 it would also have hit SchemaConflict, because it rebuilt the same agent
name with a different toolset.

It is rewritten around what #24 made possible. The loop existed to vary the
system prompt per step, which used to mean reconstructing the agent; the
prompt is row data now, so it is one agent and a per-call override. The loop
gets shorter and the example demonstrates the change instead of working
around it.

Adds a "Migrating from 0.1.x" section covering the four caller-visible
changes, and bumps the version. Every 0.1.x release is broken against
Pixeltable 0.7.3+, and PyPI still serves 0.1.5 with an unbounded
`pixeltable>=0.3.15`, so this needs to be published to actually reach anyone.

All five README python blocks now compile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
CI's `uv sync --locked` correctly refused a lockfile still recording 0.1.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pierrebrunelle
pierrebrunelle merged commit 4476a9c into main Sep 10, 2026
4 checks passed
pierrebrunelle added a commit that referenced this pull request Sep 10, 2026
0.2.0 has been on `main` since #25, but PyPI still serves **0.1.5**, so
nobody has actually received the fix. This makes releasing a tag push.

## The old script was broken

`scripts/release.sh` could not have worked as-is:

- required a git remote named `home`; a normal clone has `origin`
- read a long-lived `PYPI_API_KEY` out of `~/.pixeltable/config.toml`
- called `poetry build` after #24 moved the project to uv
- **published without ever installing what it built**

That last one is how 0.1.x shipped a package that could not import
against a current Pixeltable. Nothing in the release path ever tried it.

## Releasing now

```bash
git tag v0.2.0 && git push origin v0.2.0
```

**There is no token.** PyPI Trusted Publishing mints a short-lived
credential from the workflow's OIDC identity, so there is nothing to
leak, rotate, or paste into a shell.

The build job refuses to publish an artifact it has not exercised:

1. tag must match `pyproject.toml` version
2. `uv build` + `twine check`
3. install the built wheel into a clean venv and **construct a real
agent with it**

Verified locally on both projects. Worth noting: the wheel resolves
**pixeltable 0.7.7** through the `<0.8` bound and works — newer than the
0.7.6 we targeted, so the bound is doing its job.

## What you need to do once

On PyPI, **Manage project → Publishing → Add a pending publisher**:

| field | value |
|---|---|
| owner | `pixeltable` |
| repository | `pixelagent` |
| workflow | `release.yml` |
| environment | `pypi` |

Then tag. `RELEASING.md` has the full process.

Two optional extras: add a required reviewer to the `pypi` environment
(Settings → Environments) if you want a human gate before each publish,
and run the workflow from the Actions tab with `dry_run` checked to
exercise the whole path without publishing.

## Still not done by this PR

Adding `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GEMINI_API_KEY` as repo
secrets, so the `live` job can run. Without it, two things stay
unverified: whether anthropic's `model_kwargs={"system": ...}` reaches
the SDK as a top-level `system`, and whether bedrock's
`inference_config=` maps `temperature` as the old splat did. I did not
add those — I don't handle credentials.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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