Pulse/pkg
rcourtman 72eaab444f Replace the two non-discriminating audit telemetry fields and guard the class
Schema v6 shipped audit_logging_persistent and audit_events_30d as Pro adoption
signals. Neither discriminated. pkg/server installs the SQLite audit logger on
every install for defense in depth and gates only the read/export endpoints, so
the boolean was true on all 8 installs that had taken rc.8 and 0 rows in the
retained table have ever had it false. The event count measured that background
write volume: three of those eight unlicensed community installs were pegged at
the receiver's 100000 clamp ceiling, with the rest between 4863 and 67509.

Schema v7 replaces both with audit_reads_30d, a count of requests that cleared
the license gate on an audit read or export surface. A read requires a human
action, so unlike store presence or write volume it cannot settle into a
constant. The recorder is wrapped INSIDE RequireLicenseFeature so unentitled
requests never count, and the persisted marker carries a timestamp and a coarse
activity class from a fixed allowlist. Query filters, actors, ranges, and every
audit row read stay on the install.

The retired columns are left in the live database. They hold real rc.8 rows and
migrations only add, so dropping them would be a pointless risk; nothing writes
them once the receiver struct loses the fields.

Adds the guard this class needed. LicensedFeatureAdoptionFields registers every
field that exists to measure licensed-feature adoption, and
TestLicensedFeatureAdoptionFieldsDiscriminate builds an unused install through
the real production snapshot paths, installs a real SQLite audit logger exactly
as pkg/server does, records a baseline audit event, and fails if any registered
field is non-zero. Pinning a console logger there would have made the guard pass
while the payload lied, so it deliberately does not. The guard was verified by
reintroducing the v6 sourcing and confirming it fails with the field named.
A companion test pins the three retired fields so they cannot return under
their old names.

This is the third instance of one bug class. v6 removed
pulse_intelligence_patrol_autofixes_30d, hardcoded to zero with no increment
site, and then introduced two fields that were constant in the other direction.
Three occurrences is a guard, not a habit.

Verified end to end on a running unlicensed install: the payload that reported
audit_logging_persistent true under v6 now reports audit_reads_30d 0, and
seeding two in-window reads, one outside the window, and one with an invalid
activity class yields 2.
2026-08-05 17:33:57 +01:00
..
agents feat(proxmox): show all LXC filesystems 2026-07-30 22:42:04 +01:00
aicontracts Add coverage tests for agentexec lifecycle codec and aicontracts pure helpers 2026-07-17 06:53:16 +01:00
audit Restore backend lint to green: real dedup + errcheck idiom fixes 2026-08-03 01:01:20 +01:00
auth Keep admin recovery reachable when the legacy RBAC import fails 2026-07-24 22:56:09 +01:00
cloudauth fix(hosted): preserve direct handoff membership continuity 2026-03-26 23:40:02 +00:00
db Cover cloud tenant registry queries, unified views and slowlog wrappers 2026-07-22 21:41:02 +01:00
discovery Fix discovery blocklist for configured subnets (#1616) 2026-07-30 00:18:48 +01:00
diskinventory Fix Proxmox physical disk inventory continuity 2026-07-23 22:05:09 +01:00
edition Block in-app self-update on the Pro binary to prevent silent downgrade 2026-07-08 10:02:04 +01:00
extensions Fix audit storage migration and viewer races 2026-07-24 10:33:57 +01:00
fsfilters Keep virtio and Xen disks in host disk I/O collection 2026-08-03 17:39:55 +01:00
licensing Prevent mock license migration warnings 2026-08-04 14:19:47 +01:00
metrics Fix RC metrics, agent state, and bundle regressions 2026-08-05 00:32:24 +01:00
pbs Fix PBS datastore exclusions before detail polling (#1105) 2026-07-30 09:21:57 +01:00
pmg Harden outbound URLs and file-backed storage 2026-03-29 12:47:55 +01:00
proxmox Trust newly joined cluster members under fingerprint pinning 2026-08-02 18:11:08 +01:00
pulsecli Enforce server-owned action approval authority 2026-07-11 19:49:17 +01:00
reporting Make report branding PDF assertion case-insensitive 2026-07-21 10:23:06 +01:00
securityutil Block IPv6 transition addresses in SSRF guards (GHSA-8f8r-p75h-jwq5) 2026-07-31 17:57:26 +01:00
server Replace the two non-discriminating audit telemetry fields and guard the class 2026-08-05 17:33:57 +01:00
tlsutil Route discovery policy DNS through the cached resolver (#1638) 2026-07-28 12:08:10 +01:00