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
fix: review inherits committed baseline depth for the PR diff
Review mode hardcoded the analysis depth to 2 when depth_level was unset,
ignoring the committed .codeboarding/analysis.json's own depth_level. When the
committed baseline was deeper (e.g. depth 4), validate-base rejected it as
"deeper than expected", so the action regenerated a shallower depth-2 base,
diffed head(2) vs that, and wrote base_commit_found=false / base_commit_sha=null
into the PR artifact. The webview then fell back to diffing the depth-2 head
against the committed depth-4 base, reporting hundreds of phantom "deleted"
components for sub-trees that only differ by analysis depth.
Review now inherits the committed baseline's depth_level (mirroring sync's
run_analyze) via a new stdlib-only `baseline-depth` subcommand invoked before the
engine is installed, so head and base are analyzed at the same depth, the
committed baseline is reused, and the artifact carries a real base_commit_sha the
webview diffs against. The accepted depth ceiling is raised 3 -> 4 (the engine
has no depth cap) so a committed depth-4 baseline is a first-class value.
- engine_adapter.py: best-effort engine imports so metadata-only subcommands run
without the engine installed; add baseline_depth() + `baseline-depth` command;
widen _supported_depth and argparse choices to include 4.
- action.yml: resolve_depth inherits the committed baseline depth in review mode
(sync unchanged); depth guard + input doc widened to 1-4.
- README: depth_level doc widened to 1-4.
- tests: baseline-depth coverage incl. engine-absent subprocess run; depth-4
accepted across base/head/analyze/validate-base; depth-5 now rejected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ Review mode does not need `contents: write`: PR-specific generated files are sto
265
265
|`github_token`| both |`${{ github.token }}`| Token for GitHub API calls; in review mode it posts or updates the PR comment. |
266
266
|`push_token`| sync |`${{ github.token }}`| Token used for sync-mode pushes to `target_branch`. The workflow token can push when the workflow grants `permissions: contents: write`. Separate from `github_token` so commenting can use a GitHub App token while the push uses the workflow token. |
267
267
|`codeboarding_version`| both |`0.12.3`| CodeBoarding PyPI package version used as the analysis engine. Pin for reproducibility. |
268
-
|`depth_level`| both | empty (`2` for cold starts) | Analysis depth, 1 to 3, used for first analysis and `force_full` rebuilds. Once `.codeboarding/analysis.json` exists, its `metadata.depth_level` is the source of truth for incremental analysis and fallback-full recovery. |
268
+
|`depth_level`| both | empty (`2` for cold starts) | Analysis depth, 1 to 4, used for first analysis and `force_full` rebuilds. Once `.codeboarding/analysis.json` exists, its `metadata.depth_level` is the source of truth: sync runs incremental at the baseline depth, and review analyzes the PR head at the committed baseline depth so the diff is apples-to-apples. |
269
269
|`render_depth`| review |`1`| Display depth for the PR diagram. Keep `1` for a clean top-level view. |
Copy file name to clipboardExpand all lines: action.yml
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ inputs:
36
36
required: false
37
37
default: '0.12.3'
38
38
depth_level:
39
-
description: 'Analysis depth (1-3) for cold-start or force_full rebuilds. Once .codeboarding/analysis.json exists, its metadata.depth_level is the source of truth for incremental analysis and fallback-full recovery. Empty (default): 2 for cold starts.'
39
+
description: 'Analysis depth (1-4) for cold-start or force_full rebuilds. Once .codeboarding/analysis.json exists, its metadata.depth_level is the source of truth: sync runs incremental at the baseline depth, and review analyzes the PR head at the committed baseline depth so the diff is apples-to-apples. Empty (default): 2 for cold starts.'
40
40
required: false
41
41
default: ''
42
42
agent_model:
@@ -210,8 +210,8 @@ runs:
210
210
*) echo "::error::mode must be 'review' or 'sync' (got '$MODE')."; exit 1 ;;
211
211
esac
212
212
case "$DEPTH" in
213
-
''|1|2|3) ;;
214
-
*) echo "::error::depth_level must be 1, 2, or 3 (empty = default cold-start depth 2)."; exit 1 ;;
213
+
''|1|2|3|4) ;;
214
+
*) echo "::error::depth_level must be 1, 2, 3, or 4 (empty = default cold-start depth 2)."; exit 1 ;;
0 commit comments