Skip to content

Make JA4s have names + drop unused index - #1453

Merged
skyfallwastaken merged 2 commits into
mainfrom
ja4-names
Jun 24, 2026
Merged

Make JA4s have names + drop unused index#1453
skyfallwastaken merged 2 commits into
mainfrom
ja4-names

Conversation

@skyfallwastaken

Copy link
Copy Markdown
Member

Summary of the problem

JA4s don't have names :(

Describe your changes

Make the admin heartbeats endpoint return JA4 fingerprints and names.

Screenshots / Media

N/A

@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds JA4 names to the admin heartbeats response. The main changes are:

  • Adds a nullable name column to ja4s.
  • Returns JA4 data as an object with fingerprint and name.
  • Updates admin API tests and OpenAPI docs for the new response shape.
  • Drops unused heartbeat indexes through a new migration.

Confidence Score: 4/5

The API response shape and schema updates are straightforward, with one rollback-path issue that should be corrected to avoid schema drift.

The changed request specs and docs cover the intended JA4 response update, and the remaining concern is isolated to migration rollback behavior rather than normal forward execution.

db/migrate/20260620232900_drop_unused_heartbeat_indexes.rb

T-Rex T-Rex Logs

What T-Rex did

  • Reviewed the base controller response, which returned HTTP 200 and a JA4 heartbeat string when JA4 is present and null when absent.
  • Verified the head controller response after the change, which returns HTTP 200 and a JA4 heartbeat object with fingerprint and name when JA4 is present, while the no-JA4 case remains null.
  • Inspected logs to confirm the presence of the two controller responses and the JA4 heartbeat values across states.

View all artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
db/migrate/20260620232900_drop_unused_heartbeat_indexes.rb:23-27
**Rollback adds index**

The `down` path recreates `index_heartbeats_on_last_language_user_id`, but the schema before this migration did not contain that index. Rolling this migration back would leave the database with a new partial index that was not part of the previous schema, which can cause schema drift and an unexpected large index build on `heartbeats` during rollback.

Reviews (1): Last reviewed commit: "Update Swagger specs" | Re-trigger Greptile

Comment thread db/migrate/20260620232900_drop_unused_heartbeat_indexes.rb
@skyfallwastaken
skyfallwastaken merged commit 646a8aa into main Jun 24, 2026
17 checks passed
@skyfallwastaken
skyfallwastaken deleted the ja4-names branch June 24, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant