mcp-gee-sweet 0.9.2.dev327__tar.gz → 0.9.2.dev335__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.
Files changed (261) hide show
  1. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/merge-pr.md +2 -2
  2. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/release.md +2 -2
  3. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/qa.md +3 -1
  4. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/PKG-INFO +1 -1
  5. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/role-file-history.md +8 -0
  6. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/doc-revision-export.md +1 -1
  7. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/local-file-access-policy.md +2 -2
  8. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/docs_content.md +27 -0
  9. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/drive_transfer.md +82 -3
  10. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/sheets_read.md +20 -0
  11. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/roadmap.md +6 -4
  12. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/content.py +6 -0
  13. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/markdown_export.py +5 -2
  14. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/drive/transfer.py +34 -78
  15. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/gmail.py +10 -2
  16. mcp_gee_sweet-0.9.2.dev335/src/mcp_gee_sweet/tools/response_limits.py +250 -0
  17. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/sheets/data.py +12 -0
  18. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/drive/test_transfer.py +101 -0
  19. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_response_limits.py +120 -0
  20. mcp_gee_sweet-0.9.2.dev327/src/mcp_gee_sweet/tools/response_limits.py +0 -125
  21. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/cleanup-worktrees.md +0 -0
  22. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/notify-kai.md +0 -0
  23. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/notify-partner.md +0 -0
  24. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/orchestrator.md +0 -0
  25. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/prep-for-pr.md +0 -0
  26. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/qa-kickoff.md +0 -0
  27. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/retro.md +0 -0
  28. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/roadmap-status.md +0 -0
  29. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/start-worktree.md +0 -0
  30. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/team-member.md +0 -0
  31. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/commands/verify-pr.md +0 -0
  32. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/settings.json +0 -0
  33. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/amy.md +0 -0
  34. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/aziz.md +0 -0
  35. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/bob.md +0 -0
  36. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/dev.md +0 -0
  37. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/joy.md +0 -0
  38. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.claude/team-roles/kai.md +0 -0
  39. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.dockerignore +0 -0
  40. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  41. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  42. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  43. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/dependabot.yml +0 -0
  44. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/workflows/ci.yml +0 -0
  45. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/workflows/docs.yml +0 -0
  46. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/workflows/publish-dev.yml +0 -0
  47. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.github/workflows/release.yml +0 -0
  48. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.gitignore +0 -0
  49. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.pre-commit-config.yaml +0 -0
  50. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/.python-version +0 -0
  51. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/CHANGELOG.md +0 -0
  52. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/CLAUDE.md +0 -0
  53. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/CODE_OF_CONDUCT.md +0 -0
  54. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/CONTRIBUTING.md +0 -0
  55. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/Dockerfile +0 -0
  56. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/LICENSE +0 -0
  57. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/Makefile +0 -0
  58. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/README.md +0 -0
  59. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/SECURITY.md +0 -0
  60. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docker-compose.yml +0 -0
  61. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/assets/logo.png +0 -0
  62. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/auth.md +0 -0
  63. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/client-setup.md +0 -0
  64. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/configuration.md +0 -0
  65. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-async-tool-execution.md +0 -0
  66. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-auth-status-limitation-categories.md +0 -0
  67. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-cache-invalidation.md +0 -0
  68. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-chart-theming.md +0 -0
  69. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-comments-first-class.md +0 -0
  70. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-composite-tools.md +0 -0
  71. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-condition-type-docstring-generation.md +0 -0
  72. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-converted-doc-change-detection.md +0 -0
  73. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-dev-team.md +0 -0
  74. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-docs-formatting.md +0 -0
  75. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-fork.md +0 -0
  76. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-gmail-domain.md +0 -0
  77. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-grid-data-size-cap.md +0 -0
  78. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-local-fs-test-harness.md +0 -0
  79. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-mcp-v2-resource-context-access.md +0 -0
  80. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-pillow-image-dependency.md +0 -0
  81. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-prompt-qa-role.md +0 -0
  82. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-publishing.md +0 -0
  83. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-release-docs-roles.md +0 -0
  84. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-repositioning.md +0 -0
  85. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-response-size-cap-generalization.md +0 -0
  86. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-response-size-cap-reevaluation-519.md +0 -0
  87. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-review-finding-ticket-bar.md +0 -0
  88. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-supports-all-drives-lint-check.md +0 -0
  89. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-sync-folder-recursion.md +0 -0
  90. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-testing.md +0 -0
  91. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/decision-tool-error-visibility.md +0 -0
  92. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/decisions/index.md +0 -0
  93. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/blockquote-representation.md +0 -0
  94. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/borderless-table-columns.md +0 -0
  95. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/doc-to-markdown.md +0 -0
  96. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/docs-ast-pipeline.md +0 -0
  97. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/effectiveformat-spike.md +0 -0
  98. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/heading-anchor-resolution.md +0 -0
  99. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/image-conversion.md +0 -0
  100. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/index.md +0 -0
  101. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/markdown-support.md +0 -0
  102. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/module-history.md +0 -0
  103. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/oauth-reauthorize-from-tool-call.md +0 -0
  104. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/phase3-theme-system.md +0 -0
  105. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design/sse-consent-off-event-loop.md +0 -0
  106. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/design.md +0 -0
  107. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/index.md +0 -0
  108. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/known-limitations.md +0 -0
  109. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/notes-read.md +0 -0
  110. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/README.md +0 -0
  111. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/qa-fixture-pixel.png +0 -0
  112. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-d195-create-doc.md +0 -0
  113. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-d196-create-doc.html +0 -0
  114. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-d213-dollar-escape.md +0 -0
  115. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-d226-heading-table.md +0 -0
  116. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc102-image-conversion.html +0 -0
  117. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc103-image-conversion.md +0 -0
  118. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc104-nested-lists.html +0 -0
  119. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc105-nested-lists-gfm.md +0 -0
  120. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc106-nested-lists-4space.md +0 -0
  121. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc135-paragraph-boundary.md +0 -0
  122. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc136-interrupted-block-boundary.md +0 -0
  123. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc137-inline-hr-no-block-ancestor.html +0 -0
  124. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc138-nbsp-spacer-paragraph.md +0 -0
  125. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc141-mismatched-list-tags.html +0 -0
  126. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc142-heading-anchors.md +0 -0
  127. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc144-anchor-in-table-cell.md +0 -0
  128. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures/tc-doc145-anchor-on-first-element.md +0 -0
  129. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/fixtures.template.md +0 -0
  130. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/gmail-test-plan.md +0 -0
  131. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/operations.yaml +0 -0
  132. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/playwright_oauth.md +0 -0
  133. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/.gitkeep +0 -0
  134. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-02.md +0 -0
  135. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-14.md +0 -0
  136. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-17.md +0 -0
  137. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-18.md +0 -0
  138. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-21-drive-discovery.md +0 -0
  139. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-21-sheets-delete-clear.md +0 -0
  140. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-06-28.md +0 -0
  141. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-07-04-docs.md +0 -0
  142. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-07-04-drive-smoke.md +0 -0
  143. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-07-04-infra.md +0 -0
  144. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-07-04-sheets_read.md +0 -0
  145. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-07-04.md +0 -0
  146. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/results/2026-09-04.md +0 -0
  147. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/retro-v0.8.0.md +0 -0
  148. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/retro-v0.9.0.md +0 -0
  149. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/run.md +0 -0
  150. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/runs/README.md +0 -0
  151. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/runs/v0.8.0.md +0 -0
  152. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/runs/v0.8.1.md +0 -0
  153. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/runs/v0.9.0.md +0 -0
  154. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/setup.md +0 -0
  155. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/calendar.md +0 -0
  156. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/docs_layout.md +0 -0
  157. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/docs_style.md +0 -0
  158. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/docs_tables.md +0 -0
  159. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/drive_activity.md +0 -0
  160. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/drive_files.md +0 -0
  161. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/drive_sharing.md +0 -0
  162. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/gmail.md +0 -0
  163. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/infra.md +0 -0
  164. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/sheets_charts.md +0 -0
  165. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/sheets_mgmt.md +0 -0
  166. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/qa/tests/sheets_write.md +0 -0
  167. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/style-guide.md +0 -0
  168. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/docs/tools.md +0 -0
  169. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/mkdocs.yml +0 -0
  170. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/pyproject.toml +0 -0
  171. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/pyrightconfig.json +0 -0
  172. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/check_supports_all_drives.py +0 -0
  173. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/gen_tool_docs.py +0 -0
  174. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/lane_context_hook.py +0 -0
  175. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/oauth_setup.py +0 -0
  176. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/qa_cancel_insert_local_images.py +0 -0
  177. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/qa_gmail_fixtures.py +0 -0
  178. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/setup_team.sh +0 -0
  179. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/scripts/write_team_mcp_configs.sh +0 -0
  180. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/server.json +0 -0
  181. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/.env.template +0 -0
  182. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/__init__.py +0 -0
  183. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/auth.py +0 -0
  184. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/cache.py +0 -0
  185. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/http_transport.py +0 -0
  186. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/reauth.py +0 -0
  187. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/server.py +0 -0
  188. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/sse_shutdown.py +0 -0
  189. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/__init__.py +0 -0
  190. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/atomic_write.py +0 -0
  191. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/cache.py +0 -0
  192. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/calendar.py +0 -0
  193. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/concurrency.py +0 -0
  194. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/__init__.py +0 -0
  195. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/anchors.py +0 -0
  196. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/ast.py +0 -0
  197. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/ast_to_markdown.py +0 -0
  198. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/comments.py +0 -0
  199. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/doc_to_ast.py +0 -0
  200. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/editing.py +0 -0
  201. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/emitter.py +0 -0
  202. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/html_parser.py +0 -0
  203. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/images.py +0 -0
  204. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/indices.py +0 -0
  205. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/layout.py +0 -0
  206. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/named_ranges.py +0 -0
  207. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/style.py +0 -0
  208. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/docs/tables.py +0 -0
  209. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/drive/__init__.py +0 -0
  210. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/drive/activity.py +0 -0
  211. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/drive/files.py +0 -0
  212. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/drive/sharing.py +0 -0
  213. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/mime_types.py +0 -0
  214. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/pagination.py +0 -0
  215. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/sheets/__init__.py +0 -0
  216. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/sheets/helpers.py +0 -0
  217. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/src/mcp_gee_sweet/tools/sheets/structure.py +0 -0
  218. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/__init__.py +0 -0
  219. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/conftest.py +0 -0
  220. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/drive/__init__.py +0 -0
  221. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/drive/test_activity.py +0 -0
  222. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/drive/test_files.py +0 -0
  223. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/drive/test_sharing.py +0 -0
  224. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/fakes.py +0 -0
  225. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/integration/__init__.py +0 -0
  226. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/integration/conftest.py +0 -0
  227. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/integration/test_local_fs_harness.py +0 -0
  228. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/sheets/__init__.py +0 -0
  229. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/sheets/test_data.py +0 -0
  230. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/sheets/test_helpers.py +0 -0
  231. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/sheets/test_structure.py +0 -0
  232. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_atomic_write.py +0 -0
  233. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_auth.py +0 -0
  234. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_cache.py +0 -0
  235. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_calendar.py +0 -0
  236. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_check_supports_all_drives.py +0 -0
  237. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_concurrency.py +0 -0
  238. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_anchors.py +0 -0
  239. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_comments.py +0 -0
  240. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_content.py +0 -0
  241. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_core.py +0 -0
  242. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_editing.py +0 -0
  243. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_images.py +0 -0
  244. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_indices.py +0 -0
  245. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_layout.py +0 -0
  246. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_markdown_export.py +0 -0
  247. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_named_ranges.py +0 -0
  248. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_revision_export.py +0 -0
  249. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_style.py +0 -0
  250. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_docs_tables.py +0 -0
  251. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_gen_tool_docs.py +0 -0
  252. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_gmail.py +0 -0
  253. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_lane_context_hook.py +0 -0
  254. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_mime_types.py +0 -0
  255. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_qa_gmail_fixtures.py +0 -0
  256. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_reauth.py +0 -0
  257. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_server.py +0 -0
  258. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_server_json.py +0 -0
  259. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_sse_shutdown.py +0 -0
  260. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/tests/test_team_mcp_configs.py +0 -0
  261. {mcp_gee_sweet-0.9.2.dev327 → mcp_gee_sweet-0.9.2.dev335}/uv.lock +0 -0
