Repository navigation
Test the Calendar edit and Gmail draft tools - #15
Draft
RhysSullivan wants to merge 7 commits into
Draft
RhysSullivan wants to merge 7 commits into
RhysSullivan wants to merge 7 commits into
Conversation
This was referenced Nov 17, 2026
RhysSullivan
force-pushed
the
google-gogcli-tests
branch
2 times, most recently
from
November 17, 2026 08:56
2d6002c to
caf8529
Compare
RhysSullivan
force-pushed
the
google-gogcli-tests
branch
from
November 17, 2026 09:17
caf8529 to
b1589c4
Compare
RhysSullivan
force-pushed
the
google-gogcli-tests
branch
from
November 17, 2026 09:36
b1589c4 to
fee71b2
Compare
1 of 36 tasks
RhysSullivan
force-pushed
the
google-gogcli-tests
branch
from
November 25, 2026 18:53
fee71b2 to
162aece
Compare
Runs every curated Calendar and Gmail write in google, gmail and google-calendar through the host handler and the fake Google from #11: without approval each is refused and sends nothing, an approval of one input does not cover another, and approved updateEvent, deleteEvent, updateDraft, sendDraft and deleteDraft send the requests Google documents. sendDraft sends nothing when its input or the draft differs from what was approved. The fake host's synthetic accounts now carry a credential generation, as hosts send: the curated tools' account-scoped cache keys need one.
….get's query Event writes refuse an event Google returns without an ETag, and need affectsGuests when another organizer is on it. sendDraft refuses Content-Type parameters it does not read: a related container's start or type, format=flowed on text, extra attachment parameters, and xcharset, which was accepted before and is now refused by name. updateDraft asks drafts.get only for its format. The host fake records If-Match, and the host tests check it.
RhysSullivan
force-pushed
the
google-gogcli-tests
branch
from
November 25, 2026 19:01
162aece to
ea86794
Compare
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.
Top of the stack on #14. Tests only.
packages/google/curated.test.tsruns the curated Calendar and Gmail tools against a fake Googlefetch. It records each request, with its headers, and checks it against Google's documented formats. All data is synthetic (example.com).packages/google/curated-host.test.tsruns every curated Calendar and Gmail write ingoogle,gmailandgoogle-calendarthrough theappshost handler. It uses Fix Gmail send/drafts and Drive uploads #11's recording fake Google (scripts/fake-google.ts). Without approval, each write is refused and sends nothing. An approval of one input does not cover another. Approved,updateEventanddeleteEventsendIf-Match, andupdateDraft,sendDraftanddeleteDraftsend Gmail's documented requests.sendDraftsends nothing when its input or the draft differs from what was approved.scripts/fake-google.tsnow gives its synthetic accounts a credential generation, as hosts do, because the curated tools' account-scoped cache keys need one. It recordsIf-Match, and a test can approve a different input than it calls with.updateEvent:timeZoneis given;createEventdoes the same;If-Match, and on a 412 reads again and keeps a guest or answer changed in between;attendeesOmitted, and refuses a change other guests would see unlessaffectsGuestsis true;notifyandmeet.respondsendsIf-Match.deleteEventreads the event, then deletes withIf-Match, and needsaffectsGuestswhen others are on the event...,., blank, slashes, whitespace and control characters, and sends no request.freeBusy: a free slot from a New York account goes straight intocreateEventon a London calendar and keeps its instant.readDraftandsendDraft:data-hreflink spoof, adata-srcimage spoof,styleandhiddentext,bdo,title, extraalttext, zero-width and bidirectional characters, text stored apart from the message, and an attached multipart. All are now refused;gmail.draftis shown in full and sent;fullandrawforms are built from the same parts, headers, Content-Type values and bytes.updateDraftkeeps a reply draft'sIn-Reply-ToandReferences, warns when a new subject may break the thread, and adds neither to a draft that is not a reply.draftslists drafts newest first, anddeleteDraftdeletes one.Run with
bun test packages/google: 46 pass (curated.test.ts37,curated-host.test.ts9). The whole repository'sbun testgives 115 pass. Those counts include the tests added with the rebase: events without an ETag, other organizers, Content-Type parameters (start,type,format,xcharset, extra attachment parameters) anddrafts.gettaking onlyformat. Against the third review's heads (423dda5c/5ddfd6f5/b1589c4f), this file gives 27 pass and 8 fail. The three finding tests fail because those heads sent the probe drafts. Some table rows also fail on the changed refusal wording.curated.test.tsreaches each tool's handler and approval through the SDK's privateSymbol("apps.Operation")and runs them witheffect;curated-host.test.tsgoes through the public host handler instead. The SDK has no public way to call one tool, socurated.test.tsmay need updating when theappsdependency changes. Both files sit inpackages/googlelike the repo's other tests, so they ship in the feed.This repo runs no workflow on pull requests, so nothing runs in CI here.