Skip to content

Commit c0d7ea3

Browse files
fix: keep the review warm-start analysis for 5 days (#183)
The warm-start bundle is how a push re-analyzes only what changed since the previous push. At one day it expired over every weekend and every pause in review, and the next run re-derived from the base: every file the pull request changed, plus the LLM updates for all of them, instead of the last push. Each push stores its own copy (about 1.4 MB on a mid-size repository) until it expires, so the cost grows with pushes times days, which stays in the tens of MB for a busy repository. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a589358 commit c0d7ea3

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ The update runs after the baseline is saved, stops itself after 10 minutes and n
423423
| `depth_cap` | both | `2` | Positive integer maximum analysis depth, including full-analysis fallbacks. Changing it rebuilds incompatible state. |
424424
| `github_token` | both | `${{ github.token }}` | Token for comments and sync delivery. |
425425
| `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. |
426-
| `warmstart_retention_days` | review | `1` | Days to keep the reusable analysis. Only the next run reads it. |
426+
| `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. |
427427
| `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. |
428428
| `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. |
429429
| `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. |

‎action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ inputs:
191191
required: false
192192
default: 'codeboarding_branch'
193193
warmstart_retention_days:
194-
description: 'Days to keep the reusable analysis. Only the next run reads it.'
194+
description: 'Days to keep the reusable analysis. Only the next run reads it; a pull request idle for longer re-derives from the base.'
195195
required: false
196-
default: '1'
196+
default: '5'
197197
# Deprecated inputs. scripts/action/old_api_migrator.sh is the only reader.
198198
target_branch:
199199
description: 'Deprecated: sync analyzes the branch the run is on. Accepted only when it names that branch.'

‎docs/COMMIT_STRATEGY.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cache was free. Retention is the lever — see below.
3030
|---|---|---|---|
3131
| `codeboarding-review-<run>-<attempt>` | `analysis.json`, `health_report.json`, `metadata.json` | 14 days | the webview, humans |
3232
| `codeboarding-base-<cfg>-<merge_base>` | the merge base's own analysis | 30 days, renewed while still referenced | any later review forking from that commit |
33-
| `codeboarding-warmstart-<cfg>-pr<N>` | the working directory: graph, pickle, fingerprint, gate | **1 day**, configurable | only the next run of that pull request |
33+
| `codeboarding-warmstart-<cfg>-pr<N>` | the working directory: graph, pickle, fingerprint, gate | **5 days**, configurable | only the next run of that pull request |
3434

3535
Bundles carry analysis state, not the engine's scratch: run logs and lock files
3636
are stripped before publication, since no reader inflates them and every fetch
@@ -91,10 +91,12 @@ them:
9191
- **30 days** for a base graph, which must outlive every review that names it.
9292
The renewal threshold is the review's own retention, so the surplus — 16 days
9393
here — is how long a base is reused before being republished.
94-
- **1 day** for the warm-start bundle, since only the next run reads it. This is
95-
`warmstart_retention_days` if a repository wants longer. It behaves like the
96-
old cache eviction: a pull request left alone longer than the window
97-
re-derives from the base.
94+
- **5 days** for the warm-start bundle. Only the next run reads it, but a pull
95+
request left alone longer than the window re-derives from the base, and that
96+
run re-analyzes every file the pull request changed rather than the last push.
97+
One day lost the chain over every weekend and every pause in review. Each push
98+
stores its own copy (about 1.4 MB on a mid-size repository) until it expires,
99+
so the cost is pushes × days. This is `warmstart_retention_days`.
98100

99101
## How a review resolves its two graphs
100102

0 commit comments

Comments
 (0)