You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/10/09 12:58:20 UTC

(causeway) 05/10: CAUSEWAY-4068: archive JPA duration filtering removal

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch CAUSEWAY-4068-v4
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 40b05d438714b43540bb263381e0fd6facae518c
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Oct 7 11:18:24 2026 +0100

    CAUSEWAY-4068: archive JPA duration filtering removal
---
 .../.openspec.yaml                                 |  0
 .../design.md                                      |  0
 .../proposal.md                                    |  0
 .../specs/main-observation-foundation/spec.md      |  0
 .../specs/observation-policy/spec.md               |  0
 .../tasks.md                                       |  0
 .../validation.md                                  |  2 ++
 .../general-span-duration-filtering.md             |  2 +-
 .../planned-changes/otel-forward-port-roadmap.md   |  4 ++-
 openspec/specs/main-observation-foundation/spec.md | 32 +----------------
 openspec/specs/observation-policy/spec.md          | 40 ++++++++++------------
 11 files changed, 26 insertions(+), 54 deletions(-)

diff --git a/openspec/changes/remove-jpa-duration-filtering/.openspec.yaml b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/.openspec.yaml
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/.openspec.yaml
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/.openspec.yaml
diff --git a/openspec/changes/remove-jpa-duration-filtering/design.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/design.md
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/design.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/design.md
diff --git a/openspec/changes/remove-jpa-duration-filtering/proposal.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/proposal.md
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/proposal.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/proposal.md
diff --git a/openspec/changes/remove-jpa-duration-filtering/specs/main-observation-foundation/spec.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/specs/main-observation-foundation/spec.md
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/specs/main-observation-foundation/spec.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/specs/main-observation-foundation/spec.md
diff --git a/openspec/changes/remove-jpa-duration-filtering/specs/observation-policy/spec.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/specs/observation-policy/spec.md
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/specs/observation-policy/spec.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/specs/observation-policy/spec.md
diff --git a/openspec/changes/remove-jpa-duration-filtering/tasks.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/tasks.md
similarity index 100%
rename from openspec/changes/remove-jpa-duration-filtering/tasks.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/tasks.md
diff --git a/openspec/changes/remove-jpa-duration-filtering/validation.md b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/validation.md
similarity index 93%
rename from openspec/changes/remove-jpa-duration-filtering/validation.md
rename to openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/validation.md
index 5492650e2be..1119f33b3e7 100644
--- a/openspec/changes/remove-jpa-duration-filtering/validation.md
+++ b/openspec/changes/archive/2026-10-07-remove-jpa-duration-filtering/validation.md
@@ -26,3 +26,5 @@ Clean rebuild verified that the threshold property is absent from generated meta
 Shell syntax and mock-Maven invocations verify launcher profile/agent forwarding with no threshold setting in either mode. Both observability guides and the sample README render with Asciidoctor and their YAML examples parse. `git diff --check` and strict OpenSpec change validation pass. Full repository regressions and live browser/backend sessions were not repeated.
 
 Archive checkpoint validation uses the same focused `test` goals (without clean/install) and the tracing suite after the implementation commit, as required by the one-shot workflow.
+
+Post-checkpoint archive validation passed: the same 25 focused and 9 tracing/JPA tests succeeded after `39faf40ded6`. All tasks are complete and both capability deltas have been synced during archive.
diff --git a/openspec/planned-changes/general-span-duration-filtering.md b/openspec/planned-changes/general-span-duration-filtering.md
index 245f2735626..bd7faea53b3 100644
--- a/openspec/planned-changes/general-span-duration-filtering.md
+++ b/openspec/planned-changes/general-span-duration-filtering.md
@@ -17,4 +17,4 @@ Questions to investigate:
 
 Do not promise duration-based suppression at span creation: duration is known only when the span ends. Prefer complete trace trees until a coherent, tested policy is available.
 
