Skip to content

fix(ci): workflow path verification, stale legacy path cleanup, integration smoke test#10

Open
amar-python wants to merge 1 commit into
feature/schema-validationfrom
fix/ci-infrastructure-stability
Open

fix(ci): workflow path verification, stale legacy path cleanup, integration smoke test#10
amar-python wants to merge 1 commit into
feature/schema-validationfrom
fix/ci-infrastructure-stability

Conversation

@amar-python

Copy link
Copy Markdown
Owner

CI & Infrastructure Stability (High Priority)

Based on feature/schema-validation (PR #7) since that branch contains the restructured backend/ layout these fixes target. Merging PR #7 first will bring these changes into main cleanly.

1. Workflow Path Verification

  • New tools/verify_workflow_paths.py — stdlib-only checker that parses every .github/workflows/*.yml, extracts file/directory references from run: commands and local uses: actions, and exits non-zero if any reference no longer exists in the working tree. Prevents the "repo restructured but CI still points at old paths" failure class permanently.
  • New validation CI job staged in docs/ci/quality-gate.yml that runs the checker on every push/PR.
    • ⚠️ Maintainer action needed: the CI bot has no workflows permission, so the updated workflow is staged in docs/ci/quality-gate.yml (the repo's existing convention). Please copy it to .github/workflows/quality-gate.yml when merging.

2. Global Path Update (stale legacy roots → backend/migration/…)

Fixed all remaining references to the pre-restructure locations (tests/, build/, evals/):

  • scripts/eval_list.py, scripts/eval_summary.py, scripts/eval_compare.pyREPORTS_DIR pointed at the non-existent root evals/reports/; now backend/migration/evals/reports/ (matches where runner.py actually writes)
  • scripts/run_qa.ps1 — all pytest/coverage/lint targets updated
  • scripts/test.sh, scripts/test.ps1 — layer 2/3 runner paths updated
  • preflight.sh, preflight.ps1 — project-root existence checks updated
  • Correctly-pointing paths (Makefile, lint.sh, health_check.py, select_tests.py) were left untouched.

3. Integration Smoke Test

  • New backend/tests/integration/test_smoke.py — asserts GET /api/health returns 200 OK (plus payload shape and root-route checks), marked @pytest.mark.integration, runs on the existing SQLite-backed pytest fixtures.

Verification

  • python3 tools/verify_workflow_paths.py --verbose → 8 references checked, all resolve ✔ (and correctly fails on a synthetic stale workflow)
  • pytest backend/tests/41 passed (38 existing + 3 new)
  • bash -n clean on all touched shell scripts; preflight.sh passes its project-file checks
  • flake8 clean on the new tool

Checklist

  • Tests added
  • Verified workflow paths

…ration smoke test

- Add tools/verify_workflow_paths.py: stdlib-only checker that parses
  .github/workflows/*.yml and fails if any run:/uses: reference points
  at a file or directory that no longer exists
- Stage a 'validation' job in docs/ci/quality-gate.yml that runs the
  checker (maintainer must copy to .github/workflows/ — the CI bot has
  no 'workflows' permission)
- Fix stale legacy root paths (tests/, build/, evals/) left behind by
  the backend/migration restructure in scripts/eval_list.py,
  eval_summary.py, eval_compare.py, run_qa.ps1, test.sh, test.ps1,
  preflight.sh, preflight.ps1
- Add backend/tests/integration/test_smoke.py asserting /api/health
  returns 200 OK
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