feat(wrapper-generator): emit deltaLink-aware pagination for delta operations - #3747
Open
Joywambui-maina wants to merge 1 commit into
Open
feat(wrapper-generator): emit deltaLink-aware pagination for delta operations#3747Joywambui-maina wants to merge 1 commit into
Joywambui-maina wants to merge 1 commit into
Conversation
…erations Delta cmdlets returned a single page and dropped both @odata.nextLink and @odata.deltaLink, so callers silently received partial change sets and had no way to resume. The token form of the same operation was emitted as a separate command the published SDK does not have - it folds each into the canonical delta command. Delta now has its own emit shape rather than the function template: items enumerate to the pipeline, -All follows nextLink through the change set, and the terminal deltaLink is published to -DeltaLinkVariable (alias DLV) in the caller's scope, cleared at entry so a run that stops early cannot leave the previous link readable. A response carrying both links is refused rather than guessed at; one carrying neither stops without publishing. -DeltaLink resumes any delta operation through the raw-URL builder, which is why no -Token is exposed: a token argument exists on five routes, a link resumes all of them. The pairing is derived from route shape, never a list of names, and an orphaned, ambiguous or duplicated resume form fails generation naming the route. Path ids are scoped to the initial-sync set, since the resume link already carries them. Contract and evidence in docs/edge-cases/delta-edge-cases.md. Proven: 194 generator tests including five delta pins, and tools/Test-WrapperDelta.ps1 drives a real compiled cmdlet across two nextLink pages to a terminal deltaLink and back through a resume - eleven assertions, three rounds, all pass. The regenerated corpus follows in a separate pull request.
Joywambui-maina
requested review from
Peter Ombwa (peombwa) and
Ramses Sanchez-Hernandez (ramsessanchez)
August 25, 2026 19:46
Peter Ombwa (peombwa)
approved these changes
Aug 26, 2026
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.
Changes proposed:
-Give delta operations their own emit shape rather than the function template: items enumerate to the pipeline, -All follows @odata.nextLink through the change set, and the terminal @odata.deltaLink is published to -DeltaLinkVariable (alias DLV) — the idiom the published SDK already uses for -CountVariable
-Clear that variable at entry, so a run that fails or stops early can't leave the previous run's link readable and silently resume from the wrong point
-Handle every terminal state explicitly: nextLink continues only under -All; deltaLink stops and publishes; neither stops and publishes nothing; both is refused rather than guessed at
-Fold the delta(token='…') form into its parameterless sibling as a Resume parameter set reached by -DeltaLink. The published SDK does the same — no oracle row exists for any token form. A link resumes every delta operation; a token argument exists on only five
-Derive that pairing from route shape, never a list of names, and fail generation naming the route if a resume form is orphaned, ambiguous or duplicated
-Scope path ids to the initial-sync set, since the resume link already carries them
-Record the contract and its evidence in tools/WrapperGenerator/docs/edge-cases/delta-edge-cases.md