Skip to content

Releases

v1.5.1 — security + observability + ops prep for v2.0.0

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 11:20
b75d71e

Cumulative release covering everything since v1.3.0. The big themes:

Security (v1.3.1 + v1.4.0a + v1.x-scope-reduction):

  • HKDF key scaffolding + 4-CVE dep floor bumps
  • TrustedHost middleware + body-size cap + control-char title validation
  • _FIELD_VALIDATORS for user_store with apps_script_url validator (strict script.google.com only)
  • Default OAuth scopes reduced from 7 → 5 (script.* requested incrementally)

Testing (v1.4.0b + v1.4.0c):

  • 8 integration tests + chaos harness (tests/chaos/run_chaos.py)
  • e2e GitHub Actions workflow with 4 jobs (.github/workflows/e2e.yml)

Observability + v2.0b prep (v1.5.0 + v1.5.1):

  • Shim-hit counter + total-call denominator per purpose
  • Env-var overrides for individual derived keys (MCP_API_BEARER_KEY, etc.)
  • Preflight script scripts/preflight_strict_flip.sh
  • RUNBOOK §3.5 (post-flip recovery) + §3.6 (preflight procedure)

Migration + LLM-UX (v2.0a + v2.2a + v2.2b + v2.3):

  • scripts/migrate_existing_users.py (dry-run default, --apply required for writes, --force skips heartbeat)
  • 4 audit-produced docs: THREAT_MODEL, RUNBOOK, TOOL_CONTRACT, CONTRIBUTING
  • LLM_RECOVERY artifacts: doc + @mcp.resource("gdocs://error-recovery") + gdocs_help tool
  • gdocs_admin_audit forensic tool (gated behind MCP_ADMIN_TOKEN)

Dependency floor bumps (deps batch via dependabot):

  • fastmcp ≥3.3.1, typing-extensions ≥4.15.0, pytest ≥9.0.3, markdown-it-py ≥4.2.0, google-auth ≥2.53.0
  • uv.lock regenerated

See CHANGELOG.md for full per-version detail.

Next: v2.0.0 (HKDF strict-flip) ships after this is deployed + soaked (~1h30m–2h per the in-flight TTL ceiling).

🤖 Generated with Claude Code

v1.3.0 — self-documenting MCP

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 04:44

The MCP now carries its own documentation. The external google-docs-fly_MCP_Reference.md becomes redundant by design.

What changed

