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 3ca8dc1
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 walks the merge base's first-parent history up to
100 commits, deepening the shallow checkout, then pages through the
artifact listing newest first, keeping base analyses for this
configuration that a run on the repository's own code produced (the same
provenance rule as fetch-state.sh). It stops at the first page holding a
walked commit (50 pages at most; one or two calls in practice, and only on
a run that would otherwise analyze from scratch). The nearest 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. Seeding keeps the merge base's own
.codeboardingignore and health configuration.
Reported as base_analysis_method=incremental, the reason naming the
ancestor and the commits caught up. A saved analysis of the merge base
under another configuration makes a full run's reason "incompatible";
anything else is "no usable analysis was available". There is no separate
"too far behind" reason: proving it took compare API calls that only
changed the wording.
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
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ 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_analysis_method`| string | how this run obtained the analysis of the merge base: `reused` (the merge base already had one: its saved artifact, or a committed baseline with nothing to catch up), `incremental` (an earlier commit's analysis updated to the merge base) or `full` (analyzed from scratch in this run). Whichever, the base graph is the merge base's own analysis |
75
+
|`base_analysis_method`| string | how this run obtained the analysis of the merge base: `reused` (the merge base already had one: its saved artifact, or a committed baseline with nothing to catch up), `incremental` (an earlier commit's analysis, committed or saved, updated to the merge base) or `full` (analyzed from scratch in this run). Whichever, the base graph is the merge base's own analysis |
76
76
|`base_analysis_reason`| string | the method in words, e.g. `updated the analysis of 9f8e7d6 to a1b2c3d, 4 commits caught up`; where an incremental run started and how far it caught up are detail here, present when known |
77
77
|`base_seconds`| string | wall time spent obtaining the base, the artifact lookup included |
78
78
|`head_seconds`| string | wall time of the head analysis |
@@ -107,15 +107,29 @@ them:
107
107
|---|---|
108
108
| the published `codeboarding-base-<cfg>-<merge_base>` artifact with a compatible depth cap | none |
109
109
| no usable artifact — check out the merge base, seed from a compatible baseline committed there, catch up | one incremental, full if Core requires it |
110
-
| no compatible committed baseline either | full analysis directly, at the configured `depth_cap`|
110
+
| 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 |
111
+
| none within 100 commits either | full analysis directly, at the configured `depth_cap`|
111
112
112
113
A trusted run that computed the base publishes it, so the next pull request
113
-
forking from that commit gets the first row. The review metadata reports the
114
+
forking from that commit gets the first row; that includes a base caught up from
115
+
an ancestor. The review metadata reports the
114
116
row as `base_analysis_method` (`reused`, `incremental` or `full`) with a
115
117
`base_analysis_reason`, and the review comment repeats both under the diagram,
116
118
with measured times. While a base is computed, the progress
117
119
comment says so in two steps, with the elapsed time and the reason.
118
120
121
+
The ancestor lookup walks the merge base's first-parent history, deepening the
122
+
shallow checkout to 101 commits, then pages through the repository's artifacts
123
+
newest first, keeping those named for this configuration and produced by a run on
124
+
the repository's own code. It stops at the first page holding one of the walked
125
+
commits (usually the first; at most 50 pages) and takes the nearest commit seen.
126
+
The merge base's own `.codeboardingignore` and health configuration replace the
127
+
seed's. A base caught up this way reports `incremental`, its reason naming the
128
+
ancestor and the commits caught up. Sync uses the same lookup when the branch has
129
+
no usable committed baseline, so the first sync after the setup pull request
130
+
merges catches up from the base that pull request's review saved, instead of
131
+
analyzing from scratch.
132
+
119
133
The configuration hash includes `depth_cap`. The workflow input controls depth
120
134
for both fresh and fallback analyses; stored legacy depth values never override it.
0 commit comments