feat: add repo_commits_total to the AI security-context schema

Merged
MA
1d ago
+13-1

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: false and the scan_stats required set are unchanged.
  • The schema stays at version 0.1; $id is unchanged.

The Go decoder ScanStats struct mirrors the new field. This change must be released before any producer starts emitting the field.