Skip to content

release: bump version to 4.3.0, floor the SDK at 4.3.0 - #264

Merged
sbneto merged 2 commits into
developfrom
release-4.3.0
Aug 4, 2026
Merged

release: bump version to 4.3.0, floor the SDK at 4.3.0#264
sbneto merged 2 commits into
developfrom
release-4.3.0

Conversation

@sbneto

@sbneto sbneto commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

TL;DR

  • Floors the polyswarm_api dependency at >=4.3.0,<5.0.0 — the release that ships the typed known-good refusal and probe fixes this CLI renders.
  • bump-my-version bump minor: 4.2.1 → 4.3.0.

Requires

  • polyswarm-api release-4.3.0 → develop (same branch name, so CI here already tests against that SDK branch archive).

@sbneto sbneto mentioned this pull request Aug 4, 2026
@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review — release: bump to 4.3.0, floor SDK at 4.3.0

Base is develop ✅. Two blockers, both on the floor bump.

1. The >=4.3.0 floor fails both preconditions specs/05-sdk-contract.md sets (blocker — merge ordering)

The floor must be satisfied by the SDK archive CI installs, and by PyPI. […] a floor bump has two preconditions: the version is on PyPI, and the SDK’s develop declares at least that version.

Neither holds right now:

  • polyswarm-api 318 (release-4.3.0develop) is still OPEN → the SDK’s develop still declares version = "4.2.0".
  • polyswarm-api 319 (developmaster, "Release 4.3.0") is still OPEN → 4.3.0 is not published, since the SDK publishes off a master version change.

Consequences, in the exact shape the spec warns about:

  • After merge into develop, CI on CLI develop runs pip install $POLYSWARM_API_ARCHIVE/develop.zip (declares 4.2.0), then pip install .[tests] with a >=4.3.0 floor. The archive build no longer satisfies the floor, so pip goes to PyPI — either silently replacing the archive build (spec: "CI stops testing the SDK branch at all — the mechanism §Coordinated changes rests on, defeated with no error") or, since 4.3.0 is not on PyPI, failing resolution outright. This PR’s own CI is green only because CLI branch release-4.3.0 matches an SDK branch of the same name, so $CI_COMMIT_BRANCH.zip hits; that stops being true the moment it lands.
  • On reaching master, a floor above the newest published SDK "breaks pip install polyswarm-cli for every consumer" — and this PR is the release bump, so that is one merge away.

Required order: SDK 318 → SDK 319 → SDK 4.3.0 live on PyPI → then this. Worth stating explicitly under the Requires section, which currently links only the branch and cites the same-branch-name CI coverage as reassurance — precisely the coincidence that disappears post-merge.

2. Spec drift — specs/05-sdk-contract.md §"Current floor" not updated (AGENTS.md violation)

That spec carries a dedicated Current floor — polyswarm_api>=4.2.0 section justifying the floor behaviour-by-behaviour, plus the PyPI/develop preconditions. This PR moves the floor and leaves it saying 4.2.0. AGENTS.md: "Update the spec in the same PR as the code change." Add a Current floor — polyswarm_api>=4.3.0 section with the actual justification and the verified version strings (as the 4.2.0 section did), and mind the dev-suffix check the spec calls out.

3. The stated justification is not backed by CLI code

the release that ships the typed known-good refusal and probe fixes this CLI renders

The CLI consumes none of that surface:

  • KnownGoodWithheldException appears nowhere in src/ (nor any withheld/refusal handling). It subclasses NotFoundException (SDK 316), which ExceptionHandlingGroup (src/polyswarm/client/polyswarm.py:139) already catches by ancestry → exit 1 on 4.2.0 and 4.3.0 alike.
  • The exists() probe fix: the CLI never calls exists() — the only exists hits in src/ are click.Path(exists=True).
  • The dict/string error-payload rendering is internal to the SDK’s message construction; the CLI just logger.error(e)s it. A nicer message, not a behaviour the CLI relies on.

