diff --git a/README.md b/README.md index 192e980..7f22026 100644 --- a/README.md +++ b/README.md @@ -423,7 +423,7 @@ The update runs after the baseline is saved, stops itself after 10 minutes and n | `depth_cap` | both | `2` | Positive integer maximum analysis depth, including full-analysis fallbacks. Changing it rebuilds incompatible state. | | `github_token` | both | `${{ github.token }}` | Token for comments and sync delivery. | | `codeboarding_analysis_location` | both | `codeboarding_branch` | Where the synced branch's analysis is stored: `codeboarding_branch` (on `codeboarding/baseline`, for the default branch; the code is never written) or `in_place` (committed as `.codeboarding/` on the synced branch). Sync saves it there and review reads it from there. | -| `warmstart_retention_days` | review | `1` | Days to keep the reusable analysis. Only the next run reads it. | +| `warmstart_retention_days` | review | `5` | Days to keep the reusable analysis. Only the next run reads it; a pull request idle for longer re-derives from the base. | | `review_guide_url` | both | `https://jxivqwx4or6oip3krgdmdaiunm0iaybf.lambda-url.us-east-1.on.aws/` | Experimental. Shared base URL for `/v1/review-guide`, `/v1/architecture` and `/v1/merge-risk`, and for sync's `/v1/briefing` when `problem_history` is on. Saves `review_guide.json`, `closed/architecture.json`, `closed/merge_risk.json` and the guide's request (`closed/bundle.json.xz`) in the review artifact. Set to `''` to disable them all. Never fails the run. | | `closed_features_source` | review | `true` | Whether architecture checks may read this repository's source. Only the architecture request carries it, capped in size, and the service keeps nothing. The model sees code around a finding, never the tree. With `false`, source-dependent checks and model review do not run, and the result says so; merge risk sends the changed files' paths and line counts without their patches. It does not change what the review guide's request carries. | | `problem_history` | sync | `false` | Opt-in. With `'true'`, each sync sends this repository's issues and merged pull requests to `review_guide_url` and commits the returned problem list as `problems.json` on the orphan branch `codeboarding/briefing`. Needs `contents: write`, `issues: read`, `pull-requests: read`, `actions: read` and `id-token: write` on the sync job. See [Problem history](#problem-history). Never fails the run. | diff --git a/action.yml b/action.yml index 682314f..cbd9818 100644 --- a/action.yml +++ b/action.yml @@ -191,9 +191,9 @@ inputs: required: false default: 'codeboarding_branch' warmstart_retention_days: - description: 'Days to keep the reusable analysis. Only the next run reads it.' + description: 'Days to keep the reusable analysis. Only the next run reads it; a pull request idle for longer re-derives from the base.' required: false - default: '1' + default: '5' # Deprecated inputs. scripts/action/old_api_migrator.sh is the only reader. target_branch: description: 'Deprecated: sync analyzes the branch the run is on. Accepted only when it names that branch.' diff --git a/docs/COMMIT_STRATEGY.md b/docs/COMMIT_STRATEGY.md index 49d5712..9e80f7e 100644 --- a/docs/COMMIT_STRATEGY.md +++ b/docs/COMMIT_STRATEGY.md @@ -30,7 +30,7 @@ cache was free. Retention is the lever — see below. |---|---|---|---| | `codeboarding-review--` | `analysis.json`, `health_report.json`, `metadata.json` | 14 days | the webview, humans | | `codeboarding-base--` | the merge base's own analysis | 30 days, renewed while still referenced | any later review forking from that commit | -| `codeboarding-warmstart--pr` | the working directory: graph, pickle, fingerprint, gate | **1 day**, configurable | only the next run of that pull request | +| `codeboarding-warmstart--pr` | the working directory: graph, pickle, fingerprint, gate | **5 days**, configurable | only the next run of that pull request | Bundles carry analysis state, not the engine's scratch: run logs and lock files are stripped before publication, since no reader inflates them and every fetch @@ -91,10 +91,12 @@ them: - **30 days** for a base graph, which must outlive every review that names it. The renewal threshold is the review's own retention, so the surplus — 16 days here — is how long a base is reused before being republished. -- **1 day** for the warm-start bundle, since only the next run reads it. This is - `warmstart_retention_days` if a repository wants longer. It behaves like the - old cache eviction: a pull request left alone longer than the window - re-derives from the base. +- **5 days** for the warm-start bundle. Only the next run reads it, but a pull + request left alone longer than the window re-derives from the base, and that + run re-analyzes every file the pull request changed rather than the last push. + One day lost the chain over every weekend and every pause in review. Each push + stores its own copy (about 1.4 MB on a mid-size repository) until it expires, + so the cost is pushes × days. This is `warmstart_retention_days`. ## How a review resolves its two graphs