Repository navigation
Release 0.6.0: prospecting plan command, email_validated deprecation, offset cap - #44
Merged
Merged
Conversation
The API's email_validated contact filter never meant what it said: the index flag behind it only recorded that a third-party verifier had run at some point, not its verdict, and about a fifth of "validated" addresses were catch-all. discolike-platform!971 makes the API accept and ignore it, and contact results now carry email_validated as null until the user runs email verification. The generator drops deprecated spec fields, so the field is removed from ContactsSearchParams, ContactsCountParams and ContactFilters now, ahead of the deploy, matching what the next regen produces. Callers that still pass it keep working (extra="allow" sends it through, the API ignores it) and get a DeprecationWarning from the request base. The CLI keeps --email-validated/--no-email-validated so existing scripts do not break, but warns on stderr and stops sending it. The bulk contacts CSV keeps its email_validated column for downstream readers. gen_requests.py --check and check_contract.py report the three fields against api-dev until the platform change deploys there.
Platform !971 changed course: the API no longer ignores email_validated=true but applies it as has_email=true, so old callers keep getting contacts that have an email instead of silently widening to contacts with none. Dropping the CLI flag would have widened exactly that way, so --email-validated now sends has_email=true (winning over --no-has-email, as the API's validator does) and --no-email-validated warns and does nothing. The SDK passthrough already reaches the API's mapping; only its warning text changes. check_contract.py skipped query params only when "deprecated" sat on the parameter object, but FastAPI puts it inside the parameter's schema. gen_requests.py already honoured that location, so against the spec built from the !971 branch the generator dropped email_validated while the contract check still demanded it on the two GET routes.
The API, docs, SDK and CLI now carry the same deprecation text, so a user reading any surface sees the same contract. An explicit --has-email or --no-has-email now beats --email-validated: the user said what they want for has_email, and the deprecated flag only fills that in when they did not.
fix(sdk,cli): deprecate the email_validated contact filter
The API now leaves a plan's contact engine, company check engine or
search provider unselected when an organization has several providers
and none is the default, and approve returns 409 until one is picked.
The SDK already wraps PATCH /prospecting/runs/{id}/plan, but CLI users
had no way to reach it, so such a run could not be approved from the
CLI. `prospecting plan` forwards every ProspectingPlanSettings field and
sends only the flags passed, so it also covers resizing and spend
limits without restarting the run.
The plan tests' responses had no plan_version, so the model's default of 1 hid whether the new version reached stdout; users need that value for their next approve.
CLI: prospecting plan command
The API now expands EUROPE, ASIA, AFRICA, NORTH_AMERICA, SOUTH_AMERICA, OCEANIA and ANTARCTICA; EU stays the 27 member states. Hand-edited ahead of the platform deploy, like email_validated.
The API now answers 422 above 10,000 instead of silently clamping, so validate client-side and point deep pagination at exclusion lists. Hand-edited ahead of the platform deploy; gen_requests --check will flag it until the deployed spec carries the bound.
… work-in-progress limits Bump the SDK and CLI to 0.6.0 in _version.py, both pyproject.toml files, the discolike[cli] extra pin and uv.lock, and date the Unreleased changelog section. Adds one changelog entry for the API's new limits on queued email lookups and running async tasks: the transport already waits out their 429 with Retry-After: 60, so the entry only says how long a submit can block.
The platform release is live, so the offset cap, continent codes and the email_validated deprecation no longer need hand edits. gen_requests.py --check is clean; the changelog drops the notes that said it would not be.
| offset: Annotated[ | ||
| int | None, | ||
| Field(description="Records to skip for pagination.", ge=0, title="Offset"), | ||
| Field(description="Records to skip for pagination.", ge=0, le=10000, title="Offset"), |
There was a problem hiding this comment.
The new DiscoverParams.offset cap has no test at its boundary. Add tests that accept 10000, reject 10001 with pydantic.ValidationError, and keep an omitted offset out of to_wire(). This would catch a later regeneration that removes the cap or changes which values are allowed. PR #43 keeps the cap but adds no such tests.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/discolike/src/discolike/_generated/requests.py
Line: 2124
Comment:
**Offset boundary lacks tests**
The new `DiscoverParams.offset` cap has no test at its boundary. Add tests that accept `10000`, reject `10001` with `pydantic.ValidationError`, and keep an omitted `offset` out of `to_wire()`. This would catch a later regeneration that removes the cap or changes which values are allowed. PR #43 keeps the cap but adds no such tests.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The CLI builds its client with no retry option, so a CLI command over a work-in-progress limit waits out the retries and exits 4.
Release prep 0.6.0: version bump and work-in-progress limits note
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.6.0 of
discolike(SDK) anddiscolike-cli. Full notes in CHANGELOG.md.Merge #43 into
developmentfirst. It carries the version bump, the dated changelog section and the regenerated request models; until then this PR still says 0.5.0.Added:
prospecting plan RUN_ID --plan-version Nchanges a proposed plan before approval (engines, search provider, sizes, deliverable, goal, both spending limits).Changed:
email_validatedcontact filter is deprecated and treated ashas_email. It still works and raises aDeprecationWarning;--email-validatedwarns on stderr.DiscoverParams.offsetis limited to 0-10,000, matching the API's 422.Retry-After: 60, already retried by the transport).After merge: publish a GitHub release tagged
v0.6.0;publish.ymlpushes both packages to PyPI onrelease: published.The PR appears safe to merge after the required PR #43, with a non-blocking request to test the offset boundary.
Fix with agent prompt
Summary
Adds
prospecting planto edit a proposed plan before approval. Deprecates the contact filteremail_validated, adds the discovery offset cap, and updates country descriptions and contract checks.email_validatedin favor of email presence.Reviews (1) · Last reviewed commit: "Limit DiscoverParams.offset to 10,000 to..." · Reviewed by Greptile