delimit_ledger_auto_cancel_stale
Archives open ledger items dormant beyond a stale-TTL threshold (default 60 days). Use as nightly automation; dry_run=True returns plan, False applies archive.
Instructions
Auto-archive open ledger items dormant past the stale-TTL threshold.
When to use: as nightly automation / scripted cleanup to retire items that have gone quiet past a strict threshold (default 60 days). When NOT to use: to merely surface stale candidates without applying (use delimit_ledger_groom which is propose-only and uses a softer 30-day default), to inspect ledger health (use delimit_ledger_health), or to auto-close items mirrored from external repos (delimit_ledger_auto_close_external).
Sibling contrast: delimit_ledger_groom proposes archives with a softer threshold and never applies; delimit_ledger_auto_close_external targets externally-mirrored items; delimit_ledger_bulk is the underlying bulk-action surface; this composes the stale-detector with bulk_action(archive) on a stricter dormancy threshold.
Side effects: with dry_run=False, archives matching items via bulk_action(archive). Items are never hard-deleted — the JSONL append-only log retains the full record. With dry_run=True (default), returns the plan only.
LED-1145 Phase 2 #4.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| venture | No | Project name or path. Auto-detects if empty. | |
| threshold_days | No | dormancy threshold in days. 0 = read default (60 from STALE_TTL_DEFAULT_DAYS or DELIMIT_STALE_TTL_DAYS env). Pass an int to override. | |
| dry_run | No | True (default) returns the plan; False applies via bulk_action(archive). | |
| max_items | No | cap items processed per call. When the candidate list exceeds this, response includes truncated=True so the caller can run again to drain. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||