specs/05 says: "Floor it at the lowest SDK version that exposes every method/behaviour the CLI relies on." By that test the floor is still 4.2.0 — the same conclusion 262 recorded ("none of the SDK’s new surface (KnownGoodWithheldException) is used by the CLI"). Unlike the 4.2.0 bump, nothing here fails silently on the lower version. Either drop the floor bump (keeps this release installable regardless of SDK release timing, and dissolves item 1) or keep it and record the real reason in specs/05 — a deliberate "CLI 4.3.0 ships against SDK 4.3.0" release pairing is a legitimate justification, it just is not the one in the description.

Minor

  • release: is not in AGENTS.md’s conventional-commit prefix list (feat: fix: refactor: chore: docs: test:), and AGENTS.md says "version bumps belong to the develop → master step" — which does not describe this two-step release-branch pattern (mirroring SDK 318/319). If that is the intended flow, AGENTS.md §Gitflow should say so ("Update it when major workflow decisions land").

@sbneto
sbneto requested a review from mjbradford89 August 4, 2026 18:40
@sbneto
sbneto merged commit 18330e7 into develop Aug 4, 2026
2 checks passed
@sbneto
sbneto deleted the release-4.3.0 branch August 4, 2026 18:41
vhmartinezm added a commit that referenced this pull request Aug 25, 2026
…ntract

- rules favorite <id> [--unfavorite]: the CLI leg of the favorite
  capability (org delivery-order standard §14 — API, SDK and CLI land
  together). Renders the toggle state plus the server-owned
  'Favorites used: N of M' budget, and converts the machine-readable
  FAVORITE_LIMIT refusal into a clean actionable message at exit 2 —
  the central mapping's server-refusal code (a ClickException would
  exit 1, the code reserved for no-results/not-found).
- The command guards the SDK surface: ruleset_favorite ships in the
  paired SDK change and does not exist on the declared floor
  (published 4.3.0), so on a floor install the command fails with a
  clean upgrade message instead of an AttributeError traceback — the
  same only-the-new-surface-may-require-the-new-SDK principle as the
  withdrawn flag below. Every pre-existing command works unchanged on
  the floor; the floor itself cannot move until the SDK releases
  (specs/05 documents the exception and the follow-up bump).
- drop --include-counts: it wrapped a per-request server aggregate that
  is withdrawn under the query-design standard (§13) — and it crashed
  on the declared floor SDK, which CI's branch-name SDK install could
  never surface. With it gone, list_rules is zero-argument again.
- the new-results badge renders as 'New live results (last 24h)' — the
  fixed product window, since a caller can no longer choose one — with
  the new_results_counted_at staleness marker beside it.
- specs: the sdk-contract floor header follows the pin (>=4.3.0, moved
  by #264; the header had lagged at 4.2.0), and the command/formatter
  tables cover the favorite leg, its floor degradation, and the
  stored-counter render.
vhmartinezm added a commit that referenced this pull request Aug 25, 2026
…ntract

- rules favorite <id> [--unfavorite]: the CLI leg of the favorite
  capability (API, SDK and CLI land together as one change set).
  Renders the toggle state plus the server-owned 'Favorites used: N of
  M' budget, and converts the machine-readable FAVORITE_LIMIT refusal
  into a clean actionable message at exit 2 — the central mapping's
  server-refusal code (a ClickException would exit 1, the code reserved
  for no-results/not-found).
- The command guards the SDK surface: ruleset_favorite ships in the
  paired SDK change and does not exist on the declared floor
  (published 4.3.0), so on a floor install the command fails with a
  clean upgrade message instead of an AttributeError traceback — the
  same only-the-new-surface-may-require-the-new-SDK principle as the
  withdrawn flag below. Every pre-existing command works unchanged on
  the floor; the floor itself cannot move until the SDK releases
  (specs/05 documents the exception and the follow-up bump). The tests
  that exercise the new surface skipUnless it is installed, and the
  floor-degradation test patches with create=True, so the suite is
  honest on both installs.
- drop --include-counts: it wrapped a per-request server aggregate that
  is withdrawn (no count is computed on a request path; the badge is a
  stored, server-refreshed counter) — and it crashed on the declared
  floor SDK, which CI's branch-name SDK install could never surface.
  With it gone, list_rules is zero-argument again.
- the new-results badge renders as 'New live results (last 24h)' — the
  fixed product window, since a caller can no longer choose one — with
  the new_results_counted_at staleness marker beside it.
- specs: the sdk-contract floor header follows the pin (>=4.3.0, moved
  by #264; the header had lagged at 4.2.0), and the command/formatter
  tables cover the favorite leg, its floor degradation, and the
  stored-counter render.
vhmartinezm added a commit that referenced this pull request Aug 26, 2026
…ntract

- rules favorite <id> [--unfavorite]: the CLI leg of the favorite
  capability (API, SDK and CLI land together as one change set).
  Renders the toggle state plus the server-owned 'Favorites used: N of
  M' budget, and converts the machine-readable FAVORITE_LIMIT refusal
  into a clean actionable message at exit 2 — the central mapping's
  server-refusal code (a ClickException would exit 1, the code reserved
  for no-results/not-found). Pinned end-to-end against a real recorded
  400 (tests/cli_test.py::test_ruleset_favorite_limit_text), not just a
  hand-built mock, so a rename of the error shape on either side fails
  a test.
- The command guards the SDK surface: ruleset_favorite ships in the
  paired SDK change and does not exist on the declared floor
  (published 4.3.0), so on a floor install the command fails with a
  clean upgrade message instead of an AttributeError traceback — the
  same only-the-new-surface-may-require-the-new-SDK principle as the
  withdrawn flag below. Every pre-existing command works unchanged on
  the floor; the floor itself cannot move until the SDK releases
  (specs/05 documents the exception and the follow-up bump). Every
  test touching the new surface is guarded on the narrowest dependency
  it actually needs (the method for command tests, the resource class
  for formatter fixture tests) so a rename on either side skips only
  the tests that need it, not the whole suite silently.
- drop --include-counts: it wrapped a per-request server aggregate that
  is withdrawn (no count is computed on a request path; the badge is a
  stored, server-refreshed counter) — and it crashed on the declared
  floor SDK, which CI's branch-name SDK install could never surface.
  With it gone, list_rules is zero-argument again.
- the new-results badge renders as 'New live results (last 24h)' — the
  fixed product window, since a caller can no longer choose one — with
  the new_results_counted_at staleness marker beside it.
- specs: the sdk-contract floor header follows the pin (>=4.3.0, moved
  by #264; the header had lagged at 4.2.0), the imports table records
  RequestException/.request.errors as a real SDK dependency, and the
  command/formatter tables cover the favorite leg, its floor
  degradation, and the stored-counter render.
sbneto added a commit that referenced this pull request Aug 28, 2026
The 'exit 2 is the server-refusal code' claim was dropped from a comment and
specs/02 last commit but survived in the command DOCSTRING — which is what
'rules favorite --help' prints — and in two test docstrings. ExceptionHandlingGroup
maps 2 to a broad bucket, so the supportable contract is '2, not 1'.

cli_test.py hand-rolled a second copy of _needs_favorite_method against the same
hasattr, which is the drift tests/_sdk_guards.py was added to stop; the last
hardcoded '4.3.0' in a guard assertion now reads SDK_FLOOR, the constant
SdkFloorConstantTest ties to the pin.

Two dangling references: a comment cited '--include-counts', withdrawn inside
this PR and present nowhere in the tree, and another still said list is
zero-argument after this change gave it filters.

specs/03 attributed the floor to the behaviours that set 4.2.0 — 4.3.0 came from
the #264 bump — and now points at specs/05 rather than restating it. specs/04
and specs/05 said 'utils.' for helpers that live in client/utils.py, not the
top-level utils.py specs/01 documents.

Also records why exc.request is read directly: RequestException.__init__ assigns
it unconditionally, so a guard there would be dead code. Raised twice in review;
written down so it stays settled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants