feat: add repo_commits_total to the AI security-context schema
Merged
MA
1d ago+13+13+01234567890123456789-1-1-0123456789
Refs PFM-8068
Summary
Adds an optional repo_commits_total integer to the scan_stats definition of the AI security-context 0.1 JSON Schema. It records the number of commits reachable from the scanned revision, the denominator a consumer needs to render scan progress as "N of M commits" or a percentage, which it cannot compute without git access to the repository.
The field is additive and optional:
- Existing artifacts that omit it still validate.
additionalProperties: falseand thescan_statsrequired set are unchanged.- The schema stays at version
0.1;$idis unchanged.
The Go decoder ScanStats struct mirrors the new field. This change must be released before any producer starts emitting the field.