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:
-
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.
-
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.
Problem
docs/json-contracts.md:72–73reads:This is wrong on two counts:
Unit is bundles, not files. The code at
app.pyusesRetentionPolicy(max_bundles=_JSON_DEFAULT_MAX_LOG_FILES). A bundle is a per-run directory containing the log file plusrun.jsonmetadata. The unit "files" is imprecise and misleading — 20 bundles ≠ 20 log files in directory trees that also contain metadata.max_log_filesis the legacy API.max_log_filesonApp.__init__is a compatibility shim for consumers who have not yet migrated toRetentionPolicy. The modern API isApp(retention=RetentionPolicy(...)). Pointing JSON-mode users atmax_log_filessteers them toward the deprecated path.Fix
Replace with: