mcp-gee-sweet 0.9.2.dev324__tar.gz → 0.9.2.dev327__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/PKG-INFO +1 -1
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/known-limitations.md +28 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/drive_transfer.md +157 -5
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/roadmap.md +1 -1
- mcp_gee_sweet-0.9.2.dev327/src/mcp_gee_sweet/tools/atomic_write.py +152 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/drive/transfer.py +220 -105
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/gmail.py +4 -25
- mcp_gee_sweet-0.9.2.dev327/src/mcp_gee_sweet/tools/mime_types.py +35 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/drive/test_transfer.py +533 -2
- mcp_gee_sweet-0.9.2.dev327/tests/test_atomic_write.py +278 -0
- mcp_gee_sweet-0.9.2.dev327/tests/test_mime_types.py +51 -0
- mcp_gee_sweet-0.9.2.dev324/src/mcp_gee_sweet/tools/atomic_write.py +0 -70
- mcp_gee_sweet-0.9.2.dev324/tests/test_atomic_write.py +0 -118
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/cleanup-worktrees.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/merge-pr.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/notify-kai.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/notify-partner.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/orchestrator.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/prep-for-pr.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/qa-kickoff.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/release.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/retro.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/roadmap-status.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/start-worktree.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/team-member.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/commands/verify-pr.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/settings.json +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/amy.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/aziz.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/bob.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/dev.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/joy.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/kai.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.claude/team-roles/qa.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.dockerignore +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/dependabot.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/workflows/ci.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/workflows/docs.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/workflows/publish-dev.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.github/workflows/release.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.gitignore +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.pre-commit-config.yaml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/.python-version +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/CHANGELOG.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/CLAUDE.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/CODE_OF_CONDUCT.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/CONTRIBUTING.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/Dockerfile +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/LICENSE +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/Makefile +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/README.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/SECURITY.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docker-compose.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/assets/logo.png +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/auth.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/client-setup.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/configuration.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-async-tool-execution.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-auth-status-limitation-categories.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-cache-invalidation.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-chart-theming.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-comments-first-class.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-composite-tools.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-condition-type-docstring-generation.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-converted-doc-change-detection.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-dev-team.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-docs-formatting.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-fork.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-gmail-domain.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-grid-data-size-cap.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-local-fs-test-harness.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-mcp-v2-resource-context-access.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-pillow-image-dependency.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-prompt-qa-role.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-publishing.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-release-docs-roles.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-repositioning.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-response-size-cap-generalization.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-response-size-cap-reevaluation-519.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-review-finding-ticket-bar.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-supports-all-drives-lint-check.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-sync-folder-recursion.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-testing.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/decision-tool-error-visibility.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/index.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/decisions/role-file-history.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/blockquote-representation.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/borderless-table-columns.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/doc-revision-export.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/doc-to-markdown.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/docs-ast-pipeline.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/effectiveformat-spike.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/heading-anchor-resolution.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/image-conversion.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/index.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/local-file-access-policy.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/markdown-support.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/module-history.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/oauth-reauthorize-from-tool-call.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/phase3-theme-system.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design/sse-consent-off-event-loop.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/design.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/index.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/notes-read.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/README.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/qa-fixture-pixel.png +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-d195-create-doc.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-d196-create-doc.html +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-d213-dollar-escape.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-d226-heading-table.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc102-image-conversion.html +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc103-image-conversion.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc104-nested-lists.html +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc105-nested-lists-gfm.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc106-nested-lists-4space.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc135-paragraph-boundary.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc136-interrupted-block-boundary.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc137-inline-hr-no-block-ancestor.html +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc138-nbsp-spacer-paragraph.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc141-mismatched-list-tags.html +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc142-heading-anchors.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc144-anchor-in-table-cell.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures/tc-doc145-anchor-on-first-element.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/fixtures.template.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/gmail-test-plan.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/operations.yaml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/playwright_oauth.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/.gitkeep +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-02.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-14.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-17.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-18.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-21-drive-discovery.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-21-sheets-delete-clear.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-06-28.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-07-04-docs.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-07-04-drive-smoke.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-07-04-infra.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-07-04-sheets_read.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-07-04.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/results/2026-09-04.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/retro-v0.8.0.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/retro-v0.9.0.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/run.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/runs/README.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/runs/v0.8.0.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/runs/v0.8.1.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/runs/v0.9.0.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/setup.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/calendar.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/docs_content.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/docs_layout.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/docs_style.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/docs_tables.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/drive_activity.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/drive_files.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/drive_sharing.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/gmail.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/infra.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/sheets_charts.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/sheets_mgmt.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/sheets_read.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/qa/tests/sheets_write.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/style-guide.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/docs/tools.md +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/mkdocs.yml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/pyproject.toml +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/pyrightconfig.json +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/check_supports_all_drives.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/gen_tool_docs.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/lane_context_hook.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/oauth_setup.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/qa_cancel_insert_local_images.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/qa_gmail_fixtures.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/setup_team.sh +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/scripts/write_team_mcp_configs.sh +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/server.json +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/.env.template +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/auth.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/cache.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/http_transport.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/reauth.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/server.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/sse_shutdown.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/cache.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/calendar.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/concurrency.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/anchors.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/ast.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/ast_to_markdown.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/comments.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/content.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/doc_to_ast.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/editing.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/emitter.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/html_parser.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/images.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/indices.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/layout.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/markdown_export.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/named_ranges.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/style.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/docs/tables.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/drive/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/drive/activity.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/drive/files.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/drive/sharing.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/pagination.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/response_limits.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/sheets/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/sheets/data.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/sheets/helpers.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/src/mcp_gee_sweet/tools/sheets/structure.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/conftest.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/drive/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/drive/test_activity.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/drive/test_files.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/drive/test_sharing.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/fakes.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/integration/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/integration/conftest.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/integration/test_local_fs_harness.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/sheets/__init__.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/sheets/test_data.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/sheets/test_helpers.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/sheets/test_structure.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_auth.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_cache.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_calendar.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_check_supports_all_drives.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_concurrency.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_anchors.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_comments.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_content.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_core.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_editing.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_images.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_indices.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_layout.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_markdown_export.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_named_ranges.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_revision_export.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_style.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_docs_tables.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_gen_tool_docs.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_gmail.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_lane_context_hook.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_qa_gmail_fixtures.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_reauth.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_response_limits.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_server.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_server_json.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_sse_shutdown.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/tests/test_team_mcp_configs.py +0 -0
- {mcp_gee_sweet-0.9.2.dev324 → mcp_gee_sweet-0.9.2.dev327}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mcp-gee-sweet
|
|
3
|
-
Version: 0.9.2.
|
|
3
|
+
Version: 0.9.2.dev327
|
|
4
4
|
Summary: MCP server for Google Workspace — Sheets, Drive, Docs (HTML or Markdown), and Calendar.
|
|
5
5
|
Project-URL: Homepage, https://github.com/khuisman/mcp-gee-sweet
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/khuisman/mcp-gee-sweet/issues
|
|
@@ -238,3 +238,31 @@ refused everywhere, which means the same names are refused as path separators on
|
|
|
238
238
|
|
|
239
239
|
**Workaround:** Rename the file or folder in Drive (or locally). For a single file,
|
|
240
240
|
`download_file` with a full file path as `local_path` downloads it under that name.
|
|
241
|
+
|
|
242
|
+
### Downloads replace the local file rather than rewriting it
|
|
243
|
+
|
|
244
|
+
**What:** `download_file`, `download_folder`, and `sync_folder` write a download to a temporary
|
|
245
|
+
`.gee-sweet-partial-*` file next to the destination, then rename it over the old file. The
|
|
246
|
+
replacement is a new file, so:
|
|
247
|
+
|
|
248
|
+
- It keeps the old file's permission bits, and its owner and group only when the server may set
|
|
249
|
+
them (running as root, as the Docker image does). Running as a regular user, a file owned by
|
|
250
|
+
someone else becomes owned by the server's user; its group is kept if the server's user
|
|
251
|
+
belongs to that group. ACLs, extended attributes (macOS Finder tags,
|
|
252
|
+
the quarantine flag), and the creation time aren't carried over.
|
|
253
|
+
- Another hard link to the old file keeps the old content.
|
|
254
|
+
- The server needs write permission on the destination's *folder*, not just on the file. A
|
|
255
|
+
writable file inside a read-only folder can't be downloaded over.
|
|
256
|
+
- A FIFO or socket at the destination is refused instead of written to. A device such as
|
|
257
|
+
`/dev/null` is still written directly.
|
|
258
|
+
|
|
259
|
+
A download the server is killed partway through leaves its `.gee-sweet-partial-*` file behind.
|
|
260
|
+
`sync_folder` and `upload_local_folder` never upload one and list it under `skipped`; they
|
|
261
|
+
don't delete it, since it may belong to a download that's still running.
|
|
262
|
+
|
|
263
|
+
**Why:** Writing into the existing file left a truncated file behind when a download failed
|
|
264
|
+
partway, with a fresh mtime that made `sync_folder` upload it over the intact Drive copy (#844).
|
|
265
|
+
A rename means the destination only ever holds the old content or the complete new content.
|
|
266
|
+
|
|
267
|
+
**Workaround:** Re-apply ACLs, tags, or ownership after downloading, if they matter. Delete a
|
|
268
|
+
leftover `.gee-sweet-partial-*` file once no download into that folder is running.
|
|
@@ -334,6 +334,35 @@ Delete all `qa-convert.*` files and their converted Drive counterparts from `{FO
|
|
|
334
334
|
|
|
335
335
|
---
|
|
336
336
|
|
|
337
|
+
### TC-D286: a compressed file uploads with its compression MIME type, not the inner file's (#930) ⚠️ local-filesystem
|
|
338
|
+
**Background:** `upload_local_file`, `upload_local_folder`, and `sync_folder` dropped the encoding half of `mimetypes.guess_type()`, so `report.csv.gz` (`("text/csv", "gzip")`) was uploaded as `text/csv` even though its bytes are gzip. All three now go through the shared `guess_mime_type`, which Gmail attachments already used.
|
|
339
|
+
|
|
340
|
+
**Setup**
|
|
341
|
+
`mkdir -p /tmp/qa-gz-286 && printf 'a,b\n1,2\n' | gzip > /tmp/qa-gz-286/qa-report-286.csv.gz`
|
|
342
|
+
|
|
343
|
+
**Prompt**
|
|
344
|
+
> Step 1: "Upload the local file `/tmp/qa-gz-286/qa-report-286.csv.gz` to {FOLDER_ID}"
|
|
345
|
+
> Step 2: "Sync `/tmp/qa-gz-286` up to a new folder `qa-gz-286-sync` in {FOLDER_ID}"
|
|
346
|
+
> Step 3: "Upload the folder `/tmp/qa-gz-286` to a new folder `qa-gz-286-folder` in {FOLDER_ID}"
|
|
347
|
+
|
|
348
|
+
**Checks**
|
|
349
|
+
- Step 1: call `upload_local_file(local_path="/tmp/qa-gz-286/qa-report-286.csv.gz", parent_folder_id="{FOLDER_ID}")`; response has no `error` key
|
|
350
|
+
- `get_file_metadata` on step 1's `fileId` reports `mimeType: application/gzip` (not `text/csv`)
|
|
351
|
+
- Step 2: `create_folder(name="qa-gz-286-sync", parent_folder_id="{FOLDER_ID}")`, then `sync_folder(folder_id=<new folder ID>, local_path="/tmp/qa-gz-286", direction="upload")`; `uploaded` is `["qa-report-286.csv.gz"]`
|
|
352
|
+
- `list_files` on the new folder shows `qa-report-286.csv.gz` with `mimeType: application/gzip`
|
|
353
|
+
- Step 3: `create_folder(name="qa-gz-286-folder", parent_folder_id="{FOLDER_ID}")`, then `upload_local_folder(local_path="/tmp/qa-gz-286", parent_folder_id=<new folder ID>)`; `uploaded` is `["qa-report-286.csv.gz"]`, and `list_files` on that folder shows it with `mimeType: application/gzip`
|
|
354
|
+
|
|
355
|
+
**Teardown**
|
|
356
|
+
Delete `qa-report-286.csv.gz` and the `qa-gz-286-sync` and `qa-gz-286-folder` folders from `{FOLDER_ID}`. Remove `/tmp/qa-gz-286`.
|
|
357
|
+
|
|
358
|
+
**Result** (2026-10-11, Sky, PR #1002 round 1 at `594299f`, `mcp-gee-sweet-sky` reconnected after reset, OAuth, Shared Drive, `{FOLDER_ID}` = a throwaway child of `TEST_FOLDER_ID`): ✅ **PASS**.
|
|
359
|
+
- Step 1: no error. `get_file_metadata` reported `mimeType: application/gzip`, `size: 28`.
|
|
360
|
+
- Step 2: `uploaded == ["qa-report-286.csv.gz"]`, and `list_files` showed `application/gzip`. (`size_bytes` was `0`: sync_folder counts only downloaded bytes, which predates this PR.)
|
|
361
|
+
- Step 3 (added this round, since the Background names `upload_local_folder` but no check called it): `uploaded == ["qa-report-286.csv.gz"]`, and `list_files` showed `application/gzip`.
|
|
362
|
+
- Side probes on code-review findings. (a) Files the built-in table doesn't know, uploaded as `application/octet-stream` (`.xlsx`, `.docx` and `.7z` with random bytes, `.log`, `.ics`): Drive derived the real type from the name every time (the OOXML types, `application/x-7z-compressed`, `text/plain`, `text/calendar`). (b) A `.csv.gz` created the pre-fix way as `text/csv`, then re-uploaded by `sync_folder`'s `update()` path: Drive reset it to `application/gzip`. (c) `.svgz` now lands as `application/gzip`, where it used to be `image/svg+xml`. Neither version got a Drive thumbnail.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
337
366
|
## `upload_local_folder`
|
|
338
367
|
|
|
339
368
|
### TC-D98: Bulk upload of a mixed directory ⚠️ destructive ⚠️ local-filesystem
|
|
@@ -656,7 +685,7 @@ Unit tests: `tests/drive/test_transfer.py -k TestDownloadFile` — 10 passed (in
|
|
|
656
685
|
> `download_file(file_id="qa-bogus-file-id", local_path="/tmp/qa-d277/dangling/")`
|
|
657
686
|
|
|
658
687
|
**Checks**
|
|
659
|
-
- Raises `ValueError` `local_path '/tmp/qa-d277/dangling/' has a
|
|
688
|
+
- Raises `ValueError` `local_path '/tmp/qa-d277/dangling/' has a symlink to a missing target at '/tmp/qa-d277/dangling'`, with no Drive 404. (Before #895 the message said `non-directory path component`.)
|
|
660
689
|
- The symlink is unchanged, and `/tmp/qa-d277/missing-target` was **not** created.
|
|
661
690
|
|
|
662
691
|
**Teardown**
|
|
@@ -664,6 +693,57 @@ Unit tests: `tests/drive/test_transfer.py -k TestDownloadFile` — 10 passed (in
|
|
|
664
693
|
|
|
665
694
|
**Result (2026-10-03) ✅ PASS** — via an isolated service-account sandbox (PR #855). Raised `ValueError` `local_path '…/dangling/' has a non-directory path component at '…/dangling'`, with no 404. The symlink was intact and `missing-target` did not exist afterwards.
|
|
666
695
|
|
|
696
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 1 (`499aa59`), OAuth. Raised `ValueError` `local_path '/tmp/qa-d277/dangling/' has a symlink to a missing target at '/tmp/qa-d277/dangling'`, with no 404. The symlink was intact and `missing-target` did not exist.
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
700
|
+
### TC-D284: Local destination checks for `download_file`, `download_folder`, and `sync_folder`: trailing `/.`, dangling symlinks, files in the path (issue #874, via #895) ⚠️ local-filesystem
|
|
701
|
+
|
|
702
|
+
**Background:** #855 added a local-path check to `download_file` that runs before any Drive request. #874 found gaps in it. `Path()` drops a trailing `/.`, so `newdir/.` wrote a *file* named `newdir`, and `report/.` overwrote an existing `report` file. A dangling symlink at a plain file destination was followed, which created its missing target. And when the cause was the trailing separator, the error didn't say so. `download_folder` and `sync_folder` ran a bare `mkdir -p` on `local_path` and leaked a raw `NotADirectoryError`/`FileExistsError`. `sync_folder` also missed a dangling symlink where a Drive subfolder was to be created. The race this check can lose (a file created at the path during the Drive metadata call) can't be timed through the tool surface; it's unit-tested in `TestDownloadFile::test_*_created_during_metadata_call_raises_valueerror`.
|
|
703
|
+
|
|
704
|
+
**Setup**
|
|
705
|
+
> 1. Call `create_folder(name="qa-284", parent_folder_id="{FOLDER_ID}")`; call the returned ID `{F}`. Call `create_folder(name="sub", parent_folder_id="{F}")`.
|
|
706
|
+
> 2. Run `rm -rf /tmp/qa-284 && mkdir -p /tmp/qa-284/sync && printf 'hello' > /tmp/qa-284/hello.txt && printf 'keep me' > /tmp/qa-284/report && printf x > /tmp/qa-284/clash && ln -s /tmp/qa-284/missing-a /tmp/qa-284/out.bin && ln -s /tmp/qa-284/missing-b /tmp/qa-284/dangling-dir && ln -s /tmp/qa-284/missing-c /tmp/qa-284/sync/sub`.
|
|
707
|
+
> 3. Call `upload_local_file(local_path="/tmp/qa-284/hello.txt", parent_folder_id="{F}")`; call the returned ID `{H}`.
|
|
708
|
+
|
|
709
|
+
**Steps**
|
|
710
|
+
> 1. `download_file(file_id="{H}", local_path="/tmp/qa-284/newdir/.")`, then `ls -la /tmp/qa-284/newdir/`.
|
|
711
|
+
> 2. `download_file(file_id="{H}", local_path="/tmp/qa-284/report/.")`, then `cat /tmp/qa-284/report`.
|
|
712
|
+
> 3. `download_file(file_id="{H}", local_path="/tmp/qa-284/report/")`.
|
|
713
|
+
> 4. `download_file(file_id="{H}", local_path="/tmp/qa-284/out.bin")`, then `ls -la /tmp/qa-284/`.
|
|
714
|
+
> 5. `download_folder(folder_id="{F}", local_path="/tmp/qa-284/clash/sub")`.
|
|
715
|
+
> 6. `download_folder(folder_id="{F}", local_path="/tmp/qa-284/dangling-dir")`.
|
|
716
|
+
> 7. `sync_folder(folder_id="{F}", local_path="/tmp/qa-284/clash/sub", direction="download")`.
|
|
717
|
+
> 8. `sync_folder(folder_id="{F}", local_path="/tmp/qa-284/sync", direction="download", recursive=true)`, then `ls -la /tmp/qa-284/ /tmp/qa-284/sync/`.
|
|
718
|
+
> 9. (PR #1001 QA round 1) Repeat step 8 with `dry_run=true`.
|
|
719
|
+
|
|
720
|
+
**Checks**
|
|
721
|
+
- Step 1: succeeds. `local_path` is `/tmp/qa-284/newdir/hello.txt`; `newdir` is a directory holding `hello.txt`.
|
|
722
|
+
- Step 2: raises `ValueError` `local_path '/tmp/qa-284/report/.' has a non-directory path component at '/tmp/qa-284/report'; local_path ends in a path separator or '.', which makes it a directory target. Remove that ending to write a file at that path instead`. `report` still reads `keep me`.
|
|
723
|
+
- Step 3: the same `ValueError` and hint as step 2, for `'/tmp/qa-284/report/'`.
|
|
724
|
+
- Step 4: raises `ValueError` `local_path '/tmp/qa-284/out.bin' has a symlink to a missing target at '/tmp/qa-284/out.bin'`. `out.bin` is still a symlink and `/tmp/qa-284/missing-a` doesn't exist.
|
|
725
|
+
- Step 5: raises `ValueError` `local_path '/tmp/qa-284/clash/sub' has a non-directory path component at '/tmp/qa-284/clash'`. No `NotADirectoryError`. `clash` still contains `x`.
|
|
726
|
+
- Step 6: raises `ValueError` `local_path '/tmp/qa-284/dangling-dir' has a symlink to a missing target at '/tmp/qa-284/dangling-dir'`. `missing-b` doesn't exist.
|
|
727
|
+
- Step 7: the same `ValueError` as step 5, with `local_path '/tmp/qa-284/clash/sub'`. No `NotADirectoryError`.
|
|
728
|
+
- Step 8: returns normally (no `FileExistsError`). `downloaded` is `["hello.txt"]`, and `failed` is `[{"name": "sub/", "error": "cannot create local folder 'sub': a symlink to a missing target already exists at this path"}]`. `sync/sub` is still a symlink and `missing-c` doesn't exist.
|
|
729
|
+
- Step 9: `failed` is empty. `actions` holds `hello.txt` as `skip` (`in sync`) and `{"name": "sub/", "action": "conflict", "reason": "cannot create local folder 'sub': a symlink to a missing target already exists at this path"}`.
|
|
730
|
+
|
|
731
|
+
**Teardown**
|
|
732
|
+
`delete_file` on `{F}`. `rm -rf /tmp/qa-284`.
|
|
733
|
+
|
|
734
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 1 (`499aa59`), OAuth, throwaway `qa-284` folder under `TEST_FOLDER_ID`.
|
|
735
|
+
- **Step 1:** `local_path` `/tmp/qa-284/newdir/hello.txt`, 5 B; `newdir` is a directory holding `hello.txt`.
|
|
736
|
+
- **Steps 2–3:** both raised the expected `ValueError` with the trailing-ending hint; `report` still reads `keep me`.
|
|
737
|
+
- **Step 4:** `has a symlink to a missing target at '/tmp/qa-284/out.bin'`; link intact, `missing-a` absent.
|
|
738
|
+
- **Steps 5, 7:** `has a non-directory path component at '/tmp/qa-284/clash'`, no `NotADirectoryError`; `clash` still holds `x`.
|
|
739
|
+
- **Step 6:** `has a symlink to a missing target at '/tmp/qa-284/dangling-dir'`; `missing-b` absent.
|
|
740
|
+
- **Step 8:** `downloaded: ["hello.txt"]`, `failed` exactly the expected `sub/` entry; `sync/sub` still a dangling symlink, `missing-c` absent.
|
|
741
|
+
|
|
742
|
+
The case passes. Extra probe: the same step-8 call with `dry_run=true` listed only `hello.txt: download` and nothing for `sub/`, so the preview doesn't show the failure the real run reports (sent back on the PR).
|
|
743
|
+
|
|
744
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 2 (`a0955ce`), OAuth, after reconnecting to the fix. Fresh `qa-284` folder and fixtures; steps 1–8 gave the same results as round 1.
|
|
745
|
+
- **Step 9:** `failed` empty; `actions`: `hello.txt` `skip` (`in sync`), and `sub/` `conflict` with `cannot create local folder 'sub': a symlink to a missing target already exists at this path`.
|
|
746
|
+
|
|
667
747
|
---
|
|
668
748
|
|
|
669
749
|
## `download_folder`
|
|
@@ -1791,7 +1871,7 @@ Unit tests: full suite 1883 passed / 3 skipped; ruff clean. Fast-path re-verific
|
|
|
1791
1871
|
|
|
1792
1872
|
### TC-D279: downloads write to a temp file and rename it into place; a leftover temp file is never uploaded (issue #844) ⚠️ local-filesystem ⚠️ destructive
|
|
1793
1873
|
|
|
1794
|
-
**Background:** `sync_folder`, `download_file`, and `download_folder` used to stream straight into the destination. A download that failed partway left a truncated file with a current mtime, so the next bidirectional sync read it as locally newer and uploaded it over the intact Drive copy. Every download now goes through `_write_atomically`: it writes a sibling `.gee-sweet-partial-<16 hex>` file, stamps `sync_folder`'s Drive mtime on it, and renames it onto the destination only when complete. A temp file survives only a hard kill mid-write, and `sync_folder` and `upload_local_folder`
|
|
1874
|
+
**Background:** `sync_folder`, `download_file`, and `download_folder` used to stream straight into the destination. A download that failed partway left a truncated file with a current mtime, so the next bidirectional sync read it as locally newer and uploaded it over the intact Drive copy. Every download now goes through `_write_atomically`: it writes a sibling `.gee-sweet-partial-<16 hex>` file, stamps `sync_folder`'s Drive mtime on it, and renames it onto the destination only when complete. A temp file survives only a hard kill mid-write, and `sync_folder` and `upload_local_folder` never upload one. Since #895 they list it under `skipped`; before that it appeared in no result list. The failure path itself (a dropped connection mid-download) can't be triggered through the tool surface; it's unit-tested in `tests/drive/test_transfer.py::TestSyncFolderFailedDownloadLeavesNoPartial`, `TestDownloadToolsFailedDownloadLeavesNoPartial`, and `TestWriteAtomically`. This case checks the success path through the new write, the mode and mtime it leaves, and the leftover-temp-file skip.
|
|
1795
1875
|
|
|
1796
1876
|
**Setup**
|
|
1797
1877
|
> 1. Call `create_folder(name="qa-279", parent_folder_id="{FOLDER_ID}")`; call the returned ID `{F}`.
|
|
@@ -1810,11 +1890,11 @@ Unit tests: full suite 1883 passed / 3 skipped; ruff clean. Fast-path re-verific
|
|
|
1810
1890
|
> 8. Make a read-only local copy: `printf 'protected' > /tmp/qa-279/ro.bin && chmod 444 /tmp/qa-279/ro.bin && chmod 4644 /tmp/qa-279/dl/big.bin`. Call `download_file(file_id="{BIG}", local_path="/tmp/qa-279/ro.bin")`. Then call `download_file(file_id="{BIG}", local_path="/tmp/qa-279/dl/big.bin")` and run `ls -la /tmp/qa-279/ /tmp/qa-279/dl/ && cat /tmp/qa-279/ro.bin`. (Not as root: root can write a `0444` file.)
|
|
1811
1891
|
|
|
1812
1892
|
**Checks**
|
|
1813
|
-
- Step 1: `downloaded` is `["big.bin"]`. `uploaded` is empty,
|
|
1893
|
+
- Step 1: `downloaded` is `["big.bin"]`. `uploaded` is empty, `skipped` is `[".gee-sweet-partial-0123456789abcdef"]` (#895), and `failed` is empty.
|
|
1814
1894
|
- Step 2: `big.bin` is 3000000 bytes, its md5 matches setup step 3's `md5_checksum`, its mode is still `-rw-r-----` (the replaced file's mode is kept), and its mtime matches setup step 3's `modified_time` to the second (local time vs UTC aside). The only `.gee-sweet-partial-*` file in the directory is the planted `…0123456789abcdef`; no new one was left behind.
|
|
1815
1895
|
- Step 3: `{F}` holds exactly one file, `big.bin`. No `.gee-sweet-partial-*` file was uploaded.
|
|
1816
|
-
- Step 4: `
|
|
1817
|
-
- Step 5: `uploaded` lists only `big.bin` (a second copy, since `skip_if_exists=false`); the planted temp file is not uploaded
|
|
1896
|
+
- Step 4: `skipped` is `[".gee-sweet-partial-0123456789abcdef", "big.bin"]`; `uploaded` and `downloaded` empty (the restamped mtime round-trips, as in #346).
|
|
1897
|
+
- Step 5: `uploaded` lists only `big.bin` (a second copy, since `skip_if_exists=false`); the planted temp file is not uploaded, is not in `failed`, and is listed in `skipped` (#895). `list_files` shows two `big.bin` and no `.gee-sweet-partial-*`.
|
|
1818
1898
|
- Step 6: succeeds with `size_bytes` 3000000. The directory still holds only `big.bin` and the planted temp file.
|
|
1819
1899
|
- Step 7: `downloaded` is `["big.bin"]` and `failed` has one duplicate-filename entry for the second `big.bin` (PR #351). `/tmp/qa-279/dl/` holds only `big.bin`, 3000000 bytes, and no `.gee-sweet-partial-*` file.
|
|
1820
1900
|
- Step 8 (PR #884 QA round 1): the first `download_file` fails with a permission error. `ro.bin` still reads `protected`, still `-r--r--r--`, and no `.gee-sweet-partial-*` file is in `/tmp/qa-279/`. The second call succeeds, and `dl/big.bin` is `-rw-r--r--`: the setuid bit is not carried onto the new content.
|
|
@@ -1837,6 +1917,78 @@ The case passes, but the PR goes back for a regression this case doesn't cover:
|
|
|
1837
1917
|
- **Step 8, `ro.bin`:** `download_file` failed with `[Errno 13] Permission denied: '/tmp/qa-279/ro.bin'`. `ro.bin` still reads `protected`, still `-r--r--r--`, and there's no `.gee-sweet-partial-*` in `/tmp/qa-279/`.
|
|
1838
1918
|
- **Step 8, `dl/big.bin` (`chmod 4644` first):** succeeded, `size_bytes` 3000000, and the file is now `-rw-r--r--`: setuid dropped.
|
|
1839
1919
|
|
|
1920
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 1 (`499aa59`), OAuth, throwaway `qa-279` folder under `TEST_FOLDER_ID`. Drive `big.bin`: 3000000 B, `modified_time` `03:54:22Z`.
|
|
1921
|
+
- **Step 1:** `downloaded: ["big.bin"]`, `skipped: [".gee-sweet-partial-0123456789abcdef"]`; `uploaded`, `failed` empty.
|
|
1922
|
+
- **Step 2:** 3000000 B, md5 matches, mode `-rw-r-----` kept, mtime `20:54:22-0700` (= `03:54:22Z`). Only the planted temp file present.
|
|
1923
|
+
- **Step 3:** one file, `big.bin`.
|
|
1924
|
+
- **Step 4:** `skipped: [".gee-sweet-partial-0123456789abcdef", "big.bin"]`, nothing transferred.
|
|
1925
|
+
- **Step 5:** `uploaded: ["big.bin"]`, `skipped: [".gee-sweet-partial-0123456789abcdef"]`, `failed` empty; `list_files` shows two `big.bin`, no temp file.
|
|
1926
|
+
- **Step 6:** `size_bytes` 3000000; directory still holds only `big.bin` and the planted temp file.
|
|
1927
|
+
- **Step 7:** `downloaded: ["big.bin"]`, one duplicate-filename `failed` entry; `dl/` holds only `big.bin`, 3000000 B.
|
|
1928
|
+
- **Step 8:** `ro.bin` refused with `[Errno 13] Permission denied`, still `protected` and `-r--r--r--`, no temp file; `dl/big.bin` succeeded and is `-rw-r--r--` (setuid dropped).
|
|
1929
|
+
|
|
1930
|
+
---
|
|
1931
|
+
|
|
1932
|
+
### TC-D285: Temp-file names on Drive, device and FIFO destinations, and a kept owner group (issue #887, via #895) ⚠️ local-filesystem ⚠️ destructive
|
|
1933
|
+
|
|
1934
|
+
**Background:** #887 lists follow-ups to the temp-file-and-rename download from #844 (TC-D279). Only the local side filtered the temp name, so a Drive file named `.gee-sweet-partial-<16 hex>` downloaded, became invisible locally, and downloaded again on every sync. Such a name is now refused as a local filename, like `..`. The rename also broke non-regular destinations. `/dev/null` failed, since a temp file can't be created in `/dev`. A FIFO was replaced by a regular file. Now a device is written directly, as the old `open("wb")` did, and a FIFO is refused without blocking. The replacement file now also takes the replaced file's group when the process may set it. A directory at a file's destination is refused before the download starts (PR #1001 QA round 1). The fsync, the fd-leak fix, owner changes (root only), and the group-only fallback for a file another user owns aren't observable through the tool surface; they're unit-tested in `tests/test_atomic_write.py`.
|
|
1935
|
+
|
|
1936
|
+
**Setup**
|
|
1937
|
+
> 1. Call `create_folder(name="qa-285", parent_folder_id="{FOLDER_ID}")`; call the returned ID `{F}`.
|
|
1938
|
+
> 2. Run `rm -rf /tmp/qa-285 && mkdir -p /tmp/qa-285/src /tmp/qa-285/sync /tmp/qa-285/dl && printf 'payload' > /tmp/qa-285/src/.gee-sweet-partial-0123456789abcdef && printf 'hello' > /tmp/qa-285/src/hello.txt && mkfifo /tmp/qa-285/pipe && ln -s /dev/null /tmp/qa-285/null-link`.
|
|
1939
|
+
> 3. Call `upload_local_file(local_path="/tmp/qa-285/src/.gee-sweet-partial-0123456789abcdef", parent_folder_id="{F}")` and `upload_local_file(local_path="/tmp/qa-285/src/hello.txt", parent_folder_id="{F}")`; call the second ID `{H}`.
|
|
1940
|
+
> 4. Run `printf x > /tmp/qa-285/ref && ls -l /tmp/qa-285/ref` to see the group a new file in that folder gets. Pick a different group you belong to (`id -Gn`), call it `{G}`, and run `printf old > /tmp/qa-285/owned.txt && chgrp {G} /tmp/qa-285/owned.txt && ls -l /tmp/qa-285/owned.txt`.
|
|
1941
|
+
|
|
1942
|
+
**Steps**
|
|
1943
|
+
> 1. `sync_folder(folder_id="{F}", local_path="/tmp/qa-285/sync", direction="download")`, then `ls -la /tmp/qa-285/sync/`.
|
|
1944
|
+
> 2. `sync_folder(folder_id="{F}", local_path="/tmp/qa-285/sync", direction="download", dry_run=true)`.
|
|
1945
|
+
> 3. `download_folder(folder_id="{F}", local_path="/tmp/qa-285/dl")`, then `ls -la /tmp/qa-285/dl/`.
|
|
1946
|
+
> 4. `download_file(file_id="{H}", local_path="/dev/null")`.
|
|
1947
|
+
> 5. `download_file(file_id="{H}", local_path="/tmp/qa-285/null-link")`, then `ls -la /tmp/qa-285/`.
|
|
1948
|
+
> 6. `download_file(file_id="{H}", local_path="/tmp/qa-285/pipe")` (it must return promptly, not hang), then `ls -la /tmp/qa-285/`.
|
|
1949
|
+
> 7. `download_file(file_id="{H}", local_path="/tmp/qa-285/owned.txt")`, then `ls -l /tmp/qa-285/owned.txt && cat /tmp/qa-285/owned.txt`.
|
|
1950
|
+
> 8. (PR #1001 QA round 1) `sync_folder(folder_id="{F}", local_path="/tmp/qa-285/src", direction="upload", dry_run=true)`. The temp name exists on both sides here.
|
|
1951
|
+
> 9. (PR #1001 QA round 1) Run `mkdir -p /tmp/qa-285/dirsync/hello.txt`, then `sync_folder(folder_id="{F}", local_path="/tmp/qa-285/dirsync", direction="download")`, then `ls -la /tmp/qa-285/dirsync/`.
|
|
1952
|
+
> 10. (PR #1001 QA round 1) `create_folder(name=".gee-sweet-partial-0123456789abcdef", parent_folder_id="{F}")`; call the returned ID `{P}`. `upload_local_file(local_path="/tmp/qa-285/src/hello.txt", parent_folder_id="{P}")`. Then `sync_folder(folder_id="{F}", local_path="/tmp/qa-285/sync", direction="download", recursive=true, dry_run=true)`.
|
|
1953
|
+
> 11. (PR #1001 QA round 2) Run `mkdir -p /tmp/qa-285/probe && printf '# probe' > /tmp/qa-285/src/probe.md && mkfifo /tmp/qa-285/probe/probe.md.xlsx`. Call `upload_local_file(local_path="/tmp/qa-285/src/probe.md", parent_folder_id="{F}", convert=true)`; call the returned ID `{D}`. Then `download_file(file_id="{D}", local_path="/tmp/qa-285/probe/", export_format="xlsx")`. A Doc can't be exported as xlsx, so a Drive error here means the export ran before the destination check.
|
|
1954
|
+
|
|
1955
|
+
**Checks**
|
|
1956
|
+
- Step 1: `downloaded` is `["hello.txt"]`. `failed` has one entry, named `.gee-sweet-partial-0123456789abcdef`, whose error says the name is reserved for this server's temporary download files. `sync/` holds only `hello.txt`.
|
|
1957
|
+
- Step 2: `actions` has an `unsafe_name` entry for `.gee-sweet-partial-0123456789abcdef` (the same reason) and a `skip` for `hello.txt`.
|
|
1958
|
+
- Step 3: `downloaded` is `["hello.txt"]`, and `failed` has one entry for the temp-file name, saying it can't be used as a local filename. `dl/` holds only `hello.txt`.
|
|
1959
|
+
- Step 4: succeeds with `size_bytes` 0 (as `/dev/null` reports it). No `.gee-sweet-partial-*` error.
|
|
1960
|
+
- Step 5: succeeds the same way. `null-link` is still a symlink to `/dev/null`, and no `.gee-sweet-partial-*` file is in `/tmp/qa-285/`.
|
|
1961
|
+
- Step 6: fails promptly with an error saying the destination isn't a regular file. `pipe` is still a FIFO (`p` in `ls -la`), and no `.gee-sweet-partial-*` file is in `/tmp/qa-285/`.
|
|
1962
|
+
- Step 7: succeeds. `owned.txt` reads `hello` and its group is still `{G}`.
|
|
1963
|
+
- Step 8: `actions` has an `unsafe_name` entry for `.gee-sweet-partial-0123456789abcdef` with the reserved-name reason, not `skip` / `drive only, upload direction`.
|
|
1964
|
+
- Step 9: `downloaded` is empty. `failed` has an entry for `hello.txt` whose error says the destination is a directory and names `/tmp/qa-285/dirsync/hello.txt`, not a `.gee-sweet-partial-*` file, plus the reserved-name entry from step 1. `dirsync/hello.txt` is still an empty directory and no `.gee-sweet-partial-*` file is in `dirsync/`.
|
|
1965
|
+
- Step 10: `failed` is empty. `actions` still has the `unsafe_name` entry for the reserved-name *file*, and also `.gee-sweet-partial-0123456789abcdef/hello.txt` as `download`: a folder with the reserved name is synced like any other, with no `unsafe_name` entry for the folder.
|
|
1966
|
+
- Step 11: raises `[Errno 22] destination exists but isn't a regular file` naming `/tmp/qa-285/probe/probe.md.xlsx`, not Drive's `HttpError 400 … conversion is not supported`. `probe.md.xlsx` is still a FIFO.
|
|
1967
|
+
|
|
1968
|
+
**Teardown**
|
|
1969
|
+
`delete_file` on `{F}`. `rm -rf /tmp/qa-285`.
|
|
1970
|
+
|
|
1971
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 1 (`499aa59`), OAuth, macOS, throwaway `qa-285` folder under `TEST_FOLDER_ID`. New files in `/tmp/qa-285` get group `wheel`; `{G}` was `staff`.
|
|
1972
|
+
- **Step 1:** `downloaded: ["hello.txt"]`; `failed` one entry for `.gee-sweet-partial-0123456789abcdef`, `name is reserved for this server's temporary download files; not synced`. `sync/` holds only `hello.txt`.
|
|
1973
|
+
- **Step 2:** `actions`: `unsafe_name` for the temp name (same reason), `skip` (`in sync`) for `hello.txt`.
|
|
1974
|
+
- **Step 3:** `downloaded: ["hello.txt"]`; `failed` one entry, `… can't be used as a local filename: name is reserved …`. `dl/` holds only `hello.txt`.
|
|
1975
|
+
- **Steps 4–5:** both returned `size_bytes` 0; `null-link` still → `/dev/null`, no temp file.
|
|
1976
|
+
- **Step 6:** returned at once with `[Errno 22] destination exists but isn't a regular file`; `pipe` still `prw-r--r--`, no temp file.
|
|
1977
|
+
- **Step 7:** succeeded; `owned.txt` reads `hello`, group still `staff`.
|
|
1978
|
+
|
|
1979
|
+
The case passes. Extra probe: `sync_folder(local_path="/tmp/qa-285/src", direction="upload", dry_run=true)`, where the temp name exists on both sides, reported `skip` / `drive only, upload direction`, which is false, and never mentions the local leftover (sent back on the PR).
|
|
1980
|
+
|
|
1981
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 2 (`a0955ce`), OAuth, macOS, after reconnecting to the fix. Fresh `qa-285` folder and fixtures; steps 1–7 gave the same results as round 1 (`owned.txt` group still `staff`).
|
|
1982
|
+
- **Step 8:** `.gee-sweet-partial-0123456789abcdef` is `unsafe_name` with the reserved-name reason, no longer `skip` / `drive only`.
|
|
1983
|
+
- **Step 9:** `downloaded` empty; `failed` has the reserved-name entry and `hello.txt`: `[Errno 21] destination is a directory: '/tmp/qa-285/dirsync/hello.txt'`, with no temp-file name. `dirsync/hello.txt` is still an empty directory, and there's no temp file.
|
|
1984
|
+
- **Step 10:** `failed` empty; `actions` has `unsafe_name` for the reserved-name file and `.gee-sweet-partial-0123456789abcdef/hello.txt` as `download`, with no `unsafe_name` entry for the folder.
|
|
1985
|
+
|
|
1986
|
+
The case passes. Extra probe (sent back on the PR): a Doc exported with `download_file` to a *directory* target holding a FIFO at the export's filename isn't checked before the export. Explicit `local_path=".../explicit.xlsx"` (a FIFO) with `export_format="xlsx"` raised `EINVAL` with no Drive call. `local_path=".../probe/"` with `export_format="xlsx"` (FIFO at `probe/qa-probe.xlsx`) returned Drive's `HttpError 400 … conversion is not supported`, so the export ran first. With `export_format="txt"` (FIFO at `probe/qa-probe.txt`), the call raised `EINVAL`. It runs the same path, so the export had already been fetched by then.
|
|
1987
|
+
|
|
1988
|
+
**Result (2026-10-11) ✅ PASS** — Sky, PR #1001 round 3 (`8e5e87d`), OAuth, after reconnecting to the fix. Step 11 only (the fix touches only `download_file`'s directory-target branch); fresh `qa-285` folder.
|
|
1989
|
+
- **Step 11:** raised `[Errno 22] destination exists but isn't a regular file: '/tmp/qa-285/probe/probe.md.xlsx'`, not Drive's `HttpError 400`. `probe.md.xlsx` is still a FIFO.
|
|
1990
|
+
- Extra: the same call with `export_format="txt"` (FIFO at `probe/probe.md.txt`) raised the same `EINVAL`. With no blocker, `download_file(local_path="/tmp/qa-285/ok/", export_format="txt")` still wrote `ok/probe.md.txt` (8 B, `probe`).
|
|
1991
|
+
|
|
1840
1992
|
---
|
|
1841
1993
|
|
|
1842
1994
|
## `list_revisions`
|
|
@@ -281,7 +281,7 @@ Same shape as v0.8.1 — stabilize on defects that surfaced since v0.9.0 shipped
|
|
|
281
281
|
- [x] Deduplicate the `max_results` clamp expression, hand-copied 8x across `drive/files.py` with inconsistent caps (PR #736 follow-up) ([#737](https://github.com/khuisman/mcp-gee-sweet/issues/737)) (PR #781)
|
|
282
282
|
- [x] `download_file`: one pre-flight `local_path` check before any Drive call, for both trailing-slash and plain branches, naming the blocking path (#724/#827 follow-up; on-deck, `good first issue`) (PR #855) ([#836](https://github.com/khuisman/mcp-gee-sweet/issues/836))
|
|
283
283
|
- [x] `sync_folder`: a failed mid-stream download leaves a truncated local file with a fresh mtime, which the next sync uploads over the intact Drive copy — download to a temp file and `os.replace` on success; check `download_file`/`download_folder` too. Found by code review, not yet observed live (lane-a, after #814 since both touch `_run_one`) ([#844](https://github.com/khuisman/mcp-gee-sweet/issues/844)) (PR #884)
|
|
284
|
-
- [
|
|
284
|
+
- [x] **Bundle:** Drive transfer follow-ups (`download_file` preflight + `_write_atomically`), one PR closing [#874](https://github.com/khuisman/mcp-gee-sweet/issues/874), [#887](https://github.com/khuisman/mcp-gee-sweet/issues/887) — lane A (PR #1001) ([#895](https://github.com/khuisman/mcp-gee-sweet/issues/895))
|
|
285
285
|
- [ ] `upload_local_file`/`sync_folder`: compressed files upload with the inner MIME type (`x.csv.gz` → `text/csv`). Lane A, after #895 (both touch `transfer.py` uploads); community PR #934 closed unmerged 2026-10-10 ([#930](https://github.com/khuisman/mcp-gee-sweet/issues/930))
|
|
286
286
|
- [ ] Share one HttpError reason-check helper across the `storageQuotaExceeded` sites. Lane A, after #930; community PR #921 closed unmerged 2026-10-10 ([#916](https://github.com/khuisman/mcp-gee-sweet/issues/916))
|
|
287
287
|
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"""Atomic local-file writes, shared by every Drive download (drive/transfer.py)
|
|
2
|
+
and the response-cap local_path dump (response_limits.py). Lives at the tools/
|
|
3
|
+
level so both can import it: transfer.py already imports response_limits."""
|
|
4
|
+
|
|
5
|
+
import contextlib
|
|
6
|
+
import errno
|
|
7
|
+
import os
|
|
8
|
+
import re
|
|
9
|
+
import secrets
|
|
10
|
+
import stat
|
|
11
|
+
from collections.abc import Callable
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import BinaryIO
|
|
14
|
+
|
|
15
|
+
# Every download, and every response-cap local_path write (#958), writes to a
|
|
16
|
+
# sibling temp file with this name and renames it onto the destination only once
|
|
17
|
+
# complete (_write_atomically, #844). A temp file only outlives its write when
|
|
18
|
+
# the process is killed mid-write; sync_folder and upload_local_folder never
|
|
19
|
+
# upload one and list it under 'skipped', and a Drive file with such a name is
|
|
20
|
+
# refused as a local filename (#887). No part of the destination's name is embedded, so the temp name
|
|
21
|
+
# can't exceed the filesystem's name-length limit.
|
|
22
|
+
_PARTIAL_DOWNLOAD_PREFIX = ".gee-sweet-partial-"
|
|
23
|
+
_PARTIAL_DOWNLOAD_RE = re.compile(r"\.gee-sweet-partial-[0-9a-f]{16}")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _is_partial_download(name: str) -> bool:
|
|
27
|
+
"""Whether `name` is a temp file _write_atomically left behind."""
|
|
28
|
+
return _PARTIAL_DOWNLOAD_RE.fullmatch(name) is not None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _write_atomically(
|
|
32
|
+
dest: Path, write: Callable[[BinaryIO], object], mtime: float | None = None
|
|
33
|
+
) -> None:
|
|
34
|
+
"""Run `write` against a sibling temp file, then rename it onto `dest`.
|
|
35
|
+
|
|
36
|
+
`dest` only ever holds its previous content or the complete new content.
|
|
37
|
+
Writing straight into `dest` left a truncated file behind when a download
|
|
38
|
+
failed partway, with a current mtime that made sync_folder treat it as the
|
|
39
|
+
newer copy and upload it over the intact Drive file (#844). `mtime`, when
|
|
40
|
+
given, is stamped on the temp file before the rename, so a failed restamp
|
|
41
|
+
also leaves `dest` untouched. The temp file is removed on any failure. It's
|
|
42
|
+
fsynced before the rename and the directory after it, so a power loss can't
|
|
43
|
+
leave `dest` empty or truncated either (#887).
|
|
44
|
+
|
|
45
|
+
A symlink at `dest` is written through, as the old `open("wb")` did: the
|
|
46
|
+
temp file goes next to the link's target and replaces the target. The new
|
|
47
|
+
file gets the mode a fresh `open("wb")` would (0o666 less the umask), or the
|
|
48
|
+
replaced file's permission bits when there was one (never its
|
|
49
|
+
setuid/setgid/sticky bits, which an in-place write would have cleared), and
|
|
50
|
+
the replaced file's owner and group when this process may set them (root,
|
|
51
|
+
e.g. the Docker image writing into a bind mount). Nothing else on the old
|
|
52
|
+
inode carries over (ACLs, xattrs, creation time), and a hard link to it
|
|
53
|
+
keeps the old content; see docs/known-limitations.md.
|
|
54
|
+
|
|
55
|
+
A rename needs write permission on the directory, not the file, so an
|
|
56
|
+
existing file this process couldn't open for writing is refused up front
|
|
57
|
+
with the same PermissionError `open("wb")` raised; otherwise a file the
|
|
58
|
+
user made read-only would be silently replaced (PR #884 QA round 1).
|
|
59
|
+
|
|
60
|
+
A character or block device at `dest` (e.g. /dev/null) can't be renamed
|
|
61
|
+
over, so it's written directly, as `open("wb")` did, and `mtime` isn't
|
|
62
|
+
stamped on it. A directory, FIFO, or socket is refused (_check_destination)
|
|
63
|
+
before `write` runs, so a download isn't streamed only to fail at the
|
|
64
|
+
rename, and a FIFO is never replaced or blocked on (#887).
|
|
65
|
+
"""
|
|
66
|
+
target = Path(os.path.realpath(dest)) if dest.is_symlink() else dest
|
|
67
|
+
target_st = _check_destination(target)
|
|
68
|
+
if target_st is not None and _is_device(target_st):
|
|
69
|
+
with open(target, "wb") as fh:
|
|
70
|
+
write(fh)
|
|
71
|
+
return
|
|
72
|
+
tmp = target.with_name(_PARTIAL_DOWNLOAD_PREFIX + secrets.token_hex(8))
|
|
73
|
+
fd = os.open(tmp, os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_BINARY", 0), 0o666)
|
|
74
|
+
try:
|
|
75
|
+
try:
|
|
76
|
+
fh = os.fdopen(fd, "wb")
|
|
77
|
+
except BaseException:
|
|
78
|
+
os.close(fd)
|
|
79
|
+
raise
|
|
80
|
+
with fh:
|
|
81
|
+
write(fh)
|
|
82
|
+
fh.flush()
|
|
83
|
+
os.fsync(fh.fileno())
|
|
84
|
+
if target_st is not None:
|
|
85
|
+
_copy_owner_and_mode(tmp, target_st)
|
|
86
|
+
if mtime is not None:
|
|
87
|
+
os.utime(tmp, (mtime, mtime))
|
|
88
|
+
os.replace(tmp, target)
|
|
89
|
+
except BaseException:
|
|
90
|
+
with contextlib.suppress(OSError):
|
|
91
|
+
os.unlink(tmp)
|
|
92
|
+
raise
|
|
93
|
+
_fsync_directory(target.parent)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def _is_device(st: os.stat_result) -> bool:
|
|
97
|
+
return stat.S_ISCHR(st.st_mode) or stat.S_ISBLK(st.st_mode)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _check_destination(dest: Path) -> os.stat_result | None:
|
|
101
|
+
"""Raise if _write_atomically can't write `dest`; else its stat, or None if absent.
|
|
102
|
+
|
|
103
|
+
Callers that fetch content before writing (a Workspace export) call this
|
|
104
|
+
first too, so a bad destination fails before the round trip. Raises
|
|
105
|
+
IsADirectoryError for a directory, OSError(EINVAL) for a FIFO or socket,
|
|
106
|
+
and PermissionError for a file this process can't open for writing (a
|
|
107
|
+
rename only needs directory permission, so without this a read-only file
|
|
108
|
+
would be silently replaced; PR #884 QA round 1). A symlink is followed.
|
|
109
|
+
"""
|
|
110
|
+
try:
|
|
111
|
+
st = dest.stat()
|
|
112
|
+
except FileNotFoundError:
|
|
113
|
+
return None
|
|
114
|
+
if stat.S_ISDIR(st.st_mode):
|
|
115
|
+
raise IsADirectoryError(errno.EISDIR, "destination is a directory", str(dest))
|
|
116
|
+
if not stat.S_ISREG(st.st_mode) and not _is_device(st):
|
|
117
|
+
raise OSError(errno.EINVAL, "destination exists but isn't a regular file", str(dest))
|
|
118
|
+
if not os.access(dest, os.W_OK):
|
|
119
|
+
raise PermissionError(errno.EACCES, os.strerror(errno.EACCES), str(dest))
|
|
120
|
+
return st
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _copy_owner_and_mode(tmp: Path, old: os.stat_result) -> None:
|
|
124
|
+
"""Give `tmp` the replaced file's owner, group, and permission bits.
|
|
125
|
+
|
|
126
|
+
Owner and group are best effort: only root can give a file away, and
|
|
127
|
+
anyone else can only pick a group they belong to. When the full chown is
|
|
128
|
+
refused, the group alone is still tried (PR #1001 QA round 1). chown runs
|
|
129
|
+
before chmod because it can clear bits that chmod then sets.
|
|
130
|
+
"""
|
|
131
|
+
if hasattr(os, "chown"):
|
|
132
|
+
tmp_st = os.stat(tmp)
|
|
133
|
+
if (tmp_st.st_uid, tmp_st.st_gid) != (old.st_uid, old.st_gid):
|
|
134
|
+
try:
|
|
135
|
+
os.chown(tmp, old.st_uid, old.st_gid)
|
|
136
|
+
except OSError:
|
|
137
|
+
if tmp_st.st_gid != old.st_gid:
|
|
138
|
+
with contextlib.suppress(OSError):
|
|
139
|
+
os.chown(tmp, -1, old.st_gid)
|
|
140
|
+
os.chmod(tmp, old.st_mode & 0o777)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _fsync_directory(directory: Path) -> None:
|
|
144
|
+
"""Persist a rename inside `directory`. Best effort: Windows can't open a
|
|
145
|
+
directory, and some filesystems refuse to fsync one; the rename itself has
|
|
146
|
+
already happened either way."""
|
|
147
|
+
with contextlib.suppress(OSError):
|
|
148
|
+
dfd = os.open(directory, os.O_RDONLY)
|
|
149
|
+
try:
|
|
150
|
+
os.fsync(dfd)
|
|
151
|
+
finally:
|
|
152
|
+
os.close(dfd)
|