Skip to content

chore(extension): remove dead commented-out referrer capture in http_responses [#1185]#1192

Draft
vringar wants to merge 1 commit into
masterfrom
cleanup/dead-referrer-capture
Draft

chore(extension): remove dead commented-out referrer capture in http_responses [#1185]#1192
vringar wants to merge 1 commit into
masterfrom
cleanup/dead-referrer-capture

Conversation

@vringar

@vringar vringar commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the dead commented-out referrer-capture block in the http_responses handler in Extension/src/background/http-instrument.ts.

The block would have written update.referrer onto the response record, but the http_responses table has no referrer column in schema.sql (nor in parquet_schema.py), so it could never have populated anything.

Why this is not a data gap

referrer is captured request-side on http_requests (column referrer TEXT NOT NULL), populated from the Referer request header in onBeforeSendHeadersHandler. Referrer is a property of the request, so that is its natural home. For any response, the referrer is recoverable by joining http_responses to http_requests on (visit_id, request_id) — both tables carry those columns.

The dead block is replaced with a short note documenting where referrer lives, so future readers do not mistake it for a missing capture.

Verification

  • npm run build compiles cleanly
  • npm run lint (ESLint) reports no issues
  • No schema change, no behavior change

Closes #1185

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.14%. Comparing base (315e667) to head (27a1d91).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1192   +/-   ##
=======================================
  Coverage   62.14%   62.14%           
=======================================
  Files          40       40           
  Lines        3918     3918           
=======================================
  Hits         2435     2435           
  Misses       1483     1483           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…responses [#1185]

The response-side handler in http-instrument.ts contained a commented-out
block that would have written update.referrer onto the response record. The
http_responses table has no referrer column in schema.sql, so this code could
never have populated anything.

Referrer is captured request-side on http_requests (populated from the Referer
request header in onBeforeSendHeadersHandler) and is reachable from an
http_responses row via the (visit_id, request_id) join, so duplicating it onto
the response record is unnecessary. Replace the dead block with a short note
documenting where referrer lives.

Closes #1185
@vringar vringar force-pushed the cleanup/dead-referrer-capture branch from 168bb14 to 27a1d91 Compare June 17, 2026 23:43
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.

Remove dead commented-out referrer capture in the http_responses handler (referrer is request-side and joinable)

1 participant