test(turbodocx-sdk): add getRecipients evals for Python, Go, PHP and Ruby - #20
Draft
nicolasiscoding wants to merge 1 commit into
Draft
test(turbodocx-sdk): add getRecipients evals for Python, Go, PHP and Ruby#20nicolasiscoding wants to merge 1 commit into
nicolasiscoding wants to merge 1 commit into
Conversation
…Ruby PR #18 added getRecipients to all six language references but only two eval cases: id 45 (Express) and id 46 (Spring Boot). The other four supported languages had documentation with no eval covering it, so a regression in those templates would not be caught. Adds ids 50-53 for FastAPI, Gin, Laravel and Rails, modelled on 45/46 and using each SDK's real method shape - get_recipients / GetRecipients / getRecipients - with the per-language traps asserted: - Python: the call must be awaited; the method is async and a bare call returns a coroutine. - Go: a context.Context must be passed and the error return must be checked, not discarded. Every case asserts the agent reaches for getRecipients rather than getStatus (which returns only the document-level status and cannot answer who signed) and branches on effectiveStatus rather than the raw status field, since an unsigned signer on a voided document still reads 'pending' in status.
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.
Related
Closes #19
Follows #18, which added
getRecipientsto all six language references but eval cases for only two of them.Description
getRecipientsshipped into every language reference in #18, but the eval suite only covered Express (id 45) and Spring Boot (id 46). Python, Go, PHP and Ruby had documentation with nothing testing it — a wrong method name or a droppedawaitin those templates would ship unnoticed.This adds ids 50–53 for FastAPI, Gin, Laravel and Rails, modelled on 45/46, using each SDK's real method shape:
await TurboSign.get_recipients(document_id)GetRecipients(ctx, documentID)getRecipients($documentId)get_recipients(document_id)What every case asserts
Both failure modes that produce working-looking but wrong code:
getRecipients, notgetStatus.getStatusreturns only{ status }— the document-level state — so it cannot answer who signed. Code using it compiles, runs, and answers a different question than the user asked.effectiveStatus, notstatus. There is no per-recipient declined/voided/expired state, so on a voided or expired document an unsigned signer still readspendinginstatus. Generated code branching on it chases people whose signing links are already dead.Per-language traps pinned
awaits-the-call. The method is async; a bare call returns a coroutine rather than the roster, which fails at runtime rather than at author time.passes-contextandhandles-error-return. The signature takescontext.Contextfirst and returns(result, error); a discarded error hides the failure entirely.Validation
evals.jsonparses; all 53 ids unique.id,prompt,expected_output,files,assertions).file_contains).fileslists follow the existing per-framework convention (e.g.pyproject.toml+app/main.pyfor FastAPI,go.mod+main.gofor Gin — matching ids 44 and 9).I did not execute
claude evals run evals/evals.json— it drives 53 agentic runs, which is a long and costly operation better done in whatever environment normally runs the suite. The changes here are data-only (no skill or reference logic touched), so nothing in this PR can change the outcome of the existing 49 cases.Note on the underlying behaviour
The endpoint these evals describe was exercised end to end on staging through a full document lifecycle — sent → resent → viewed → signed — with 16/16 assertions passing at each step. So the semantics asserted here (
effectiveStatustransitions,delivery.totalSentcounting real sends only,waitingOnreaching 0 only at completion) are confirmed against a live endpoint rather than inferred from the SDK types.