Skip to content

properties list: omit propertyType when unfiltered, pass values through verbatim - #22

Merged
piekstra merged 1 commit into
mainfrom
fix/properties-list-property-type
Aug 11, 2026
Merged

properties list: omit propertyType when unfiltered, pass values through verbatim#22
piekstra merged 1 commit into
mainfrom
fix/properties-list-property-type

Conversation

@piekstra

Copy link
Copy Markdown
Owner

Fixes #20.

lofty properties list was entirely broken: the upstream marketplace endpoint changed its propertyType enum, and every documented value (ALL — the default the CLI always sent — plus RESIDENTIAL/COMMERCIAL) now returns HTTP 400 invalid_property_type.

Change

  • No --property-type → the parameter is omitted entirely. Omission already means "all types" upstream; the ALL sentinel is gone.
  • A given value is passed through verbatim — no client-side casing, mapping, or validation — so future upstream enum changes work without a CLI release. Help text now notes values are upstream-defined and lists the currently observed ones (probed live: single family, vacation rental, duplex, triplex, fourplex, mixed use, commercial — the lowercase strings from the listings' own property_type field).
  • Query construction extracted into a list_query helper with offline tests for both the omission and the pass-through.
  • Version bump 0.1.6 → 0.1.7 per release convention.

Verification

  • make verify green (fmt, clippy -D warnings, 115 tests, offline smoke).
  • Live read-only smoke with the built binary: properties list --json returns the full set again; --property-type "vacation rental" is accepted and echoed back by upstream.

The upstream marketplace endpoint changed its propertyType enum out from
under the CLI: every documented value (ALL, RESIDENTIAL, COMMERCIAL) now
400s with invalid_property_type, so `properties list` — which defaulted
to sending ALL — was entirely broken.

Probing the live API shows the accepted values are now the lowercase
strings from the listings' own `property_type` field ("single family",
"vacation rental", "duplex", "triplex", "fourplex", "mixed use",
"commercial"), and that omitting the parameter already means all types.

So stop encoding upstream's enum here at all:

- No --property-type → omit the parameter entirely (no ALL sentinel).
- A given value is passed through verbatim — no client-side casing,
  mapping, or validation — so the next upstream enum change doesn't
  need a CLI release to use. Help text now says the values are
  upstream-defined and lists the currently observed ones.

Query construction moves into a list_query helper with offline tests
covering both the omission and the verbatim pass-through.

Fixes #20
@piekstra
piekstra requested a review from piekstra-dev August 11, 2026 12:45

@piekstra-dev piekstra-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: f62378e3a903
Profile: reviewer - Posting as: piekstra-dev

Summary

Severity Findings
blocking 0
major 0
minor 0
nits 0

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 28s | $0.19 | claude-sonnet-5 | cr 0.10.268
Field Value
Model claude-sonnet-5
Reviewers unavailable
Engine claude_cli · claude-sonnet-5
Reviewed by cr · piekstra-dev
Duration 28s wall · 24s compute
Cost $0.19
Tokens 12 in / 1.3k out

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection claude-sonnet-5 6 889 49.7k 10.8k $0.09 13s
orchestrator-rollup claude-sonnet-5 6 376 57.4k 12.8k $0.10 11s

@piekstra
piekstra merged commit bb1f145 into main Aug 11, 2026
2 checks passed
@piekstra
piekstra deleted the fix/properties-list-property-type branch August 11, 2026 12:50
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.

properties list: upstream rejects propertyType enum (ALL/RESIDENTIAL → HTTP 400 invalid_property_type)

2 participants