familia 2.0.0.pre12 → 2.0.0.pre13

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +2 -3
  3. data/CHANGELOG.rst +507 -0
  4. data/CLAUDE.md +1 -1
  5. data/Gemfile +1 -6
  6. data/Gemfile.lock +13 -7
  7. data/changelog.d/README.md +5 -5
  8. data/{setup.cfg → changelog.d/scriv.ini} +1 -1
  9. data/docs/guides/Feature-System-Autoloading.md +228 -0
  10. data/docs/guides/time-utilities.md +221 -0
  11. data/docs/migrating/v2.0.0-pre11.md +14 -16
  12. data/docs/migrating/v2.0.0-pre13.md +329 -0
  13. data/examples/autoloader/mega_customer/safe_dump_fields.rb +6 -0
  14. data/examples/autoloader/mega_customer.rb +17 -0
  15. data/familia.gemspec +1 -0
  16. data/lib/familia/autoloader.rb +53 -0
  17. data/lib/familia/base.rb +5 -0
  18. data/lib/familia/data_type.rb +4 -0
  19. data/lib/familia/encryption/encrypted_data.rb +4 -4
  20. data/lib/familia/encryption/manager.rb +6 -4
  21. data/lib/familia/encryption.rb +1 -1
  22. data/lib/familia/errors.rb +3 -0
  23. data/lib/familia/features/autoloadable.rb +113 -0
  24. data/lib/familia/features/encrypted_fields/concealed_string.rb +4 -2
  25. data/lib/familia/features/expiration.rb +4 -0
  26. data/lib/familia/features/quantization.rb +5 -0
  27. data/lib/familia/features/safe_dump.rb +7 -0
  28. data/lib/familia/features.rb +20 -16
  29. data/lib/familia/field_type.rb +2 -0
  30. data/lib/familia/horreum/core/serialization.rb +3 -3
  31. data/lib/familia/horreum/subclass/definition.rb +3 -4
  32. data/lib/familia/horreum.rb +2 -0
  33. data/lib/familia/json_serializer.rb +70 -0
  34. data/lib/familia/logging.rb +12 -10
  35. data/lib/familia/refinements/logger_trace.rb +57 -0
  36. data/lib/familia/refinements/snake_case.rb +40 -0
  37. data/lib/familia/refinements/time_utils.rb +248 -0
  38. data/lib/familia/refinements.rb +3 -49
  39. data/lib/familia/utils.rb +2 -0
  40. data/lib/familia/validation/{test_helpers.rb → validation_helpers.rb} +2 -2
  41. data/lib/familia/validation.rb +1 -1
  42. data/lib/familia/version.rb +1 -1
  43. data/lib/familia.rb +15 -3
  44. data/try/core/autoloader_try.rb +112 -0
  45. data/try/core/extensions_try.rb +38 -21
  46. data/try/core/familia_extended_try.rb +4 -3
  47. data/try/core/time_utils_try.rb +130 -0
  48. data/try/data_types/datatype_base_try.rb +3 -2
  49. data/try/features/autoloadable/autoloadable_try.rb +61 -0
  50. data/try/features/encrypted_fields/concealed_string_core_try.rb +8 -3
  51. data/try/features/encrypted_fields/secure_by_default_behavior_try.rb +59 -17
  52. data/try/features/encrypted_fields/universal_serialization_safety_try.rb +36 -12
  53. data/try/features/feature_improvements_try.rb +2 -1
  54. data/try/features/real_feature_integration_try.rb +1 -1
  55. data/try/features/safe_dump/safe_dump_autoloading_try.rb +111 -0
  56. data/try/helpers/test_helpers.rb +24 -0
  57. data/try/integration/cross_component_try.rb +3 -1
  58. metadata +33 -6
  59. data/CHANGELOG.md +0 -247
  60. data/lib/familia/core_ext.rb +0 -135
  61. data/lib/familia/features/autoloader.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 003a28f3135f0e89f6813e61cf08482350dbff865d2d97971998c714aafcc898
4
- data.tar.gz: 6c713c9861043c71d7b2cfc99a37c4522e404ed7461d8dafed5462022735440b
3
+ metadata.gz: ca101edcf531af301428b4b29bc83f464a84e47339a9d67f1b8a70ead828aa74
4
+ data.tar.gz: 56255e7fbc191f8c15b75d5cab0a990b83c3e54fe07362f1b20dbf392edca65d
5
5
  SHA512:
6
- metadata.gz: b0e4cb9f390ee0a3e1d83cc94a2248690fe757ce343665ef6e4ea6dbd2c74f8f7d07e352661380f0aac23e91f437315300a409847d28896b58b4ddf567d5e953
7
- data.tar.gz: 2ec7616c6b2d64d522d441447ac93e58fe89f35eccd357bfdfc65305fc4324122148e5a3722c4bfd613d1f194fac1e5c0228d72b3774aa0e86e09bcdfe8b90fb
6
+ metadata.gz: d92e09f275bcf262a73afe443fa5e099fff6c0836502de52d485358ec1f5d5a095878fe69ff9c4d5fcdbe26aa00c404474418cc72e9748b10d783ded2942e1b5
7
+ data.tar.gz: 2e22b89f457a6b188b31820e794960a5ad288c406ad7550fc47f48501489394fb891c966f7e147fe2b89b8d2eaa36b736258b75184a0aee5e5aa2aaf63ac6878
data/.rubocop_todo.yml CHANGED
@@ -64,14 +64,13 @@ Naming/BlockForwarding:
64
64
  - "lib/familia/data_type/types/list.rb"
65
65
  - "lib/familia/data_type/types/sorted_set.rb"
66
66
  - "lib/familia/data_type/types/unsorted_set.rb"
67
- - "lib/familia/refinements.rb"
67
+ - "lib/familia/refinements/logger_trace.rb"
68
68
 
69
69
  # Offense count: 8
70
70
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
71
71
  # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
72
72
  Naming/MethodParameterName:
73
73
  Exclude:
74
- - "lib/familia/core_ext.rb"
75
74
  - "lib/familia/horreum/class_methods.rb"
76
75
  - "lib/familia/data_type/types/sorted_set.rb"
77
76
  - "lib/familia/data_type/types/unsorted_set.rb"
@@ -107,7 +106,7 @@ Style/ArgumentsForwarding:
107
106
  - "lib/familia/data_type/types/list.rb"
108
107
  - "lib/familia/data_type/types/sorted_set.rb"
109
108
  - "lib/familia/data_type/types/unsorted_set.rb"
110
- - "lib/familia/refinements.rb"
109
+ - "lib/familia/refinements/logger_trace.rb"
111
110
 
112
111
  # Offense count: 11
113
112
  # Configuration parameters: AllowedConstants.
