orfeas_lyra 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d1fc3fab85a30b1ed635864d084fee35468b77ff0ad0ce2aec0b0d004fe43e7
4
- data.tar.gz: e050efff730bc551ef67c3d0107dc5c11fb5c5e8ba433970f188c17d3517e3c5
3
+ metadata.gz: 78b09c46f0962b726d30c8cd53850948b8ae2ef72b3cf2d696e9d380e04e7863
4
+ data.tar.gz: 27e7df735b3cfde195fa2b5af0995c381d6ad564177446e85f42ac131eaf38eb
5
5
  SHA512:
6
- metadata.gz: 5650de44e8ade792aa79bf9fba6e42dd6144e08521a47aa5132e34df94215af9c464faa3d08f87c7d8b98a03649b0f4600e8636a3e334da89100eb0e257a6170
7
- data.tar.gz: 03d0c2c5419ffddd950f86d8d97dcc3033be8bbd81dda0a8470ef9ab2c4e743c98484788cb74a59a41cf3933c946496f06201d77341b2c9280e58accd26012f7
6
+ metadata.gz: 87974ed14d52033ec9535e7226196850eafa0d328e1a1c66c3158c6e610d9bda007492f6343b7c0030cbba3ccc8f94081295b4877d34966aa5f7625175ee18ea
7
+ data.tar.gz: 956d753a51e3ce4d6297adebf063da64c4afaee369de7974f4a2bb4040f80c89702fc0b4d777d0119e8333cfdf40bba3720a4f484de84318a60278a74e90cda4
data/CHANGELOG.md CHANGED
@@ -7,6 +7,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.0] - 2026-08-09
11
+
12
+ The version the PAM article (Requirements Engineering, 2026) describes.
13
+
14
+ ### Added
15
+ - **Projection rebuild from the event log** (`Lyra::Projections::Rebuild`) - Reconstruct
16
+ read-model tables from the event streams alone, the load-bearing invariant of event
17
+ sourcing (log is source of truth; tables are a derived projection):
18
+ - `Lyra::Projections::Rebuild.rebuild(Model)` clears the read model and replays each
19
+ stream through the same `ModelProjection.project` path used by live sync/async
20
+ projection, so a rebuilt table matches what live projection would have produced.
21
+ - `Lyra::Projections::Rebuild.rebuild_all` rebuilds every monitored model (or an
22
+ explicit list); `truncate: false` reconstructs streamed rows in place.
23
+ - `rake lyra:projections:rebuild [MODEL=Namespace::Model[,Other]] [TRUNCATE=false]`
24
+ rake task wrapping the above.
25
+ - Invalidates ES-NoProj cached reconstructions so reads reflect the rebuild.
26
+ - Integration tests (`test/projections/rebuild_test.rb`) covering surviving-record
27
+ reconstruction, destroyed-record omission, dual-view consistency after rebuild, and
28
+ `rebuild_all` over monitored models.
29
+ - **PAM DSL** aligned with its formal foundations — see `gems/pam_dsl/CHANGELOG.md`.
30
+ - **Performance characterization** (`docs/PERFORMANCE.md`) — measured overhead of every
31
+ Lyra mode against a plain-ORM baseline: throughput and P95 latency across 1–64 threads,
32
+ the measurement controls used, and a SQL-level account of why Hijack mode outperforms
33
+ Monitor mode. The benchmark harness itself is published on acceptance of the
34
+ accompanying papers.
35
+
36
+ ### Fixed
37
+ - **`:disabled` mode emitted events** (`Lyra::Interceptors::CrudInterceptor`) — the monitor
38
+ callbacks were gated on `lyra_monitored?`, a class attribute carrying no mode check, so a
39
+ model that had ever called `monitor_with_lyra` kept writing to the event store after Lyra
40
+ was disabled. A 150-write workload emitted 150 `event_store_events` rows in `:disabled`
41
+ mode, identical to `:monitor`. `:disabled` is now gated on `lyra_events_enabled?`
42
+ (monitored **and** not disabled), making it a true plain-ORM baseline. Hijack and
43
+ event-sourcing modes still pass the guard and are unaffected — their `after_*` callbacks
44
+ already return early via `@lyra_hijacked`.
45
+
46
+ If you have been using `:disabled` as an off switch on models that call
47
+ `monitor_with_lyra`, those models were still writing events before this fix.
48
+
49
+ The existing `test_disabled_mode_captures_no_events` could not catch this: it redefines the
50
+ model *without* the interceptor, asserting the outcome by construction. The new
51
+ `test_disabled_mode_writes_no_events_for_a_monitored_model` keeps the model monitored and
52
+ flips only the mode — what a migrating team actually does — and counts rows directly.
53
+ - **Empty-stream reads raised `NameError`** (`Lyra::Projections::CachedProjection`) —
54
+ `load_events` rescued `RubyEventStore::StreamNotFound`, which does not exist in
55
+ `ruby_event_store` 2.18/3.0; the real class is `EventNotFoundInStream`. The bad constant
56
+ reference raised instead of catching the empty-stream case, surfacing as silent failed
57
+ operations on the ES (No Projection) read path.
58
+
10
59
  ## [0.6.0] - 2026-01-05
11
60
 
12
61
  ### Added