-Predecessor: `remove-jpa-duration-filtering`, following `classify-and-correlate-observations` on CAUSEWAY-4068-v4.
+Predecessor: [remove JPA duration filtering](../changes/archive/2026-10-07-remove-jpa-duration-filtering/proposal.md), following [classification/correlation](../changes/archive/2026-10-07-classify-and-correlate-observations/proposal.md) on CAUSEWAY-4068-v4.
diff --git a/openspec/planned-changes/otel-forward-port-roadmap.md b/openspec/planned-changes/otel-forward-port-roadmap.md
index e06e788a1e8..a1b5dc1dc74 100644
--- a/openspec/planned-changes/otel-forward-port-roadmap.md
+++ b/openspec/planned-changes/otel-forward-port-roadmap.md
@@ -115,4 +115,6 @@ Filtering simplification: `causeway.observation.jpa-duration-threshold` is the o
 
 Classification/correlation archived on 2026-10-07 after fresh focused and tracing validation passed (45 tests), with all delta specs synced. General duration filtering is tracked in [the exploration backlog](general-span-duration-filtering.md); the narrow JPA-only threshold is being removed in a separate change.
 
-The [remove-jpa-duration-filtering](../changes/remove-jpa-duration-filtering/proposal.md) change removes the narrow JPA-only policy while preserving explicit transaction discard behavior. Replacement filtering is deferred to [general span duration filtering](general-span-duration-filtering.md).
+The [remove-jpa-duration-filtering](../changes/archive/2026-10-07-remove-jpa-duration-filtering/proposal.md) change removes the narrow JPA-only policy while preserving explicit transaction discard behavior. Replacement filtering is deferred to [general span duration filtering](general-span-duration-filtering.md).
+
+Removal completed and archived on 2026-10-07. Implementation checkpoint `39faf40ded6`; 34 Java tests passed before and after the checkpoint, Petclinic packaged successfully, and metadata/docs/launcher checks passed. Specs were synced; all completed changes are archived. General span filtering remains backlog exploration.
diff --git a/openspec/specs/main-observation-foundation/spec.md b/openspec/specs/main-observation-foundation/spec.md
index 5027255ac11..e301c78d0a2 100644
--- a/openspec/specs/main-observation-foundation/spec.md
+++ b/openspec/specs/main-observation-foundation/spec.md
@@ -1,9 +1,7 @@
 ## Purpose
 
-Defines the observation lifecycle, opt-in activation, telemetry ownership, duration filtering, and compatibility guarantees that support main-branch telemetry forward ports.
-
+Defines the observation lifecycle, opt-in activation, telemetry ownership and compatibility guarantees that support main-branch telemetry forward ports.
 ## Requirements
-
 ### Requirement: Observation ownership has deterministic cleanup
 
 The lifecycle helper SHALL close each successfully opened scope and attempt to stop each owned started observation exactly once, in that order, and SHALL release references even when cleanup fails. It SHALL reject a second start while an observation is active.
@@ -76,34 +74,6 @@ The implementation SHALL preserve a supported Boot-managed configuration and doc
 - **WHEN** a failing observed request is followed by another request
 - **THEN** the failure is recorded and the later request does not inherit stale observation state
 
-### Requirement: Duration filtering survives observation composition
-
-Threshold observations SHALL retain their stop policy through fluent customization, start and lifecycle-helper use. Duration filtering SHALL be disabled by default. When explicitly enabled in configurations supporting duration filtering, successful observations below the threshold SHALL be suppressed and observations at or above it SHALL remain eligible for export. Failed observations SHALL NOT be suppressed solely for short duration. Any agent-mode limitation on discard export SHALL be  [...]
-
-#### Scenario: Fluent customization before start
-- **WHEN** a threshold observation is customized through its fluent methods and run through the lifecycle helper
-- **THEN** its threshold policy still runs when it stops
-
-#### Scenario: Successful short observation
-- **WHEN** a successful observation completes below the threshold with filtering explicitly enabled in a configuration supporting duration filtering
-- **THEN** it is discarded from export
-
-#### Scenario: Successful longer observation
-- **WHEN** a successful observation reaches or exceeds the threshold
-- **THEN** duration filtering does not discard it
-
-#### Scenario: Short failed observation
-- **WHEN** an observation fails below the threshold
-- **THEN** duration filtering does not discard the failure
-
-#### Scenario: Agent exporter cannot enforce discard
-- **WHEN** the documented agent configuration cannot apply the existing discard policy
-- **THEN** duration suppression is explicitly disabled for that configuration, collected spans confirm retention, and the configuration guide explains the limitation
-
-#### Scenario: Filtering disabled by default
-- **WHEN** a successful observation completes below the threshold without explicitly enabled duration filtering
-- **THEN** duration filtering does not discard it
-
 ### Requirement: Foundation reconciliation preserves main instrumentation
 
 The change SHALL preserve main's existing interaction, action, property modification, transaction, execution-publishing and JPA instrumentation boundaries. It SHALL use main-compatible dependency and toolchain versions rather than maintenance's compatibility pins.
