Skip to content

Release --window-days for Historical Hunts - #281

Merged
alanjds merged 9 commits into
masterfrom
develop
Oct 22, 2026
Merged

alanjds merged 9 commits into
masterfrom
develop

Conversation

@alanjds

@alanjds alanjds commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Releases 4.7.0

Includes the --window-days option on historical hunts

claude and others added 7 commits October 20, 2026 17:52
…ate(window_days=)

CI installs the SDK from the same-named branch archive, so the floor names
the version the paired SDK change declares: 4.8.0, the next version above
the 4.7.0 the SDK's develop already declares. It is mergeable once that
change is on the SDK's develop, and releasable once 4.8.0 is on PyPI.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
-w/--window-days picks how many days back a historical hunt reaches: a
closed choice of 30, 60, 90 or 180, mirroring the server's enum so a bad
value is a usage error before any request. It is forwarded to
historical_create as an int, and only when passed, so a script that
omits it makes the same SDK call as before and the hunt reaches the
platform maximum. The help does not name a day count for that maximum,
because the server owns it.

Tests drive the command through autospec'd SDK mocks, which also check
the signature against the installed SDK.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
The hunt block prints a Time Range line right after Created at: "Last N
days" for a hunt created with a window, "Platform maximum" for one created
without (the key is null, or a server that predates it never sent it).
The web UI uses the same two labels. The JSON formatter already dumps the
resource's own JSON, so it carries the raw key and needed no change.

The three text snapshots that render a historical hunt gain the one new
line, because their recorded responses carry no window: regenerated by
deleting each .click and re-running its test, with every .vcr untouched.
The JSON snapshots and every other text snapshot are unchanged.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
The option keeps only its long name. It has not been released, so no
invocation depends on the short form.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
Applies the review suggestion; the help test now checks the new wording.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
`historical start --window-days 30`, in text and JSON, recorded against a live
e2e stack: the request carries window_days 30 and the server echoes it, which
renders as `Time Range: Last 30 days`. The suite's API host was mapped to the
stack for the run, so these cassettes pin the same host as every other one.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
feat(historical): start takes --window-days, text output shows the time range
@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown

Gitflow / release: this is a develop → master release PR, but pyproject.toml version is still 4.6.0. Per AGENTS.md, "PyPI release happens automatically when pyproject.toml's version changes on master" and "version bumps belong to the develop → master step", so merging this as it stands won't publish --window-days. It adds a user-facing option and raises the SDK floor to polyswarm_api>=4.8.0, so bump the version (minor, e.g. 4.7.0) in this PR. Also confirm polyswarm_api 4.8.0 is on PyPI before merging. Without it, installs from PyPI can't resolve the new floor.

Nothing else needs action. The code, specs (02/03/05) and tests (autospec SDK-boundary, Style 3 formatter, re-recorded cassettes) match the documented conventions.

Release bump for 4.7.0: `historical start --window-days` (#279). The SDK
floor `polyswarm_api>=4.8.0` is already pinned, and polyswarm-api 4.8.0 is
on PyPI, so the develop → master release can resolve it.

Co-Authored-By: Alan Justino <alan.justino@yahoo.com.br>
@alanjds
alanjds marked this pull request as ready for review October 22, 2026 17:22
@alanjds
alanjds requested review from a team and mjbradford89 October 22, 2026 17:23
@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown

Clean against AGENTS.md and specs/. This is a develop → master release PR, so the version bump to 4.7.0 (pyproject, bumpversion, __init__) belongs here. Code, specs 02/03/05 and tests agree with each other. The only callers of output.hunt are in historical.py, which matches what 03-formatters claims.

One check before merging: this merge publishes 4.7.0 to PyPI, and that release pins polyswarm_api>=4.8.0. Make sure polyswarm_api 4.8.0 (a final release, not a .dev build) is already on PyPI. If it isn't, pip install polyswarm fails to resolve. I couldn't check PyPI from CI.

@alanjds
alanjds merged commit b6c98a0 into master Oct 22, 2026
3 checks passed
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.

3 participants