@@ -6,10 +6,10 @@ Merge the current branch's PR and clean up its worktree. Uses `--admin` only to
6
6
  - `state` must be `OPEN`.
7
7
  - Every check in `statusCheckRollup` must show success. If anything is failing or still pending, stop and report which — do not merge, and do not wait/poll.
8
8
  - **Exception for a transient re-run:** a `qa-approved` PR often arrives with CI mid-run because the QA agent's own TC-Result-entry commit (pushed at or just before approval, per `qa.md`) retriggered the workflow. If this session is a *background* Kai woken specifically to merge this PR (e.g. via `notify-kai`) **and** every not-yet-green check is `IN_PROGRESS` (none `FAILURE`/`ERROR`, and `Lint and test` present per the next bullet), you may arm a single `Monitor` on `gh pr checks <n>` that exits once every check reaches a terminal state, then re-run this whole step from the top against fresh JSON before merging. That's a scheduled re-check, not polling inside the synchronous flow. An *interactive* Kai still just reports the mid-run state and lets the user re-invoke. A `FAILURE`, `ERROR`, or an absent `Lint and test` is never waited out — report it. (Confirmed 2026-09-09: PR #712 arrived with 6 checks `IN_PROGRESS` from Kit's Result-entry push; monitored to green, re-verified, merged.)
9
- - Specifically confirm a `"name": "Lint and test"` entry is *present* in `statusCheckRollup` with `"conclusion": "SUCCESS"` — don't just scan for failures. This check has been observed missing entirely from the rollup (not failing, not pending — absent) on a PR's first push, while CodeQL's checks still populated normally; a rollup with zero failing entries can still mean the actual test suite never ran. If it's absent, don't treat that as a pass — push a trivial commit (or `gh workflow run ci.yml --ref <branch>` if available) to retrigger it and wait for a real result before merging.
9
+ - Specifically confirm all four `Lint and test (Python 3.10)` … `(Python 3.13)` entries are *present* in `statusCheckRollup`, each with `"conclusion": "SUCCESS"` — don't just scan for failures. CI runs `Lint and test` as a matrix (`.github/workflows/ci.yml`), so no entry is named exactly `Lint and test`; match the prefix and count the versions. This check has been observed missing entirely from the rollup (not failing, not pending — absent) on a PR's first push, while CodeQL's checks still populated normally; a rollup with zero failing entries can still mean the actual test suite never ran. If it's absent, don't treat that as a pass — push a trivial commit (or `gh workflow run ci.yml --ref <branch>` if available) to retrigger it and wait for a real result before merging.
10
10
  - `mergeable` must not be `CONFLICTING`. `UNKNOWN` is not a block — GitHub computes this asynchronously and it can lag briefly right after a label change or a fresh push (confirmed on PR #324); re-run `gh pr view <number> --json mergeable` once after a few seconds and it should resolve to `MERGEABLE` or `CONFLICTING`.
11
11
  - If the branch's second `/`-separated segment is one of the four dev-lane slot names (`ash`, `sky`, `jay`, `kit` — the type prefix in front varies, `feat`/`fix`/`chore`/etc., don't assume `feat`), it must carry the `qa-approved` label (check `gh pr view <number> --json labels`). If it doesn't, stop — that means the paired QA agent (`/team-member`) hasn't signed off yet; don't merge and don't review it yourself here. This check deliberately stays scoped to the four dev-lane names — Aziz's branch (`team/aziz`) isn't part of any Dev/QA pairing and goes through normal review instead.
12
- - **Exception — prompt-file-only PRs (checked first, before the QA-slot exception below):** if every path in `gh pr view <number> --json files` is `.claude/team-roles/*.md`, `.claude/commands/*.md`, or root `CLAUDE.md`, read the file list itself, not the branch prefix. For those PRs the required label is `prompt-qa-approved` instead of `qa-approved`, and only Bob merges them (`bob.md` step 4). If this session isn't Bob, stop and leave it for Bob. A PR that touches even one other file still needs `qa-approved`, plus `prompt-qa-approved` for its prompt-file changes. (Added 2026-09-25: PR #804, `doc/jay/claude-md-560`, was a `CLAUDE.md`-only edit, and this check would otherwise have blocked it for lacking `qa-approved`.)
12
+ - **Exception — prompt PRs (checked first, before the QA-slot exception below):** read the file list (`gh pr view <number> --json files`), not the branch prefix. If at least one path is a prompt file (`.claude/team-roles/*.md`, `.claude/commands/*.md`, or root `CLAUDE.md`) and every other path is under `docs/`, the required label is `prompt-qa-approved` instead of `qa-approved`, and only Bob merges it (`bob.md` step 4). If this session isn't Bob, stop and leave it for Bob. A PR that also touches anything outside `docs/` and the prompt files (`src/`, `tests/`, `scripts/`, `.github/`, `pyproject.toml`, …) needs `qa-approved`, plus `prompt-qa-approved` for its prompt-file changes. (Widened 2026-10-12, PR #1005: retros record incidents in `docs/decisions/role-file-history.md` per `bob.md`, so a prompt-files-only allowlist blocked every retro PR, e.g. #1004.) (Added 2026-09-25: PR #804, `doc/jay/claude-md-560`, was a `CLAUDE.md`-only edit, and this check would otherwise have blocked it for lacking `qa-approved`.)
13
13
  - **Exception:** a QA-named slot (`sky`/`kit`) authoring its own process/meta PR (e.g. `chore/sky/...`) has no natural QA partner to self-approve — the Dev/QA pairing only exists for the *other* lane's ticket work. There's no label path for this case; stop and ask the user directly whether it's safe to merge without one, same as any missing-label PR. If they confirm (e.g. because it's a prompting/process change with no application-code risk), proceed — that confirmation stands in for the label for this PR only, it doesn't waive the check generally.
14
14
  - If the branch's second segment is `amy` (`docs/amy/issue-<n>`), it must carry the `docs-qa-approved` label instead — a parallel track, started 2026-08-02 (first case: PR #482), for docs PRs reviewed for product/tone accuracy. As of that date it's applied directly by the user rather than by an automated QA partner (Amy has no dedicated QA pairing the way Ash/Jay do), so treat its presence the same as any other approval label — sufficient to merge, no need to re-review — but if it's missing, stop and ask rather than merging or reviewing the PR yourself.
