Skip to content

chore: bring repo to plugin standard — CI, pyproject, host-free suite, stdlib-shadow fix#1

Merged
mabry1985 merged 1 commit into
mainfrom
chore/repo-standard
Jul 3, 2026
Merged

chore: bring repo to plugin standard — CI, pyproject, host-free suite, stdlib-shadow fix#1
mabry1985 merged 1 commit into
mainfrom
chore/repo-standard

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Brings google-plugin up to the standalone-plugin operational standard (projectBoard/artifact shape).

What

  • CI (.github/workflows/ci.yml): ruff check + format-check (tests/) + pytest on the Namespace runner, host-free via requirements-dev.txt.
  • pyproject.toml: ruff + pytest config, version kept in lockstep with the manifest (enforced by a test).
  • calendar.pygcal.py: a root-level calendar.py shadows the stdlib calendar module — stdlib email imports it, so any Python started from this directory exploded with a bizarre circular-import error. Pinned by test_no_stdlib_shadowing_module_names.
  • __init__.py: relative imports moved inside functions. pytest (8+) makes the repo root a Package node and imports its __init__.py as a nameless top-level module at setup — any top-level from . import x breaks the whole suite. This is the shape projectBoard-plugin already uses. Pinned by test_init_has_no_top_level_relative_imports.
  • Tests 8 → 18: synthetic-package conftest bootstrap (imports resolve exactly as under the host loader — the flat-import dual-path hack and the tests/pytest.ini rootdir dodge are gone); new manifest-coherence, register()-wiring, tool-wrapper, and four-rules view tests (view path asserted against what the router actually serves).
  • Manifest: min_protoagent_version: 0.71.0 (first release with public_paths, #1345).

Test

pip install -r requirements-dev.txt && pytest -q from the repo root — 18 passed, ruff clean, verified in a clean py3.12 venv with no protoAgent host importable.

🤖 Generated with Claude Code

…, stdlib-shadow fix

- pyproject.toml (ruff + pytest config) + requirements-dev.txt + host-free CI on the Namespace runner
- rename calendar.py -> gcal.py: a root-level calendar.py shadows stdlib calendar (which stdlib
  email imports), breaking any Python started from this directory
- __init__.py: no top-level relative imports — pytest imports a repo-root __init__.py as a
  nameless top-level module during package setup; service imports now live inside functions
  (both invariants pinned by tests)
- tests: synthetic-package conftest bootstrap (google_plugin), drop the flat-import dual-path
  hack + tests/pytest.ini rootdir dodge; add manifest-coherence, register()-wiring, tool-wrapper
  and four-rules view tests (8 -> 18 tests)
- manifest: min_protoagent_version 0.71.0 (public_paths, #1345)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #1 | chore: bring repo to plugin standard — CI, pyproject, host-free suite, stdlib-shadow fix

VERDICT: WARN (non-blocking — CI still queued, re-review on terminal)


CI Status

  • test: queued

Diff Review

  • calendar.pygcal.py: fixes real stdlib-shadow bug (import calendar would resolve to this module, breaking email and anything else). Pinned by test_no_stdlib_shadowing_module_names. Correct.
  • __init__.py lazy imports: all from . import x moved inside functions — correct pattern for pytest 8+ (repo-root __init__.py loaded as nameless top-level module). Consistent across all tool functions and register().
  • Lazy _CREDS init: module-level None, populated by _creds() (empty-credentials fallback) or overwritten by register(). register() writes the global directly, so the cache-before-register path resolves correctly.
  • CI workflow (.github/workflows/ci.yml): clean, host-free, Namespace runner with fallback.

Observations

  • GAP: Diff truncated at 200/674 lines — ~474 lines (tests, pyproject.toml, requirements-dev.txt, manifest, remaining __init__.py) not directly reviewed.
  • GAP: Clawpatch structural review unavailable (502 — repo not in checkout cache). Cross-file analysis (e.g. view.pygcal.py interface after rename, test coverage of register() wiring) not verified.
  • GAP: path_exists not available on this pr_inspector — could not verify requirements-dev.txt, gcal.py, or view.py exist on the PR head.
  • LOW: CI non-terminal — test still queued. PR description reports 18/18 pass locally with ruff clean; formal PASS/FAIL deferred to CI-completion re-review.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #1.

@mabry1985 mabry1985 merged commit 296c140 into main Jul 3, 2026
1 check passed
@mabry1985 mabry1985 deleted the chore/repo-standard branch July 3, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant