Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Context signal count is total, not average like peers
- Changed context_signal_count from a raw sum accumulator to a list-and-average pattern matching tool_count and customization_count, so all three metrics are now per-session averages.
Or push these changes by commenting:
@cursor push 40a5268b6e
Preview (40a5268b6e)
diff --git a/src/primer/server/services/maturity_service.py b/src/primer/server/services/maturity_service.py
--- a/src/primer/server/services/maturity_service.py
+++ b/src/primer/server/services/maturity_service.py
@@ -1073,7 +1073,7 @@
"leverage_scores": [],
"tool_counts": [],
"customization_counts": [],
- "context_signal_count": 0,
+ "context_signal_counts": [],
"tools": Counter(),
"customizations": Counter(),
"signals": Counter(),
@@ -1090,7 +1090,7 @@
bucket["success_sessions"].add(row.id)
bucket["tool_counts"].append(len(tool_names))
bucket["customization_counts"].append(len(customization_names))
- bucket["context_signal_count"] += context_count
+ bucket["context_signal_counts"].append(context_count)
bucket["tools"].update(tool_names)
bucket["customizations"].update(customization_names)
bucket["signals"].update(
@@ -1148,7 +1148,11 @@
)
if bucket["customization_counts"]
else 0,
- context_signal_count=bucket["context_signal_count"],
+ context_signal_count=round(
+ sum(bucket["context_signal_counts"]) / len(bucket["context_signal_counts"])
+ )
+ if bucket["context_signal_counts"]
+ else 0,
top_tools=[tool for tool, _count in bucket["tools"].most_common(5)],
top_customizations=[
customization for customization, _count in bucket["customizations"].most_common(5)You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 9a9aea3. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Validation
ruff check .ruff format --check .bandit -r src/ -c pyproject.tomlPYTHONPATH=/Users/ccf/git/primer/src:/Users/ccf/git/primer pytest --import-mode=importlib -v --tb=short- 962 passed./node_modules/.bin/eslint src/pages/maturity.tsx src/components/maturity/harness-fingerprint-table.tsx src/components/maturity/__tests__/harness-fingerprint-table.test.tsx src/components/maturity/__tests__/maturity-summary.test.tsx src/types/api.ts./node_modules/.bin/tsc --noEmit./node_modules/.bin/vitest run --run src/components/maturity/__tests__/harness-fingerprint-table.test.tsx src/components/maturity/__tests__/maturity-summary.test.tsxNote
Medium Risk
Medium risk because it changes maturity analytics computation and API payload shape, which could affect dashboard correctness/performance and downstream consumers expecting the previous schema.
Overview
Adds
harness_configuration_fingerprintsto the maturity analytics response, computing a SHA-256–based fingerprint that groups sessions byagent_type,permission_mode, tool set, customization state/provenance, and presence/amount of context usage, and returns aggregate metrics (session/engineer counts, success + compound reliability, leverage, and “top” tools/customizations/signals).Surfaces this new dataset in the frontend via a
HarnessFingerprintTableon the Harness Intelligence “Customizations” tab (with empty state + tests), updates API types/schemas, and extends backend/frontend tests to cover the new response field and fingerprint calculations.Reviewed by Cursor Bugbot for commit 3f679e2. Bugbot is set up for automated code reviews on this repo. Configure here.