Problem
CLI default FieldNames for several get commands contain values that don't exist in the corresponding WSDL *FieldEnum definitions. The current test suite (test_api_coverage.py) validates method-level coverage and dry-run payload shapes, but does not check whether default FieldNames match WSDL enums.
This causes error_code=8000 (Invalid request) at runtime when the API rejects unknown field names.
Confirmed mismatches
1. Invalid field names (cause API error 8000)
| Resource |
CLI sends |
Invalid field(s) |
WSDL-valid alternatives |
strategies |
["Id", "Name", "Type", "IsArchived"] |
IsArchived |
StatusArchived |
turbopages |
["Id", "Name", "Status", "Href"] |
Status |
TurboSiteHref, PreviewHref, BoundWithHref |
businesses |
["Id", "Name", "Url"] |
Url |
ProfileUrl, InternalUrl, Urls |
smartadtargets |
["Id", "CampaignId", "AdGroupId", "Status", "ServingStatus"] |
Status, ServingStatus |
State |
Note: strategies, turbopages, businesses are already fixed in #107. smartadtargets is still broken.
2. Missing fields (data silently omitted from response)
| Resource |
CLI sends |
Missing useful field |
adextensions |
["Id", "Type", "Status"] |
State (exists in WSDL) |
3. Dual-source inconsistency
Some commands hardcode default fields instead of using COMMON_FIELDS from utils.py, creating two independent sources of truth that can diverge:
| Resource |
COMMON_FIELDS (utils.py) |
Hardcoded in command |
Diverges? |
strategies |
(not defined) |
["Id", "Name", "Type", "IsArchived"] |
N/A |
turbopages |
["Id", "Name", ...] |
["Id", "Name", ...] |
No |
businesses |
["Id", "Name", ...] |
["Id", "Name", ...] |
No |
ads |
[..., "TextAd"] |
["Id", "CampaignId", "AdGroupId", "Status", "State", "Type"] |
Yes — COMMON_FIELDS includes TextAd, command doesn't |
adextensions |
["Id", "Type", "Status"] |
["Id", "Type", "Status"] |
No |
Typical mismatch patterns
- Renamed field: API renamed the field but CLI wasn't updated (e.g.
IsArchived → StatusArchived)
- Removed field: Field existed in older API version but was removed (e.g.
Status in turbopages)
- Invented field: Developer assumed a field name that was never in the schema (e.g.
Url in businesses — API has ProfileUrl, InternalUrl, Urls)
- Wrong enum: Field valid for a different resource type was used (e.g.
Status/ServingStatus from campaigns applied to smartadtargets which only has State)
What broke in tests
All 6 failures from the integration test run (#96):
strategies get → error_code=8000: "IsArchived" invalid enum value
turbopages get → error_code=8000: "Status" invalid enum value
businesses get → error_code=8000: "Url" invalid enum value + requires SelectionCriteria filter
leads get → exit_code=2: test used --campaign-ids (nonexistent option, requires --turbo-page-ids)
advideos get → error_code=8000: omitted required parameter Ids (no list-all endpoint)
agencyclients → error_code=54: not an agency account (test didn't catch error_code=54)
Proposed fix
Add a test in test_api_coverage.py that:
- Parses all
*FieldEnum definitions from tests/wsdl_cache/*.xml
- Extracts default FieldNames from each CLI
get command (both COMMON_FIELDS and hardcoded)
- Asserts every default field exists in the corresponding WSDL enum
- Reports mismatches with the exact WSDL-expected values
This would have caught all 4 invalid-field bugs before they reached integration tests.
Remaining work after #107
Problem
CLI default
FieldNamesfor severalgetcommands contain values that don't exist in the corresponding WSDL*FieldEnumdefinitions. The current test suite (test_api_coverage.py) validates method-level coverage and dry-run payload shapes, but does not check whether default FieldNames match WSDL enums.This causes
error_code=8000(Invalid request) at runtime when the API rejects unknown field names.Confirmed mismatches
1. Invalid field names (cause API error 8000)
strategies["Id", "Name", "Type", "IsArchived"]IsArchivedStatusArchivedturbopages["Id", "Name", "Status", "Href"]StatusTurboSiteHref,PreviewHref,BoundWithHrefbusinesses["Id", "Name", "Url"]UrlProfileUrl,InternalUrl,Urlssmartadtargets["Id", "CampaignId", "AdGroupId", "Status", "ServingStatus"]Status,ServingStatusState2. Missing fields (data silently omitted from response)
adextensions["Id", "Type", "Status"]State(exists in WSDL)3. Dual-source inconsistency
Some commands hardcode default fields instead of using
COMMON_FIELDSfromutils.py, creating two independent sources of truth that can diverge:strategies["Id", "Name", "Type", "IsArchived"]turbopages["Id", "Name", ...]["Id", "Name", ...]businesses["Id", "Name", ...]["Id", "Name", ...]ads[..., "TextAd"]["Id", "CampaignId", "AdGroupId", "Status", "State", "Type"]TextAd, command doesn'tadextensions["Id", "Type", "Status"]["Id", "Type", "Status"]Typical mismatch patterns
IsArchived→StatusArchived)Statusin turbopages)Urlin businesses — API hasProfileUrl,InternalUrl,Urls)Status/ServingStatusfrom campaigns applied to smartadtargets which only hasState)What broke in tests
All 6 failures from the integration test run (#96):
Proposed fix
Add a test in
test_api_coverage.pythat:*FieldEnumdefinitions fromtests/wsdl_cache/*.xmlgetcommand (bothCOMMON_FIELDSand hardcoded)This would have caught all 4 invalid-field bugs before they reached integration tests.
Remaining work after #107
smartadtargetsdefault fields:Status/ServingStatus→StateStatetoadextensionsdefault fieldsTypefrombusinessesCOMMON_FIELDS (not in WSDL enum)test_api_coverage.py