@rulemetric/proxy 0.12.3 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/rulemetric_addon.py +19 -0
- package/package.json +1 -1
|
@@ -237,6 +237,25 @@ def _ensure_session_for_wire_id(
|
|
|
237
237
|
|
|
238
238
|
# Write registry file so subsequent same-wire-id requests find it without
|
|
239
239
|
# re-POSTing.
|
|
240
|
+
# ONLY when we actually had a project path. The registry file is the
|
|
241
|
+
# short-circuit the hooks read first (`_ensure-session.sh`): once it
|
|
242
|
+
# exists, `_rulemetric_ensure_session` returns immediately and NEVER
|
|
243
|
+
# POSTs the cwd / git remote / root commit it had assembled. Writing it
|
|
244
|
+
# from a bootstrap that carried no project path therefore silenced the
|
|
245
|
+
# only writer that could attribute the session, permanently — measured
|
|
246
|
+
# 2026-08-26 as 43 sessions / 3,923 events with project_id NULL, one repo
|
|
247
|
+
# losing every session it ever had. Leaving the file unwritten costs a
|
|
248
|
+
# few extra idempotent POSTs (the API returns the existing row, and
|
|
249
|
+
# `_PENDING_BOOTSTRAPS` single-flights them) and lets the hook create
|
|
250
|
+
# path run, whose POST now repairs the row server-side.
|
|
251
|
+
if not project_path:
|
|
252
|
+
logger.info(
|
|
253
|
+
"Bootstrapped %s session %s for wire id %s WITHOUT a project path — "
|
|
254
|
+
"leaving the registry file unwritten so the hook can attribute it",
|
|
255
|
+
tool, session_id[:8], wire_id[:16],
|
|
256
|
+
)
|
|
257
|
+
return session_id
|
|
258
|
+
|
|
240
259
|
try:
|
|
241
260
|
sdir = _get_session_dir()
|
|
242
261
|
sdir.mkdir(parents=True, exist_ok=True)
|