Repository navigation
Commit 523ea2d
fix(test): wire the environment reader in 3 bare-subprocess telemetry tests
Fixing the last commit's "raise on unconfigured" change surfaced a real
regression: tests_py/core/test_telemetry_isolation.py and
test_telemetry_rotation.py spawn a bare `python -S -c "..."` subprocess
that calls telemetry.record() directly, without importing any
composition root. Before the previous commit this silently worked
(read_environment_variable returned None); now it correctly raises,
since these ARE genuinely-unwired standalone scripts and the fix is
supposed to catch exactly that. Added the same
`configure_core_environment_reader(os.environ.get)` call every real
entry point now needs, directly in each bare script literal.
Also: mcp_server/hooks/post_commit_reindex.py's wiring block (from the
previous commit) pushed it to 302 lines, a new craftsmanship violation
(not previously baselined for file-size). Shrunk the import to a single
line to land at exactly 300.
Verified: full pytest reports 8440 passed, 165 skipped, 0 failed
(up from 8437 passed / 3 failed before this fix -- the exact 3 that are
fixed here). scripts/check_craftsmanship.py --base origin/main returns
OK.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 822c2f8 commit 523ea2d
3 files changed
Lines changed: 10 additions & 3 deletions
File tree
- mcp_server/hooks
- tests_py/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 297 | + | |
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
0 commit comments