Skip to content

json-contracts.md says "20 files" — should be "20 run bundles" and drop legacy max_log_files reference #126

Description

@codeforester

Problem

docs/json-contracts.md:72–73 reads:

bounds default-log retention to the most recent 20 files (or the explicit max_log_files setting).

This is wrong on two counts:

  1. Unit is bundles, not files. The code at app.py uses RetentionPolicy(max_bundles=_JSON_DEFAULT_MAX_LOG_FILES). A bundle is a per-run directory containing the log file plus run.json metadata. The unit "files" is imprecise and misleading — 20 bundles ≠ 20 log files in directory trees that also contain metadata.

  2. max_log_files is the legacy API. max_log_files on App.__init__ is a compatibility shim for consumers who have not yet migrated to RetentionPolicy. The modern API is App(retention=RetentionPolicy(...)). Pointing JSON-mode users at max_log_files steers them toward the deprecated path.

Fix

Replace with:

bounds default-log retention to the most recent 20 run bundles. Pass an explicit RetentionPolicy to the App to override the limit, the maximum age, or the total cache size.

Metadata

Metadata

Assignees

Labels

documentationDocumentation improvements

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions