You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2012a60
Browse filesBrowse the repository at this point in the historyBrowse files
feat: catch up the review base from the nearest saved ancestor
With no saved base for the merge base and no usable baseline committed
there, a review analyzed the merge base from scratch, even when a saved
analysis of a commit a few steps below it was sitting in the artifact store.
find-ancestor-base.sh lists the repository's artifacts once, keeps the
base analyses for this configuration that a run on the repository's own
code produced (the same provenance rule as fetch-state.sh), and walks the
merge base's first-parent history up to 100 commits, deepening the shallow
checkout. The first hit seeds an incremental catch-up to the merge base,
which is then published under the merge base's own name. Order: exact
artifact, committed at the merge base, nearest ancestor, full.
base_source=ancestor reports it, with base_from_sha and catchup_commits.
A compatible ancestor that exists only beyond the bound gives
base_reason=too_far_behind; a saved analysis of the merge base under
another configuration gives incompatible.
Sync uses the same lookup when the branch has no usable committed
baseline, so the first sync after the setup pull request merges catches
up from the base that pull request's review saved. FORCE_FULL is now
lowercased with tr, which also runs on the bash 3.2 macOS ships.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/COMMIT_STRATEGY.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,8 @@ never fires.
72
72
|`base_sha`| string | the base branch tip when the event fired — *not* what was compared against |
73
73
|`kind`| string | always `review`, so a reader can tell this artifact from a base or warm-start bundle |
74
74
|`analysed_files_changed`| string | analysed files whose content hash differs between base and head; `unknown` when the analyses cannot say |
75
-
|`base_source`| string | how this run obtained the base graph: `saved` (the artifact for the merge base), `committed` (`.codeboarding/` committed at the merge base, caught up), or `computed` (full analysis in this run) |
76
-
|`base_reason`| string | only with `computed`: `no_baseline` (nothing to seed from) or `incompatible` (a candidate existed but its depth cap differed, or the engine demanded a full run); empty otherwise |
75
+
|`base_source`| string | how this run obtained the base graph: `saved` (the artifact for the merge base), `committed` (`.codeboarding/` committed at the merge base, caught up), `ancestor` (the artifact of an older base-branch commit, caught up), or `computed` (full analysis in this run) |
76
+
|`base_reason`| string | only with `computed`: `no_baseline` (nothing to seed from), `incompatible` (a candidate existed but its depth cap or configuration differed, or the engine demanded a full run) or `too_far_behind` (the nearest saved ancestor is beyond the catch-up bound); empty otherwise |
77
77
|`base_from_sha`| string | the commit whose saved analysis seeded the base; the merge base for `saved`, empty for `computed` or when it lies beyond the fetched history |
78
78
|`catchup_commits`| string | first-parent commits from `base_from_sha` to the merge base that change anything outside `.codeboarding/`; `0` when exact, empty when unknown |
79
79
|`base_seconds`| string | wall time spent obtaining the base, the artifact lookup included |
@@ -109,14 +109,24 @@ them:
109
109
|---|---|
110
110
| the published `codeboarding-base-<cfg>-<merge_base>` artifact with a compatible depth cap | none |
111
111
| no usable artifact — check out the merge base, seed from a compatible baseline committed there, catch up | one incremental, full if Core requires it |
112
-
| no compatible committed baseline either | full analysis directly, at the configured `depth_cap`|
112
+
| no compatible committed baseline either: the nearest `codeboarding-base-<cfg>-<sha>` artifact among the merge base's last 100 first-parent ancestors | one incremental from that commit to the merge base |
113
+
| none within 100 commits either | full analysis directly, at the configured `depth_cap`|
113
114
114
115
A trusted run that computed the base publishes it, so the next pull request
115
-
forking from that commit gets the first row. The rows are `base_source``saved`,
116
-
`committed` and `computed` in the review metadata, and the review comment says
116
+
forking from that commit gets the first row; that includes a base caught up from
117
+
an ancestor. The rows are `base_source``saved`, `committed`, `ancestor` and
118
+
`computed` in the review metadata, and the review comment says
117
119
which one ran, with measured times. While a base is computed, the progress
118
120
comment says so in two steps, with the elapsed time and the reason.
119
121
122
+
The ancestor lookup lists the repository's artifacts once (up to 1,000, newest
123
+
first), keeps those named for this configuration and produced by a run on the
124
+
repository's own code, and walks the merge base's first-parent history, deepening
125
+
the shallow checkout to 101 commits. Sync uses the same lookup when the branch has
126
+
no usable committed baseline, so the first sync after the setup pull request
127
+
merges catches up from the base that pull request's review saved, instead of
128
+
analyzing from scratch.
129
+
120
130
The configuration hash includes `depth_cap`. The workflow input controls depth
121
131
for both fresh and fallback analyses; stored legacy depth values never override it.
0 commit comments