chore: pin uv_build upper bound; assert pyroscope_endpoint precondition#104
Merged
Conversation
Captures the brainstormed design for a new FastMcpBootstrapper that mirrors microbootstrap PR141's instrument set (sentry, pyroscope, logging with MCP access middleware, health checks, prometheus) while following lite-bootstrap conventions (frozen-dataclass configs, optional-import guards, single-file bootstrapper module). Adds teardown wiring via FastMCP lifespan composition, which PR141 doesn't do. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
uv_build: silence the `just lint` warning about missing upper bound by pinning to <0.12 (matches the warning's own suggestion). Pyroscope: add `assert self.bootstrap_config.pyroscope_endpoint is not None` at the top of bootstrap(). This documents the precondition that is_ready() already enforces and narrows the type for both ty and Pyright (was the only remaining real Pyright complaint after the post-retro suppressions landed). Direct callers that bypass the bootstrapper now get a clear AssertionError instead of a TypeError from pyroscope. Both items surfaced during retro action-item work. First PR using the lightweight plan template.
Twelve-task TDD plan implementing the design from 2026-06-01-fastmcp-bootstrapper-design.md. Tasks scaffold the bootstrapper module, layer instruments one at a time with failing-then-passing tests, add missing-dependency regression coverage, update docs, and open the PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two tiny hygiene items surfaced during post-retro action-item work.
pyproject.toml):requires = ["uv_build"]→requires = ["uv_build<0.12"]. Silences the persistentjust lintwarning about missing upper bound (matches the warning's own suggestion).lite_bootstrap/instruments/pyroscope_instrument.py):assert self.bootstrap_config.pyroscope_endpoint is not Noneat the top ofbootstrap(), with a comment documenting the precondition thatis_ready()already enforces.Why the assert: runtime safety for direct callers that bypass the bootstrapper (clear
AssertionErrorinstead of a downstream pyroscopeTypeError), documents the invariant, and narrowsstr | None→strforty.Caveat: the plan claimed both
tyand Pyright narrow after the assert. In practice Pyright doesn't narrow attribute chains across assertions (known limitation). The assert still has value (runtime + ty + docs); the Pyright residual diagnostic is acceptable noise consistent with the existing[tool.pyright]policy.First PR using the lightweight plan template. First PR using a combined spec+quality review dispatch (testing the "trim two-stage review for trivial PRs" retro action item).
Test plan
just test— 129/129.just lint— clean; the "missing upper bound on uv_build" warning is gone.test_pyroscope_instrument_bootstrap_and_teardownexercises the new assert path (with a real endpoint).🤖 Generated with Claude Code