Skip to content

Commit 33a53bb

Browse files
committed
Clarify stale context version mismatch
1 parent dae14dd commit 33a53bb

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.rabbit/context.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ generator:
66
tool: dev.kit
77
repo: https://github.com/udx/dev.kit
88
version: 0.14.0
9-
generated_at: 2026-06-26T10:41:30Z
9+
generated_at: 2026-07-05T18:10:03Z
1010
sources:
1111
homepage: https://udx.dev/kit
1212
repository: https://github.com/udx/dev.kit

‎bin/dev-kit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ dev_kit_home_context_reason() {
283283
fi
284284

285285
if [ -n "$(dev_kit_tool_version)" ] && [ "$generator_version" != "$(dev_kit_tool_version)" ]; then
286-
printf '%s' "context was generated by a different dev.kit version"
286+
printf 'context was generated by dev.kit %s; current dev.kit is %s' "$generator_version" "$(dev_kit_tool_version)"
287287
return 0
288288
fi
289289

‎changes.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Add regression coverage for reference-only command examples so generated context stays tied to runnable repo-owned surfaces.
77
- Add release verification guidance that distinguishes GitHub release, npm registry, tarball, and npmjs.com UI evidence.
88
- Add `udx/rabbit-automation-action` to the real-repo validation matrix as a manifest-heavy config contract probe.
9+
- Clarify stale-context output when generated context came from a different `dev.kit` version by showing both the generator and current versions.
910

1011
### 0.13.0
1112

‎tests/suite.sh‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ ln -sf "$REPO_DIR/bin/dev-kit" "$DEV_KIT_BIN_DIR/dev.kit"
128128
export PATH="$DEV_KIT_BIN_DIR:$PATH"
129129
assert_contains "$(command -v dev.kit)" "$DEV_KIT_BIN_DIR/dev.kit" "suite: uses local dev.kit shim"
130130
assert_contains "$(dev.kit --version)" "$(awk -F'"' '/"version"/{print $4; exit}' "$REPO_DIR/package.json")" "suite: uses checkout dev.kit version"
131+
DEV_KIT_VERSION="$(awk -F'"' '/"version"/{print $4; exit}' "$REPO_DIR/package.json")"
131132

132133
# shellcheck disable=SC1090
133134
. "$DEV_KIT_HOME/bin/env/dev-kit.sh"
@@ -297,6 +298,20 @@ if should_run "core"; then
297298
assert_contains "$home_repeat_text" "reference: README.md" "home text: shows local gap reference"
298299
assert_contains "$home_repeat_text" "repair: fix repo-owned gaps, then rerun dev.kit repo" "home text: prints repair loop next step"
299300

301+
replace_in_file \
302+
"$HOME_ACTION_REPO/.rabbit/context.yaml" \
303+
" version: ${DEV_KIT_VERSION}" \
304+
" version: 0.0.0-test"
305+
306+
stale_version_home_json="$(cd "$HOME_ACTION_REPO" && dev.kit --json)"
307+
assert_contains "$stale_version_home_json" "\"context_status\": \"stale\"" "home: marks version-mismatched context as stale"
308+
assert_contains "$stale_version_home_json" "\"context_reason\": \"context was generated by dev.kit 0.0.0-test; current dev.kit is ${DEV_KIT_VERSION}\"" "home: reports stale generator and current versions"
309+
310+
replace_in_file \
311+
"$HOME_ACTION_REPO/.rabbit/context.yaml" \
312+
" version: 0.0.0-test" \
313+
" version: ${DEV_KIT_VERSION}"
314+
300315
replace_in_file \
301316
"$HOME_ACTION_REPO/.rabbit/context.yaml" \
302317
"No repo-owned configuration contract was found in docs, manifests, or checked-in example files." \

0 commit comments

Comments
 (0)