From db41223b515d170981db3c66f94ebadfc1e64089 Mon Sep 17 00:00:00 2001 From: Beon de Nood Date: Sat, 21 Mar 2026 01:02:30 -0400 Subject: [PATCH] feat(pip): add bundle staleness telemetry constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add TelemetryBundleStale and ErrorCodeBundleStale constants for the embedded PDP implementation (RFC-005 Appendix B §B.4). - TelemetryBundleStale: emitted when policy bundle exceeds staleness threshold - ErrorCodeBundleStale: distinct from PDP_UNAVAILABLE — PDP evaluated but data may be out of date Part of: EMBEDDED-PDP-001 (PR 1a) --- pkg/pip/telemetry.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/pip/telemetry.go b/pkg/pip/telemetry.go index 98fcb33..a292172 100644 --- a/pkg/pip/telemetry.go +++ b/pkg/pip/telemetry.go @@ -24,6 +24,15 @@ const ( // ErrorCodePDPUnavailable indicates PDP could not be reached. ErrorCodePDPUnavailable = "PDP_UNAVAILABLE" + + // TelemetryBundleStale is emitted when the embedded PDP's policy bundle + // exceeds the staleness threshold (RFC-005 Appendix B §B.4). + TelemetryBundleStale = "capiscio.policy.bundle_stale" + + // ErrorCodeBundleStale indicates the policy bundle is stale. + // Distinct from PDP_UNAVAILABLE: the PDP evaluated successfully, + // but the underlying data may be out of date. + ErrorCodeBundleStale = "BUNDLE_STALE" ) // TxnIDHeader is the HTTP header for transaction ID propagation (RFC-004).