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 }}
test(code-metrics): isolate dispatch.test.sh from the developer's home configuration #16365
No related issue: found while checking an owed follow-up against the code.
Defect
30 of the 52 bash "$SCRIPT" invocations in plugins/code-metrics/scripts/dispatch.test.sh set no CODE_METRICS_HOME, case 1 at line 71 among them. plugins/code-metrics/scripts/entry-common.sh:99 then passes --home "${CODE_METRICS_HOME:-${HOME:-/}}", and resolve-config.py reads the user-global layer at <home>/.claude/<stem>.yaml, which covers ~/.claude/code-metrics.yaml and ~/.claude/ecosystems/<lane>.yaml. A developer whose home holds either file gets different lanes, thresholds or scope than CI, and assertions such as case 1's lane count can fail or pass for the wrong reason.
Done when
Every dispatch invocation in dispatch.test.sh sets CODE_METRICS_HOME to a test-owned directory, except one that tests the default on purpose and says so.
The suite passes unchanged with a ~/.claude/ecosystems/<bundled lane>.yaml present whose globs would change lane detection.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
I understood this as a test-isolation defect. About 30 of the 52 invocations in plugins/code-metrics/scripts/dispatch.test.sh set no CODE_METRICS_HOME. Those runs read the developer's ~/.claude/code-metrics.yaml and ~/.claude/ecosystems/<lane>.yaml, so results can differ from CI. The fix is to point every invocation at a test-owned directory, apart from one that deliberately tests the default and says so. The suite should then pass with a home-level lane file present.
Nothing is missing, and I found no duplicate among the open issues or a merged PR that already fixes it.
Activity
github-actions commentedon Nov 15, 2026
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
I understood this as a test-isolation defect. About 30 of the 52 invocations in
plugins/code-metrics/scripts/dispatch.test.shset noCODE_METRICS_HOME. Those runs read the developer's~/.claude/code-metrics.yamland~/.claude/ecosystems/<lane>.yaml, so results can differ from CI. The fix is to point every invocation at a test-owned directory, apart from one that deliberately tests the default and says so. The suite should then pass with a home-level lane file present.Nothing is missing, and I found no duplicate among the open issues or a merged PR that already fixes it.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 15, 2026
{"v":1,"actor_id":337595936,"title_sha256":"4885ebe28f87851551b431993f2cb3a1fb58b9e2157ef54de2c75275dff54b65","body_sha256":"88d921208b9020be1d74bd6266c023d2a10bc49168ad2a5a4ab7edb5c6f287bd"}
github-actions commentedon Nov 15, 2026