Connect-time orientation. _SERVER_INSTRUCTIONS now includes:

  • One sentence on what the server does
  • 5 named workflows (goal → tool sequence): new_doc, convert_doc_with_headings, retrofit_styled_doc, convert_sandbox_docx, cleanup
  • 5 operating rules (never rebuild styled .docx; docx_path doesn't work from cloud chat; placeholder_behavior="rename" preserves a title page; trash tools only act on own files; first use needs interactive OAuth consent)
  • Pointer to gdocs_guide / gdocs_server_info

New gdocs_guide tool. Zero-arg, always callable. Returns the same orientation as a structured payload:

{server, workflows[], operating_rules[], tool_groups{}}

Rationale: server instructions is seen only at connect time and some clients truncate or ignore it. gdocs_guide is the "start here" / --help entry point.

Workflow-aware tool descriptions. Every tool description ends with a Choreography: line (what typically comes before / after) and a NOTE: block for known failure modes — so an agent doesn't have to discover them by hitting errors:

  • gdocs_preview_tab_split / gdocs_tab_existing_doc / gdocs_get_signed_upload_url — docx_path doesn't work from cloud chat
  • gdocs_trash_file / gdocs_untrash_file / gdocs_move_to_folder — only works on files this app created
  • gdocs_setup_apps_script — first call returns needs_authorization with a URL the user must open

Tests

  • EXPECTED_TOOLS adds gdocs_guide (22 total); no_arg_tools extended.
  • New test_gdocs_guide_shape_includes_all_5_workflows_and_rules asserts the 5 named workflows, 5 operating-rule topics, 7 tool_group buckets.
  • 240/240 unit pass; 8/8 mutations caught cleanly.

Acceptance

A fresh agent with only (a) the server instructions and (b) the tool list — no external reference file — can correctly choose and sequence tools for all 5 core workflows and avoid the known failure modes without first triggering them. gdocs_guide is the callable fallback.

v1.2.3 — hot-fix the v1.2.2 missing-fields bug

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 04:16

Hot-fix for v1.2.2: the live runtime's _read_mutation_check() was still returning the v1.2.1 four-field shape (stale_patches / imprecise_patches absent from gdocs_server_info), making v1.2.2's headline acceptance criterion non-verifiable from cloud chat.

Root cause

scripts/mutation_check.py's revert() used git checkout -- <file> to restore mutated sources. That works against a clean working tree but wipes uncommitted edits in any file that mutation_check also mutates. Three of the eight mutations target server.py. The v1.2.2 edit to _read_mutation_check was applied locally, then mutation_check.py ran, mutated server.py for test_trash_file_id, and reverted via git checkout — silently restoring server.py to HEAD and wiping the new return shape. The commit captured the wiped state; CI built that; live runtime served the old shape.

Fix

  • _read_mutation_check() now actually returns stale_patches + imprecise_patches (v1.2.2 intent, restored).
  • apply_mutation() returns the original file bytes on success (was bool). revert() writes those bytes back from memory — never touches git. Uncommitted edits in mutated source files now survive mutation_check.py runs. Workflow-safe against unclean working trees.

Tests

Two new tests:

  • test_revert_restores_original_bytes_not_via_git
  • test_revert_is_noop_when_original_is_none

19/19 unit tests pass. Local mutation_check.py: 8/8 caught cleanly.

v1.2.2 — guard against mutation-patch rot

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 03:54

Preventive maintenance for the mutation gate itself: detect when an injection patch has rotted instead of silently reporting "caught" for a bug that was never actually introduced.

What

scripts/mutation_check.py now classifies each mutation into one of four outcomes (was binary caught/asleep):

Outcome Meaning
caught Patch applied, only the targeted test failed (clean catch)
stale_patch find text gone, OR patch applied but 0 tests failed
imprecise_patch Target failed AND undeclared collateral failed too
asleep_guard Patch applied, but the named guard didn't notice the bug

To distinguish, the gate now runs the full unit suite per mutation (was: targeted test only). Adds ~90s to CI's mutation job; buys collateral-damage detection.

Surfaced via gdocs_server_info

mutation_check: {
  ran, caught, status, asleep_guards,        # existing
  stale_patches:     [guard names whose patch no longer applies],
  imprecise_patches: [guard names whose patch broke unrelated tests]
}

status is "passed" only when caught == ran AND all three buckets are empty. Specific subtype values (stale_patch > imprecise_patch > asleep_guard) replace the catch-all "failed".

expected_collateral

The strict "exactly one named failure" rule punished legitimate defense in depth. Mutation now accepts expected_collateral: list[str] to declare known sibling guards; failures matching those don't flag imprecise_patch. Two siblings declared on first audit (see CHANGELOG).

Tests

17 new tests in tests/unit/test_mutation_check.py for apply_mutation, _matches_nodeid (parametrized prefix match), classify_outcome (4 outcomes + expected_collateral), and aggregate (status priority).

Acceptance verified: 8/8 mutations caught cleanly, all buckets empty.

v1.2.1 — full mutation coverage

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 02:33

[1.2.1] — 2026-05-18

Closes the last v1.2.0 gap: mutation_check.ran goes 3 → 8.
Every named regression guard now has an automated mutation
proving it actually catches its named bug pattern.

Added

Mutations for the 5 guards that v1.2.0 deferred. Researched in
parallel by 5 named subagents (one per guard), each VERIFIED
empirically (apply patch → run pytest → expect exit ≠ 0 → revert).
All 5 came back with working diffs; 8/8 caught on local run.

  • test_owned_by_app_agrees_with_trash_outcome — flip the
    403-probe branch from write_results[fid] = False to True.
    Probe lies about writability → find claims owned_by_app=True
    but trash still 403s → cross-tool inconsistency assertion fires.
    Reintroduces the v0.19.0 bug pattern.

  • test_inject_matches_fragmented_runs — add break after
    the first <w:t> text append in _extract_visible_text.
    Extraction stops at the first run; fragmented paragraph
    ["Sec", "tion", " ", "Banner"] becomes just "Sec". Marker
    "Section Banner" can't match. Reintroduces the pre-v0.15.1
    text-extraction bug.

  • test_preview_flags_what_convert_truncates — drift
    TITLE_MAX_CHARS from 50 to 60 in preview.py. The test's
    fixture heading is exactly 60 chars, so 60 > 60 becomes False
    and no warning fires; even if one fired, the message would
    interpolate "60" not "50" (test asserts "50" in msg). Double
    failure mechanism — robust catch.

  • test_auth_pkce_consistency_every_url — the hard one from
    v1.2.0. Original attempt commented out flow.code_verifier = ...
    but Flow.authorization_url() auto-generates a 128-char verifier
    when code_verifier=None AND autogenerate_code_verifier=True
    (lib default). PKCE survived via the fallback. New mutation
    overrides BOTH paths AFTER the original assignment:
    flow.code_verifier = None; flow.autogenerate_code_verifier = False.
    URL emits no code_challenge. Test's first assertion fires
    immediately.

  • test_tool_discoverability_via_server_info — slice [1:]
    on the sorted tool list returned by gdocs_server_info. Drops
    the alphabetically-first tool (gdocs_add_tabs) while leaving
    mcp.list_tools() intact → set-equality fails AND tool_count
    diverges (20 vs 21).

Process note

The 5 mutations were dispatched as parallel subagents. Each had
the same brief: read the test, read the code, design a minimal
find/replace, VERIFY by running pytest on the mutated state,
revert via git checkout --. All 5 returned in ~3 minutes
elapsed (vs ~15 min serial). Each agent's verified_exit_code
field made the integration step purely mechanical — no guessing
whether a mutation would actually fire.

Tests

scripts/mutation_check.py now contains 8 mutations. CI's
mutation job runs them all in ~30s. Local run confirms
8/8 mutations caught. After this commit deploys via CI,
gdocs_server_info.test_suite.mutation_check.caught/ran reports
8/8 with asleep_guards: [].

v1.1.1 — hot-fix cycle

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 02:36

[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.create rejected the entryPoints field.
    Google's API returns Invalid JSON payload received. Unknown name "entryPoints": Cannot find field. Web-app entry-point configuration
    belongs in the appsscript.json manifest, NOT the deployment body.
    Removed entryPoints from deploy_webapp's request body; removed
    the now-unused execute_as / access parameters 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, so MYSELF worked via session magic.
    In v1.1 multi-tenant cloud, the USER deploys the Web App but the
    SERVER calls it — unauthenticated. MYSELF would 401 every call.
    ANYONE_ANONYMOUS is 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 container request.url
    has scheme http:// even though the public URL is HTTPS.
    oauthlib.Flow.fetch_token validates the URL and rejected any
    http://. Fixed by rewriting the scheme on the URL we hand to oauthlib
    when base_url begins with https://. 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_challenge and sometimes didn't, depending on which Flow code
    path generated them. v1.1.1 makes PKCE always-on: every
    build_authorization_url call generates a code_verifier via
    secrets.token_urlsafe(48), persists it server-side keyed by the
    state token's nonce (see oauth_state._pending_verifiers), and
    retrieves it on callback so Flow.fetch_token can 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 returned needs_authorization. Rewrote to distinguish the two
    grant types explicitly. Guard:
    test_tool_schemas.py::test_tool_descriptions_truthful.

  • gdocs_reset_authorization was registered but undiscoverable via
    tool_search.
    Tool was visible in gdocs_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_authorization MCP tool. Clears the user's stored
    Google OAuth credentials and (optionally with full=True) Apps
    Script setup state. Forces the next tool call back into the
    needs_authorization flow. 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_info reports version as
    f"{__version__}+{GIT_COMMIT}" (e.g. 1.1.1+abc1234) when
    GIT_COMMIT env var is set. Every deploy from a distinct commit
    reports a unique version string without requiring a manual
    pyproject.toml bump 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.sh runs pytest tests/unit -q before flyctl deploy;
    refuses to deploy on test failure (bypassable with SKIP_TESTS=1
    for emergency hot-fixes).

v1.1.0 — multi-tenant cloud auth

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 19 May 02:36

[1.1.0] — 2026-05-18

Multi-tenant cloud auth. The remote HTTP MCP (claude.ai connector
via Fly.io) is now genuinely multi-tenant — each cloud-chat user
operates on their own Drive with their own Google identity. Before
1.1, the entire Fly deployment was single-tenant: every cloud-chat
user's tool calls implicitly used the operator's cached OAuth token,
so docs were created in the operator's Drive and the retrofit Apps
Script Web App (deployed access: MYSELF) was unusable for anyone
but the operator.

New: gdocs_setup_apps_script MCP tool

One-shot setup for the per-user Apps Script Web App needed by
gdocs_tab_existing_doc (the lossless content-move path). Run once
per user; idempotent on retry (resumes from the last successful
step). Stdio mode keeps calling the v1.0 local CLI; HTTP mode
deploys a Web App into the calling user's Drive.

Cloud architecture: "Shape C"

  • FastMCP's GoogleProvider handles claude.ai connector auth
    (identity-only openid email scopes, but valid_scopes advertises
    the full Workspace union so consent grants Docs/Drive/Apps Script
    at the same time)
  • Separate auth-code flow we own (/oauth/google/api/callback)
    obtains tokens we can actually use for Google API calls
  • Per-user state in SQLite on the Fly volume, keyed by Google
    sub
  • Per-user lock on refresh so two concurrent tool calls don't
    rotate each other's refresh_token

Why not just rely on GoogleProvider for the API tokens too: the
upstream Google tokens it holds live in private attributes
(_upstream_token_store, no public getter, no API contract). The
MCP spec blesses two-flow designs in the "URL Mode Elicitation for
OAuth Flows" pattern; production reference is
taylorwilsdon/google_workspace_mcp.

New env vars (HTTP deploy)

Required when running the Fly server with the new auth wiring:

  • GOOGLE_OAUTH_BASE_URL — public HTTPS hostname of the deployment
    (e.g. https://my-app.fly.dev). Must exactly match the actual URL
    or claude.ai's connector OAuth discovery silently fails.
  • GOOGLE_OAUTH_CLIENT_SECRETS_JSON — full OAuth client JSON inline,
    or GOOGLE_OAUTH_CLIENT_SECRETS_PATH pointing at a file.
  • MCP_BEARER_TOKEN (already required) — reused as the HMAC signing
    key for the OAuth state parameter.

Auto-set by configure_auth_for_http:
OAUTHLIB_RELAX_TOKEN_SCOPE=1 (so partial-grant consents don't
crash the OAuth callback).

Breaking: existing claude.ai connector users must reconnect

The OAuth scope set is changing. Existing connector connections need
to be disconnected + reconnected in claude.ai's connector settings to
pick up the new scopes.

Internal modules added

  • user_store.py — SQLite per-user state (WAL mode, per-path init
    guard, merge-semantics on save, typo-rejection)
  • oauth_state.py — HMAC-signed, single-use state-param for OAuth
    callback (CSRF + replay protection)
  • oauth_google.py — google_auth_oauthlib.Flow setup, callback
    code-exchange, GoogleProvider activation
  • credentials.py — get_credentials_for_user(sub) with per-user
    refresh lock, invalid_grant → NeedsReauthError mapping
  • setup_apps_script_for_user — cloud-side variant of
    setup_apps_script_auto using user_store as the per-user ledger

Production bug fix in user_store

The concurrent-writes test surfaced a real PRAGMA journal_mode=WAL
race that busy_timeout doesn't mitigate. Fixed via per-path init
guard under threading.Lock — would have fired on Fly the moment
two cloud users finished OAuth simultaneously.

Tests

+49 unit tests across the v1.1 modules:
test_user_store.py (13), test_oauth_state.py (12),
test_oauth_google.py (13), test_credentials.py (11),
test_setup_apps_script_for_user.py (9),
test_phase6_consumer_branching.py (7),
test_configure_auth_for_http.py (9). Total: 158 unit + 4 live.

Dependencies

  • fastmcp>=2.13 (was >=2.0) — GoogleProvider + valid_scopes +
    _default_scope_str post-init patch all require 2.13+.

v1.2.0 — CI-gated deploys + mutation testing

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 18 May 17:06

[1.2.0] — 2026-05-18

Closes the "is the gate real?" gap. Two big additions: CI-driven
deploys (so a broken commit literally cannot reach production) and
automated mutation testing (so the suite proves it catches bugs
on every build, not just once when written).

Added

  • CI-gated deploys via GitHub Actions. New
    .github/workflows/deploy.yml:

    • Triggers on push to main (and workflow_dispatch).
    • Jobs: unit → mutation → deploy. Each depends on the
      previous; deploy runs ONLY if both test jobs are green.
    • The unit job runs pytest + injects provenance into
      test-results.json (git_commit, ci_run_url from
      $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID,
      sha256 digest of the canonicalized payload).
    • The mutation job runs scripts/mutation_check.py — see below.
    • The deploy job downloads both artifacts, runs flyctl deploy
      with provenance build-args, runs a /health smoke check.
    • Concurrency: cancels in-flight deploys when a newer commit
      supersedes.

    One-time setup: the FLY_API_TOKEN repo secret must be set:

    flyctl tokens create deploy -a sundeepg98-docs-mcp -j | jq -r .token | gh secret set FLY_API_TOKEN
    

    Pipes the token directly from flyctl to gh — it never appears in
    shell history or chat.

    After this is set, every push to main runs CI; if any test fails,
    the deploy doesn't happen. ci_run_url in the test_suite block
    becomes a real GitHub Actions URL (replacing "local" for
    CI-built deploys).

  • scripts/mutation_check.py — automated mutation testing.
    For each named regression guard, applies a known bug-injecting
    patch (e.g. revert file_id: str | list[str] → file_id: str),
    runs pytest filtered to that guard, asserts the guard goes red.
    If any guard does NOT catch its mutation, the build fails — that
    guard is "asleep" and can't be trusted.

    v1.2.0 ships mutations for 3 of the 8 named guards (the cleanest
    string-replace patches):

    • test_trash_file_id_accepts_str_or_list (file_id schema)
    • test_deploy_webapp_body_does_not_include_entryPoints (the
      v1.1.1 Apps Script bug)
    • test_tool_descriptions_truthful (the v1.1.1 docstring lie)

    Other 5 guards (test_owned_by_app_*, test_inject_matches_*,
    test_preview_*, test_auth_pkce_*, test_tool_discoverability_*)
    need multi-line diffs or library-quirk workarounds and are
    documented as TODOs in the script. Each one added = the gate
    gets one notch sharper. Iterative ship.

  • test_suite.mutation_check block in gdocs_server_info:

    mutation_check: {
      ran: int,
      caught: int,
      status: "passed" | "failed" | "unknown",
      asleep_guards: [list of guards that failed to catch their bug],
    }
    

    Populated from mutation-check.json baked into the image by CI.
    status: "passed" requires ran > 0 AND caught == ran. Empty
    artifact or local-only deploy → "unknown".

Changed

  • Local deploy.sh is now the emergency fallback. Primary
    deploy path is push-to-main → CI. Local ./deploy.sh still
    works for hot-fixes that need to bypass CI (e.g. CI itself is
    broken); in that case ci_run_url reports "local" and
    mutation_check.status reports "unknown" — those values are
    the signals "this build didn't go through CI."

Tests

  • extended test_server_info_includes_test_suite_block to assert
    the new mutation_check sub-block is always present with a valid
    status. Total: 212 unit + 5 live, all green.

v1.1.4 — complete named-guard coverage

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 18 May 16:43

[1.1.4] — 2026-05-18

Closes the two gaps surfaced by the gdocs_test_manifest audit on
v1.1.3.

Fixed

  • named_regression_guards.missing was non-empty because two
    named guards lived only in tests/integration/ (gated behind
    --live) and so didn't appear in the deploy artifact's
    test-results.json (which comes from pytest tests/unit -q).

    • test_owned_by_app_agrees_with_trash_outcome added as a
      new unit test in test_soft_failure_contracts.py. Mocks both
      the write-probe (used by find_doc_by_title) and the trash
      update (used by trash_drive_file) to share a single backing
      behavior, then asserts they agree across both the app-owned and
      external-file scenarios. Complements the existing live
      integration test (which still runs the full real-Drive E2E
      when invoked with --live).

    • test_preview_flags_what_convert_truncates moved from
      tests/integration/test_title_threshold.py to
      tests/unit/test_preview_threshold_consistency.py. The original
      was mislabeled as live (it took live_creds as a fixture but
      never used it — preview_tab_split runs locally for the
      docx_path= input mode). No live coverage lost; the test
      asserts the same contract, now in CI.

    After this, gdocs_test_manifest.named_regression_guards.missing
    is empty — all 8 named guards present in unit suite.

  • ci_run_url defaulted to "" which conflated "no CI run
    exists yet" with "should have been set but wasn't." Per the
    v1.1.3 spec, empty must now be reserved for "broken pipeline."
    Deploys not from CI now report ci_run_url: "local" explicitly.

Tests

  • New unit test (5 mocks-with-batch-callback plumbing): proves the
    find-probe and trash-update return-value relationship is
    consistent. The mock setup is more involved than typical unit
    tests because the production code uses Drive's batched-HTTP
    pattern with per-request callbacks.
  • Moved test stays green in its new home.
  • Total: 212 unit + 5 live (was 6 — test_title_threshold.py removed).

v1.1.3 — verifiable test_suite

Choose a tag to compare

@Sundeepg98 Sundeepg98 released this 18 May 16:29

[1.1.3] — 2026-05-18

Closes "verify the test_suite block isn't just a number to trust"
gap. Three additions that make the suite independently verifiable.

Added

  • test_suite.ci_run_url — link to the GitHub Actions run that
    produced this artifact. Populated by deploy.sh via best-effort
    gh run list --commit=<sha>; empty string if no run found
    (deploy ran before CI completed, gh not installed, etc.).

  • test_suite.report_digest — sha256 of the canonicalized
    test-results.json payload (excluding the _meta block itself,
    chicken-and-egg). Stored in _meta.digest in the JSON file at
    deploy time; recomputed by the server at read time and compared.

  • test_suite.status: "tampered" — new status value emitted
    when the recomputed digest doesn't match the stored one. Catches
    post-build edits to the artifact's summary (e.g. someone hand-
    editing the passed count). The status hierarchy is now:

    • unknown: artifact missing or summary empty (SKIP_TESTS path)
    • tampered: stored digest doesn't match recomputed digest
    • failed: any test failed
    • passed: all green AND digest verifies
  • gdocs_test_manifest() MCP tool — surfaces the test inventory

    • per-test outcomes from the CI artifact. Returns:
    {
      status: "ok" | "unknown" | "tampered",
      total: int,
      tests: [{nodeid, outcome}, ...],
      named_regression_guards: {present: [...], missing: [...]},
    }
    

    Lets any caller confirm specific named guards (e.g.
    test_owned_by_app_agrees_with_trash_outcome) actually exist and
    passed — instead of trusting an opaque "203". Tool count: 20 → 21.

Fixed

  • Lazy cwd evaluation in _find_test_results_path — was
    computing candidates at module-load time, freezing the working
    directory. Caught by test_test_suite_status_tampered_when_digest_ mismatches which monkeypatches chdir. Now evaluated at each
    call.

Tests

  • test_canonical_digest_excludes_meta_block_and_is_stable — same
    payload in different dict-iteration orders → identical digest;
    tampering changes the digest.
  • test_test_suite_status_tampered_when_digest_mismatches — the
    killer guard: edit summary.passed without re-signing → server
    reports status="tampered".
  • test_gdocs_test_manifest_exists_and_returns_required_shape —
    manifest tool returns the documented shape regardless of artifact
    presence.
  • All 21 tool's test_tool_descriptions_truthful and
    test_tool_input_schema_non_empty extended to the new tool
    (gdocs_test_manifest joins no_args allowlist).

Total: 210 unit + 6 live tests, all green.

Deferred to v1.2.0

  • CI mutation testing stage — automated proof that injected
    regressions turn their named test red. Substantial CI workflow
    changes; separate atomic commit. The manual adversarial test
    (branch + PR #8) already proved the loop works on file_id; the
    v1.2 work is automating that across all 8 named guards on every
    build.