Skip to content

ci(v1-api): MOCK_POSE_DATA + declare psutil — green Performance Tests & API Docs#911

Merged
ruvnet merged 2 commits into
mainfrom
fix/ci-v1-api-mock-mode
Jun 2, 2026
Merged

ci(v1-api): MOCK_POSE_DATA + declare psutil — green Performance Tests & API Docs#911
ruvnet merged 2 commits into
mainfrom
fix/ci-v1-api-mock-mode

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Jun 2, 2026

Follow-up to #910 (v1 API startup crash fix). Two more reasons the main-only v1-API CI jobs failed, now fixed:

  1. API Documentation failed with ModuleNotFoundError: No module named 'psutil' — psutil is imported by health.py/metrics.py/status.py/monitoring.py but was never declared; it only worked where locust (Performance Tests) pulled it in transitively. Declared psutil>=5.9.0 in requirements.txt. Verified from src.api.main import app; app.openapi() now generates the spec (26 paths).
  2. Performance Tests hit the pose endpoints which error without CSI hardware. Set MOCK_POSE_DATA=true on both jobs so they exercise the mock path.

Together with #910 these should green the v1-API CI jobs (which only run on push to main, so they'll be exercised once this merges).

The PR-level CI red has been transient Docker Hub pull timeouts (infra), not these changes.

🤖 Generated with claude-flow

ruvnet added 2 commits June 2, 2026 12:04
After the DensePoseHead startup fix (#910), the v1 API starts, but the
Performance Tests load-hit the pose endpoints which error "requires real
CSI data" (no hardware in CI, mock_pose_data defaults False), and the
API-docs job imports the app the same way. Set MOCK_POSE_DATA=true on both
jobs so they exercise the mock path. Verified: the env var maps to
settings.mock_pose_data=True (pydantic, no env_prefix).

(Note: Performance Tests is continue-on-error so this is cleanup, not a
run-blocker; the run-level red on main has been transient Docker Hub pull
timeouts on Tests/docker-build, which are infra flakes that pass on re-run.)
…on CI

The API Documentation job (and any env without locust) failed with
`ModuleNotFoundError: No module named 'psutil'` when importing the app:
psutil is imported by src/api/routers/health.py, services/metrics.py,
commands/status.py, and tasks/monitoring.py, but was never declared as a
dependency — it only happened to be present where locust (Performance
Tests) pulled it in transitively. Declare it explicitly (psutil>=5.9.0).

Verified locally: `from src.api.main import app; app.openapi()` (the exact
docs-job operation) now succeeds.
@ruvnet ruvnet changed the title ci(v1-api): MOCK_POSE_DATA=true for Performance Tests + API Docs ci(v1-api): MOCK_POSE_DATA + declare psutil — green Performance Tests & API Docs Jun 2, 2026
@ruvnet ruvnet merged commit 5038e3c into main Jun 2, 2026
20 checks passed
github-actions Bot pushed a commit to zenhara/RuView that referenced this pull request Jun 2, 2026
…pi-mock-mode

ci(v1-api): MOCK_POSE_DATA + declare psutil — green Performance Tests & API Docs 5038e3c
pull Bot pushed a commit to jw5812018/RuView that referenced this pull request Jun 2, 2026
Two more latent v1-API CI bugs surfaced once ruvnet#910/ruvnet#911 let the jobs reach
their later steps:

- API Documentation: openapi generation now succeeds (psutil fix), but the
  gh-pages deploy failed with HTTP 403 — the job had no `permissions` block
  and GITHUB_TOKEN is read-only by default. Add `permissions: contents:
  write`, and make the deploy `continue-on-error` (the openapi generation is
  the real validation; Pages may be disabled).
- Performance Tests: ran `locust -f tests/performance/locustfile.py`, but
  there is no locustfile — the suite is pytest (test_api_throughput.py,
  test_frame_budget.py, test_inference_speed.py). Run pytest instead, with
  working-directory: archive/v1 and MOCK_POSE_DATA=true.

ci.yml validated as well-formed YAML.
ruvnet added a commit that referenced this pull request Jun 2, 2026
…#914)

The Performance Tests job collected 26 items then aborted with
`ModuleNotFoundError: No module named 'src'` on test_frame_budget.py,
which does `from src.core.csi_processor import CSIProcessor`. The bare
`pytest` console script does not put the cwd (archive/v1) on sys.path;
`python -m pytest` does. pytest aborts the whole session on a collection
error, so this one import masked the entire (otherwise mock-based,
self-contained) perf suite.

Verified locally: bare-script path reproduces the exact error; `-m`
resolves it and test_frame_budget.py passes 3/3. The other two files
(test_api_throughput.py mock server, test_inference_speed.py MockPoseModel
+psutil) are fully self-contained — no test hits the running server.

Closes the last red job in the v1-API CI chain (#910/#911/#913).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant