fix(release): pin PSR past GitPython break so labels can ship to PyPI - #79
Conversation
Auto Release for the labels merge failed because GitPython 3.1.60 removed Actor.name_email_regex and python-semantic-release ≤10.6.1 crashed on config load — no tag, no PyPI publish past v3.8.0. Pin PSR ≥10.6.2 and exclude the broken GitPython wheel. Also expose uuid on checkin create/ config/show --json (API returns id) so label-assign scripts stay consistent. Co-authored-by: Cursor <cursoragent@cursor.com>
AI review for
|
There was a problem hiding this comment.
Verdict
Solid unblocker for Auto Release / PyPI — the PSR ≥10.6.2 + GitPython!=3.1.60 pin matches upstream #1476, and the check-in --json uuid alias is a sensible non-breaking fix for Labels scripting. A couple of test/consistency gaps on the alias helper are worth tightening.
Findings
| # | Severity | File | Summary |
|---|---|---|---|
| 1 | dailybot_cli/commands/public_api_helpers.py:533 |
Preserve-uuid / followup_uuid-only branches and config/show --json wiring are untested |
|
| 2 | ℹ️ info | dailybot_cli/display.py:1466 |
Reimplements _checkin_uuid with a different key priority |
Notes
- Release pin + recovery docs look correct;
gh workflow run auto-release.yml --ref mainafter merge is the right recovery path for the stuck labels release. - Creating the
uuidalias only when missing (never overwriting) is the right contract for Forms/Labels parity. - Human panel label
ID:→UUID:alignsprint_checkin_createdwith check-in detail (alreadyUUID:); machine consumers should keep using--json.
Recommendation
comment — ship the release pin; tighten alias test coverage when convenient (does not need to block unblocking PyPI).
| if not enriched.get("uuid"): | ||
| legacy_id: Any = enriched.get("id") or enriched.get("followup_uuid") | ||
| if legacy_id: | ||
| enriched["uuid"] = str(legacy_id) |
There was a problem hiding this comment.
Missing coverage for the non-trivial branches of this helper (and two of three call sites).
The only new test exercises checkin create --json when the payload has id and no uuid. That leaves untested:
- Preserve explicit
uuid— the docstring promises never to overwrite; a regression that always copiesid→uuidwould still pass the create test. followup_uuid-only payloads — the fallback used whenidis absent.checkin config --json/checkin show --json— both call this helper in this PR, but neither assertsuuid(the existing show JSON test still only checks nested question fields).
Suggested additions (unit or CliRunner):
assert normalize_checkin_entity_json({"id": "a", "uuid": "b"})["uuid"] == "b"
assert normalize_checkin_entity_json({"followup_uuid": "fu"})["uuid"] == "fu"plus a show/config --json assertion that payload["uuid"] is present when the API returns only id.
| checkin_uuid: str = str( | ||
| checkin.get("uuid") or checkin.get("id") or checkin.get("followup_uuid") or "" | ||
| ) | ||
| lines: list[str] = [f"[bold]{name}[/bold]", f"UUID: {checkin_uuid}"] |
There was a problem hiding this comment.
_checkin_uuid already exists a few hundred lines above with a different key order.
This block inlines uuid → id → followup_uuid, while _checkin_uuid (dailybot_cli/display.py ~813) uses uuid → followup_uuid → id. For create/config payloads that only have id the result matches; if a payload ever carries both id and followup_uuid with different values, create output and status tables would disagree.
Prefer reusing the helper so authoring and status stay consistent:
| checkin_uuid: str = str( | |
| checkin.get("uuid") or checkin.get("id") or checkin.get("followup_uuid") or "" | |
| ) | |
| lines: list[str] = [f"[bold]{name}[/bold]", f"UUID: {checkin_uuid}"] | |
| checkin_uuid: str = _checkin_uuid(checkin) | |
| lines: list[str] = [f"[bold]{name}[/bold]", f"UUID: {checkin_uuid}"] |
Summary
python-semantic-release>=10.6.2,<11andGitPython!=3.1.60so config load no longer crashes on the removedActor.name_email_regex(run 33115288463, PSR #1476).gh workflow run auto-release.yml --ref main) indocs/RELEASE_AND_DISTRIBUTION.md.uuidoncheckin create|config|show --jsonwhen the API only returnsid, solabel assignscripts match forms/workflows (found during local Labels E2E).Test plan
auto-release.ymlinstall step pins PSR ≥10.6.2 and excludes GitPython 3.1.60pytest tests/checkin_authoring_test.py tests/authoring_helpers_test.py::TestAuthoringDisplay::test_checkin_created -qgh workflow run auto-release.yml --ref main(or wait for the merge-triggered run) and verify a newv*tag + PyPI publish beyond 3.8.0dailybot checkin create … --json→ payload includes bothidanduuidRisks
--jsonadds a non-breaking alias field.Made with Cursor