Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
473 lines (437 loc) ยท 24.7 KB
/
Copy pathpyproject.toml
File metadata and controls
473 lines (437 loc) ยท 24.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "phaze"
version = "2026.10.9"
description = "A music alignment tool"
license = "MIT"
requires-python = ">=3.14,<3.15"
dependencies = [
# Phase 53 (KSTAGE-01..05): async S3 client the control plane uses to presign multipart
# PUT + just-in-time GET URLs and to delete/abort staged objects. The control plane never
# reads file bytes (DIST-01); it only orchestrates presigned URLs the agent/pod transfer over.
# aioboto3 stopped at aiobotocore 2.x, so use aiobotocore's native session API directly.
"aiobotocore>=3.10.0",
"alembic>=1.20.1",
"asyncpg>=0.32.0",
"beautifulsoup4>=4.15.0",
"cryptography>=50.0.2",
"essentia-tensorflow>=2.1b6.dev1438; sys_platform != 'linux' or platform_machine == 'x86_64'",
"fastapi>=0.165.0",
"httpx>=0.29.0",
# Phase 54 (KSUBMIT-01): control-plane Kubernetes client. Submits suspended Kueue Jobs
# via the kube API, watches them to completion, and reconciles their status. Lives on the
# control plane ONLY (kube creds never reach the agent/pod, mirroring aiobotocore). Verified
# legitimate (kr8s-org, BSD-3-Clause, pure-Python) before install (T-54-SC).
"kr8s>=0.20.15",
# Capped on purpose: litellm had a supply-chain attack (malicious 1.82.7/1.82.8,
# Mar 2026) and ships frequent breaking minors, so CLAUDE.md mandates aggressive
# pinning. The cap confines uv to ONE vetted minor line; raise it deliberately.
#
# Raised 1.85.x -> 1.94.x on 2026-08-04 (commit d90741e3, PR #401) as the IMPLEMENTER'S
# decision, which is the "raise the cap deliberately after vetting" step CLAUDE.md requires
# -- not an automatic bump. The commit credited the go-ahead to the operator, but no
# question or answer survives: not found in local session transcripts as of 2026-09-23 (the
# retained corpus starts 2026-08-18) and no bead records it, so it is relabelled per
# CLAUDE.md rule 2 (phaze-bo0sm).
# Vetted at that raise: 1.94.1 is nine minors clear of the compromised 1.82.7/1.82.8,
# pip-audit and osv-scanner report nothing against it, and the full suite passes. Note
# this cap is now the ONLY control on this package: the repo-wide `exclude-newer`
# cooldown was removed the same day, so there is no waiting window behind it.
#
# Raised 1.97.x -> 1.98.x on 2026-08-23, same deliberate step. This also requires the
# aiobotocore 3.x migration above because litellm 1.98 requires boto3 >=1.43.1 while the
# final aioboto3 release pins boto3 to the 1.40 line. Vetted at this raise: see the PR for
# the pip-audit / osv-scanner / full-suite results.
#
# Raised 1.98.x -> 1.100.x on 2026-09-11 by operator decision (bead phaze-dkqor), same
# deliberate step. Vetted at this raise: pip-audit clean on the moved pins, osv-scanner no
# issues on the 181-package lock, full suite green (see the bead comment for the run).
#
# WHEN YOU RAISE THIS CAP, the raise is not complete until the guard moves with it.
# tests/review/capabilities/proposal_provider/test_wire_shapes.py measures the LLM->pydantic seam
# against whatever litellm is pinned here and records that minor in MEASURED_LITELLM_MINOR.
# Re-measure its verdicts and update that constant in the SAME commit as the bump. This comment
# is a pointer, not a coupling -- nothing enforces it, and the cost of forgetting lands on
# whoever gates next, ~23 minutes into a suite, in a file they did not touch (phaze-85zxu).
"litellm>=1.100.5,<1.101.0",
"lxml>=6.2.1",
"mutagen>=1.48.1",
"numpy>=2.5.5",
# phaze-m1drf.1: OpenTelemetry. THREE packages, deliberately -- api + sdk + the
# OTLP **HTTP/protobuf** exporter. No `opentelemetry-instrumentation-*` package is
# taken: phaze writes its own HTTP / SAQ / SQLAlchemy hooks so that every metric
# LABEL is a bounded value this repo chose (see docs/telemetry/metric-catalogue.md).
# Auto-instrumentation labels HTTP by the RAW path, which puts a file UUID in a
# Prometheus label the first time anyone requests /record/<uuid> -- an unbounded
# series explosion in a Prometheus phaze does not own (phaze-m1drf.3 ยงcardinality).
#
# HTTP/protobuf rather than gRPC on purpose: the gRPC exporter needs `grpcio` (a
# heavy binary wheel that must build for every platform in the essentia/TF matrix)
# and its channel keeps its own retry state across a shutdown, which is exactly the
# blocking-at-exit shape phaze-m1drf.2 ยง2 has to bound for a k8s analyze Job.
"opentelemetry-api>=1.45.2",
"opentelemetry-exporter-otlp-proto-http>=1.45.2",
"opentelemetry-sdk>=1.45.2",
"psycopg[binary]>=3.3.9",
"pydantic-settings>=2.16.3",
# Direct dep since v4.0.1: config.py reads the configured `.env` for `<VAR>_FILE`
# secret resolution. Already installed transitively via pydantic-settings' env_file
# support; declared explicitly so the direct import is not a transitive accident.
"python-dotenv>=1.2.4",
"python-multipart>=0.0.34",
# Phase 70 (MKUE-01): kube_staging parses inline kubeconfig YAML content into a dict for the
# per-backend kr8s client. Already resolved transitively via the pinned kr8s -- declared
# explicitly (hygiene) so a future kr8s dropping PyYAML cannot silently break the kubeconfig
# parse. Floor at the currently-resolved 6.0.4.
"PyYAML>=6.0.4",
"rapidfuzz>=3.14.6",
# Direct dep since Phase 36: dropping `saq[redis]` removes the transitive `redis`,
# but `redis.asyncio` is imported directly across the codebase (cache_redis handle,
# pipeline counters). Declared explicitly so the import is not a transitive accident.
"redis>=8.2.0,<9.0",
# Phase 36: postgres extra pulls psycopg[pool]>=3.3.4 for the PostgresQueue broker.
# phaze-mvq8z.10: capped to the 0.26 minor line. phaze.tasks._shared.live_worker hooks SAQ's
# PRIVATE worker/queue internals (docs/design/0019-runtime-config-hot-reload.md ยง8), which a
# release may change without calling it breaking; tests/shared/tasks/test_saq_worker_contract.py
# fails on any version it was not verified against, so a bump is a compatibility review.
"saq[postgres]>=0.26.5,<0.27.0",
# phaze-dixnj: the [asyncio] extra is what installs `greenlet` at runtime. SQLAlchemy's asyncio
# bridge raises ImportError without it; patchright used to pull it in transitively and its removal
# (phaze-7muoo) left the api image without it, because the dev-group pin never reaches the image.
"sqlalchemy[asyncio]>=2.1.9",
"sse-starlette>=3.7.1",
"structlog>=26.1.0",
"tenacity>=9.2.1",
"uvicorn>=0.55.0",
"watchdog>=7.1.1",
]
[project.scripts]
phaze = "phaze.cli:main"
# phaze-jktlb. WHERE the JSON report lands. Measured, not assumed (coverage 7.15.4 +
# pytest-cov 7.1.0): `--cov-report=json` with NO `:DEST` and a bare `coverage json` BOTH
# resolve their destination from this key -- pytest-cov's engine passes `outfile=None`
# straight through to coverage.py, which then reads the config. Verified by pointing this
# key at a sentinel filename and observing the artifact appear under that name.
#
# THE SPLIT THAT MATTERS, because it is the thing this bead got asked to establish:
# coverage.py owns the report's DESTINATION; pytest-cov owns whether the report is EMITTED
# at all. `--cov-report` is a pytest-cov flag with no coverage.py equivalent and no pytest
# ini key (the installed plugin registers eleven `addoption`s and zero `addini`s), so
# SELECTION cannot live here. It lives in the justfile's `cov_reports` variable. Do not
# "finish the job" by trying to move selection into this table -- there is nothing to move
# it to, and a key here that coverage.py ignores reads as configured while doing nothing.
#
# `scripts/coverage_floor.py` and `just check-branch-coverage` both read this path.
[tool.coverage.json]
output = "coverage.json"
[tool.coverage.report]
# phaze-bk9el.21 -- THIS NUMBER DID NOT CHANGE, BUT WHAT IT MEASURES DID. Read before editing.
#
# With `branch = true` set under the tool.coverage.run section below, coverage.py's `fail_under` measures the
# COMBINED figure -- `(covered_lines + covered_branches) / (num_statements + num_branches)` -- not
# lines. There is no coverage.py option to make it line-only (verified against coverage 7.15.4:
# `coverage report` offers --fail-under, --format and --precision, and nothing that selects the
# metric). `coverage xml`, `coverage json` and pytest-cov all read this same value.
#
# MEASURED on the full suite, 2026-08-21:
# statements 17554/17771 = 98.7789%
# branches 3684/3866 = 95.2923%
# combined 21238/21637 = 98.1559% <- what this key now checks
# 3.16 points of headroom, so this stays ARMED. It also has to: `just combine-coverage` passes
# `--fail-under=95` on the CLI, a CLI value silently overrides this config value, and
# `tests/shared/test_coverage_gate.py` fails the build if the two sites ever disagree.
#
# The operator's decision that the repo-wide gate stays on LINES at 95% is satisfied separately and
# explicitly by `scripts/coverage_floor.py`, which reads `percent_statements_covered` and enforces
# 95% repo-wide plus 90% per module. That separation is load-bearing at the per-module level: ONE
# module reads differently under the two metrics (`src/phaze/routers/duplicates.py` -- 91.20%
# statements, 75.00% branches, 88.59% combined), so a per-module floor left on the combined number
# would fail a module that has regressed nothing. Neither gate is disarmed; both name their metric.
fail_under = 95
precision = 2
show_missing = true
[tool.coverage.run]
# phaze-bk9el.21, operator decision 2026-08-21. Question as put: "Branch coverage is off, and
# runs 4-8 points under line coverage on the refactor targets. What should this epic do about
# it?" Answer as given (selected option label, verbatim): "Enable it, gate the refactor targets
# only (Recommended)". Durable record: bead phaze-bk9el.21.
#
# ON REPO-WIDE, GATE-NARROW. `branch = true` makes every coverage run in this repo MEASURE
# branches, so the number is visible everywhere. It deliberately does NOT move the repo-wide
# gate onto branches: branch coverage runs below the line figure on most files, so a repo-wide
# branch gate would fail on day one and the backfill would dwarf the epic it was meant to
# protect. The repo-wide floors stay on LINES -- see scripts/coverage_floor.py, which is now
# where BOTH of them are enforced, and its header for why that had to move.
#
# WHY IT MATTERS AT ALL: decomposing a long function, flattening a nest, or splitting a file
# are all operations where every line still executes and only the BRANCH COMBINATIONS change.
# Line coverage is structurally unable to detect the regression a refactor is most likely to
# introduce, which is exactly the change class epic phaze-bk9el consists of.
branch = true
# phaze-bein3. The CORE follows from this list, so read it as a performance switch as well as a
# correctness one. Unset, PHAZE_COVERAGE_GREENLET leaves ["thread", "thread"] and coverage.py 7.16
# on Python 3.14 picks its sys.monitoring core; any `greenlet` here forces the settrace CTracer,
# measured at +55% CPU (spike phaze-6qhh2). sys.monitoring keeps no per-thread frame stack, so it
# attributes SQLAlchemy's async greenlet bridge correctly without greenlet support -- measured
# identical executed lines AND arcs to CTracer+greenlet, the reason greenlet was added (c8bbd16f).
# What sys.monitoring cannot do is `--cov-context=test`: it records only the FIRST test to hit a
# line, which would silently thin repowise's per-test map. So every launcher passing that flag sets
# PHAZE_COVERAGE_GREENLET=greenlet, the pytest filterwarnings entry makes a context run that lands
# on sys.monitoring anyway fail rather than warn, and tests/shared/test_coverage_core_selection.py
# pins all three halves. A set-but-empty value is rejected by coverage.py as a config error.
concurrency = ["thread", "${PHAZE_COVERAGE_GREENLET-thread}"]
omit = ["tests/*"]
relative_files = true
source = ["phaze"]
# phaze-jktlb. WHERE the Cobertura report lands -- the companion to the json table above, and
# established by the same measurement: `--cov-report=xml` with no `:DEST`, and the bare
# `coverage xml` that `just combine-coverage` runs, both take their destination from here.
# This retired the `-o coverage.xml` that scripts/repowise-coverage.sh used to hardcode.
#
# Codecov reads this file (.github/workflows/tests.yml `files: ./coverage.xml`), so the path
# is also pinned there and in scripts/repowise_coverage_gate.py's `--coverage-xml`. Cobertura
# cannot carry per-test contexts; the binary `.coverage` is the only artifact that can, which
# is why `--cov-context=test` stays on the shard recipes rather than moving into config.
[tool.coverage.xml]
output = "coverage.xml"
[tool.hatch.build.targets.wheel]
packages = ["src/phaze"]
[tool.mypy]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
exclude = "^(tests/|prototype/|services/|scripts/vendor/diagram_design/|vulture_whitelist\\.py)"
exclude_gitignore = true
mypy_path = ["src"]
no_implicit_optional = true
python_version = "3.14"
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["essentia", "essentia.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["mutagen", "mutagen.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["aiobotocore.*", "botocore", "botocore.*"]
ignore_missing_imports = true
# asyncpg ships no py.typed marker. phaze.runtime_config_notify (phaze-mvq8z.6) is the first src/
# caller to import it directly (every prior use lived in tests/, which mypy excludes wholesale) --
# a dedicated LISTEN/NOTIFY connection for the DB-override reload channel, kept separate from the
# SQLAlchemy engine because LISTEN/NOTIFY has no ORM-level API.
[[tool.mypy.overrides]]
module = ["asyncpg"]
ignore_missing_imports = true
# PyYAML ships no py.typed / stubs bundled; kube_staging parses inline kubeconfig content via yaml.safe_load.
[[tool.mypy.overrides]]
module = ["yaml"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["playwright.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "phaze.services.agent_client"
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
strict_equality = true
warn_return_any = true
[[tool.mypy.overrides]]
module = "phaze.services.agent_task_router"
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
strict_equality = true
warn_return_any = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
"integration: tests that require external services (database, redis, etc.)",
"browser: real-browser Playwright tests (phaze-tzy6s.14). Excluded from the default run by `addopts`; run with `just test-browser`.",
]
# phaze-tzy6s.14: the browser suite is deselected by DEFAULT, not merely un-run by convention.
# Playwright is isolated to the optional `browser` dependency group, so a default `uv sync` does not install it.
# `-m browser` on the command line overrides this, which is what `just test-browser` passes.
addopts = "-m 'not browser'"
# phaze-bein3: `--cov-context=test` on coverage.py's sys.monitoring core records only the first test
# per line and says so only in a warning. Make it an error, so a context-bearing launcher that forgot
# PHAZE_COVERAGE_GREENLET=greenlet (see the coverage run table) goes red instead of thinning the map.
filterwarnings = ["error:Dynamic contexts aren't supported:coverage.exceptions.CoverageWarning"]
testpaths = ["tests"]
[tool.ruff]
line-length = 150
target-version = "py313"
# Do not format fenced code blocks in markdown. ruff 0.16 began formatting them, which would
# rewrite 217 committed docs (214 under .planning/, 3 under docs/) purely to normalise comment
# spacing inside illustrative snippets.
#
# This is the same decision `[tool.ruff.format] docstring-code-format = false` already records:
# embedded samples are PROSE, and their layout is often the point -- an aligned trailing comment
# marking the line a write-up is about, or a deliberately terse fragment that is not valid
# standalone module text. Reformatting them edits documentation to satisfy a code formatter.
#
# Nothing gated this (`just lint` is `ruff check`; the pre-commit ruff-format hook is Python-only),
# so it never failed CI -- but a bare `uv run ruff format` by anyone churned 217 files. Excluding
# markdown makes that impossible rather than merely unlikely.
extend-exclude = ["*.md", "scripts/vendor/diagram_design/"]
force-exclude = true
[tool.ruff.format]
docstring-code-format = false
docstring-code-line-length = "dynamic"
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.lint]
fixable = ["ALL"]
ignore = [
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"E501", # line too long, handled by ruff format
"S101", # use of assert detected (allow assert statements)
]
select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"PLC", # pylint conventions
"PTH", # flake8-use-pathlib
"RUF", # ruff-specific rules
"S", # bandit security rules
"SIM", # flake8-simplify
"T20", # flake8-print (no print statements)
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle warnings
"W191", # indentation contains tabs (explicit tab detection)
]
unfixable = []
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-first-party = ["phaze"]
lines-after-imports = 2
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
split-on-trailing-comma = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"scripts/parity/**" = ["T201"]
# Spike measurement harnesses. These are standalone, manually-run scripts whose ENTIRE output is
# what they print -- they are the evidence a spike doc cites, not library code (see
# docs/spikes/phaze-han03-essentia-seek.md). Same rationale as scripts/parity/**.
"docs/spikes/**" = ["T201"]
"services/**" = ["S603", "S607"]
"src/phaze/cli/**" = ["T201"]
"src/phaze/main.py" = ["T201"]
"tests/**" = ["T201", "PLC", "S105", "ARG001"]
[tool.uv] # nosemgrep: package_managers.uv.uv-missing-dependency-cooldown.uv-missing-dependency-cooldown
# The nosemgrep above MUST stay on this table-header line, not a separate line below it --
# semgrep only attaches a nosemgrep comment to a finding when it shares the finding's start
# line. A separate comment line here (the original, now-broken placement) silently stopped
# suppressing once a registry-side ruleset change altered the rule's match span, reddening CI
# on every PR (phaze-bq9cy). Verified empirically: moving the comment inline makes
# `semgrep scan --config auto --error` exit 0 with the finding shown as suppressed (SARIF
# `suppressions: [{"kind": "inSource"}]`); reverting to a following-line comment reproduces
# the red exit 1.
#
# NO dependency cooldown. Operator decision 2026-08-03: resolve every package at its latest
# published version rather than deferring adoption. The original exchange is no longer in the
# local transcripts, so the operator re-confirmed it on 2026-09-23 and bead phaze-bo0sm's comment
# is the durable record. Question as put: "...Did you make that decision?"; answer as given:
# "Yes, I decided it". The attribution covers this [tool.uv] no-cooldown policy and nothing wider.
#
# What this gives up, stated so nobody has to reconstruct it: a cooldown exists so a compromised
# release has time to be detected and yanked before it can enter a lockfile. This repo has already
# been on the receiving end of that class -- litellm is pinned `>=1.98.0,<1.99.0` because of the
# March 2026 supply-chain attack on 1.82.7/1.82.8. With no window, a malicious release published
# minutes ago is eligible the moment `uv lock` runs.
#
# The compensating controls that remain: pip-audit, osv-scanner, bandit and Trivy all run in CI on
# every PR, and `uv.lock` pins exact versions with hashes, so nothing changes without a reviewed
# lockfile diff. Those catch KNOWN-bad releases; they do not catch a fresh one in its first hours,
# which is precisely what the cooldown covered.
#
# The semgrep suppression above is deliberate and paired with this decision -- the rule hardcodes
# a 7-day recommendation, so it cannot express "no cooldown, knowingly". Re-adding a window means
# deleting the nosemgrep line, restoring `exclude-newer`, and re-raising COOLDOWN_DAYS in
# scripts/update-project.sh (which re-asserts it across manifests).
environments = [
# Only support Linux platforms that we build for in CI/CD
"sys_platform == 'linux' and platform_machine == 'x86_64'", # linux/amd64
"sys_platform == 'linux' and platform_machine == 'aarch64'", # linux/arm64
# Also support local development on macOS
"sys_platform == 'darwin' and platform_machine == 'x86_64'", # macOS Intel
"sys_platform == 'darwin' and platform_machine == 'arm64'", # macOS Apple Silicon
]
constraint-dependencies = [
# setuptools 82.0.1 carries PYSEC-2026-3447 (macOS APFS/HFS+ NFD filename bypasses an NFC
# MANIFEST.in exclude when packing an sdist); fixed in 83.0.0 (published 2026-07-04, already
# past the 2-day cooldown). setuptools is only a transitive test dependency (via moto), so
# floor it here to keep pip-audit clean without promoting it to a direct dependency.
"setuptools>=83.0.0",
]
[dependency-groups]
browser = [
"playwright==1.65.2",
]
dev = [
"bandit>=1.9.4",
# phaze-bp8h1 (seam C2): a real, independent third-party CUE parser -- the artifact
# `cue_generator.write_cue_file` produces (UTF-8 BOM, bare LF, 75fps INDEX) had never been
# read by anything but phaze's own substring/line-count assertions on the string it
# generated. Verified this build's ffmpeg (9.0.2, Homebrew) carries NO cue demuxer/format/
# protocol -- that "ffmpeg's cue demuxer is already a system dependency" belief does not
# hold in this environment. `cueparser` is pinned exactly (MIT, actively maintained --
# github.com/artur-shaik/CueParser, last release 2026-01-07); its sole dependency,
# python-dateutil, is already present transitively (via botocore), so this adds no new
# transitive footprint. Dev/test only -- never imported by src/phaze.
"cueparser==1.3.3",
"defusedxml>=0.7.1",
# Coverage tooling only (concurrency = ["greenlet"]). It is NOT the runtime greenlet: that comes from
# sqlalchemy[asyncio] in [project].dependencies, and this group never reaches the image.
"greenlet>=3.5.6",
"httpx>=0.29.0",
# phaze-frq98 (seam F1): validates `kube_staging.build_job_manifest`'s output against the REAL
# Kubernetes Job schema -- the vendored, OpenAPI-derived artifact under
# `tests/vendor/kubernetes-json-schema/`, which is the SAME artifact `kubeconform` consumes.
# Chosen over kubeconform deliberately: kubeconform IS a JSON-Schema validator over these files,
# so a Go binary in CI *and* on every dev machine buys nothing the schema does not already carry
# (and it would still need the schemas vendored for offline determinism). A pure-Python dev
# dependency needs no dev-side setup step at all -- `uv sync` already installs this group.
# NOTE: no JSON Schema catches a bad Quantity ("4GB", "500") -- k8s types those as plain strings.
# That is `services/k8s_quantity.py`'s job, at config load, and it is ADR-0012 (verification fidelity and operator attribution) G3 in miniature:
# this schema is DERIVED FROM the same OpenAPI the apiserver publishes, so validating against it
# proves the manifest's shape and says nothing about what the apiserver's own Quantity parser --
# the real consumer -- will accept. See ADR-0012 (verification fidelity and operator attribution) section 4, G3
# (`docs/design/0012-verification-fidelity-and-operator-attribution.md`).
"jsonschema>=4.26.0",
# Phase 53: S3 mock so the staging leg (presign/upload/delete) is testable without a
# live S3 backend or cluster. The [server] extra (flask/werkzeug) provides
# ThreadedMotoServer -- required because aiobotocore's async response parsing
# is incompatible with moto's in-process `mock_aws`, so the SDK must talk real HTTP to a
# wire-compatible moto server (this is what makes presigned-URL round-trips testable).
"moto[server]>=5.2.6",
"mypy>=2.4.1",
"pip-audit>=2.10.1",
"pre-commit>=4.7.0",
"pytest>=9.2.0",
"pytest-asyncio>=1.5.0",
"pytest-cov>=7.1.0",
"pytest-xdist>=3.8.0",
"respx>=0.23.1",
"ruff>=0.17.6",
"types-defusedxml>=0.7.0.20260504",
"vulture>=2.16",
]