Skip to content

Provide local scoped validation script #255391

@tylersmalley

Description

@tylersmalley

Today, pre-CI validation is inconsistent across tools and often slower than necessary.

This meta issue defines a shared validation contract so humans and LLMs can run fast local checks and then escalate to branch/PR/full validation with predictable behavior.

Goals

  • Make fast local validation the default for iteration.
  • Standardize change scope and test selection across tools.
  • Provide clear escalation from local checks to PR-equivalent and full validation.
  • Ensure CI failures include exact local reproduction commands.

Common contract

  • --scope <staged|local|branch(default)|full>
  • --test-mode <related|affected(default)|all>
  • --base-ref <git-ref> (for branch)
  • --head-ref <git-ref> (default HEAD)
  • --downstream <none(default)|direct|deep>
  • --profile <precommit|quick|agent|branch|pr|full>
  • --verbose

Scope definitions

  • staged: files in the git index.
  • local: local changes vs HEAD (staged + unstaged + optional untracked).
  • branch: changes since merge-base with base branch.
  • full: no scoping.

Test-mode definitions

  • related: run tests related to scoped changed files (e.g. Jest --findRelatedTests).
  • affected: run tests for projects/packages affected by scoped changes.
  • all: run all tests for selected configs/projects.

Profile defaults

  1. precommit: scope=staged, test-mode=related, downstream=none
  2. quick: scope=local, test-mode=related, downstream=none
  3. agent: scope=local, test-mode=related, downstream=none (same as quick)
  4. branch: scope=branch, test-mode=affected, downstream=none
  5. pr: scope=branch, test-mode=affected, downstream=deep
  6. full: scope=full, test-mode=all, downstream=none

Notes

  • Explicit flags override profile defaults.
  • check_changes should accept this contract and orchestrate underlying tools.
  • Tools should also accept the same shared flags when run directly.
  • Tool-specific flags remain optional overrides.

Related:

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions