mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
Fix remote telemetry adoption reports
This commit is contained in:
@@ -978,6 +978,10 @@ new categorical value against its fixed set before storage. The adoption
|
||||
report may aggregate those latest-per-install signals and use indexed time
|
||||
filters plus compressed remote transport, but it must not enrich them with
|
||||
accounts, request IPs, customer records, or event-level browser data.
|
||||
The compressed remote-report transport must compile the exact generated Python
|
||||
program in its unit proof. Its JSON-lines delimiter is escaped at the outer
|
||||
generator boundary so the program sent over SSH contains a valid `b"\n"`
|
||||
literal rather than an unterminated bytes literal.
|
||||
That same telemetry trust boundary must remain operator-inspectable in-product:
|
||||
the shared system settings surface may preview only the exact runtime payload
|
||||
Pulse would send, and it must allow an operator to rotate the local telemetry
|
||||
|
||||
@@ -1203,7 +1203,7 @@ rows_sql = (
|
||||
output = gzip.GzipFile(fileobj=sys.stdout.buffer, mode="wb", compresslevel=6)
|
||||
|
||||
def emit(value):
|
||||
output.write(json.dumps(value, separators=(",", ":")).encode("utf-8") + b"\n")
|
||||
output.write(json.dumps(value, separators=(",", ":")).encode("utf-8") + b"\\n")
|
||||
|
||||
try:
|
||||
db_stats = dict(conn.execute(db_stats_sql).fetchone())
|
||||
|
||||
@@ -49,6 +49,7 @@ class TelemetryAdoptionReportTest(unittest.TestCase):
|
||||
remote_script = run_mock.call_args.kwargs["input"].decode("utf-8")
|
||||
self.assertNotIn("fetchall", remote_script)
|
||||
self.assertIn("received_at >= datetime('now', ?)", remote_script)
|
||||
compile(remote_script, "<telemetry-remote-fetch>", "exec")
|
||||
|
||||
def test_fetch_rows_remote_rejects_empty_response(self) -> None:
|
||||
completed = subprocess.CompletedProcess(
|
||||
|
||||
Reference in New Issue
Block a user