diff --git a/openspec/specs/observation-policy/spec.md b/openspec/specs/observation-policy/spec.md
index 2ea87e2929b..50bb2949bcb 100644
--- a/openspec/specs/observation-policy/spec.md
+++ b/openspec/specs/observation-policy/spec.md
@@ -1,6 +1,6 @@
 ## Purpose
 
-Defines stable observation operation names, safe contextual metadata, automatic interaction identity, and configurable JPA duration filtering.
+Defines stable observation operation names, safe contextual metadata, automatic interaction identity, and duration-independent JPA span retention.
 ## Requirements
 ### Requirement: Existing dynamic observations separate operation and context
 
@@ -22,29 +22,12 @@ Causeway SHALL use fixed operation names for the existing JPA, action invocation
 - **WHEN** a safe static identifier is unavailable
 - **THEN** the operation remains observable without falling back to object or query descriptions
 
-### Requirement: JPA duration policy is explicit and validated
-
-Causeway SHALL expose only `causeway.observation.jpa-duration-threshold` for JPA duration filtering, defaulting to `0ms`. Zero SHALL disable filtering. A positive threshold SHALL mark successful JPA observations strictly below the threshold for discard; failed observations SHALL remain eligible for export. Negative or malformed thresholds SHALL fail startup. No separate duration-filtering-enabled property SHALL exist. Agent-owned export SHALL require a zero threshold because it does not  [...]
-
-#### Scenario: Default or zero threshold
-- **WHEN** the threshold is zero or unset
-- **THEN** short successful JPA spans are retained
-
-#### Scenario: Positive threshold
-- **WHEN** the threshold is positive
-- **THEN** shorter successful JPA spans are marked for discard while failed spans remain eligible
-
-#### Scenario: Invalid threshold
-- **WHEN** the threshold is negative or malformed
-- **THEN** startup reports a configuration error
-
 ### Requirement: Telemetry migration and limitations are documented
-
-The observability guide SHALL describe operation/contextual names, automatic identity attributes, duration defaults and configuration examples. It SHALL distinguish Micrometer operation identity from exported contextual names, explain that enabled duration filtering can leave missing parents, and retain the supported agent requirement to disable filtering. Migration SHALL NOT introduce duplicate legacy spans.
+The observability guide SHALL describe operation/contextual names, automatic identity attributes and the removal of JPA duration filtering. It SHALL distinguish Micrometer operation identity from exported contextual names and explain that normal sampling/export policy still determines available traces. It SHALL NOT present the removed threshold as supported configuration or require agent-specific duration overrides. Migration SHALL NOT introduce duplicate legacy spans.
 
 #### Scenario: Existing deployment migrates
-- **WHEN** an operator follows the migration guide
-- **THEN** they can inspect automatically included identity attributes and choose supported duration filtering without another SDK or duplicate observations
+- **WHEN** an operator follows the guide
+- **THEN** they can remove obsolete threshold settings and inspect complete eligible JPA/JDBC ancestry without configuring a replacement Causeway filter
 
 ### Requirement: Interaction identity metadata is automatic
 
@@ -58,3 +41,18 @@ Causeway SHALL always include nonempty username and multitenancy-token values un
 - **WHEN** an observed interaction has empty or missing identity values
 - **THEN** those attributes are omitted without inventing values
 
+### Requirement: JPA observations are independent of duration
+Causeway SHALL retain successful and failed JPA observations regardless of their duration, subject to ordinary sampling and export policies. It SHALL NOT expose a JPA duration threshold or automatically mark these observations for discard by duration. Existing operation/contextual names, metadata and ancestry SHALL remain intact in Boot-managed and agent-managed tracing. Explicit discard behavior outside duration filtering SHALL be preserved.
+
+#### Scenario: Short successful operation
+- **WHEN** a short JPA operation completes successfully under either supported tracing owner
+- **THEN** its JPA span remains eligible for export with its children and parentage intact
+
+#### Scenario: Failed operation
+- **WHEN** a JPA operation fails
+- **THEN** its error and observation lifecycle remain intact regardless of duration
+
+#### Scenario: Obsolete configuration
+- **WHEN** an application still supplies the removed JPA threshold property
+- **THEN** it has no effect on Causeway's JPA observation retention and is absent from configuration metadata
+