Skip to content

Regenerate Python connectors from merged query-contract fixes - #101

Merged
David Burg (daviburg) merged 14 commits into
mainfrom
fix/regenerate-merged-query-contracts
Oct 8, 2026
Merged

David Burg (daviburg) merged 14 commits into
mainfrom
fix/regenerate-merged-query-contracts

Conversation

@daviburg

@daviburg David Burg (daviburg) commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Regenerate the existing 99-connector Python inventory and show the downstream result of the paired generator fix. The 33-client internal-default encoding delta and its exact SDK regression are published in commit dab5d97. No generated file was hand-edited.

Paired Generator Source

  • BPM PR 17368905, CodefulSdkGenerator: encode internal Python query defaults, by David Burg.
  • Exact generating source: commit 71906fe, rebuilt compiler version 1.193.0.9.
  • Status: active/unmerged. This SDK PR intentionally shows that linked BPM PR's generated outcome before upstream merge. Publication is complete; upstream integration remains a separate final SDK merge gate. The source is not described as merged.
  • The generator suite passed 821 tests, including old-fails/new-passes short and wrapped internal-default regressions.

Current Generated Outcome

  • Caller-supplied and internal-default query values escape reserved characters, including /.
  • The committed Groups Mail assertion now checks $filter=groupTypes%2Fany%28c%3Ac%20eq%20%27Unified%27%29 exactly and passes. It is no longer a local, uncommitted, failing test.
  • All 99 clients were generated from fresh live westus definitions in subscription f34b22a3-2202-4fb1-b040-1332bd928c84, API 2018-07-01-preview, using a new empty temporary response directory. Temporary inputs/outputs are removed after validation; reviewers make independent live downloads.
  • Jira's October 6 live fields: Optional[str] contract is retained. Its tests cover absent, explicit, and empty fields plus named continuation-token binding; callers should use keyword arguments for fields/token.
  • Seismic Planner tests execute CSV IDs and the existing runtime scalar fallback with slash-bearing values, plus empty/omitted controls. Both slash assertions fail against the immutable old client and pass now.

Paging and Consumer Changes

The existing automatic item-iterator contract is propagated to 32 additional connectors. This is separate from query encoding and traces to merged BPM PR 17086991, CodefulSdkGenerator: preserve Dataverse pagination continuations, by David Burg, and Python PR #84, Fix Dataverse list pagination, by David Burg (@daviburg).

Changed samples capture semantic collections directly, preserve nullable non-pageable guards, and are tested with empty/nonempty/None results as appropriate. Actual continuation tests assert later-page requests/items and final termination, including an empty first page. Scope/consumer findings have contextual replies and evidence; no cache/replay scaffolding was introduced.

Validation

  • Full current Python suite: 4,279 passed, three warnings, zero failures.
  • Full source/test/sample lint and source mypy passed (108 source files).
  • Focused Groups Mail/Jira/Seismic Planner checks: 70 passed. The exact internal-default filter check passes against the paired output.
  • Generator suite: 821 passed; source-linked paired output is ready for review, not inferred to be merged upstream.
  • The TypeScript sibling was generated independently from the same active source with fresh live inputs: all 75 committed outputs match; no TypeScript generated-code churn is needed for this Python-specific fix.
  • No live connector actions or deployed samples were exercised.

Remaining Review Gates

  • Event Hubs scalar-map compatibility remains an open, separate contract decision in its individual thread. This encoding change does not resolve it.
  • Final SDK merge requires upstream integration and the remaining human review/contract gates. It does not block showing paired generated output here.
  • Companion TypeScript PR #105 records the unchanged sibling result and the same paired-publication workflow.

Populated Pagination and Validator Coverage

Commit dabdac0 closes the concrete Copilot pagination request. Shared pageable success fixtures contain contract-keyed populated items. Elfsquad OData entities and all 11 pageable newly generated-operation cases assert populated multi-page results, empty-first-page continuations, exact later requests/items, and termination. Empty-body, empty-collection, and 204 controls remain separate. Wrong-key and missing-continuation mutations are rejected by nine negative controls without changing product files.

