Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/catalog-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ through lifecycle metadata rather than deleting members.

## v1 evidence

The audit tool reads either schema-v1 or schema-v2 result files and emits stable
The audit tool reads either schema version 1 or schema version 2 result files and emits stable
JSON and Markdown solve-count reports:

```bash
Expand Down
6 changes: 3 additions & 3 deletions scripts/v1_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def _v1_records(data: Mapping[str, Any], path: pathlib.Path) -> Iterable[dict[st
}


def _v2_records(data: Mapping[str, Any], path: pathlib.Path) -> Iterable[dict[str, Any]]:
def _schema_v2_records(data: Mapping[str, Any], path: pathlib.Path) -> Iterable[dict[str, Any]]:
file_user = data.get("user")
records = data.get("results")
if not isinstance(records, list):
raise AuditError(f"{path}: v2 file requires results array")
raise AuditError(f"{path}: schema version 2 file requires results array")
for index, record in enumerate(records):
if not isinstance(record, dict):
raise AuditError(f"{path}: results[{index}] must be an object")
Expand Down Expand Up @@ -87,7 +87,7 @@ def load_records(results_dir: pathlib.Path) -> tuple[list[dict[str, Any]], int]:
if version == 1:
loaded = _v1_records(data, path)
elif version == 2:
loaded = _v2_records(data, path)
loaded = _schema_v2_records(data, path)
else:
raise AuditError(f"{path}: unsupported schema_version {version!r}")
for record in loaded:
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test_v1_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


class V1AuditTest(unittest.TestCase):
def test_v1_and_v2_records_produce_deterministic_evidence(self):
def test_schema_v1_and_schema_v2_records_produce_deterministic_evidence(self):
with tempfile.TemporaryDirectory() as directory:
results = pathlib.Path(directory)
(results / "v1.json").write_text(json.dumps({
Expand Down