oficina / agent-access Public
Resumable cross-app scheduling
Status: November 1 draft by GPT-6 Astra, independently reviewed and approved by GPT-6 Astra (reviewdocsaccess), November 1. The user authorized implementing the everyday editing APIs, shared conventions and one substantial workflow including interruption, retry and revoked access.
Boundary
calls_schedule is a synchronous composite operation in the connection gateway. It creates an optional Docs agenda, a Calls meeting and a Calendar event holding their member-facing URLs. It sends no invitations, grants no new access and does not claim a reservation from advisory free/busy. It never deletes objects automatically to undo a partial result. There is no cross-app transaction.
The gateway stores no workflow inputs, results or credentials. Durable state is the workflow fingerprint reservation in the selected team's Calls database plus each app's existing atomic create receipts. Resumption means submitting the same UUID and original arguments again, even after every process restarts. This is not a background job, autonomous retry service or a status-only API. The client must retain its original request. No cross-team composition exists.
Input and reservation
Input: {team,client_id,title,calendar_id,start,end,tz,notes,agenda?}. start and end are RFC3339 instants with explicit offsets; tz is an IANA zone. The offsets must match that zone at both instants, end must follow start, and local date/time conversion must round-trip without ambiguity. Calendar's own validator is authoritative. agenda contains a title and the bounded literal blocks accepted by docs_create. Unknown fields are rejected.
Before any content effect, validate all known downstream inputs against the configured exported schemas, every required route for this exact team, and all scopes: calls:read, calls:write, calendar:read, calendar:write, plus docs:read and docs:write for an agenda. Each step obtains a fresh audience-bound credential using the original current principal. Current directory membership and destination checks remain in force.
New app operation calls_reserve_schedule (calls:write) takes {team,client_id,fingerprint} and returns {reserved:true}. The fingerprint is the lower-case SHA-256 of the normalized complete typed workflow request, including version 1. Calls stores only keyed fingerprints: a domain-separated coordinate binding identity/delegation issuers, subject, client, team, operation and UUID, and a keyed fingerprint of the supplied digest. No title, event text, agenda, credentials or remote resource coordinates are persisted there. The reservation is atomic, stable across restart and bound by existing immutable authority configuration. Same UUID/different fingerprint refuses before effects. The operation can also be called directly; it only reserves a fingerprint, never claims that another app committed a step and never grants authority.
The gateway derives distinct deterministic nonzero UUIDs for agenda, meeting and event from the root UUID and a versioned step namespace. Existing app receipts also bind person/client/team/authority; two people using the same UUID cannot collide. The full-input reservation prevents changed later fields from causing partial changes under an already-used workflow UUID. There is no receipt expiry that permits implicit recreation within this implementation.
Execution and results
Order: reserve, optional agenda, meeting, event. After each success record only the response in transient memory. The Calendar event gets explicit local start, end and zone, kind:meeting, confirmed status, supplied notes plus canonical agenda and meeting member URLs. Exact enum values follow the exported app contract. URLs are checked against the corresponding configured app origin and known resource route; no external response URL is fetched. Invitations remain false.
Replays execute the same sequence with the same step IDs. App receipts return the prior resources and preserve later manual changes. If a prior resource was deleted or access was removed, stop; do not recreate it or skip the failure. An ambiguous/lost response is retried only with the same step UUID. Concurrent requests rely on each app's atomic uniqueness and receipt transaction.
Result: workflow UUID, team, status:complete|partial, confirmed step references, invitations_sent:false, and, on partial completion, a failed step plus a fixed failure code. Unattempted steps are distinguishable from confirmed steps. A failed request may nevertheless have committed; failure is not a nonexistence claim. When authorization is lost, return an authorization failure without previously selected resource details. On other errors, revalidate selected resources under current authority before releasing partial details. Completed responses likewise revalidate selected resources. A later retry rediscovers progress through receipts, not an unverified checkpoint supplied by a client.
Evidence
Use exported app contracts to validate every step and the composite contract. Test whole success, missing scope/route before effects, changed-input reservation, failure and lost response after each commit, full restart and replay, concurrent retries, deletion/manual edit after partial completion, same UUID across users, revocation between each step and before response, false/foreign URLs, DST gaps and folds, result limits, HTTP/CLI/MCP parity, and real app store effects. Remove reservation binding, step-ID stability and revalidation separately to prove the behavioral gates fail. Source review precedes deployment; existing team adoption and scoped infrastructure approval remain separate live gates.
Review resolutions (November 1)
Require read scopes as well as write scopes. Resource revalidation uses only docs_get, calls_get_meeting, and calendar_get_event, never mutation replay. Before every step and after all read checks, validate every required scope/team/ destination through the credential provider against the original immutable Subject/Client/Grant. Any unavailable/refused revalidation suppresses all references. HTTP uses the existing guarded emission path before headers/chunks; MCP revalidates before returning the bounded tool result to the SDK. There is no claim of a cross-app atomic snapshot or byte-by-byte authorization inside the SDK.
Preflight validates known fields only. Generated URLs are validated against trusted routes and schemas before subsequent use; authoritative app validation can still refuse a later step and leave an honest partial result. No pure Calendar preflight endpoint is claimed. Calendar local minute precision requires zero input seconds/nanoseconds; offsets and ambiguity are checked before effects.
The fingerprint is SHA-256 of JSON for a version-1 typed request, with exact int64 calendar ID and fields in declared order. UUID spelling is canonical; title/notes/zone and canonical RFC3339 start/end spelling are preserved. Agenda absence is nil; paragraph level omission normalizes to zero. Versioned step IDs are RFC4122 v5 using namespace 8ba3600d-9e03-52df-8c34-9ff05a6e66cb and the exact name oficina.schedule.v1/<root UUID>/<agenda|meeting|event>. Receipts additionally bind actor, client and team. Responses are limited below 64 KiB.
Implementation evidence (2026-11-01)
The opt-in TestSuiteSchedulingInterop passed against the real Docs, Calls and Calendar delegated HTTP handlers, their exported contracts, sealed stores and atomic create receipts. The CLI adapter observed a partial result after a transport deliberately lost Calendar's committed reply. A fresh gateway's MCP server completed the unchanged request, returned identical resources on replay, and exposed the expected agenda body and both cross-app URLs in the event. Changed arguments conflicted and revoked credentials refused resumption. python3 scripts/suite-interop.py reproduces this with temporary private stores. This does not establish deployed Home/team setup or hosted-client acceptance.
The shared tests additionally drop responses after every step, reject revoked read scopes before writes, withhold results after revocation, reject foreign resource URLs, recheck deleted resources with pure reads, reject malformed Unicode before reservation, reject DST folds/gaps, and recheck authority at the MCP result-return seam after registry output validation.
Independent GPT-6 Astra review selected six shared-runtime fault mutations: accept malformed Unicode, omit the MCP final guard, omit final resource checks, skip an earlier app's scope, accept a foreign URL, and randomize retry step IDs. Each caused a behavioral test failure; no build failure counted as detection. All original sources were restored. Resource references additionally validate against the destination's read schema and member-route ID shape before use; the response guard verifies the step, app, ID and canonical URL together.
Final shared implementation review: GPT-6 Astra (review_docs_access) approved on 2026-11-01 after inspecting source, all six effective mutation failures and the three-app acceptance evidence. The restored source passed make ci, including all-package race tests. Calls roster reconciliation and reservation have their own app review and gate; live four-client acceptance remains pending.