The same revision repairs RHS-before-reassignment and parameter-shadowing validator misses, including sync/async scopes and outer default evaluation. Focused connector/operation tests: 117 passed; sample/validator tests: 140 passed; full suite: 4,279 passed with three warnings. Lint and source typing pass. No live service execution, generated-client change, or resolution of the unrelated Event Hubs contract is implied by these test-infrastructure fixes.

Follow-Up Copilot Findings

Commit 15e3c3a addresses all three new inline findings with contextual replies and verified resolution:

  • Comprehensions now use local target facts across list/set/dict/generator forms, validate each iterable before binding, and restore enclosing facts. Five old-failing shadowing cases now pass; the invalid outer-iterable control remains detected. All 146 sample/validator tests pass.
  • Azure AD, Slack, and Azure Tables have their own populated/empty-first continuation tests using their exact next-link fields. Exact requests, bodies, yielded dictionaries, and termination are asserted while single-page controls remain. All 164 connector/Elfsquad tests pass; six wrong-continuation mutations are rejected without changing product files.
  • The 11 expected new pageable methods are declared independently of runtime inspection. Iterator shape, case retention, and populated fixtures are invariant. A single-page coroutine mutation retains all 11 cases but fails four guards; the shared success helper is also declaration-driven. All 102 operation-harness tests pass.

Full current Python validation: 4,279 passed, three warnings; lint and source typing pass. No generated file changed in this iteration. The user-authored workflow merge was fast-forwarded and preserved. The Event Hubs contract thread and separate TypeScript provenance findings are not represented as resolved by these focused repairs.

Co-authored-by: Dobby <dobby@microsoft.com>
Comment thread samples/sample_connector_usage/sample_connector_usage_arm.py
Comment thread samples/sample_connector_usage/sample_connector_usage_arm.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_azuredigitaltwins.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Four updated samples still treat collected pageable results as dictionaries, causing incorrect output or runtime errors.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Regenerates the connector inventory with corrected query escaping and async-iterator pagination, alongside updated tests, samples, and provenance validation.

Changes:

  • Fully percent-encodes generated query values.
  • Converts pageable operations to async iterators that follow continuation links.
  • Updates tests, samples, and regeneration validation.
