chore: repo skeleton, tooling and GET /healthz - #1
Merged
Merged
Conversation
- `scripts` in ruff's paths and isort, and pytest's `pythonpath`, served DSS folders. - This repo has neither, so the settings and their comments explained nothing. - The e2e marker named an env var from before the prefix was settled.
- The composition root, with nothing wired yet. - `asgi-lifespan` (dev) runs the lifespan, which httpx's ASGI transport does not.
- For Docker and the front proxy. Not in the contract, so not in the OpenAPI document. - Says the process is up. It does not probe the DSS, so an outage keeps it in rotation.
- Architecture §4.1 as an AST walk: each module's layer, by path, limits its imports. - Relative and dynamic imports are resolved; a module that fits no layer fails too. - A service takes config as plain values; only app.py may read Settings. - A second feature is reachable only through its package, never its insides. - ruff bans relative imports, so the easy bypass is never written.
- Same workflow as the DSS: uv sync --locked, ruff check, ruff format --check, pytest.
- Ruff and the usual hygiene hooks on commit; the test suite on push. - `pre-commit` is a dev dependency: hooks install with `uv run`, no global tool.
- `standard` mode, on every commit and in CI. Ruff does not check types; this does. - The hook runs whatever changed, since pyproject.toml alone can loosen the check.
- Unused functions, classes, imports and variables fail every commit and CI. - A route's HTTP-verb decorator counts as a use, since FastAPI calls it, not our code.
- `vulture_whitelist.py` is one of vulture's paths, so a name it lists counts as used. - Ruff ignores B018 and F821 there; the file is outside pyright's `include`. - Ships empty; its docstring says how to add an entry.
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.
What
The Experience API's skeleton. An installable package that boots, and answers
GET /healthz. Five gates run on every commit and in CI: ruff, ruff format, pyright, vulture and pytest.create_app()with a lifespan, which is the composition root.GET /healthz, for Docker and the front proxy. It does not probe the DSS, and it is not in the OpenAPI document.tests/test_boundaries.pyenforces the architecture's dependency rule (§4.1). It reads imports from the AST, resolving relative and dynamic ones, and ruff also bans relative imports. A service may import only its own domain and ports. Config reaches it as plain values, so onlyapp.pyreads settings.Why
This is the first phase of the build. The tooling and the dependency rule are in place before any feature code arrives.
Testing
uv run uvicorn --factory experience_api.app:create_app --port 8078, thencurl -i localhost:8078/healthz.🤖 Generated with Claude Code