Skip to content

chore: clear out stale config and fix small doc and test gaps - #262

Merged
glebedel merged 5 commits into
mainfrom
s2d2/audit-minor-cleanup
Nov 11, 2026
Merged

glebedel merged 5 commits into
mainfrom
s2d2/audit-minor-cleanup

Conversation

@glebedel

@glebedel glebedel commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Small cleanups, each checked against the code:

Area Change Evidence
.release-please-config.json drop bump-minor-pre-major and bump-patch-for-minor-pre-major they only apply below 1.0; the package is 3.0.0
.gitleaks.toml drop the venv/ allowlist entry .venv/ is the only virtualenv the repo uses and stays allowlisted
pyproject.toml drop the examples E501 ignore ruff check . passes without it; no example line is over 110
pyproject.toml drop the **/py.typed coverage omit and exclude_lines = ["pragma: no cover"] coverage only measures .py files; the setting restated the default
pyproject.toml add [project.urls] (Repository, Changelog, Issues) the PyPI page had no link back; the built wheel now carries three Project-URL lines
dev extra add pydantic-ai-slim>=1.83.0; pytest.importorskip("pydantic_ai") becomes a plain import on a dev-only install those tests skipped silently; langchain-core is already in dev the same way. uv.lock gains two lines, no new package
fetch_tools(mode=...) typed ToolMode | None instead of Any, and documented it was the one undocumented argument
MIGRATION.md the 3.0 hand-built tool snippet gets its imports it raised NameError: name 'StackOneTool' is not defined when run; it runs now
scripts/validate.sh header names the default ADK checkout it documented a different directory than the default it uses
.github/dependabot.yaml comment says the MCP SDK is ignored entirely it said "major-only-blocked", but the ignore has no update types
Tools._warn_duplicate_names no change: the docstring edit was reverted, since #266 makes the warning fire once, when the collection is built

No runtime behaviour change.

How verified

  • uv lock --check, uv run ruff check ., uv run ruff format --check ., uv run ty check stackone_ai examples: clean.
  • uv run pytest (Python 3.13, all extras, MCP mock via pnpm): 871 passed, the same as main; the pydantic-ai tests run rather than skip.
  • uv build: wheel METADATA lists the three project URLs.
  • The MIGRATION snippet run as a script: NameError without the imports, runs with them.

Gates (head d4f8132)

Gate Result
Repo skills none in repo
/forge:forge ran on c00a40b: removed the examples ruff ignores (ruff passes without them) and reworded the duplicate-name docstring; its typed sentinel exposed a private type in the public fetch_tools signature, so d4f8132 keeps `mode: ToolMode
Security scan security-reviewer agent: no finding at confidence 70 or above. Aikido: 31 open issues on main (lockfile CVEs, workflow SAST, one old test-fixture secret), none on lines this PR changes
Codex security clean on d4f8132 (job 772c9e76): the gitleaks change widens scanning; the release flags only applied below 1.0.0
/security-review ran: secrets, input validation, transport and DoS items clean; the server-side items do not apply to an SDK
/code-review medium on d4f8132: no correctness bugs, 4 design notes. Declined: the mode annotation keeps a private type out of the signature, the dev pin mirrors langchain-core, and dropping venv/ widens gitleaks. Raised for a decision rather than changed here: the duplicate-name warning repeats on every adapter conversion, which is existing behaviour
CI green on d4f8132: 10 pass, 3 skipped
Unresolved review threads 0

Requested by guillaume@stackone.com in Slack (repo audit thread)

🤖 Generated with Claude Code


Summary by cubic

Cleans up stale config, fixes small doc and test gaps, and types the undocumented fetch_tools(mode=...) argument. No runtime behavior changes.

  • Adds [project.urls] to pyproject.toml so the PyPI page links the repository, changelog, and issues, and drops config that was stale or restated defaults (release-please pre-major flags, the venv/ gitleaks allowlist entry, the examples per-file ruff ignores, the py.typed coverage omit).
  • Adds pydantic-ai-slim to the dev extra and replaces pytest.importorskip("pydantic_ai") with plain imports, so those tests run on a dev-only install instead of silently skipping.
  • Fixes doc gaps in MIGRATION.md (the 3.0 snippet raised NameError) and scripts/validate.sh.

Written for commit 960755d. Summary will update on new commits.

View guided diff Turn on auto-fix

- release-please: drop the bump-*-pre-major flags, which only apply
  below 1.0 (the package is at 3.0.0).
- gitleaks: drop the venv/ allowlist entry; .venv/ is the only
  virtualenv the repo uses and stays allowlisted.
- pyproject: drop the E501 ignore for examples (no line is over 110),
  the py.typed coverage omit (coverage only measures .py files) and an
  exclude_lines that restated the default; add [project.urls] so the
  PyPI page links the repo, changelog and issues.
- dev extra: add pydantic-ai-slim, as langchain-core already is, and
  turn the pydantic_ai importorskip calls into plain imports, so those
  tests fail on a dev-only install instead of silently skipping.
- fetch_tools(mode=...) is typed ToolMode | None and documented.
- MIGRATION.md: the 3.0 hand-built tool snippet gets its imports.
- validate.sh: the header named a different ADK checkout than the
  default it uses.
- dependabot.yaml: the npm comment said major-only, but the MCP SDK is
  ignored entirely.
- Tools._warn_duplicate_names: the docstring said "once", but it also
  warns from each adapter, which tests pin deliberately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
@glebedel glebedel self-assigned this Nov 10, 2026
s2d2-s1 and others added 2 commits November 11, 2026 00:35
- fetch_tools(mode=...): the default is now a one-member enum, so the
  annotation states the sentinel instead of hiding it behind a ty
  ignore, and ty narrows it away after the default is resolved.
- pyproject: examples pass ruff with no per-file ignores, so the
  remaining F841 and E402 entries go with E501.
- Tools._warn_duplicate_names: the docstring repeated what
  _first_per_name already says about adapters; it now states only that
  it warns on every call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
…type

The typed sentinel put a private enum into the public signature
(`ToolMode | None | Literal[_Unset.UNSET]`), which IDEs and help() show
to every caller. `ToolMode | None` with one inline ty ignore on the
default states the public contract more plainly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
The duplicate-names warning moves to construction only in the warn-once
change, so this PR leaves the original docstring as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>
Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com>

# Conflicts:
#	.github/dependabot.yaml
@glebedel
glebedel merged commit 09b9813 into main Nov 11, 2026
15 checks passed
@glebedel
glebedel deleted the s2d2/audit-minor-cleanup branch November 11, 2026 14:49
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.

2 participants