test: make privacy capture independent of callsite order #7

Merged
jlxq0 merged 2 commits from fix/privacy-log-capture-20261029 into main 2026-10-29 00:47:55 +00:00
Owner

The privacy tests could miss a warning when a parallel non-capturing thread first registered its tracing callsite. The error response was correct, but the positive log assertion failed intermittently. This carried fork test-infrastructure patch replaces per-test subscribers with one stable subscriber and separate thread-local sinks; production logging and all API/auth/token code stay unchanged.

A fresh-process regression deterministically fails the old capture helper and requires exactly one child test to run. Additional coverage checks parallel isolation and nested restoration. Existing positive log-count and private-value assertions remain unchanged. Two independent reviews completed; the final exact head 007ed1bace is approved for source merge after CI. Local format, Clippy,119 tests, audit and deny pass. The dated pitfall records the cause and avoids treating an empty capture as privacy proof.

Residual: a very narrow first-subscriber-publication/in-flight callsite-registration race in tracing-core can still cause a safe test failure; rebuilding interest on each capture narrows it, and positive assertions prevent false privacy passes. The deterministic regression covers the observed cross-thread first-use defect, not that internal library transition.

This is not a release promotion. Separate qualification found6 dependency advisory entries in the unchanged lockfile; their dependency/runtime remediation and final artifact/authenticated-client gates remain mandatory before release or deployment. No real service calls or measurements were used by these tests.

The privacy tests could miss a warning when a parallel non-capturing thread first registered its tracing callsite. The error response was correct, but the positive log assertion failed intermittently. This carried fork test-infrastructure patch replaces per-test subscribers with one stable subscriber and separate thread-local sinks; production logging and all API/auth/token code stay unchanged. A fresh-process regression deterministically fails the old capture helper and requires exactly one child test to run. Additional coverage checks parallel isolation and nested restoration. Existing positive log-count and private-value assertions remain unchanged. Two independent reviews completed; the final exact head 007ed1bace7bcb48f9fc2367a8d1167afa94bf63 is approved for source merge after CI. Local format, Clippy,119 tests, audit and deny pass. The dated pitfall records the cause and avoids treating an empty capture as privacy proof. Residual: a very narrow first-subscriber-publication/in-flight callsite-registration race in tracing-core can still cause a safe test failure; rebuilding interest on each capture narrows it, and positive assertions prevent false privacy passes. The deterministic regression covers the observed cross-thread first-use defect, not that internal library transition. This is not a release promotion. Separate qualification found6 dependency advisory entries in the unchanged lockfile; their dependency/runtime remediation and final artifact/authenticated-client gates remain mandatory before release or deployment. No real service calls or measurements were used by these tests.
test: require child execution and refresh capture interest
All checks were successful
CI / cargo (pull_request) Successful in 48s
CI / docker (pull_request) Successful in 41s
007ed1bace
jlxq0 merged commit de32e81b48 into main 2026-10-29 00:47:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jlxq0/withings-mcp!7
No description provided.