Skip to content

Add validate-strict CI workflow#89

Merged
realmarcin merged 2 commits into
mainfrom
ci/validate-strict-workflow
May 26, 2026
Merged

Add validate-strict CI workflow#89
realmarcin merged 2 commits into
mainfrom
ci/validate-strict-workflow

Conversation

@realmarcin
Copy link
Copy Markdown
Contributor

Summary

Locks in the 0-error closed-schema baseline established across PRs #84-#88 so it can't silently regress on future merges. Mirrors the qc.yaml workflow shipped to TraitMech #77 and matches the CommunityMech runner conventions (Python 3.10, `uv sync --all-extras`).

Runs three checks on every PR touching schema/data/source/scripts:

  • `just validate-strict` — closed-schema LinkML walk over kb/communities/
  • `just audit-writers` — writer-script inventory + safety-flag matrix
  • `pytest tests/ -q --no-cov` — unit-test suite

Uploads `reports/instance_validation_failures.tsv` + `reports/pipeline_writers_audit.tsv` as artifacts.

Scope

Narrower than `just qc` — the existing `network-quality.yml` already covers the network-integrity audit. The new workflow specifically gates the fast closed-schema + writer-audit + unit-test loop, which can run on every PR without becoming a bottleneck.

Test plan

  • Workflow yaml is valid.
  • (Verified post-merge) Workflow runs and passes on this PR.

🤖 Generated with Claude Code

Locks in the 0-error closed-schema baseline established across PRs
#84-#88 so it can't silently regress on future merges. Mirrors the
qc.yaml workflow shipped to TraitMech in PR #77 and adapted for the
CommunityMech runner conventions.

Runs `just validate-strict` + `just audit-writers` + `pytest tests/`
on PRs touching kb/communities/, schema, source, scripts, justfile,
or this workflow. Uploads the categorized TSV reports as workflow
artifacts so reviewers can inspect failures without re-running
locally.

Deliberately scoped narrower than `just qc` — the existing
network-quality.yml handles the network-integrity audit; this new
workflow specifically gates closed-schema validation + writer audit
+ unit tests, which are fast and run on every PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 26, 2026 02:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated GitHub Actions workflow to continuously enforce the repo’s “0 closed-schema errors” baseline and writer-safety checks, ensuring strict schema validation and the writer audit can’t silently regress on future PRs.

Changes:

  • Introduces validate-strict CI workflow triggered on relevant PR changes (schema/data/scripts/code).
  • Runs just validate-strict, just audit-writers, and pytest in CI.
  • Uploads strict-validation + writer-audit TSV reports as build artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/validate-strict.yaml Outdated
Comment thread .github/workflows/validate-strict.yaml
Comment thread .github/workflows/validate-strict.yaml Outdated
Three findings, all addressed:

- Path globs: \`**.py\` doesn't actually match nested subdirs in
  GitHub Actions glob semantics — it behaves like \`*.py\`. Switch
  to \`**/*.py\` so changes under src/communitymech/<subpkg>/ (like
  network/, validators/, embedding/) trigger the workflow.
- Push trigger had no \`paths:\` filter, so the workflow ran on
  every commit to main. Mirror the pull_request path list via a
  YAML anchor (&trigger_paths + *trigger_paths) so the two stay in
  sync.
- uv sync: switch to \`--frozen --all-extras\` so the workflow fails
  if uv.lock is stale (instead of silently re-resolving) while
  keeping the dev/test extras the existing network-quality.yml
  uses. Also added uv.lock + tests/**/*.py to the trigger paths so
  dependency and test changes re-run the workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@realmarcin realmarcin merged commit 847d0a4 into main May 26, 2026
1 check passed
@realmarcin realmarcin deleted the ci/validate-strict-workflow branch May 26, 2026 02:42
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.

2 participants