You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uv run --frozen pytest tests/unit/test_resource_manager.py::test_pause_signals_score_consumer_shutdown
67
71
```
68
72
73
+
Minimum verification matrix:
74
+
75
+
| Change scope | Minimum verification |
76
+
| --- | --- |
77
+
| Docs or comments only |`uv run --frozen ruff format --check .` if Python files changed |
78
+
| Python source only |`uv run --frozen ruff check .` + `uv run --frozen mypy langfuse --no-error-summary` + targeted unit tests |
79
+
| Unit-test-only change | targeted `uv run --frozen pytest ...` for the changed tests |
80
+
| Shutdown, flushing, worker-thread, or OTEL-heavy change | targeted resource-manager/OTEL tests plus affected integration tests when relevant |
81
+
| OpenAI or LangChain instrumentation | targeted unit tests using exporter-local assertions; add e2e/live-provider coverage only when unit tests cannot cover behavior |
82
+
| Generated API client or public API contract | upstream Fern/OpenAPI regeneration path plus targeted SDK serialization/deserialization tests |
83
+
| CI, sharding, or bootstrap | relevant script test plus CI workflow review against this file's CI contract |
84
+
69
85
## Test Topology
70
86
71
87
### `tests/unit`
@@ -96,6 +112,7 @@ The main CI workflow currently runs:
96
112
-`tests/unit` on a Python 3.10-3.14 matrix
97
113
-`tests/e2e` in 2 mechanical shards plus a serial subset inside each shard
98
114
-`tests/live_provider` as one always-on suite
115
+
- PR title validation for Conventional Commits
99
116
100
117
If you change the e2e split:
101
118
@@ -113,16 +130,19 @@ If you change CI bootstrap:
113
130
- Keep changes scoped. Avoid unrelated refactors.
114
131
- Prefer `LANGFUSE_BASE_URL`; `LANGFUSE_HOST` is deprecated and is only kept for compatibility tests.
115
132
- If you touch `langfuse/api/`, regenerate it from the upstream Fern/OpenAPI source instead of hand-editing files.
133
+
- If you change public SDK behavior, update examples, README snippets, or generated reference docs when they would otherwise become stale.
116
134
- If you touch shutdown, flushing, or worker-thread behavior, run the relevant resource-manager and OTEL-heavy tests.
117
135
- If you change OpenAI or LangChain instrumentation, keep as much coverage as possible in `tests/unit` using exporter-local assertions, and leave only the minimal necessary coverage in `tests/e2e` / `tests/live_provider`.
118
136
- Never commit secrets or credentials.
119
137
- Keep `.env.template` in sync with required local-development environment variables.
120
138
121
139
## Commit And PR Rules
122
140
123
-
- Commit messages and PR titles should follow Conventional Commits: `type(scope): description` or `type: description`.
141
+
- Commit messages and PR titles must follow Conventional Commits: `type(scope): description` or `type: description`.
142
+
- Allowed common types include `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`, and `security`.
124
143
- Keep commits focused and atomic.
125
-
- In PR descriptions, list the main verification commands you ran.
144
+
- Before opening a PR, self-review the diff and check `code_review.md` for the repo-specific review checklist.
145
+
- In PR descriptions, list the main verification commands you ran and call out any skipped checks with the reason.
uv run --env-file .env pytest -s -v --log-cli-level=INFO
36
-
```
54
+
```bash
55
+
uv run --frozen pytest tests/unit/test_resource_manager.py::test_pause_signals_score_consumer_shutdown
56
+
```
57
+
58
+
## Codex Cloud Setup
59
+
60
+
This repository includes repo-owned Codex setup so agents can start from a reproducible environment.
61
+
62
+
Recommended Codex UI configuration:
63
+
64
+
1. Create a Codex cloud environment for this repository.
65
+
2. Set the setup script to:
66
+
67
+
```bash
68
+
bash scripts/codex/setup.sh
69
+
```
70
+
71
+
3. Set the maintenance script to:
72
+
73
+
```bash
74
+
bash scripts/codex/maintenance.sh
75
+
```
76
+
77
+
4. Keep agent internet access disabled by default, or allow only the domains required for the task.
78
+
5. Add secrets and environment variables in the Codex UI instead of committing them.
79
+
80
+
## Pull Requests
81
+
82
+
PR titles and commit messages must follow Conventional Commits:
83
+
84
+
```text
85
+
type(scope): description
86
+
type: description
87
+
```
37
88
38
-
- Run a specific test
89
+
Common types include `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`, and `security`.
39
90
40
-
```
41
-
uv run --env-file .env pytest -s -v --log-cli-level=INFO tests/test_core_sdk.py::test_flush
42
-
```
91
+
Before opening a PR:
43
92
44
-
- E2E tests involving OpenAI and Serp API are usually skipped, remove skip decorators in [tests/test_langchain.py](tests/test_langchain.py) to run them.
93
+
- Self-review the diff and use `code_review.md` for the repo-specific checklist.
94
+
- Keep changes focused and avoid unrelated refactors.
95
+
- Add or update tests for behavior changes.
96
+
- List the verification commands you ran in the PR description.
45
97
46
-
### Update openapi spec
98
+
### Update OpenAPI spec
47
99
48
-
A PR with the changes is automatically created upon changing the Spec in the langfuse repo.
100
+
The generated API client in `langfuse/api/` must not be hand-edited. Regenerate it from the upstream Fern/OpenAPI source.
0 commit comments