Skip to content

perf(validate): scope PR validation to the changed records - #116

Merged
Seungpyo1007 merged 2 commits into
mainfrom
perf/validate-scoped
Sep 30, 2026
Merged

Seungpyo1007 merged 2 commits into
mainfrom
perf/validate-scoped

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Step 4 of GetTechAPI/TechAPI#350.

  • python -m app.validate --changed-since BASE: loads changed files + whole brand/soc/cpu/gpu (FK targets). Full run unchanged when the flag is absent.
  • Uniqueness of a changed slug is checked against all file names in the category (names only, no JSON parse); a clash where filename != slug is only caught by the full run.
  • Reusable validate-data.yml gains optional base-sha; shallow checkout + deepen to merge base.
  • Known gap: deleting a brand/soc/cpu/gpu that an unchanged record references is only caught by the full run (push to develop/main). The TechAPI caller will pass base-sha for PRs only.
  • Tests: new tests/unit/test_validate_scoped.py.

`app.validate --changed-since BASE` loads only the records changed since BASE
plus the whole brand/soc/cpu/gpu sets that others reference, so a PR touching a
few files no longer parses ~190k. Slug uniqueness for changed records is checked
against every existing file name in the category (no JSON parsing). The reusable
validate-data workflow takes an optional `base-sha` and uses it with a shallow
checkout; without it the full run is unchanged.

Refs GetTechAPI/TechAPI#350
@Seungpyo1007
Seungpyo1007 merged commit 3d63733 into main Sep 30, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the perf/validate-scoped branch September 30, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant