data/value/validation.csv is the git/GitHub validation audit table. It
rolls up the two validation caches and decides, per validation target,
whether a repo's resolved URL is real and reachable. It is the audit trail
behind the git_valid column of data/value/value.csv: it
records which cache verdict applied, when the check ran, and which ecosystems
point at the target. build_validation joins that verdict back onto every
value row.
Grain: one row per target, not per repo. A target is a GitHub
owner/repo slug (type github_repo) or a non-GitHub clone URL (type
git_url). Value rows that share a target union their ecosystems into its
sources column.
Built by src/value/build_validation.py,
which runs as the validation step of the value pipeline runner — after
unify, and before openssf-crit, eco-crit and criticality.
It does one piece of network I/O: before rolling up, it refreshes the
non-GitHub git ls-remote reachability cache (data/sources/git/urls.csv,
TTL 365 days). The TTL makes a warm re-run a no-op; --refresh forces
a re-check regardless of age. It never touches the GitHub cache
(data/sources/github/repos.csv) — that is the GitHub Repos API record
maintained by src.sources.github.fetch_repo_owner_data and refreshed by the
earlier resolve step.
Steps:
- Collect targets from
data/value/value.csv. For each value row,_row_targetpicks a single target: the row'sreposlug (typegithub_repo) when itsplatform == github, else its canonicalized non-GitHubgit_url(typegit_url). The GitHub branch wins, so a GitHub row's derivedgit_urlis never double-counted. A row with neither is an orphan and contributes no target. Each target accumulates thesources— the ecosystems (from each row'secosystemscolumn) whose packages resolve to it. - Load verdicts from the two caches:
data/sources/github/repos.csv—valid+fetched_at, keyed by both the queriedreposlug and the rename-resolvedfull_name(so a value row holding either form resolves).validis parsed case-insensitively.data/sources/git/urls.csv—valid+checked_at, keyed byurl.
- Apply override pins from
data/value/overrides.csv. A row there may pin a target's validity via itsvalidcolumn (True/False). The pin resolves to the override'srepotarget, else itsgit_urltarget, and overrides whatever the cache said (itschecked_atbecomes the literal stringoverride). Two kinds of pin resolve to no target and are dropped: acanonical_url-only row is skipped silently — it declares "this project has no git upstream", so having no git target is correct — while a row with norepo,git_urlorcanonical_urlat all is a misconfiguration and prints a warning. - Hard gate: every collected target must have a verdict. If any target has
none, the step raises
SystemExitlisting the offenders and refusing to write — a missing verdict is treated as a pipeline error, never silently invalid (see Refreshing below). - Write
validation.csv(sorted bytype, thentarget) and join the per-target verdict back into thegit_validcolumn ofvalue.csv.
The same verdicts produce two columns. In validation.csv, valid is the
cache verdict (or override pin) for one target. In value.csv, git_valid is
the per-row projection of that verdict, set by join_valid. git_valid is
host-agnostic: a reachable non-GitHub upstream (sourceware / savannah / a
GitLab host / …) is valid on its own, not only a GitHub repo.
git_valid |
Meaning | How derived |
|---|---|---|
True |
The repo's upstream is real/reachable. | The row's target verdict is True (GitHub Repos API for platform == github rows, git ls-remote for non-GitHub git_url rows) — or the row carries a GitLab gl/ repo_id, which is itself a validity proof: the resolver only assigns it after the GitLab project API confirmed the project exists, more authoritative than git ls-remote (which can fail on hosts like salsa.debian.org even for live projects). This keeps the repo_id ⇒ git_valid invariant. |
False |
No reachable upstream. | Orphan rows (no target at all — nothing to validate), a target whose reachability check failed, or a github repo that 404s. |
Every non-orphan value row's git_valid traces to exactly one
validation.csv row, matched by target + type. gl/-id rows are the
exception: they are True whatever their git_url target's ls-remote verdict
says.
A valid non-GitHub upstream does not enter the risk / eligibility scope.
load_top_repos still filters to the platforms in settings.json → top_repos; git_valid only records that the URL resolves.
| Column | Description |
|---|---|
target |
The validated identity: a lowercase GitHub owner/repo slug, or a non-GitHub clone URL. |
type |
github_repo (validated via the GitHub Repos API) or git_url (validated via git ls-remote). |
sources |
Comma-separated, sorted list of ecosystems (npm, pypi, crates, cpp) whose packages resolve to this target. |
checked_at |
When the verdict was produced: the cache's fetched_at (GitHub) / checked_at (git), or the literal override when pinned via overrides.csv. |
valid |
True/False — whether the target was found real/reachable. |
scripts/run-pipeline.sh is the only supported entry point. Run the
validation step alone to rebuild validation.csv and re-join git_valid
onto value.csv. The step refreshes stale ls-remote entries first — its only
network I/O.
scripts/run-pipeline.sh --stage value --only validation
scripts/run-pipeline.sh --stage value --only validation --refresh # re-check URLsThe resolve step refreshes the GitHub cache
(data/sources/github/repos.csv), so to refresh everything run the rollup (or
the whole value pipeline). It wires the steps in order — eco-fetch →
canonical → resolve → unify → validation → openssf-crit →
eco-crit → criticality:
uv run python -m src.value.run_value_pipeline --rollupPrerequisite:
build_validationwill not invent verdicts. If a target invalue.csvhas no entry in either cache, the hard gate aborts the build with the message "Runuv run python -m src.value.run_value_pipeline --rollupfirst." — run that (or the full pipeline) to populate the caches, then rebuild.