File Description
tests/​test_zendesk.py Adapts tests to pageable results.
tests/​test_yammer.py Adapts message tests to iteration.
tests/​test_wdatp.py Tests yielded security records.
tests/​test_sql.py Updates pageable SQL tests.
tests/​test_slack.py Tests channel iteration.
tests/​test_shifts.py Tests shift iteration.
tests/​test_sharepointonline.py Updates list-item tests.
tests/​test_salesforce.py Updates pageable Salesforce tests.
tests/​test_rss.py Verifies escaped feed URLs.
tests/​test_regenerated_operation_coverage.py Adds provenance hashes and pageable contracts.
tests/​test_regenerated_connector_samples.py Tests invalid awaiting of pagers.
tests/​test_planner.py Updates task-list expectations.
tests/​test_onenote.py Updates page-list tests.
tests/​test_onedriveforbusiness.py Collects pageable errors correctly.
tests/​test_onedrive.py Updates folder-list expectations.
tests/​test_office365users.py Updates user-search tests.
tests/​test_office365groupsmail.py Updates pageable mail operations.
tests/​test_office365groups.py Updates group-list tests.
tests/​test_office365.py Updates contact-item tests.
tests/​test_ftp.py Verifies encoded paths.
tests/​test_excelonlinebusiness.py Updates row pagination tests.
tests/​test_excelonline.py Updates row pagination tests.
tests/​test_eventhubs.py Verifies encoded content types.
tests/​test_elfsquaddata.py Updates entity iteration tests.
tests/​test_dynamicsax.py Handles mixed pageable operations.
tests/​test_dropbox.py Verifies encoded folder paths.
tests/​test_documentdb.py Updates document iteration tests.
tests/​test_box.py Verifies encoded paths.
tests/​test_azuretables.py Updates entity iteration tests.
tests/​test_azuremonitorlogs.py Updates discovery pagination tests.
tests/​test_azureiotcentral.py Updates device-list tests.
tests/​test_azuredigitaltwins.py Updates pageable list tests.
tests/​test_azureblob.py Updates folder pagination tests.
tests/​test_azuread.py Updates member pagination tests.
tests/​test_arm.py Adds multi-page ARM validation.
tests/​generated_connector_test_utils.py Supports awaitables and async iterators.
swagger-cache/​universalprint.swagger.json Adds pinned Universal Print input.
swagger-cache/​smtp.swagger.json Adds pinned SMTP input.
swagger-cache/​rss.swagger.json Adds pinned RSS input.
swagger-cache/​orderful.swagger.json Adds pinned Orderful input.
swagger-cache/​microsoftforms.swagger.json Adds pinned Forms input.
swagger-cache/​formstackforms.swagger.json Adds pinned Formstack input.
src/​azure/​connectors/​zohosign.py Fully escapes query values.
src/​azure/​connectors/​wordonlinebusiness.py Fully escapes query values.
src/​azure/​connectors/​webex.py Fully escapes query values.
src/​azure/​connectors/​waywedo.py Fully escapes query values.
src/​azure/​connectors/​universalprint.py Fully escapes print parameters.
src/​azure/​connectors/​typeform.py Fully escapes query values.
src/​azure/​connectors/​twitter.py Fully escapes query values.
src/​azure/​connectors/​todo.py Fully escapes query values.
src/​azure/​connectors/​tallyfy.py Fully escapes query values.
src/​azure/​connectors/​starmind.py Fully escapes query values.
src/​azure/​connectors/​slack.py Adds automatic channel pagination.
src/​azure/​connectors/​rss.py Fully escapes feed parameters.
src/​azure/​connectors/​revai.py Fully escapes query values.
src/​azure/​connectors/​replicon.py Fully escapes host URLs.
src/​azure/​connectors/​plumsail.py Fully escapes query values.
src/​azure/​connectors/​planner.py Adds automatic task pagination.
src/​azure/​connectors/​msgraphgroupsanduser.py Fully escapes OData parameters.
src/​azure/​connectors/​microsoftforms.py Fully escapes response IDs.
src/​azure/​connectors/​meetingroommap.py Fully escapes query values.
src/​azure/​connectors/​mailchimp.py Fully escapes query values.
src/​azure/​connectors/​kusto.py Fully escapes session IDs.
src/​azure/​connectors/​jira.py Fully escapes Jira parameters.
src/​azure/​connectors/​insightly.py Fully escapes identifiers.
src/​azure/​connectors/​googledrive.py Updates models and query escaping.
src/​azure/​connectors/​googlecalendar.py Fully escapes calendar parameters.
src/​azure/​connectors/​ftp.py Fully escapes file paths.
src/​azure/​connectors/​eventhubs.py Updates models and query escaping.
src/​azure/​connectors/​elfsquaddata.py Adds automatic entity pagination.
src/​azure/​connectors/​dropbox.py Fully escapes file paths.
src/​azure/​connectors/​docuware.py Fully escapes query values.
src/​azure/​connectors/​commondataservice.py Updates models and OData escaping.
src/​azure/​connectors/​cloudconvert.py Fully escapes format parameters.
src/​azure/​connectors/​clicksendsms.py Fully escapes query values.
src/​azure/​connectors/​campfire.py Fully escapes query values.
src/​azure/​connectors/​box.py Fully escapes file paths.
src/​azure/​connectors/​azuretables.py Adds automatic entity pagination.
src/​azure/​connectors/​azurequeues.py Fully escapes queue parameters.
src/​azure/​connectors/​azureautomation.py Adds automatic ARM pagination.
src/​azure/​connectors/​azuread.py Adds automatic member pagination.
scripts/​validate_connector_samples.py Rejects awaiting async generators.
samples/​sample_connector_usage/​sample_connector_usage_zendesk.py Migrates item retrieval to iteration.
samples/​sample_connector_usage/​sample_connector_usage_yammer.py Migrates message retrieval.
samples/​sample_connector_usage/​sample_connector_usage_wdatp.py Migrates pageable security examples.
samples/​sample_connector_usage/​sample_connector_usage_sql.py Migrates row retrieval.
samples/​sample_connector_usage/​sample_connector_usage_slack.py Migrates channel retrieval.
samples/​sample_connector_usage/​sample_connector_usage_shifts.py Migrates shift retrieval.
samples/​sample_connector_usage/​sample_connector_usage_sharepoint.py Migrates list-item retrieval.
samples/​sample_connector_usage/​sample_connector_usage_salesforce.py Migrates table and record retrieval.
samples/​sample_connector_usage/​sample_connector_usage_planner.py Migrates task retrieval.
samples/​sample_connector_usage/​sample_connector_usage_onenote.py Migrates page retrieval.
samples/​sample_connector_usage/​sample_connector_usage_onedrive.py Migrates folder retrieval.
samples/​sample_connector_usage/​sample_connector_usage_office365users.py Migrates user search.
samples/​sample_connector_usage/​sample_connector_usage_office365groupsmail.py Migrates conversation retrieval.
samples/​sample_connector_usage/​sample_connector_usage_office365groups.py Migrates group retrieval.
samples/​sample_connector_usage/​sample_connector_usage_excelonlinebusiness.py Migrates row retrieval.
samples/​sample_connector_usage/​sample_connector_usage_elfsquaddata.py Migrates entity retrieval.
samples/​sample_connector_usage/​sample_connector_usage_documentdb.py Migrates document retrieval.
samples/​sample_connector_usage/​sample_connector_usage_azuretables.py Migrates entity retrieval.
samples/​sample_connector_usage/​sample_connector_usage_azuremonitorlogs.py Migrates discovery retrieval.
samples/​sample_connector_usage/​sample_connector_usage_azureiotcentral.py Migrates device retrieval.
samples/​sample_connector_usage/​sample_connector_usage_azuredigitaltwins.py Migrates model and relationship retrieval.
samples/​sample_connector_usage/​sample_connector_usage_azureblob.py Migrates folder retrieval.
samples/​sample_connector_usage/​sample_connector_usage_arm.py Migrates subscription retrieval.
GENERATION.md Documents pinned replay and pagination.
CHANGELOG.md Records query and paging changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread samples/sample_connector_usage/sample_connector_usage_documentdb.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_office365groupsmail.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_zendesk.py Outdated
Comment thread swagger-cache/arm.swagger.json Outdated
Comment thread GENERATION.md Outdated
Comment thread GENERATION.md Outdated
David Burg (daviburg) and others added 2 commits October 1, 2026 12:13
Co-authored-by: Dobby <dobby@microsoft.com>
Co-authored-by: Dobby <dobby@microsoft.com>
@daviburg