data/CHANGELOG.rst ADDED
@@ -0,0 +1,507 @@
1
+ CHANGELOG.rst
2
+ =============
3
+
4
+ All notable changes to Familia are documented here.
5
+
6
+ The format is based on `Keep a
7
+ Changelog <https://keepachangelog.com/en/1.1.0/>`__, and this project
8
+ adheres to `Semantic
9
+ Versioning <https://semver.org/spec/v2.0.0.html>`__.
10
+
11
+ .. raw:: html
12
+
13
+ <!--scriv-insert-here-->
14
+
15
+ .. _changelog-2.0.0.pre13:
16
+
17
+ 2.0.0.pre13 — 2025-09-07
18
+ ========================
19
+
20
+ Added
21
+ -----
22
+
23
+ - **Feature-specific autoloading**: Features can now automatically discover and load extension files from your project directories. When you include a feature like ``safe_dump``, Familia searches for configuration files using conventional patterns like ``{model_name}/{feature_name}_*.rb``, enabling clean separation between core model definitions and feature-specific configurations.
24
+
25
+ - **Consolidated autoloader architecture**: Introduced ``Familia::Autoloader`` as a shared utility for consistent file loading patterns across the framework, supporting both general-purpose and feature-specific autoloading scenarios.
26
+
27
+ - Added ``PER_MONTH`` constant (2,629,746 seconds = 30.437 days) derived from Gregorian year for consistent month calculations.
28
+ - Added ``months``, ``month``, and ``in_months`` conversion methods to Numeric refinement.
29
+ - Added month unit mappings (``'mo'``, ``'month'``, ``'months'``) to TimeUtils ``UNIT_METHODS`` hash.
30
+
31
+ - **Error Handling**: Added ``NotSupportedError`` for invalid serialization mode combinations in encryption subsystem. PR #97
32
+
33
+ Changed
34
+ -------
35
+
36
+ - Refactored time and numeric extensions from global monkey patches to proper Ruby refinements for better encapsulation and reduced global namespace pollution
37
+ - Updated all internal classes to use refinements via ``using Familia::Refinements::TimeUtils`` statements
38
+ - Added centralized ``RefinedContext`` module in test helpers to support refinement testing in tryouts files
39
+
40
+ - Updated ``PER_YEAR`` constant to use Gregorian year (31,556,952 seconds = 365.2425 days) for calendar consistency.
41
+
42
+ - **Performance**: Replaced stdlib JSON with OJ gem for 2-5x faster JSON operations and reduced memory allocation. All existing code remains compatible through mimic_JSON mode. PR #97
43
+
44
+ - **Encryption**: Enhanced serialization safety for encrypted fields with improved ConcealedString handling across different JSON processing modes. Strengthened protection against accidental data exposure during serialization. PR #97
45
+
46
+ Fixed
47
+ -----
48
+
49
+ - Fixed byte conversion logic in ``to_bytes`` method to correctly handle exact 1024-byte boundaries (``size >= 1024`` instead of ``size > 1024``)
50
+ - Resolved refinement testing issues in tryouts by implementing ``eval``-based code execution within refined contexts
51
+
52
+ - Fixed TimeUtils refinement ``months_old`` and ``years_old`` methods returning incorrect values (raw seconds instead of months/years). The underlying ``age_in`` method now properly handles ``:months`` and ``:years`` units. Issue #94.
53
+ - Fixed calendar consistency issue where ``12.months != 1.year`` by updating ``PER_YEAR`` to use Gregorian year (365.2425 days) and defining ``PER_MONTH`` as ``PER_YEAR / 12``.
54
+
55
+ Security
56
+ --------
57
+
58
+ - **Encryption**: Improved concealed value protection during JSON serialization, ensuring encrypted data remains properly protected across all OJ serialization modes. PR #97
59
+
60
+ Documentation
61
+ -------------
62
+
63
+ - **Feature System Autoloading Guide**: Added comprehensive guide at ``docs/guides/Feature-System-Autoloading.md`` explaining the new autoloading system, including file naming conventions, directory patterns, and usage examples.
64
+ - **Enhanced API documentation**: Added detailed YARD documentation for autoloading modules and methods.
65
+
66
+ AI Assistance
67
+ -------------
68
+
69
+ - Provided comprehensive analysis of Ruby refinement scoping issues and designed the eval-based testing solution
70
+ - Assisted with refactoring global extensions to proper refinements while maintaining backward compatibility
71
+ - Helped debug and fix the byte conversion boundary condition bug
72
+
73
+ - Significant AI assistance in architectural design and implementation of the feature-specific autoloading system, including pattern matching logic, Ruby introspection methods, and comprehensive debugging of edge cases and thread safety considerations.
74
+
75
+ - Claude Code assisted with implementing the fix for broken ``months_old`` and ``years_old`` methods in the TimeUtils refinement, including analysis, implementation, testing, and documentation.
76
+
77
+ - Performance optimization research and OJ gem integration strategy, including compatibility analysis and testing approach for seamless stdlib JSON replacement. PR #97
78
+
79
+ 2.0.0.pre12 — 2025-09-04
80
+ ========================
81
+
82
+ Added
83
+ ~~~~~
84
+
85
+ - Added the ``Familia::VerifiableIdentifier`` module to create and
86
+ verify identifiers with an embedded HMAC signature. This allows an
87
+ application to stateless-ly confirm that an identifier was generated
88
+ by itself, preventing forged IDs from malicious sources.
89
+
90
+ - **Scoped VerifiableIdentifier**: Added ``scope`` parameter to
91
+ ``generate_verifiable_id()`` and ``verified_identifier?()`` methods,
92
+ enabling cryptographically isolated identifier namespaces for
93
+ multi-tenant, multi-domain, or multi-environment applications while
94
+ maintaining full backward compatibility with existing code.
95
+
96
+ Changed
97
+ ~~~~~~~
98
+
99
+ - ObjectIdentifier feature now tracks which generator (uuid_v7,
100
+ uuid_v4, hex, or custom) was used for each objid to provide
101
+ provenance information for security-sensitive operations.
102
+
103
+ - Updated external identifier derivation to normalize objid format
104
+ based on the known generator type, eliminating format ambiguity
105
+ between UUID and hex formats.
106
+
107
+ - Refactored identifier generation methods for clarity and consistency.
108
+ Method ``generate_objid`` is now ``generate_object_identifier``, and
109
+ ``generate_external_identifier`` is now
110
+ ``derive_external_identifier`` to reflect its deterministic nature.
111
+
112
+ Removed
113
+ ~~~~~~~
114
+
115
+ - Removed the ``generate_extid`` class method, which was less secure
116
+ than the instance-level derivation logic.
117
+
118
+ Security
119
+ ~~~~~~~~
120
+
121
+ - Hardened external identifier derivation with provenance validation.
122
+ ExternalIdentifier now validates that objid values come from the
123
+ ObjectIdentifier feature before deriving external identifiers,
124
+ preventing derivation from potentially malicious or unvalidated objid
125
+ values while maintaining deterministic behavior for legitimate use
126
+ cases.
127
+
128
+ - Improved the security of external identifiers (``extid``) by using
129
+ the internal object identifier (``objid``) as a seed for a new random
130
+ value, rather than deriving the ``extid`` directly. This prevents
131
+ potential information leakage from the internal ``objid``.
132
+
133
+ Documentation
134
+ ~~~~~~~~~~~~~
135
+
136
+ - Added detailed YARD documentation for ``VerifiableIdentifier``,
137
+ explaining how to securely generate and manage the required
138
+ ``VERIFIABLE_ID_HMAC_SECRET`` key.
139
+
140
+ AI Assistance
141
+ ~~~~~~~~~~~~~
142
+
143
+ - Security analysis of external identifier derivation and hardened
144
+ design approach was discussed and developed with AI assistance,
145
+ including provenance tracking, validation logic, format
146
+ normalization, and comprehensive test updates.
147
+
148
+ - Implementation of scoped verifiable identifiers was developed with AI
149
+ assistance to ensure cryptographic security properties and
150
+ comprehensive test coverage.
151
+
152
+ 2.0.0.pre11 - 2025-09-03
153
+ ======================
154
+
155
+ .. _added-1:
156
+
157
+ Added
158
+ ~~~~~
159
+
160
+ - **Enhanced Feature System**: Introduced a hierarchical feature system
161
+ with ancestry chain traversal for model-specific feature
162
+ registration. This enables better organization, standardized naming,
163
+ and automatic loading of project-specific features via the new
164
+ ``Familia::Autoloader`` module.
165
+ - **Improved SafeDump DSL**: Replaced the internal
166
+ ``@safe_dump_fields`` implementation with a cleaner, more robust DSL
167
+ using ``safe_dump_field`` and ``safe_dump_fields`` methods.
168
+ - Added ``generate_short_id`` and ``shorten_securely`` utility methods
169
+ for creating short, secure identifiers, adapted from
170
+ ``OT::Utils::SecureNumbers``.
171
+ - For a detailed guide on migrating to the new feature system, see
172
+ ``docs/migration/v2.0.0-pre11.md``.
173
+
174
+ .. _changed-1:
175
+
176
+ Changed
177
+ ~~~~~~~
178
+
179
+ - External identifier now raises an ``ExternalIdentifierError`` if the
180
+ model does not have an objid field. Previously: returned nil. In
181
+ practice this should never happen, since the external_identifier
182
+ feature declares its dependency on object_identifier.
183
+ - Moved lib/familia/encryption_request_cache.rb to
184
+ lib/familia/encryption/request_cache.rb for consistency.
185
+ - **Simplified ObjectIdentifier Feature Implementation**: Consolidated
186
+ the ObjectIdentifier feature from two files (~190 lines) to a single
187
+ file (~140 lines) by moving the ObjectIdentifierFieldType class
188
+ inline. This reduces complexity while maintaining all existing
189
+ functionality including lazy generation, data integrity preservation,
190
+ and multiple generator strategies.
191
+ - **Renamed Identifier Features to Singular Form**: Renamed
192
+ ``object_identifier`` → ``object_identifier`` and
193
+ ``external_identifier`` → ``external_identifier`` for more accurate
194
+ naming. Added full-length aliases
195
+ (``object_identifier``/``external_identifier``) alongside the short
196
+ forms (``objid``/``extid``) for clarity when needed.
197
+ - **Simplified ExternalIdentifier Feature Implementation**:
198
+ Consolidated the ExternalIdentifier feature from two files (~240
199
+ lines) to a single file (~120 lines) by moving the
200
+ ExternalIdentifierFieldType class inline, following the same pattern
201
+ as ObjectIdentifier.
202
+
203
+ Fixed
204
+ ~~~~~
205
+
206
+ - Fixed external identifier generation returning all zeros for
207
+ UUID-based objids. The ``shorten_to_external_id`` method now
208
+ correctly handles both 256-bit secure identifiers and 128-bit UUIDs
209
+ by detecting input length and applying appropriate bit truncation
210
+ only when needed.
211
+
212
+ .. _security-1:
213
+
214
+ Security
215
+ ~~~~~~~~
216
+
217
+ - Improved input validation in ``shorten_to_external_id`` method by
218
+ replacing insecure character count checking with proper bit length
219
+ calculation and explicit validation. Invalid inputs now raise clear
220
+ error messages instead of being silently processed incorrectly.
221
+
222
+ 2.0.0-pre10 - 2025-09-02
223
+ ======================
224
+
225
+ .. _added-2:
226
+
227
+ Added
228
+ ~~~~~
229
+
230
+ - The ``Familia::Horreum`` initializer now supports creating an object
231
+ directly from its identifier by passing a single argument (e.g.,
232
+ ``Customer.new(customer_id)``). This provides a more convenient and
233
+ intuitive way to instantiate objects from lookups.
234
+
235
+ - Automatic indexing and class-level tracking on ``save()`` operations,
236
+ eliminating the need for manual index updates.
237
+
238
+ - Enhanced collection syntax supports the Ruby-idiomatic ``<<``
239
+ operator for more natural relationship management.
240
+
241
+ .. _changed-2:
242
+
243
+ Changed
244
+ ~~~~~~~
245
+
246
+ - The ``member_of`` relationship is now bidirectional. A single call to
247
+ ``member.add_to_owner_collection(owner)`` is sufficient to establish
248
+ the relationship, removing the need for a second, redundant call on
249
+ the owner object. This fixes bugs where members could be added to
250
+ collections twice.
251
+
252
+ - **BREAKING**: Refactored Familia Relationships API to remove “global”
253
+ terminology and simplify method generation. (Closes #86)
254
+
255
+ - Split ``generate_indexing_instance_methods`` into focused
256
+ ``generate_direct_index_methods`` and
257
+ ``generate_relationship_index_methods`` for better separation between
258
+ direct class-level and relationship-based indexing.
259
+
260
+ - Simplified method generation by removing complex global vs parent
261
+ conditionals.
262
+
263
+ - All indexes are now stored at the class level for consistency.
264
+
265
+ .. _fixed-1:
266
+
267
+ Fixed
268
+ ~~~~~
269
+
270
+ - Fixed a bug in the ``class_indexed_by`` feature where finder methods
271
+ (e.g., ``find_by_email``) would fail to correctly instantiate objects
272
+ from the index, returning partially-formed objects.
273
+
274
+ - Refactored connection handling to properly cache and reuse Redis
275
+ connections. This eliminates repetitive “Overriding existing
276
+ connection” warnings and improves performance.
277
+
278
+ - Method generation now works consistently for both
279
+ ``class_indexed_by`` and ``indexed_by`` with a ``parent:``.
280
+
281
+ - Resolved metadata storage issues for dynamically created classes.
282
+
283
+ - Improved error handling for nil class names in tracking
284
+ relationships.
285
+
286
+ .. _documentation-1:
287
+
288
+ Documentation
289
+ ~~~~~~~~~~~~~
290
+
291
+ - Updated the ``examples/relationships_basic.rb`` script to reflect the
292
+ improved, bidirectional ``member_of`` API and to ensure a clean
293
+ database state for each run.
294
+
295
+ .. _ai-assistance-1:
296
+
297
+ AI Assistance
298
+ ~~~~~~~~~~~~~
299
+
300
+ - This refactoring was implemented with Claude Code assistance,
301
+ including comprehensive test updates and API modernization.
302
+
303
+ 2.0.0-pre9 - 2025-09-02
304
+ ======================
305
+
306
+ .. _added-3:
307
+
308
+ Added
309
+ ~~~~~
310
+
311
+ - Added ``class_tracked_in`` method for global tracking relationships
312
+ following Horreum’s established ``class_`` prefix convention
313
+ - Added ``class_indexed_by`` method for global index relationships with
314
+ consistent API design
315
+
316
+ .. _changed-3:
317
+
318
+ Changed
319
+ ~~~~~~~
320
+
321
+ - **BREAKING**: ``tracked_in :global, collection`` syntax now raises
322
+ ArgumentError - use ``class_tracked_in collection`` instead
323
+ - **BREAKING**: ``indexed_by field, index, context: :global`` syntax
324
+ replaced with ``class_indexed_by field, index``
325
+ - **BREAKING**: ``indexed_by field, index, context: SomeClass`` syntax
326
+ replaced with ``indexed_by field, index, parent: SomeClass``
327
+ - Relationships API now provides consistent parameter naming across all
328
+ relationship types
329
+
330
+ .. _documentation-2:
331
+
332
+ Documentation
333
+ ~~~~~~~~~~~~~
334
+
335
+ - Updated Relationships Guide with new API syntax and migration
336
+ examples
337
+ - Updated relationships method documentation with new method signatures
338
+ - Updated basic relationships example to demonstrate new API patterns
339
+ - Added tryouts test coverage in
340
+ try/features/relationships/relationships_api_changes_try.rb
341
+
342
+ 2.0.0-pre8 - 2025-09-01
343
+ ======================
344
+
345
+ .. _added-4:
346
+
347
+ Added
348
+ ~~~~~
349
+
350
+ - Implemented Scriv-based changelog system for sustainable
351
+ documentation
352
+ - Added fragment-based workflow for tracking changes
353
+ - Created structured changelog templates and configuration
354
+
355
+ .. _documentation-3:
356
+
357
+ Documentation
358
+ ~~~~~~~~~~~~~
359
+
360
+ - Set up Scriv configuration and directory structure
361
+ - Created README for changelog fragment workflow
362
+
363
+ .. raw:: html
364
+
365
+ <!-- scriv-end-here -->
366
+
367
+ 2.0.0-pre7 - 2025-08-31
368
+ ======================
369
+
370
+ .. _added-5:
371
+
372
+ Added
373
+ ~~~~~
374
+
375
+ - Comprehensive relationships system with three relationship types:
376
+
377
+ - ``tracked_in`` - Multi-presence tracking with score encoding
378
+ - ``indexed_by`` - O(1) hash-based lookups
379
+ - ``member_of`` - Bidirectional membership with collision-free
380
+ naming
381
+
382
+ - Categorical permission system with bit-encoded permissions
383
+ - Time-based permission scoring for temporal access control
384
+ - Permission tier hierarchies with inheritance patterns
385
+ - Scalable permission management for large object collections
386
+ - Score-based sorting with custom scoring functions
387
+ - Permission-aware queries filtering by access levels
388
+ - Relationship validation framework ensuring data integrity
389
+
390
+ .. _changed-4:
391
+
392
+ Changed
393
+ ~~~~~~~
394
+
395
+ - Performance optimizations for large-scale relationship operations
396
+
397
+ .. _security-2:
398
+
399
+ Security
400
+ ~~~~~~~~
401
+
402
+ - GitHub Actions security hardening with matrix optimization
403
+
404
+ 2.0.0-pre6 - 2025-08-15
405
+ ======================
406
+
407
+ .. _added-6:
408
+
409
+ Added
410
+ ~~~~~
411
+
412
+ - New ``save_if_not_exists`` method for conditional persistence
413
+ - Atomic persistence operations with transaction support
414
+ - Enhanced error handling for persistence failures
415
+ - Improved data consistency guarantees
416
+
417
+ .. _changed-5:
418
+
419
+ Changed
420
+ ~~~~~~~
421
+
422
+ - Connection provider pattern for flexible pooling strategies
423
+ - Multi-database support with intelligent pool management
424
+ - Thread-safe connection handling for concurrent applications
425
+ - Configurable pool sizing and timeout management
426
+ - Modular class structure with cleaner separation of concerns
427
+ - Enhanced feature system with dependency management
428
+ - Improved inheritance patterns for better code organization
429
+ - Streamlined base class functionality
430
+
431
+ .. _fixed-2:
432
+
433
+ Fixed
434
+ ~~~~~
435
+
436
+ - Critical security fixes in Ruby workflow vulnerabilities
437
+ - Systematic dependency resolution via multi-constraint optimization
438
+
439
+ 2.0.0-pre5 - 2025-08-05
440
+ ======================
441
+
442
+ .. _added-7:
443
+
444
+ Added
445
+ ~~~~~
446
+
447
+ - Field-level encryption with transparent access patterns
448
+ - Multiple encryption providers:
449
+
450
+ - XChaCha20-Poly1305 (preferred, requires rbnacl)
451
+ - AES-256-GCM (fallback, OpenSSL-based)
452
+
453
+ - Field-specific key derivation for cryptographic domain separation
454
+ - Configurable key versioning supporting key rotation
455
+ - Non-persistent field storage for sensitive runtime data
456
+ - RedactedString wrapper preventing accidental logging/serialization
457
+ - Memory-safe handling of sensitive data in Ruby objects
458
+ - API-safe serialization excluding transient fields
459
+
460
+ .. _security-3:
461
+
462
+ Security
463
+ ~~~~~~~~
464
+
465
+ - Encryption field security hardening with additional validation
466
+ - Enhanced memory protection for sensitive data handling
467
+ - Improved key management patterns and best practices
468
+ - Security test suite expansion with comprehensive coverage
469
+
470
+ 2.0.0-pre - 2025-07-25
471
+ ======================
472
+
473
+ .. _added-8:
474
+
475
+ Added
476
+ ~~~~~
477
+
478
+ - Complete API redesign for clarity and modern Ruby conventions
479
+ - Valkey compatibility alongside traditional Redis support
480
+ - Ruby 3.4+ modernization with fiber and thread safety improvements
481
+ - Connection pooling foundation with provider pattern architecture
482
+
483
+ .. _changed-6:
484
+
485
+ Changed
486
+ ~~~~~~~
487
+
488
+ - ``Familia::Base`` replaced by ``Familia::Horreum`` as the primary
489
+ base class
490
+ - Connection configuration moved from simple string to block-based
491
+ setup
492
+ - Feature activation changed from ``include`` to ``feature``
493
+ declarations
494
+ - Method naming updated for consistency (``delete`` → ``destroy``,
495
+ ``exists`` → ``exists?``, ``dump`` → ``serialize``)
496
+
497
+ .. _documentation-4:
498
+
499
+ Documentation
500
+ ~~~~~~~~~~~~~
501
+
502
+ - YARD documentation workflow with automated GitHub Pages deployment
503
+ - Comprehensive migrating guide for v1.x to v2.0.0-pre transition
504
+
505
+ .. raw:: html
506
+
507
+ <!-- scriv-end-here -->
data/CLAUDE.md CHANGED
@@ -47,7 +47,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
47
47
 
48
48
  ### Changelog Management
49
49
 
50
- Add changelog fragment with each user-facing or documented change (optional but encouraged). See:
50
+ Add changelog fragment with each user-facing or documented change (optional but encouraged). Fragments use RST format. See:
51
51
  @changelog.d/README.md
52
52
 
53
53
  ### Known Issues & Quirks
data/Gemfile CHANGED
@@ -5,12 +5,7 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  group :test do
8
- if ENV['LOCAL_DEV']
9
- gem 'tryouts', path: '../tryouts'
10
- gem 'uri-valkey', path: '..//uri-valkey/gems', glob: 'uri-valkey.gemspec'
11
- else
12
- gem 'tryouts', '~> 3.5.2', require: false
13
- end
8
+ gem 'tryouts', '~> 3.6.0', require: false
14
9
  gem 'concurrent-ruby', '~> 1.3.5', require: false
15
10
  gem 'ruby-prof'
16
11
  gem 'stackprof'
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- familia (2.0.0.pre12)
5
- benchmark
6
- connection_pool
7
- csv
8
- logger
4
+ familia (2.0.0.pre13)
5
+ benchmark (~> 0.4)
6
+ connection_pool (~> 2.5)
7
+ csv (~> 3.3)
8
+ logger (~> 1.7)
9
+ oj (~> 3.16)
9
10
  redis (>= 4.8.1, < 6.0)
10
11
  stringio (~> 3.1.1)
11
12
  uri-valkey (~> 1.4)
@@ -16,6 +17,7 @@ GEM
16
17
  ast (2.4.3)
17
18
  base64 (0.3.0)
18
19
  benchmark (0.4.1)
20
+ bigdecimal (3.2.3)
19
21
  byebug (11.1.3)
20
22
  coderay (1.1.3)
21
23
  concurrent-ruby (1.3.5)
@@ -39,6 +41,10 @@ GEM
39
41
  logger (1.7.0)
40
42
  method_source (1.1.0)
41
43
  minitest (5.25.5)
44
+ oj (3.16.11)
45
+ bigdecimal (>= 3.0)
46
+ ostruct (>= 0.2)
47
+ ostruct (0.6.3)
42
48
  parallel (1.27.0)
43
49
  parser (3.3.8.0)
44
50
  ast (~> 2.4.1)
@@ -113,7 +119,7 @@ GEM
113
119
  ruby-progressbar (1.13.0)
114
120
  stackprof (0.2.27)
115
121
  stringio (3.1.7)
116
- tryouts (3.5.2)
122
+ tryouts (3.6.0)
117
123
  concurrent-ruby (~> 1.0)
118
124
  irb
119
125
  minitest (~> 5.0)
@@ -148,7 +154,7 @@ DEPENDENCIES
148
154
  rubocop-thread_safety
149
155
  ruby-prof
150
156
  stackprof
151
- tryouts (~> 3.5.2)
157
+ tryouts (~> 3.6.0)
152
158
  yard (~> 0.9)
153
159
 
154
160
  BUNDLED WITH
@@ -17,11 +17,11 @@ This approach provides several benefits:
17
17
 
18
18
  ## Relevant paths
19
19
 
20
- * `changelog.d/` - (e.g. changelog.d/YYYYMMDD_HHmmss_username_branch.md)
20
+ * `changelog.d/` - (e.g. changelog.d/YYYYMMDD_HHmmss_username_branch.rst)
21
21
  * `docs/migrating/` - (e.g. docs/migrating/v2.0.0-pre.md)
22
- * `CHANGELOG.md` - The full changelog for all releases, in reverse chronological order. Careful: LARGE DOCUMENT. Limit reading to the first 50 lines.
22
+ * `CHANGELOG.rst` - The full changelog for all releases, in reverse chronological order. Careful: LARGE DOCUMENT. Limit reading to the first 50 lines.
23
23
 
24
- * `setup.cfg` - Scriv tool settings
24
+ * `changelog.d/scriv.ini` - Scriv tool settings
25
25
 
26
26
  ## How to Add a Changelog Entry
27
27
 
@@ -44,7 +44,7 @@ Compare the headers of your draft content with the headers of the previous migra
44
44
 
45
45
  4. **Commit with Your Code:**
46
46
  ```bash
47
- git add changelog.d/YYYYMMDD_HHmmss_username_branch.md [docs/migrating/v2.0.0-pre.md]
47
+ git add changelog.d/YYYYMMDD_HHmmss_username_branch.rst [docs/migrating/v2.0.0-pre.md]
48
48
  git commit
49
49
  ```
50
50
 
@@ -74,4 +74,4 @@ Use these categories:
74
74
 
75
75
  ## Release Process
76
76
 
77
- At release time, scriv will collect all fragments into the main `CHANGELOG.md` file with th command `scriv collect`. The version is taken automatically from `lib/familia/version.rb`.
77
+ At release time, scriv will collect all fragments into the main `CHANGELOG.rst` file with th command `scriv collect`. The version is taken automatically from `lib/familia/version.rb`.
@@ -1,5 +1,5 @@
1
1
  [scriv]
2
+ format = rst
2
3
  categories = Added, Changed, Deprecated, Removed, Fixed, Security, Documentation, AI Assistance
3
4
  version = command: ruby -r ./lib/familia/version.rb -e "puts Familia::VERSION"
4
5
  main_branches = main, develop
5
- md_header_level = 2