15
15
  - **Review-finding ticket check (dev-lane branches: `ash`/`sky`/`jay`/`kit`).** Read the QA comments and the PR body (`gh pr view <number> --json body,comments,createdAt`) and list every issue `gh issue list --state all --search "<number> in:body created:>=<createdAt date>"` returns. Don't filter by label: the check exists for tickets that skipped the rule, and those skip the `from-review` label too. Skip roadmap bundles and other issues that only reference the PR. Every remaining hit filed from this PR's review or by its Dev must appear as `ticket — bar N: <reason> (#<issue>)` in a QA comment's finding list (`qa.md` step 3) or in the PR body's follow-up list (`dev.md` step 6), and carry `from-review`. A bar-2 ticket must name a behavior impact (bar 2's value test); a refactor or dedup reason doesn't fit bar 2. Stop and don't merge if any filed ticket has no `bar N:` reason, if a comment still files findings under a "non-blocking"/"not blocking" heading, or if a `dropped:` reason describes size or priority instead of why the finding is wrong ("outside this diff, no behavior impact" is a valid drop). Tell the user which line, and send the PR back to whoever wrote that list (the QA partner or the Dev) to redo it. If a bar is named but the reason plainly doesn't fit it (e.g. bar 1 for a choice between implementation options), don't decide alone: name it to the user before merging. You check that a fitting reason is given; you don't redo the review. Background: `docs/decisions/decision-review-finding-ticket-bar.md`.
@@ -5,12 +5,12 @@ Cut a stable release: merge `develop` → `main`, tag, publish to PyPI via a Git
5
5
  1. **Determine the version.** Check `docs/roadmap.md`'s Release Cadence table for the target version, and confirm it against the last tag (`git tag --sort=-creatordate | head -1`) so the bump direction (patch/minor/major) makes sense. Confirm the exact version string with the user before proceeding if there's any ambiguity.
6
6
  2. **Bump the MCP registry manifest (`server.json`) to the new version, before merging to `main`.** `pyproject.toml`'s version is dynamic (`uv-dynamic-versioning`, derived from the git tag) and needs no manual edit — `server.json` is the one file in this repo that does.
7
7
  - Branch off `develop` (e.g. `chore/release/server-json-vX.Y.Z`). Set both `version` (top-level) and `packages[].version` in `server.json` to the exact version string from step 1 — they must match each other (`tests/test_server_json.py::test_pypi_package_version_matches_top_level_version` enforces this).
8
- - Open a PR, wait for "Lint and test" to pass, merge with `gh pr merge <number> --admin --squash` — `develop` requires 1 approving review a solo maintainer can't get natively, same reason step 3 below uses `--admin` for the `main` merge.
8
+ - Open a PR, wait for every `Lint and test (Python 3.x)` check to pass, merge with `gh pr merge <number> --admin --squash` — `develop` requires 1 approving review a solo maintainer can't get natively, same reason step 3 below uses `--admin` for the `main` merge.
9
9
  - `git checkout develop && git pull` so the local checkout has the bump before continuing.
10
10
  - This lands *before* the develop→main PR (step 3) so the version bump ships in the same release rather than trailing it.
11
11
  3. **Merge `develop` → `main`.**
12
12
  - Check for an existing PR first (`gh pr list --base main --head develop`); open one if it doesn't exist (`gh pr create --base main --head develop --title "Release vX.Y.Z" --body ...`).
13
- - Wait for the "Lint and test" check to pass — do not merge on a failing or pending check.
13
+ - Wait for every `Lint and test (Python 3.x)` check (one per Python version in `ci.yml`'s matrix) to pass — do not merge on a failing, pending, or missing one.
14
14
  - Merge with `gh pr merge <number> --admin --merge` — a real merge commit, **not** `--squash`. This repo's existing `main` history is a chain of "Merge pull request #NNN from khuisman/develop" merge commits (see `git log origin/main`), not squashed releases; squashing here would collapse that convention. `--admin` is required the same way it is in `/merge-pr`: `main` requires 1 approving review that will never come from a solo maintainer, and `enforce_admins` is `false` specifically so this bypass is allowed — it must never be used to skip the "Lint and test" check itself.
15
15
  4. **Tag the merge commit.**
16
16
  - `git fetch origin main`
@@ -32,11 +32,13 @@ Find the partner Dev's open PR by matching the branch's second `/`-separated seg
32
32
  4. **A pre-existing defect inside a function this diff modifies, whose fix would move code to another thread or change what awaits what.** A short fix like that opens new races for the next round to find (PR #867). A pre-existing defect whose fix doesn't change threading or await order is a `send-back`.
33
33
 
34
34
  **Search before filing.** Run `gh issue list --state open --search "<function or file name> <symptom>"` right before `gh issue create`. If an open issue already describes the same defect (same code path and same failure, not just a shared keyword), comment the new evidence there instead of filing. Do the same when an open issue's planned fix would also fix this finding, even if it describes a different symptom: read the design or "possible fix" section of every hit, not just its title (#906 was already covered by #873's design and was closed into it). Put the issue you commented on in the finding line: `ticket — bar N: <reason> (commented on #<issue>)`. Classify a filed ticket `enhancement` (or `defect` only if a failure was actually observed). History of this rule: `docs/decisions/decision-review-finding-ticket-bar.md`.
35
+
36
+ **Check other open PRs before suggesting a fix outside this PR's diff.** A suggested fix that edits, moves, or consolidates code the PR doesn't already change can collide with another lane's PR. Before writing one, run `gh pr list --state open --json number,headRefName,files` and check whether any other open PR changes the same file. If one does, keep the send-back but suggest a fix confined to this PR's own files. Leave the consolidation for later: if it has behavior impact, file it under bar 2 to do after that PR merges; if not, it's `dropped: … — outside this diff, no behavior impact (revisit after #<other> merges)`. Name the other PR in the finding so the Dev doesn't rediscover it. The Dev decides how to fix a send-back; this only keeps QA's suggestion from creating the collision (PR #1000).
35
37
  4. Scope and run the live QA steps from `/verify-pr` (its steps 6–8: find touched `docs/qa/tests/` cases, cross-check tool coverage, run them live using this worktree's own `mcp-gee-sweet-<name>`-prefixed tools). A changed tool with no QA test case at all blocks the pass; handle it here, not in a retro. Before the first `**Playwright: required**` case, run `docs/qa/run.md` §"Verifying Playwright is signed into the right account" — this slot's browser profile is its own and can be signed into the wrong Google account; on a fail, stop and ask the user to sign it in, don't silently verify via API only.
36
38
  5. Record `**Result**` entries for every case actually run.
37
39
  6. Before pushing (either outcome below): `git fetch origin <headRefName>`. If it moved since step 1 (the Dev pushed again while this QA pass was running — a real, observed race, not just theoretical), `git rebase origin/<headRefName>` first; only if that has real conflicts (not just "the tip moved") stop and ask the user how to reconcile. Never force-push over the Dev's new commits.
38
40
  7. If anything failed: push the recorded results (`git push origin HEAD:<headRefName>`, with confirmation), comment on the PR summarizing what failed, including step 3's finding list. The comment's first line must be exactly `## QA round <N> (<Name>) @ <short-sha>: sent back`, where `<N>` is 1 on this PR's first pass and goes up by 1 for each re-verification round on the same PR, `<Name>` is this role's name (`Sky` or `Kit`), and `<short-sha>` is the PR head commit this round verified (the commit step 1 reset to, not the commit that pushes your Result entries). The verdict is the literal text `sent back`, with no bold or other wording (not `send back`, not `changes requested`). Then run `/notify-partner` (`.claude/commands/notify-partner.md`) to wake the Dev partner directly if they're live, and stop — tell the user regardless that it goes back to the Dev agent, since automating the agent-to-agent handoff doesn't replace keeping the user informed.
39
- 8. If everything passed: push the results, then comment on the PR naming which test cases were run and passed, plus step 3's finding list (every line `ticket — bar N:` or `dropped:`; any `send-back` means step 7, not this step). The comment's first line must be exactly `## QA round <N> (<Name>) @ <short-sha>: approved`, with `<N>`, `<Name>`, and `<short-sha>` as defined in step 7 and the verdict the literal text `approved` (not `pass`). Then `gh pr edit <number> --add-label qa-approved`, run `/notify-kai` (`.claude/commands/notify-kai.md`) to wake Kai directly if it's live, and report to the user that it's ready for Kai to run `/merge-pr`. A bare label with no accompanying comment is itself a signal to distrust, not evidence of review — GitHub attribution can't prove who applied it (see `decision-prompt-qa-role.md`'s label-attribution addendum).
41
+ 8. If everything passed: push the results, then wait for CI on the PR's new head (`gh pr checks <number> --watch`; your Result-entry push retriggers it). Every check must pass, and all four `Lint and test (Python 3.x)` jobs must be present and passing. "No failures" isn't enough, because the rollup can leave a check out entirely (`merge-pr.md` step 2). If a check fails, this round is sent back: go to step 7 with the failure as a `send-back:` line. If `Lint and test` is absent, retrigger it the way `merge-pr.md` step 2 says and wait again. Only then comment on the PR naming which test cases were run and passed, plus step 3's finding list (every line `ticket — bar N:` or `dropped:`; any `send-back` means step 7, not this step). The comment's first line must be exactly `## QA round <N> (<Name>) @ <short-sha>: approved`, with `<N>`, `<Name>`, and `<short-sha>` as defined in step 7 and the verdict the literal text `approved` (not `pass`). Then `gh pr edit <number> --add-label qa-approved`, run `/notify-kai` (`.claude/commands/notify-kai.md`) to wake Kai directly if it's live, and report to the user that it's ready for Kai to run `/merge-pr`. A bare label with no accompanying comment is itself a signal to distrust, not evidence of review — GitHub attribution can't prove who applied it (see `decision-prompt-qa-role.md`'s label-attribution addendum).
40
42
 
41
43
  ## Retro
42
44
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mcp-gee-sweet
3
- Version: 0.9.2.dev327
3
+ Version: 0.9.2.dev335
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
@@ -266,6 +266,14 @@ Addendum, PR #414 (issue #211) round 3: the fix targeted exactly two named findi
266
266
 
267
267
  - **A race repro must keep the stale operation in flight across the event, or it proves nothing.** PR #867 round 4: Sky's first success-side race repro started B only after A's consent had finished, which can't be told apart from a legitimate new consent; Ash caught it. Command decision: the technique is now a bullet in `docs/qa/run.md` §"Running server-startup and CLI cases" ("Race and hang repros").
268
268
 
269
+ ### Check other open PRs before suggesting a fix outside this PR's diff
270
+
271
+ PR #1000 (#990, lane B) originally changed only `response_limits.py`. Its round 1 code review noted that the new guard duplicated `drive/transfer.py`'s `_validate_local_destination`, and Kit's send-back suggested moving that helper into `response_limits.py`. Nobody checked for other open PRs. PR #1001 (#874/#887, lane A), opened 11 seconds after #1000, was rewriting that same function. Jay caught the overlap before pushing and recommended waiting for #1001. #1000 then took in `develop` and moved #1001's rewritten validator, growing from one helper to every capped tool's `local_path` (11 docstrings). The `develop` merge forced a full `/code-review`, which reviewed the larger scope and found five more send-backs. Two of them were pre-existing defects the move exposed (sheet-name path traversal, the joined-file symlink), not new ones. The PR took four rounds, and the user called the cycle "a hot mess." The scheduling was not the cause: #990's own fix touched no file #1001 did. The fix in round 1 should have stayed in `response_limits.py`, with the consolidation filed for after #1001 merged.
272
+
273
+ ### CI must be green before `qa-approved`
274
+
275
+ Round 3 of PR #1000 (`290f5bc`) got `qa-approved` while `Lint and test` was failing on every Python version: two non-raw `match=` patterns tripped ruff RUF043. Kai caught it at `/merge-pr`. Step 8 had no CI check, and QA's local checks didn't catch it, because pre-commit's ruff hook is pinned at v0.11.9, where RUF043 is preview-only, while CI runs 0.16.x (#974 tracks that version skew). Step 8 now waits for CI on the head SHA after QA's Result-entry push and before the `approved` comment. Every check must pass, with all four `Lint and test` jobs present and passing. A failure sends the round back through step 7, and an absent check is retriggered per `merge-pr.md` step 2.
276
+
269
277
  ## `aziz.md`
270
278
 
271
279
  ### Server slots during a release pass
@@ -103,7 +103,7 @@ Measured across two imports of the same DOCX:
103
103
  - `revisions.list` returns at most 200 revisions per page by default (discovery document), and
104
104
  `list_revisions` read only the first page. It now pages through every revision via the same
105
105
  `_list_revisions` helper `sync_folder` uses.
106
- - A Doc `local_path` is checked with `_validate_local_destination` before the export, so a bad
106
+ - A Doc `local_path` is checked with `response_limits.validate_local_destination` before the export, so a bad
107
107
  destination fails before the temporary Doc round trip.
108
108
 
109
109
  ## Live verification
@@ -128,11 +128,11 @@ Each local read or write gets exactly one check, placed at the narrowest shared
128
128
  | `create_doc_from_file`, `update_doc_from_file` | `read_text` | `content._read_doc_source_file`, at the top, before `exists()` | read |
129
129
  | `import_csv_to_sheet` | `open` | the tool, before `path.open` | read |
130
130
  | `send_message`, `create_draft` (attachments) | `read_bytes` | `gmail._read_attachment_bytes` (already in a worker thread; the `ValueError` propagates out of `_compose_raw` as today's missing-field error does) | read |
131
- | `download_file` | `_write_atomically`, `mkdir` | the tool, before `_validate_local_destination` (that helper `stat`s parents) | write |
131
+ | `download_file` | `_write_atomically`, `mkdir` | the tool, before `response_limits.validate_local_destination` (that helper `stat`s parents) | write |
132
132
  | `download_folder`, `sync_folder` (downloads) | `mkdir`, `_write_atomically` per file | the destination root in the tool, before `mkdir`, plus each file (§6) | write |
133
133
  | `sync_folder` (uploads, `use_checksum` hashing, `stat`) | `MediaFileUpload`, `_local_md5`, `stat` | each local entry where `_sync_level` builds `local_map` / `local_folder_map` (§6) | read |
134
134
  | `sync_folder`, `upload_local_folder`, `download_folder`: the `local_path` root | `mkdir` / `iterdir` | the tool, at entry | read for upload-only, write for any direction that can download |
135
- | 9 tools with the response-cap bypass (`get_sheet_data`, `get_multiple_sheet_data`, `get_multiple_spreadsheet_summary`, `find_in_spreadsheet`, `get_doc_content`, `find_in_doc`, `get_doc_as_markdown`, `get_message`, `get_thread`) and `sync_folder(result_local_path=)` | `mkdir`, `_write_atomically` | `response_limits.write_capped_result_to_disk`, at the top, before `is_dir()`. Check the final `dest` after the directory join too, since `default_filename` changes the target | write |
135
+ | 9 tools with the response-cap bypass (`get_sheet_data`, `get_multiple_sheet_data`, `get_multiple_spreadsheet_summary`, `find_in_spreadsheet`, `get_doc_content`, `find_in_doc`, `get_doc_as_markdown`, `get_message`, `get_thread`) and `sync_folder(result_local_path=)` | `mkdir`, `_write_atomically` | `response_limits.write_capped_result_to_disk`, at the top, before `validate_local_destination`. Check the final `dest` after the directory join too, since `default_filename` changes the target. For `result_local_path`, also `sync_folder`'s own early `validate_local_destination(result_local_path, ...)`, which runs before any transfer and before `local_path`'s `mkdir` (#990) | write |
136
136
 
137
137
  `sync_folder`'s existing "`result_local_path` inside `local_path`" `ValueError` stays as it is and runs after the policy check. The two are independent.
138
138
 
@@ -4278,3 +4278,30 @@ Comment text is plain text, so no line of it may render as Markdown structure, a
4278
4278
  **Result (2026-10-11) ✅ PASS (case as written), ❌ sent back on probes — Kit, PR #991 round 2 (`de8143e`).** Ran with the export under this job's scratch dir instead of `/tmp`. Every check passed for the case's own content: body `<p>- a</p>`, `<p># h</p>`, `<p>---</p>`, `<p>tab indent</p>`; the comment's eight lines joined by `<br />` in one paragraph, then `<p>indented *x*</p>`; no `<ul>`/`<ol>`/`<table>`/`<pre>`. Extra probes on the same doc failed: (1) a body paragraph `## Notes` and a comment line `## Notes` each rendered as `<h2>`, and the comment line before it kept a literal `\`, because `_LEADING_SIMPLE_MARKER` matches only a single `#`; (2) `add_doc_comment(quoted_text="Summary\n=== ")` exported `> Summary\` / `> === `, which renders as `<h1>Summary\</h1>` inside the blockquote, because `_LEADING_RULE_LINE` doesn't allow trailing whitespace after `=`. Drive trims trailing whitespace from the end of comment `content` (not from `quoted_text`), and a mid-content `=== ` line is safe because the hard break before it blocks the setext.
4279
4279
 
4280
4280
  **Result (2026-10-11) ✅ PASS — Kit, PR #991 round 3 (`95ba882`).** Ran with the export under this job's scratch dir instead of `/tmp`. Step 3's HTML had no `<ul>`/`<ol>`/`<h1>`/`<table>`/`<pre>`, exactly one `<h2>` (`Comments`) and one `<hr />`. Body: `<p>- a</p>`, `<p># h</p>`, `<p>---</p>`, `<p>tab indent</p>`, `<p>## Notes</p>`. Step 1's comment rendered its nine lines through `## Notes` joined by `<br />` with no literal `\`, then `<p>indented *x*</p>`. Step 1a's `quoted_text` came back as `Summary\n=== ` (trailing spaces kept) and rendered as `<blockquote><p>Summary<br />===</p></blockquote>`, no `<h1>`.
4281
+
4282
+ ### TC-DOC218: A trailing-slash `local_path` naming a missing directory creates it; one naming an existing file is refused (issue #990) ⚠️ local-filesystem
4283
+ Every capped tool's `local_path` goes through the shared `write_capped_result_to_disk`. Before #990, `dir/` for a directory that didn't exist yet was written as a *file* named `dir`, and `file/` over an existing file overwrote it.
4284
+
4285
+ **Setup:** `rm -rf /tmp/qa-990 && mkdir -p /tmp/qa-990/linkdir && printf 'keep me' > /tmp/qa-990/blocker && ln -s /tmp/qa-990/missing /tmp/qa-990/dangling && ln -s /tmp/qa-990/elsewhere /tmp/qa-990/linkdir/{DOC_ID}.md`. Confirm `/tmp/qa-990/new`, `/tmp/qa-990/missing`, and `/tmp/qa-990/elsewhere` don't exist.
4286
+
4287
+ **Steps**
4288
+ 1. `get_doc_as_markdown(doc_id={DOC_ID}, local_path="/tmp/qa-990/new/sub/")`
4289
+ 2. `get_doc_as_markdown(doc_id={DOC_ID}, local_path="/tmp/qa-990/blocker/")`
4290
+ 3. `get_doc_as_markdown(doc_id={DOC_ID}, local_path="/tmp/qa-990/blocker/sub/")`
4291
+ 4. `get_doc_as_markdown(doc_id={DOC_ID}, local_path="/tmp/qa-990/dangling/")`
4292
+ 5. `get_doc_as_markdown(doc_id={DOC_ID}, local_path="/tmp/qa-990/linkdir/")`
4293
+
4294
+ **Checks**
4295
+ - Step 1 returns `local_path` `/tmp/qa-990/new/sub/{DOC_ID}.md`. `/tmp/qa-990/new/sub` is a directory (`test -d`), not a file, and the `.md` file in it holds raw Markdown whose byte size equals `bytes_written`
4296
+ - Step 2 raises "local_path '/tmp/qa-990/blocker/' has a non-directory path component at '/tmp/qa-990/blocker'; local_path ends in a path separator or '.', which makes it a directory target…", and `/tmp/qa-990/blocker` still holds `keep me`
4297
+ - Step 3 raises a `ValueError` "…has a non-directory path component at '/tmp/qa-990/blocker'" (a file further up the path), not a raw `NotADirectoryError` (PR #1000 QA round 1)
4298
+ - Step 4 raises a `ValueError` "…has a symlink to a missing target at '/tmp/qa-990/dangling'", not a raw `FileExistsError`, and `/tmp/qa-990/missing` still doesn't exist (PR #1000 QA round 1)
4299
+ - Step 5 raises a `ValueError` "…has a symlink to a missing target at '/tmp/qa-990/linkdir/{DOC_ID}.md'", and `/tmp/qa-990/elsewhere` still doesn't exist: the file joined onto a directory gets the same checks as a file `local_path` (PR #1000 QA round 2)
4300
+
4301
+ **Cleanup:** `rm -rf /tmp/qa-990`
4302
+
4303
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 1 (`12bd36a`).** Ran under this job's scratch dir instead of `/tmp`. Step 1 returned `local_path` `<dir>/new/sub/{DOC_ID}.md`, `bytes_written` 96; `new/sub` is a directory and the file is 96 bytes. Step 2 raised the expected "ends in a separator, so it must be a directory, but … is an existing file" error and `blocker` still holds `keep me`. Probes outside the case (sent back): `<file>/sub/` with `<file>` a regular file raises a raw `NotADirectoryError`, and `<dangling symlink>/` raises `FileExistsError`, not the new `ValueError`.
4304
+
4305
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 2 (`695d0f9`).** Ran under this job's scratch dir instead of `/tmp`. Step 1 returned `<dir>/new/sub/{DOC_ID}.md`, `bytes_written` 96, and `new/sub` is a directory. Step 2 raised "…has a non-directory path component at '<dir>/blocker'; local_path ends in a path separator or '.', which makes it a directory target…", and `blocker` still holds `keep me`. Step 3 raised the `ValueError` naming `<dir>/blocker`. Step 4 raised "…has a symlink to a missing target at '<dir>/dangling'", and `missing` was not created.
4306
+
4307
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 3 (`290f5bc`).** Ran under this job's scratch dir instead of `/tmp`. Steps 1–4 matched round 2 (step 1 wrote `<dir>/new/sub/{DOC_ID}.md`, 96 bytes; steps 2–4 raised the expected `ValueError`s; `blocker` still holds `keep me`; `missing` not created). Step 5 raised "…has a symlink to a missing target at '<dir>/linkdir/{DOC_ID}.md'", and `elsewhere` was not created.
@@ -614,7 +614,7 @@ Unit tests: `tests/drive/test_transfer.py -k TestDownloadFile` — 10 passed (in
614
614
 
615
615
  ### TC-D274: `download_file` — trailing-slash `local_path` over an existing regular file fails before any Drive request (#827, #855) ⚠️ local-filesystem
616
616
 
617
- **Background:** #827 moved the trailing-slash clash check ahead of the Drive metadata call, and #855 folded it into a single preflight (`_validate_local_destination`). A bad destination should now fail without spending a Drive request. A file ID that doesn't exist is the live stand-in for "no Drive request": if the call reaches Drive it gets a 404 `HttpError`, and if the preflight rejects it first the path error comes back.
617
+ **Background:** #827 moved the trailing-slash clash check ahead of the Drive metadata call, and #855 folded it into a single preflight (`_validate_local_destination`, now the shared `response_limits.validate_local_destination`, #990). A bad destination should now fail without spending a Drive request. A file ID that doesn't exist is the live stand-in for "no Drive request": if the call reaches Drive it gets a 404 `HttpError`, and if the preflight rejects it first the path error comes back.
618
618
 
619
619
  **Setup:** `rm -rf /tmp/qa-d274 && mkdir -p /tmp/qa-d274 && printf x > /tmp/qa-d274/clash`
620
620
 
@@ -2220,8 +2220,8 @@ revision separate (#814), so the diff below uses one.
2220
2220
 
2221
2221
  ### TC-D282: Doc revision `local_path`, and arguments that don't apply to the file's type (issue #959) ⚠️ local-filesystem ⚠️ requires-oauth
2222
2222
 
2223
- **Setup:** `mkdir -p /tmp/qa-959` (the directory must exist: a `local_path` naming a missing
2224
- directory, even with a trailing `/`, is written as a file of that name).
2223
+ **Setup:** `mkdir -p /tmp/qa-959` (before #990, a `local_path` naming a missing directory, even
2224
+ with a trailing `/`, was written as a file of that name; TC-D288 covers the missing-directory case).
2225
2225
  `create_doc(title="qa-959-args", content="<p>Saved to disk</p>")`, then
2226
2226
  `list_revisions` on it and on `TEST_SPREADSHEET_ID`, taking each one's last `revisionId`.
2227
2227
 
@@ -2281,6 +2281,62 @@ is the Shared Drive.
2281
2281
 
2282
2282
  ---
2283
2283
 
2284
+ ### TC-D288: `export_revision` — a trailing-slash `local_path` naming a missing directory creates it, not a file (issue #990) ⚠️ local-filesystem ⚠️ requires-oauth
2285
+
2286
+ Reproduces PR #988 round 1's observation: with the directory absent, `local_path="<dir>/"`
2287
+ wrote a 15-byte *file* named after it. Uses `/tmp/qa-990-rev`, not TC-DOC218's `/tmp/qa-990`, so
2288
+ parallel shards don't delete each other's scratch dir.
2289
+
2290
+ **Setup:** `rm -rf /tmp/qa-990-rev`. `create_doc(title="qa-990", content="<p>Saved to disk</p>")`, then
2291
+ `list_revisions(file_id="<doc-id>")` and take the last `revisionId`.
2292
+
2293
+ **Tool calls**
2294
+ 1. `export_revision(file_id="<doc-id>", revision_id="<doc rev>", local_path="/tmp/qa-990-rev/")`
2295
+
2296
+ **Checks**
2297
+ - Call 1 returns `local_path` `/tmp/qa-990-rev/<doc-id>-r<doc rev>.md`, not `/tmp/qa-990-rev`.
2298
+ - `/tmp/qa-990-rev` is a directory (`test -d`), and the `.md` file in it holds `Saved to disk`.
2299
+
2300
+ **Teardown:** `rm -rf /tmp/qa-990-rev`; `delete_file(file_id="<doc-id>")`.
2301
+
2302
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 1 (`12bd36a`).** Ran under this job's scratch dir instead of `/tmp`. With the directory absent, call 1 returned `local_path` `<dir>/<doc-id>-r3.md`, `bytes_written` 15; `<dir>` is a directory and the file holds `Saved to disk`.
2303
+
2304
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 2 (`695d0f9`).** Same as round 1: call 1 returned `<dir>/<doc-id>-r3.md`, `bytes_written` 15; `<dir>` is a directory holding `Saved to disk`.
2305
+
2306
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 3 (`290f5bc`).** Ran under this job's scratch dir instead of `/tmp`. Call 1 returned `<dir>/<doc-id>-r3.md`, `bytes_written` 15; `<dir>` is a directory holding `Saved to disk`.
2307
+
2308
+ ---
2309
+
2310
+ ### TC-D287: `sync_folder` — a `result_local_path` over an existing file is refused before any transfer (PR #1000 QA round 1, issue #990) ⚠️ local-filesystem
2311
+
2312
+ Before the fix, a real sync ran every upload and download, then failed at the final manifest
2313
+ write, and the error named `local_path` (`sync_folder`'s other parameter).
2314
+
2315
+ **Setup:** `rm -rf /tmp/qa-990-sync && mkdir -p /tmp/qa-990-sync/src && printf 'upload me' > /tmp/qa-990-sync/src/a.txt && printf 'keep me' > /tmp/qa-990-sync/blocker`.
2316
+ `create_folder(name="qa-990-sync")`, note the returned ID as `<folder-id>`.
2317
+
2318
+ **Tool calls**
2319
+ 1. `sync_folder(folder_id="<folder-id>", local_path="/tmp/qa-990-sync/src", direction="upload", result_local_path="/tmp/qa-990-sync/blocker/")`
2320
+ 2. `list_files(folder_id="<folder-id>")`
2321
+ 3. `sync_folder(folder_id="<folder-id>", local_path="/tmp/qa-990-sync/new/deep/sync", result_local_path="/tmp/qa-990-sync/blocker/")`
2322
+
2323
+ **Checks**
2324
+ - Call 1 raises "result_local_path '/tmp/qa-990-sync/blocker/' has a non-directory path component
2325
+ at '/tmp/qa-990-sync/blocker'; result_local_path ends in a path separator…". The message names
2326
+ `result_local_path` throughout, never `local_path`.
2327
+ - Call 2 returns no files: `a.txt` was not uploaded (a real, non-`dry_run` sync).
2328
+ - `/tmp/qa-990-sync/blocker` still holds `keep me`.
2329
+ - Call 3 raises the same error, and `/tmp/qa-990-sync/new` doesn't exist: the missing `local_path`
2330
+ isn't created for a refused call (PR #1000 QA round 2).
2331
+
2332
+ **Teardown:** `rm -rf /tmp/qa-990-sync`; `delete_file(file_id="<folder-id>")`.
2333
+
2334
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 2 (`695d0f9`).** Ran under this job's scratch dir instead of `/tmp`. Call 1 raised "result_local_path '<dir>/blocker/' has a non-directory path component at '<dir>/blocker'; result_local_path ends in a path separator or '.'…", naming `result_local_path` throughout. Call 2 returned `[]`, and `blocker` still holds `keep me`. Probe outside the case (sent back): the same call with a missing `local_path` of `<dir>/new/deep/sync` raised the same error but had already created `new/deep/sync`.
2335
+
2336
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 3 (`290f5bc`).** Ran under this job's scratch dir instead of `/tmp`. Call 1 raised the `result_local_path` error, call 2 returned `[]`, and call 3 raised the same error with no `new/` directory created. `blocker` still holds `keep me`.
2337
+
2338
+ ---
2339
+
2284
2340
  ### TC-D256: `download_folder`'s `progress_unit='bytes'` feeds byte totals into the structured progress fields, with a file-count fallback when sizes aren't fully known (issue #741) ⚠️ local-filesystem
2285
2341
 
2286
2342
  **Background:** TC-D255 (#352) confirmed the message text carries bytes-transferred-so-far as supplementary context, but the structured `progress`/`total` fields passed to `ctx.report_progress()` stayed file-count-based unconditionally — a client rendering a progress bar from those fields alone (not parsing message text) sees the same one-tick-per-file granularity regardless of individual file size. #741's maintainer decision: keep file-count as the default (`progress_unit='files'`), but add an opt-in `progress_unit='bytes'` so a caller can request byte-based structured fields when every candidate's size is known upfront (same `bytes_total_known` gate TC-D255's message-fallback logic already uses) — falling back to file-count when it isn't, since there's no reliable byte total to report against then. `sync_folder` is explicitly out of scope for this decision (recursive descent never has a full upfront size list). Unit-tested deterministically against a mocked `ctx` in `tests/drive/test_transfer.py::TestDownloadFolder::test_progress_unit_bytes_reports_byte_totals_when_sizes_known`/`test_progress_unit_bytes_falls_back_to_files_when_sizes_unknown`; this live check confirms both branches against a real API call.
@@ -2547,3 +2603,26 @@ Trash `{FOLDER_ID}` and its contents. Remove `/tmp/qa-273/`.
2547
2603
  - Call 2: `conflicts == ["g.md"]`, and `x.md` was in `skipped`, even though `g.md` had also drifted.
2548
2604
  - Call 3: `modified_time` was still `03:45:36.140Z`, not reset. `g.md` carried `geeSweetImportRevision: "1"`.
2549
2605
  - Call 4: `uploaded == ["x.md"]`, and `get_doc_content` contained "appended within 5s". An immediate extra resync left `x.md` in `skipped` (no repeat upload), and `g.md` stayed in `conflicts`.
2606
+
2607
+ ### TC-D289: `sync_folder` — `size_bytes` counts uploaded bytes, on both the create and update paths (issue #1003) ⚠️ destructive ⚠️ local-filesystem
2608
+
2609
+ **Background:** `size_bytes` is documented as bytes transferred, but `sync_folder` added only downloaded bytes to it. An upload-only sync always returned `size_bytes: 0`, whether the file was new (`create()`) or a re-upload (`update()`). Found live in PR #1002's QA.
2610
+
2611
+ **Setup**
2612
+ Create a scratch Drive folder `{FOLDER_ID}` and `/tmp/qa-289/` containing `a.txt` (exactly 28 bytes) and a subfolder `sub/` containing `b.txt` (exactly 7 bytes).
2613
+
2614
+ **Tool calls**
2615
+ 1. `sync_folder(folder_id={FOLDER_ID}, local_path="/tmp/qa-289/", direction="upload", recursive=True)`
2616
+ 2. Overwrite `/tmp/qa-289/a.txt` with exactly 40 bytes. Then read the Drive copy's `modified_time` with `get_file_metadata` and set the local file's mtime to that value plus at least 60 s (scratch script: `os.utime`). An mtime within `_SYNC_MTIME_TOLERANCE` (5 s) of Drive's would make the size change a `conflict` rather than an upload. Then repeat call 1.
2617
+
2618
+ **Checks**
2619
+ - Call 1: `uploaded` contains `a.txt` and `sub/b.txt`, and `size_bytes == 35`.
2620
+ - Call 2: `uploaded == ["a.txt"]`, `sub/b.txt` is in `skipped`, and `size_bytes == 40`. `list_files(folder_id={FOLDER_ID})` shows a single `a.txt`, with the same file ID as after call 1 (the `update()` path, not a new file), and `get_file_metadata` on it shows `size` `"40"`.
2621
+
2622
+ **Teardown**
2623
+ Trash `{FOLDER_ID}` and its contents. Remove `/tmp/qa-289/`.
2624
+
2625
+ **Result** (2026-10-12, Sky, PR #1007 round 1 at `10dfb80`, `mcp-gee-sweet-sky` reconnected after reset, OAuth, Shared Drive): ✅ **PASS**.
2626
+ - Call 1: `uploaded == ["a.txt", "sub/b.txt"]`, `size_bytes == 35`.
2627
+ - Call 2 (local mtime set to now + 120 s): `uploaded == ["a.txt"]`, `skipped == ["sub/b.txt"]`, `size_bytes == 40`. `list_files` showed a single `a.txt` with the same file ID as after call 1, and `get_file_metadata` showed `size` `"40"`.
2628
+ - Side probes, not part of the checks: a `convert_markdown=True` upload of a new 17-byte `c.md` returned `uploaded == ["c.md"]`, `size_bytes == 17`. A bidirectional call that downloaded `sub/b.txt` (7 bytes, after deleting it locally) and uploaded a new `d.txt` (5 bytes) returned `size_bytes == 12`.
@@ -809,3 +809,23 @@ Write 10 cells (`Empty!A1:A10`) each containing a ~4,785-character string with a
809
809
  **Result (2026-09-04) ⏭️ SKIP**
810
810
  Stale: references retired 40,000 cap; ~42k-char 10-match response no longer trips the 1,000,000 default. Cap + local_path mechanism covered by TC-R03c/d. Skipped rather than add fixture churn for no signal
811
811
 
812
+
813
+ ---
814
+
815
+ ### TC-R44: A sheet name with `/` or `..` writes inside the chosen `local_path` directory (PR #1000 QA round 2, issue #990) ⚠️ local-filesystem
816
+ `get_sheet_data` names its file `<sheet>_data.json`. Before the fix, a tab named `../x` wrote `x_data.json` beside the chosen directory, and a tab named `a/b` created a subdirectory.
817
+
818
+ **Setup:** `rm -rf /tmp/qa-990-sheet`. `create_sheet(spreadsheet_id={SPREADSHEET_ID}, title="../x")` and `create_sheet(spreadsheet_id={SPREADSHEET_ID}, title="a/b")`.
819
+
820
+ **Steps**
821
+ 1. `get_sheet_data(spreadsheet_id={SPREADSHEET_ID}, sheet="../x", local_path="/tmp/qa-990-sheet/out/")`
822
+ 2. `get_sheet_data(spreadsheet_id={SPREADSHEET_ID}, sheet="a/b", local_path="/tmp/qa-990-sheet/out/")`
823
+
824
+ **Checks**
825
+ - Step 1 returns `local_path` `/tmp/qa-990-sheet/out/.._x_data.json`
826
+ - Step 2 returns `local_path` `/tmp/qa-990-sheet/out/a_b_data.json`
827
+ - `ls -A /tmp/qa-990-sheet` lists only `out`, and `ls -A /tmp/qa-990-sheet/out` lists exactly `.._x_data.json` and `a_b_data.json` (no `a/` subdirectory)
828
+
829
+ **Cleanup:** `delete_sheet` both tabs; `rm -rf /tmp/qa-990-sheet`
830
+
831
+ **Result (2026-10-11) ✅ PASS — Kit, PR #1000 round 3 (`290f5bc`).** Ran under this job's scratch dir instead of `/tmp`. Used `TEST_SPREADSHEET_ID`. Step 1 returned `<dir>/out/.._x_data.json` (117 bytes), step 2 `<dir>/out/a_b_data.json` (116 bytes). `<dir>` lists only `out`, and `out` lists exactly those two files. Both tabs deleted afterward.
@@ -225,7 +225,7 @@ Same shape as v0.8.1 — stabilize on defects that surfaced since v0.9.0 shipped
225
225
  - [x] `_parse_a1_notation` hardening: one compiled grammar, index bounds, validate before the sheet-ID fetch. #931 review follow-ups, no behavior change for valid input — lane A, after #954 (same A1 area); its QA also runs #953's live checks for #931 (folded in) (PR #986) ([#955](https://github.com/khuisman/mcp-gee-sweet/issues/955))
226
226
  - [x] Write side drops image links: `[![alt](src)](url)` (or `<a href><img></a>`) imports through `create_doc`/`create_doc_from_file`/`write_doc_content` without its URL, so it doesn't round-trip with #951's export. Found in PR #976 — lane A, after #955 (PR #992) ([#977](https://github.com/khuisman/mcp-gee-sweet/issues/977))
227
227
  - [x] Comment quoted text comes back HTML-escaped (`Caf&#233;`) from `add_doc_comment`, `list_doc_comments`, and `get_doc_as_markdown(include_comments=True)`: `comments.py` passes Drive's escaped `quotedFileContent.value` through unchanged. Found reviewing #958 — lane B, after #959 (defect, next pick) (PR #991) ([#984](https://github.com/khuisman/mcp-gee-sweet/issues/984))
228
- - [ ] `write_capped_result_to_disk` writes `dir/` as a file when the directory doesn't exist: a trailing separator should mean "directory" (create it, append `default_filename`). Shared by every `local_path` writer. Found in PR #988 — lane B, after #984 (defect) ([#990](https://github.com/khuisman/mcp-gee-sweet/issues/990))
228
+ - [x] `write_capped_result_to_disk` writes `dir/` as a file when the directory doesn't exist: a trailing separator should mean "directory" (create it, append `default_filename`). Shared by every `local_path` writer. Found in PR #988 — lane B, after #984 (defect) (PR #1000) ([#990](https://github.com/khuisman/mcp-gee-sweet/issues/990))
229
229
 
230
230
  **Sheets hardening** _(triaged out of `backlog` 2026-09-11 — see the "Backlog triage" note below)_
231
231
  - [x] `update_sheet_properties`/dimension-tool hardening + dedup follow-ups from PR #321's review ([#323](https://github.com/khuisman/mcp-gee-sweet/issues/323)) (PR #734)
@@ -282,8 +282,9 @@ Same shape as v0.8.1 — stabilize on defects that surfaced since v0.9.0 shipped
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
- - [ ] `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
- - [ ] 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))
285
+ - [x] `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 (PR #1002) ([#930](https://github.com/khuisman/mcp-gee-sweet/issues/930))
286
+ - [ ] `sync_folder`: `size_bytes` never counts uploaded bytes, so an upload-only sync reports 0 (found in PR #1002's QA, observed live). Lane A, after #930 ([#1003](https://github.com/khuisman/mcp-gee-sweet/issues/1003))
287
+ - [ ] Share one HttpError reason-check helper across the `storageQuotaExceeded` sites. Lane A, after #1003; community PR #921 closed unmerged 2026-10-10 ([#916](https://github.com/khuisman/mcp-gee-sweet/issues/916))
287
288
 
288
289
  **Calendar hardening** _(triaged out of `backlog` 2026-09-11)_
289
290
  - [ ] **Bundle:** Calendar follow-ups from PR #912, one PR closing [#915](https://github.com/khuisman/mcp-gee-sweet/issues/915), [#918](https://github.com/khuisman/mcp-gee-sweet/issues/918) — lane B, after #892 ([#985](https://github.com/khuisman/mcp-gee-sweet/issues/985))
@@ -297,7 +298,8 @@ Same shape as v0.8.1 — stabilize on defects that surfaced since v0.9.0 shipped
297
298
  **Infrastructure**
298
299
  - [ ] Interaction-log middleware for tool calls — structured, append-only JSONL log per call (inputs, duration, cache hit, error), opt-in ID redaction, swappable backend ([#646](https://github.com/khuisman/mcp-gee-sweet/issues/646))
299
300
  - [ ] Automated tooling for dependency-bump security review — today's manual skim can miss a well-disguised supply-chain compromise ([#520](https://github.com/khuisman/mcp-gee-sweet/issues/520))
300
- - [ ] **Bundle:** CI tidy (on deck, no lane), one PR closing [#536](https://github.com/khuisman/mcp-gee-sweet/issues/536), [#619](https://github.com/khuisman/mcp-gee-sweet/issues/619), [#308](https://github.com/khuisman/mcp-gee-sweet/issues/308), [#708](https://github.com/khuisman/mcp-gee-sweet/issues/708), [#974](https://github.com/khuisman/mcp-gee-sweet/issues/974) ([#897](https://github.com/khuisman/mcp-gee-sweet/issues/897))
301
+ - [ ] **Bundle:** CI tidy (on deck, no lane), one PR closing [#536](https://github.com/khuisman/mcp-gee-sweet/issues/536), [#619](https://github.com/khuisman/mcp-gee-sweet/issues/619), [#308](https://github.com/khuisman/mcp-gee-sweet/issues/308), [#708](https://github.com/khuisman/mcp-gee-sweet/issues/708) ([#897](https://github.com/khuisman/mcp-gee-sweet/issues/897))
302
+ - [ ] pre-commit's `ruff` hook pins v0.11.9 while CI runs the project's locked 0.16.x, so a commit can pass a lint CI rejects. Seen live on PR #1000 (RUF043, three red CI runs). Moved out of the #897 bundle 2026-10-12 — lane B, after #989 ([#974](https://github.com/khuisman/mcp-gee-sweet/issues/974))
301
303
  - [ ] Automate the mechanical `release.md` steps as GitHub Actions ([#660](https://github.com/khuisman/mcp-gee-sweet/issues/660))
302
304
  - [x] `/release` + `prep-for-pr` backstop checks for README render breakage on PyPI — the human-facing companion to #708's CI guard, routed to Bob ([#709](https://github.com/khuisman/mcp-gee-sweet/issues/709)) (PR #967)
303
305
  - [x] `supportsAllDrives=True` is hand-inlined at ~58 Drive call sites — retrofitted twice now (#687 plus its own original miss); wants a shared wrapper or lint guard so a new call site can't omit it ([#696](https://github.com/khuisman/mcp-gee-sweet/issues/696)) (PR #784)
@@ -1157,6 +1157,9 @@ def register(tool):
1157
1157
  file_id: The Google Drive file ID of the document.
1158
1158
  local_path: Optional local filesystem path (file or directory) to write the
1159
1159
  result to instead of returning it inline. Bypasses the response-size cap.
1160
+ A path ending in '/' is a directory, created if missing. A file in place
1161
+ of a parent directory, or at a path ending in '/', raises ValueError; an
1162
+ existing file at a plain file path is replaced.
1160
1163
  Same caveat as download_file/download_folder: this path is resolved on the
1161
1164
  *server's* filesystem, not the caller's.
1162
1165
 
@@ -1540,6 +1543,9 @@ def register(tool):
1540
1543
  max_results: Maximum number of matches to return (default 50).
1541
1544
  local_path: Optional local filesystem path (file or directory) to write the
1542
1545
  result to instead of returning it inline. Bypasses the response-size cap.
1546
+ A path ending in '/' is a directory, created if missing. A file in place
1547
+ of a parent directory, or at a path ending in '/', raises ValueError; an
1548
+ existing file at a plain file path is replaced.
1543
1549
  Same caveat as download_file/download_folder: this path is resolved on the
1544
1550
  *server's* filesystem, not the caller's.
1545
1551
 
@@ -308,8 +308,11 @@ def register(tool):
308
308
  instead of returning it inline. The file holds the raw Markdown
309
309
  text (UTF-8), byte-identical to the inline markdown field,
310
310
  including the comments section when include_comments is True.
311
- A directory path writes <doc_id>.md inside it. Bypasses the
312
- response-size cap.
311
+ A directory path writes <doc_id>.md inside it; a path ending in
312
+ '/' is a directory, created if missing. A file in place of a parent
313
+ directory, or at a path ending in '/', raises ValueError; an existing
314
+ file at a plain file path is replaced.
315
+ Bypasses the response-size cap.
313
316
 
314
317
  Returns:
315
318
  Dictionary with doc_id, title, and markdown (the full Markdown
@@ -20,7 +20,14 @@ from ...auth import execute_in_thread, thread_http
20
20
  from ..atomic_write import _check_destination, _is_partial_download, _write_atomically
21
21
  from ..mime_types import guess_mime_type
22
22
  from ..pagination import iter_pages
23
- from ..response_limits import enforce_response_size_cap, write_capped_result_to_disk
23
+ from ..response_limits import (
24
+ _blocked_destination_error,
25
+ _is_dangling_symlink,
26
+ _local_dir_blocker,
27
+ enforce_response_size_cap,
28
+ validate_local_destination,
29
+ write_capped_result_to_disk,
30
+ )
24
31
  from . import _SA_QUOTA_ERROR, _escape_drive_query_mime_type
25
32
 
26
33
  logger = logging.getLogger(__name__)
@@ -272,75 +279,6 @@ def _restamp_failure_result(file_id: str, exc: Exception) -> dict[str, Any]:
272
279
  }
273
280
 
274
281
 
275
- def _local_dir_blocker(path: Path) -> Path | None:
276
- """The nearest existing component of `path` (itself, then its parents), if
277
- it isn't a directory; None when `path` can be created with mkdir -p.
278
-
279
- A dangling symlink counts as existing: mkdir can't create a directory over it.
280
- """
281
- for p in (path, *path.parents):
282
- if p.exists() or p.is_symlink():
283
- return None if p.is_dir() else p
284
- return None
285
-
286
-
287
- def _is_dangling_symlink(path: Path) -> bool:
288
- return path.is_symlink() and not path.exists()
289
-
290
-
291
- def _blocked_destination_error(
292
- local_path: str, blocker: Path, ending_made_dir: bool = False
293
- ) -> ValueError:
294
- """The ValueError for a local_path that `blocker` stops from being written.
295
-
296
- `ending_made_dir`: `blocker` is the destination itself, and only local_path's
297
- ending (a trailing separator, '.' or '..') made it a directory target. The
298
- message then says so, since dropping that ending writes a file there instead.
299
- """
300
- if _is_dangling_symlink(blocker):
301
- return ValueError(
302
- f"local_path {local_path!r} has a symlink to a missing target at {str(blocker)!r}"
303
- )
304
- message = f"local_path {local_path!r} has a non-directory path component at {str(blocker)!r}"
305
- if ending_made_dir:
306
- message += (
307
- "; local_path ends in a path separator or '.', which makes it a directory "
308
- "target. Remove that ending to write a file at that path instead"
309
- )
310
- return ValueError(message)
311
-
312
-
313
- def _validate_local_destination(local_path: str, *, is_dir: bool = False) -> tuple[Path, bool]:
314
- """Reject a blocked local destination before making any Drive request.
315
-
316
- The destination must be a directory when `is_dir` is set or local_path ends
317
- in a separator, '.' or '..' (Path() drops a trailing '/.', so a check on the
318
- Path alone would read 'dir/.' as a file named 'dir'). Otherwise it's a file
319
- and only its parents must be directories: an existing regular file there may
320
- still be replaced, but a dangling symlink is refused, the same as a dangling
321
- symlink at a directory target (#874).
322
- """
323
- dest = Path(local_path)
324
- ending_made_dir = os.path.basename(local_path) in ("", ".", "..")
325
- wants_dir = is_dir or ending_made_dir
326
- if wants_dir:
327
- blocker = _local_dir_blocker(dest)
328
- elif _is_dangling_symlink(dest):
329
- blocker = dest
330
- else:
331
- blocker = _local_dir_blocker(dest.parent)
332
- if blocker is not None:
333
- raise _blocked_destination_error(
334
- local_path, blocker, ending_made_dir and not is_dir and blocker == dest
335
- )
336
- if not wants_dir and not dest.is_dir():
337
- # A FIFO, socket, or unwritable file at a file destination fails here,
338
- # not after a Workspace export's round trip (PR #1001 QA round 1). An
339
- # existing directory without a trailing separator is a directory target.
340
- _check_destination(dest)
341
- return dest, wants_dir
342
-
343
-
344
282
  def _mkdir_or_blocker(path: Path) -> Path | None:
345
283
  """mkdir -p `path`, or return the component in its way (_local_dir_blocker).
346
284
 
@@ -2139,6 +2077,7 @@ async def _sync_level(
2139
2077
  conflicts.append(rel_name)
2140
2078
  elif kind == "upload_ok":
2141
2079
  uploaded.append(rel_name)
2080
+ total_bytes += o["bytes"]
2142
2081
  level_changed = True
2143
2082
  elif kind == "download_ok":
2144
2083
  downloaded.append(rel_name)
@@ -2549,7 +2488,11 @@ def register(tool):
2549
2488
  local_path: Docs only. Local path to write the Markdown to instead of
2550
2489
  returning it inline (the raw Markdown text, UTF-8). A
2551
2490
  directory path writes <file_id>-r<revision_id>.md inside
2552
- it. Bypasses the response-size cap.
2491
+ it; a path ending in '/' is a directory, created if
2492
+ missing. A file in place of a parent directory, or at a
2493
+ path ending in '/', raises ValueError before the export; an
2494
+ existing file at a plain file path is replaced. Bypasses the
2495
+ response-size cap.
2553
2496
 
2554
2497
  Returns:
2555
2498
  Sheets: revisionId, modifiedTime, sheet name, range, and values as a
@@ -2601,7 +2544,7 @@ def register(tool):
2601
2544
  if local_path:
2602
2545
  # Before the export: a bad destination would otherwise fail only
2603
2546
  # after the temporary Doc round trip (PR #988 QA round 1).
2604
- _validate_local_destination(local_path)
2547
+ validate_local_destination(local_path)
2605
2548
  from ..docs.markdown_export import export_doc_revision_markdown
2606
2549
 
2607
2550
  exported = await export_doc_revision_markdown(
@@ -3081,7 +3024,7 @@ def register(tool):
3081
3024
  """
3082
3025
  drive_service = ctx.request_context.lifespan_context.drive_service
3083
3026
 
3084
- dest, wants_dir = _validate_local_destination(local_path)
3027
+ dest, wants_dir = validate_local_destination(local_path)
3085
3028
 
3086
3029
  metadata = await execute_in_thread(
3087
3030
  drive_service.files()
@@ -3196,7 +3139,7 @@ def register(tool):
3196
3139
  plus total 'size_bytes' downloaded.
3197
3140
  """
3198
3141
  drive_service = ctx.request_context.lifespan_context.drive_service
3199
- dest_dir, _ = _validate_local_destination(local_path, is_dir=True)
3142
+ dest_dir, _ = validate_local_destination(local_path, is_dir=True)
3200
3143
  _make_local_dir(dest_dir, local_path)
3201
3144
  resolved_dest_dir = dest_dir.resolve()
3202
3145
 
@@ -3620,14 +3563,19 @@ def register(tool):
3620
3563
  sync input on every call, so a result manifest written there
3621
3564
  would show up as a new local-only file on the next sync (and
3622
3565
  get uploaded to Drive on a real run); raises ValueError if it
3623
- resolves inside `local_path`.
3566
+ resolves inside `local_path`. A path ending in '/' is a
3567
+ directory, created if missing. A file in place of a parent
3568
+ directory, or at a path ending in '/', raises ValueError; an
3569
+ existing file at a plain file path is replaced. Both checks
3570
+ run before any transfer or local mkdir.
3624
3571
 
3625
3572
  Returns:
3626
3573
  uploaded, downloaded, skipped, conflicts, failed lists (relative paths —
3627
3574
  just the filename at the top level, 'subdir/name' for nested matches when
3628
3575
  recursive descends; always empty when dry_run=True, see the dry_run
3629
3576
  section above), 'folders_skipped' (relative subfolder paths not entered —
3630
- always empty when recursive=False), size_bytes transferred, dry_run flag,
3577
+ always empty when recursive=False), size_bytes transferred (uploaded plus
3578
+ downloaded), dry_run flag,
3631
3579
  and — when dry_run=True — an 'actions' list with {name, action, reason}
3632
3580
  for every file considered at every level visited. A '.gee-sweet-partial-*'
3633
3581
  temp file an interrupted download left locally is never synced; it's
@@ -3655,10 +3603,15 @@ def register(tool):
3655
3603
 
3656
3604
  lc = ctx.request_context.lifespan_context
3657
3605
  drive_service = lc.drive_service
3658
- dest_dir, _ = _validate_local_destination(local_path, is_dir=True)
3659
- _make_local_dir(dest_dir, local_path)
3606
+ dest_dir, _ = validate_local_destination(local_path, is_dir=True)
3660
3607
 
3661
3608
  if result_local_path:
3609
+ # Before any transfer: a bad destination would otherwise fail only at the
3610
+ # final manifest write, after every upload/download had already run, and
3611
+ # the caller would get no record of them (PR #1000 QA round 1). Before
3612
+ # local_path's mkdir too, so a refused call leaves nothing on disk
3613
+ # (PR #1000 QA round 2).
3614
+ validate_local_destination(result_local_path, local_path_param="result_local_path")
3662
3615
  # local_path is also a live input directory this same call scans — unlike
3663
3616
  # every other capped tool's local_path (a pure output destination), writing
3664
3617
  # the result manifest inside it would make the manifest file itself show up
@@ -3677,6 +3630,8 @@ def register(tool):
3677
3630
  "up as a new local-only file on the next sync. Use a separate directory."
3678
3631
  )
3679
3632
 
3633
+ _make_local_dir(dest_dir, local_path)
3634
+
3680
3635
  uploaded: list[str] = []
3681
3636
  downloaded: list[str] = []
3682
3637
  skipped: list[str] = []
@@ -3729,6 +3684,7 @@ def register(tool):
3729
3684
  result_local_path,
3730
3685
  default_filename=f"{folder_id}_sync_result.json",
3731
3686
  manifest_extra={"folder_id": folder_id, "dry_run": dry_run},
3687
+ local_path_param="result_local_path",
3732
3688
  )
3733
3689
 
3734
3690
  # recursive=True removes the previous implicit bound (one folder's direct
@@ -831,7 +831,11 @@ def register(tool):
831
831
  message_id: The Gmail message ID (from list_messages or get_thread).
832
832
  local_path: Optional local filesystem path (file or directory) to write the
833
833
  message JSON to instead of returning it inline. Bypasses the
834
- response-size cap, for messages with very large bodies.
834
+ response-size cap, for messages with very large bodies. A
835
+ path ending in '/' is a directory, created if missing. A file
836
+ in place of a parent directory, or at a path ending in '/',
837
+ raises ValueError; an existing file at a plain file path is
838
+ replaced.
835
839
  include_body: When False, fetch only metadata (Gmail's format='metadata'):
836
840
  no body is downloaded, and body_plain, body_html, and
837
841
  attachments are left out of the result.
@@ -948,7 +952,11 @@ def register(tool):
948
952
  thread_id: The Gmail thread ID (from list_threads or a message's thread_id).
949
953
  local_path: Optional local filesystem path (file or directory) to write the
950
954
  thread JSON to instead of returning it inline. Bypasses the
951
- response-size cap, for threads with very large bodies.
955
+ response-size cap, for threads with very large bodies. A
956
+ path ending in '/' is a directory, created if missing. A file
957
+ in place of a parent directory, or at a path ending in '/',
958
+ raises ValueError; an existing file at a plain file path is
959
+ replaced.
952
960
  include_body: When False, fetch only each message's metadata (Gmail's
953
961
  format='metadata'): no body is downloaded, and body_plain,
954
962
  body_html, and attachments are left out. Use it to list a