Copy link
Copy Markdown
Member Author

[Dobby] Review-fix handoff

Published the Python behavioral fixes and active shared rules; applied the corresponding scope/live-download rules and continuation boundary test in TypeScript PR #105.

For the two discussions left open:

  • Automatic paging: yes, iteration follows continuation links automatically. test_success_with_pagination calls the real generated method and asserts both GET requests, the exact continuation token, second-page items, and termination, including an empty first page. This is execution coverage, not a substitute code comment. The item iterator is not claimed to expose Azure Core page metadata.
  • Semantic response capture: the sample now assigns subscriptions = [item async for item in client.subscriptions_list_async()] directly. Applied semantic captures and duplicate-condition removal across the changed samples, not a one-off rename. Both SDKs' active instructions carry the principle. I left your follow-up discussions open for confirmation and did not overwrite your comments.
Ask Disposition and evidence
Automatic paging Implemented; real two-request/empty-first-page assertions pass; open for confirmation.
Semantic captures Implemented across changed consumers; negative/positive naming checks pass; open for confirmation.
Repeated conditions Removed; negative items and items and positive distinct-name controls pass; replied/resolved.
Cosmos DB envelope reads Removed from both samples; nonempty execution reproduces old failures and now passes; replied/resolved.
Groups Mail count conversation_count = len(conversations); zero/two-item executions pass; replied/resolved.
Zendesk discarded items Capture directly in items; zero/two-item executions pass; replied/resolved.
Added cache/scaffolding Entire new Python cache/manifest and new TypeScript catalog removed; artifact absence verified; replied/resolved.
Refresh from live New empty temporary directories fetched 99 Python and 75 TypeScript definitions; every generated client matched; stores removed; replied/resolved.
Independent live review Active instructions prohibit producer responses/fixtures as review inputs; separate live download required; replied/resolved.

Miss/prevention record: the original reviewed head a2dc1f2 passed import/signature checks but those checks did not execute response consumption. New tests reproduced four nonempty failures with four empty controls passing; after the consumer fixes, all eight pass. The validator also failed its new list-access regression before the repair and passed afterward. Runtime sample tests, valid counterexamples, and actual continuation assertions now provide reusable prevention; policy guidance alone does not guarantee agent compliance.

Validation: 4,174 Python tests, 118 sample tests, and 1,253 TypeScript tests passed; lint/type checks passed. No live connector actions or deployed samples were exercised. Hosted checks and a fresh review are tracked separately; this is not a blanket merge-ready claim.

@hallvictoria

Copy link
Copy Markdown
Contributor

[Dobby] High - Query contract: internal default still preserves /

At src/azure/connectors/office365groupsmail.py:1247, this internal $filter value still uses quote(...) without safe='':

quote("groupTypes/any(c:c eq 'Unified')")

The generated URL therefore contains groupTypes/any... rather than groupTypes%2Fany..., contradicting this PR's claim that reserved characters, including /, are escaped.

The current test at tests/test_office365groupsmail.py:265-282 only asserts that $filter= exists, so it misses the incorrect value.

Please update the generator's internal-default query path to emit quote(default, safe=''), add a generator regression using a slash-bearing default, regenerate, and assert the exact encoded filter here.

@hallvictoria

Copy link
Copy Markdown
Contributor

Verified fixed at 1795f04. The samples now treat collected pageable results as lists:

The validator at scripts/validate_connector_samples.py:124-149 now rejects incompatible collection method calls. The sample-consumption finding is resolved.

@hallvictoria

Copy link
Copy Markdown
Contributor

[Dobby] Medium - Scope: link the paging provenance

CHANGELOG.md:17-19 documents the breaking paging rollout, but the PR's source section links only the query-contract generator PR. This paging behavior comes from separate work: BPM PR 17086991 and Python PR #84.

Please link those sources and state that this regeneration propagates the paging contract to 32 connectors. That makes the breaking change independently traceable instead of presenting it as part of the query repair.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Several changed samples dereference nullable non-pageable responses without guards, causing successful empty-body calls to fail.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
Resolved since last review (3)

Comment thread samples/sample_connector_usage/sample_connector_usage_azuredigitaltwins.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_planner.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_wdatp.py Outdated
Co-authored-by: Dobby <dobby@microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Public property annotations conflict with supported sample usage, and several migrated samples retain redundant or unreachable conditions.

Review effort: Balanced
Findings: None

Resolved since last review (3)
Previously missed (9)

In code that hasn't changed since last review

Medium severity Remove duplicate empty-result check

samples/​sample_connector_usage/​sample_connector_usage_azuretables.py:192

This duplicates the identical check on line 194, so the inner else is unreachable and the sample has two competing empty-result messages. Keep a single branch around the loop.

Medium severity Preserve scalar application-property values in response model

src/​azure/​connectors/​eventhubs.py:34

This narrowing makes the public response model reject its established scalar application-property values: tests/test_eventhubs.py:335-342 constructs Event(properties={"type": "notification"}). Keep the dictionary value type broad enough for the actual scalar contract (as before), and fix the generator before regenerating this file.

Medium severity Preserve scalar values for SendEvent properties

src/​azure/​connectors/​eventhubs.py:100

SendEvent.properties is still used with string application properties throughout the supported API (tests/test_eventhubs.py:157-160,388-393 and the Event Hubs sample), so changing it to Dict[str, ObjectEntity] makes valid calls fail static type checking even though runtime serialization accepts them. Preserve the scalar/Any value contract in the generator and regenerate this client.

Low severity Remove redundant async comprehension self-assignment

samples/​sample_connector_usage/​sample_connector_usage_azureiotcentral.py:55

The async comprehension already always produces a list, so this self-assignment is a no-op. Remove it to keep the migrated consumer direct and avoid the redundant condition.

This issue also appears on line 72 of the same file.

Low severity Remove redundant subscriptions length condition

samples/​sample_connector_usage/​sample_connector_usage_azuremonitorlogs.py:75

subscriptions is always a list after the async comprehension, and len([]) is already zero. Remove the redundant condition and count it directly.

This issue also appears on line 81 of the same file.

