Skip to content

feat(wrapper-generator): emit deltaLink-aware pagination for delta operations - #3747

Open
Joywambui-maina wants to merge 1 commit into
feat/wrapper-paginationfrom
feat/wrapper-delta-generator
Open

feat(wrapper-generator): emit deltaLink-aware pagination for delta operations#3747
Joywambui-maina wants to merge 1 commit into
feat/wrapper-paginationfrom
feat/wrapper-delta-generator

Conversation

@Joywambui-maina

Copy link
Copy Markdown

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

…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.
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.

2 participants