Repository navigation
v1.1.1 — hot-fix cycle
[1.1.1] — 2026-05-18
Post-1.1.0 hot-fixes from the first real cloud-chat user testing.
Each was caught in production by the user noticing mid-use; v1.1.1
adds named unit-test regression guards for every one so the next
cycle catches them in CI.
Fixed
-
Apps Script
deployments.createrejected theentryPointsfield.
Google's API returnsInvalid JSON payload received. Unknown name "entryPoints": Cannot find field.Web-app entry-point configuration
belongs in theappsscript.jsonmanifest, NOT the deployment body.
RemovedentryPointsfromdeploy_webapp's request body; removed
the now-unusedexecute_as/accessparameters from its signature.
Guard:test_gas_deploy.py::test_deploy_webapp_body_does_not_include_entryPoints. -
Apps Script Web App manifest changed
access: MYSELF→
ANYONE_ANONYMOUS. In single-tenant v1.0 the operator was both
deployer and runtime caller, soMYSELFworked via session magic.
In v1.1 multi-tenant cloud, the USER deploys the Web App but the
SERVER calls it — unauthenticated.MYSELFwould 401 every call.
ANYONE_ANONYMOUSis the right setting for the v1.1 architecture.
Surface is bounded by the script's logic (only acts on doc IDs in
the request, only on docs the deployer owns); v1.2 will add HMAC
request validation for defense in depth. -
OAuth callback failed on Fly with
OAuth 2 MUST utilize https.
Fly terminates TLS at the edge; inside the containerrequest.url
has schemehttp://even though the public URL is HTTPS.
oauthlib.Flow.fetch_tokenvalidates the URL and rejected any
http://. Fixed by rewriting the scheme on the URL we hand to oauthlib
whenbase_urlbegins withhttps://. Did NOT set
OAUTHLIB_INSECURE_TRANSPORT=1(that disables transport security
globally). -
PKCE handling was non-deterministic; callback failed with
Missing code verifier. Auth URLs sometimes included
code_challengeand sometimes didn't, depending on which Flow code
path generated them. v1.1.1 makes PKCE always-on: every
build_authorization_urlcall generates acode_verifiervia
secrets.token_urlsafe(48), persists it server-side keyed by the
state token's nonce (seeoauth_state._pending_verifiers), and
retrieves it on callback soFlow.fetch_tokencan complete the
exchange. Guard:
test_oauth_google.py::test_auth_pkce_consistency_every_url. -
Doc-string overpromise: tools claimed to work "without setup".
gdocs_setup_apps_script's description conflated two prerequisites:
(a) the Apps Script Web App setup itself, (b) the base Google OAuth
grant. Other tools don't need (a) but ALL tools need (b). Saying
"works without setup" unqualified misled the model into trying calls
that returnedneeds_authorization. Rewrote to distinguish the two
grant types explicitly. Guard:
test_tool_schemas.py::test_tool_descriptions_truthful. -
gdocs_reset_authorizationwas registered but undiscoverable via
tool_search. Tool was visible ingdocs_server_info.tools(count
20) but search ranker couldn't surface its schema for keywords like
"reset authorization" / "revoke grant" / "sign out". Root cause:
bland leading description sentence. Rewrote to embed the synonym
set ("reset / revoke / clear stored Google OAuth credentials. Force
re-consent.") in the first 200 chars where the ranker weighs most.
Guard:test_tool_schemas.py::test_tool_discoverability_via_server_info.
Added
-
gdocs_reset_authorizationMCP tool. Clears the user's stored
Google OAuth credentials and (optionally withfull=True) Apps
Script setup state. Forces the next tool call back into the
needs_authorizationflow. Required as a recovery path AND as the
only way to re-trigger consent for testing PKCE / scope changes /
account switches. Per-user in cloud mode (via user_store); per-
machine in stdio mode (deletes~/.google-docs-mcp/token.json). -
Version string now embeds the git commit SHA as semver build
metadata.gdocs_server_inforeportsversionas
f"{__version__}+{GIT_COMMIT}"(e.g.1.1.1+abc1234) when
GIT_COMMITenv var is set. Every deploy from a distinct commit
reports a unique version string without requiring a manual
pyproject.tomlbump on every hot-fix. Per semver §10 the build-
metadata segment is informational only and doesn't affect sort.
Tests
- ~40 new test cases (parametrized over 20 tools):
test_tool_discoverability_via_server_info— server_info.tools
matches mcp.list_tools() exactly.test_tool_descriptions_truthful(parametrized over 19 OAuth-needing
tools) — no description contains "without setup" / "without
authorization" unqualified.test_tool_input_schema_non_empty(parametrized over all 20 tools)
— every tool's schema has properties or is on the no-args allowlist.test_tab_nesting_depth_cap_enforced— 4-level nesting raises
ValueError before any Google API call.test_auth_pkce_consistency_every_url— 5 sequential calls all
return URLs with code_challenge + code_challenge_method=S256, all
with unique challenges (verifier regenerated per call).test_pkce_verifier_roundtrip(+ 2 related) — sign_state with
code_verifier → verify_state returns it on consume; single-use;
no-PKCE returns None for backward compat.
Total: ~200 unit + 4 live tests. CI gates deploys on unit pass via
deploy.sh.
Internal
- Auto version-bump-on-deploy wired via the GIT_COMMIT build arg in
deploy.sh. Every push to Fly carries a unique build identifier. - GitHub Actions runs the full unit suite across Python 3.10–3.13 on
every push/PR. deploy.shrunspytest tests/unit -qbeforeflyctl deploy;
refuses to deploy on test failure (bypassable withSKIP_TESTS=1
for emergency hot-fixes).