Low severity Remove redundant async comprehension self-assignment

samples/​sample_connector_usage/​sample_connector_usage_salesforce.py:48

The async comprehension already always produces a list, so this self-assignment is a no-op. Remove it to keep the migrated consumer direct and avoid the redundant condition.

This issue also appears on line 80 of the same file.

Low severity Remove redundant async comprehension self-assignment

samples/​sample_connector_usage/​sample_connector_usage_shifts.py:75

The async comprehension already always produces a list, so this self-assignment is a no-op. Remove it to keep the migrated consumer direct and avoid the redundant condition.

Low severity Remove redundant async comprehension self-assignment

samples/​sample_connector_usage/​sample_connector_usage_slack.py:42

The async comprehension already always produces a list, so this self-assignment is a no-op. Remove it to keep the migrated consumer direct and avoid the redundant condition.

Low severity Remove redundant async comprehension self-assignment

samples/​sample_connector_usage/​sample_connector_usage_sql.py:100

The async comprehension already always produces a list, so this self-assignment is a no-op. Remove it to keep the migrated consumer direct and avoid the redundant condition.

David Burg (daviburg) and others added 2 commits October 1, 2026 14:42
Co-authored-by: Dobby <dobby@microsoft.com>
Co-authored-by: Dobby <dobby@microsoft.com>
Co-authored-by: Dobby <dobby@microsoft.com>
@daviburg

Copy link
Copy Markdown
Member Author

[Dobby] Reply to the October 6 live Jira drift finding

hallvictoria, in reply to your Jira reproducibility comment: refreshed Jira in commit 8462815. This is observed live managed-connector contract drift, not a post-generation hand edit; the connector owner's intent is not inferred.

I rebuilt the declared merged BPM revision 7c26edf, compiler version 1.193.0.5, and generated only Jira from fresh westus definitions in subscription f34b22a3-2202-4fb1-b040-1332bd928c84, using a new empty response directory. A second independent empty-directory live download reproduced the new Python file exactly after line-ending normalization. Input/output stores were then removed.

list_issues_async now exposes fields: Optional[str] = None, omits fields when unspecified, and no longer injects fields=*all. The new signature/omitted/populated/empty tests all failed against the previous client and pass after regeneration; a named next_page_token test confirms its existing query binding. The changelog notes that callers should use keyword arguments because fields precedes the token in the generated signature. All 25 Jira tests pass.

I independently checked the TypeScript sibling: its fields option was already public, and today's output differs only in the live description. TypeScript commit a3f6f91 refreshes that exact generated documentation, its existing Jira fixture/hash entry, a per-Jira capture timestamp, and optional-fields request tests; filtered registries were not applied. All 9 TypeScript Jira tests and the full 1,260-test suite pass.

Disposition: fixed and independently verified for Jira. This is a narrow October 6 Jira refresh, not a claim that every other connector was freshly recaptured today. The separate unmerged internal-default encoding and Event Hubs contract blockers remain explicit; no output from the unmerged generator repair was used.

@daviburg

David Burg (daviburg) commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

[Dobby] Updated in place: the paired generator output is now published

hallvictoria, correction to my earlier response to your internal-default follow-up: I incorrectly treated upstream merge as a prerequisite for publishing the downstream outcome. The generator and SDK PRs are a review pair.

SDK commit dab5d97 now contains all affected generated Python clients and the exact encoded-filter assertion, generated from BPM PR 17368905, CodefulSdkGenerator: encode internal Python query defaults, by David Burg, at exact source 71906fe, compiler 1.193.0.9.

That source is active/unmerged, and is deliberately identified as such. All 99 clients were generated from fresh live definitions, 33 clients changed for internal-default encoding, and the previously red assertion now passes with $filter=groupTypes%2Fany%28c%3Ac%20eq%20%27Unified%27%29. The full current Python suite passes 4,197 tests with zero failures; lint and source typing pass. The exact test is committed, not merely prepared locally.

The corresponding 75 TypeScript outputs were checked from the same source using a separate fresh live download and were byte-identical after line-ending normalization, so no generated TypeScript churn was needed. Both PRs' active guidance now distinguish showing paired output from final merge readiness. Temporary response/output stores are removed after verification.

Disposition: the encoding implementation and downstream regression are now published and passing. Upstream integration is still a final merge gate, not a publication blocker. The separate Event Hubs map-contract thread is unchanged and is not claimed fixed by this encoding result.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Unresolved schema contracts and pending generator integration require human review before approval.

Review effort: Balanced
Findings: None

Previously missed (3)

In code that hasn't changed since last review

Medium severity Validate RHS before updating reassigned variable type

scripts/​validate_connector_samples.py:98

This clears the assignment target's type before validating the right-hand side. After collecting items, items = items.get('value', []) therefore passes validation even though it raises AttributeError; the standalone items.get(...) control is correctly rejected. Visit the right-hand side with the previous type facts before updating either target map, and add a same-name reassignment regression.

Medium severity Clear shadowed parameter facts before function validation

scripts/​validate_connector_samples.py:106

Outer type facts remain active for parameters that shadow those names. For example, items = [] at module scope followed by async def consume(items: dict) makes a valid items.get(...) call fail validation as a list method error. Clear inherited variable and client facts for parameter names before visiting the function, then restore the outer scope afterward. Add a shadowing regression alongside the existing validator tests.

Medium severity Resolve Event Hubs scalar-map type compatibility

src/​azure/​connectors/​eventhubs.py:100

Both SendEvent.properties here and Event.properties at line 34 now require ObjectEntity values. Existing tests construct scalar maps such as {"type": "greeting"} and {"type": "notification"} (tests/test_eventhubs.py:159,337), and the sample also sends string properties. These payloads still work with the dataclasses at runtime but no longer satisfy their public types. Complete the pending Event Hubs contract arbitration and approved schema normalization, then regenerate both models and add scalar-map compatibility coverage. Do not hand-edit the generated annotations or widen unrelated typed maps.

David Burg (daviburg) and others added 2 commits October 6, 2026 17:08
Generated from BPM PR 17368905 source 71906fed9cdd8765caa4ff181a2fcde4d533d0ac; upstream PR is active, not merged.

Co-authored-by: Dobby <dobby@microsoft.com>
Co-authored-by: Dobby <dobby@microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The broad API refresh retains unresolved contract and upstream integration gates requiring maintainer verification.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread tests/generated_connector_test_utils.py Outdated
@daviburg

Copy link
Copy Markdown
Member Author

[Dobby] Disposition of the validator coverage asks

For the two validator asks in this review body's Previously missed section, both are fixed in commit dabdac0:

  1. RHS before reassignment: visit_Assign visits the value with the existing type/client facts before updating targets, and clears stale client facts on non-client assignments. The new regression reproduces items = items.get('value', []): the old validator emitted no finding, whereas the repaired validator reports the list-method error. Existing standalone-access controls remain intact.
  2. Parameter shadowing: sync and async functions clear inherited parameter facts for positional, positional-only, keyword-only, vararg, and kwarg names while visiting the body, then restore the enclosing maps. Tests exercise sync/async ordinary/positional-only/keyword-only shadowing and require the outer list check still to work afterward. Function defaults, annotations, and decorators are visited in the outer scope before shadowing; a further regression catches an invalid outer client method in a same-name default expression.

Old-fails/new-passes evidence: the same-name reassignment and initial sync/async shadowing cases all failed before the repair; the default-expression control also exposed a local false negative before its correction. All 140 existing and new sample/validator tests pass after the fixes. Full Python suite: 4,266 passed, three warnings; full lint and source typing passed.

The separate pagination finding has its own contextual reply and resolution, not this global substitute. The Event Hubs type-contract finding in the same review body remains separate and is not resolved by these validator changes. There are no inline threads for these two body-only validator asks; this response links their exact source and gives each its own action/evidence.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Broad generated API changes still require upstream integration and human resolution of the outstanding compatibility and validation concerns.

3 open findings
1 resolved since last review

🧠 Review effort: Balanced

Comment thread scripts/validate_connector_samples.py
Comment thread tests/test_azuread.py
Comment thread tests/test_regenerated_operation_coverage.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Upstream integration and the acknowledged Event Hubs scalar-map compatibility gate still require human review.

0 open findings

3 resolved since last review

🧠 Review effort: Balanced

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.

3 participants