whodunit-chronicles 0.3.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +22 -226
- data/LICENSE +1 -1
- data/README.md +96 -599
- data/exe/whodunit-chronicles +6 -0
- data/lib/whodunit/chronicles/chronicler.rb +62 -0
- data/lib/whodunit/chronicles/cli.rb +131 -0
- data/lib/whodunit/chronicles/errors.rb +7 -33
- data/lib/whodunit/chronicles/ledger.rb +69 -0
- data/lib/whodunit/chronicles/ledger_entry.rb +143 -0
- data/lib/whodunit/chronicles/ledger_factory.rb +66 -0
- data/lib/whodunit/chronicles/ledgers/file_ledger.rb +56 -0
- data/lib/whodunit/chronicles/ledgers/memory_ledger.rb +29 -0
- data/lib/whodunit/chronicles/ledgers/sqlite_ledger.rb +172 -0
- data/lib/whodunit/chronicles/version.rb +2 -1
- data/lib/whodunit/chronicles.rb +12 -65
- data/lib/whodunit-chronicles.rb +0 -1
- data/sig/whodunit/chronicles/chronicler.rbs +14 -0
- data/sig/whodunit/chronicles/cli.rbs +17 -0
- data/sig/whodunit/chronicles/errors.rbs +15 -0
- data/sig/whodunit/chronicles/ledger.rbs +13 -0
- data/sig/whodunit/chronicles/ledger_entry.rbs +62 -0
- data/sig/whodunit/chronicles/ledger_factory.rbs +14 -0
- data/sig/whodunit/chronicles/ledgers/file_ledger.rbs +14 -0
- data/sig/whodunit/chronicles/ledgers/memory_ledger.rbs +12 -0
- data/sig/whodunit/chronicles/ledgers/sqlite_ledger.rbs +30 -0
- data/sig/whodunit/chronicles.rbs +5 -0
- metadata +40 -326
- data/.codeclimate.yml +0 -50
- data/.rubocop.yml +0 -93
- data/.yardopts +0 -14
- data/CODE_OF_CONDUCT.md +0 -132
- data/CONTRIBUTING.md +0 -186
- data/Rakefile +0 -18
- data/docker/mysql/init.sql +0 -33
- data/docker/postgres/init.sql +0 -40
- data/docker-compose.yml +0 -138
- data/examples/images/campaign-performance-analytics.png +0 -0
- data/examples/images/candidate-journey-analytics.png +0 -0
- data/examples/images/recruitment-funnel-analytics.png +0 -0
- data/lib/.gitkeep +0 -0
- data/lib/whodunit/chronicles/adapter_loader.rb +0 -69
- data/lib/whodunit/chronicles/adapters/mysql.rb +0 -261
- data/lib/whodunit/chronicles/adapters/postgresql.rb +0 -278
- data/lib/whodunit/chronicles/change_event.rb +0 -201
- data/lib/whodunit/chronicles/composite_processor.rb +0 -86
- data/lib/whodunit/chronicles/configuration.rb +0 -112
- data/lib/whodunit/chronicles/connection.rb +0 -88
- data/lib/whodunit/chronicles/persistence.rb +0 -129
- data/lib/whodunit/chronicles/processor.rb +0 -127
- data/lib/whodunit/chronicles/service.rb +0 -207
- data/lib/whodunit/chronicles/stream_adapter.rb +0 -91
- data/lib/whodunit/chronicles/table.rb +0 -120
- data/whodunit-chronicles.gemspec +0 -79
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c5860f6ea71bf324cb88c3962606f53c7292ba89cbf572ba408443f60248f366
|
|
4
|
+
data.tar.gz: 7333d83462ec43b3d93c38666ff51cacafff8af2579abc28594603e0d5e75a1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cce125043fb2152e3ba2e82a7c4df6a4294c624bce1278caa55ed4605166f7b658e7efe66b11a45168e154db8910a1cd5aca8c6266310e0df9e2943deb70880
|
|
7
|
+
data.tar.gz: 12bb800f8a9f0fe4b9f0355a2be1442195feeb58deab010bc25acdcc2e597cf041eb0c15bfe102b28f746b2c93e4aa1ff44677864ccaac9b2c2f501fcb03e8ff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,228 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
instructions is raised if the gem is missing, instead of a cryptic `LoadError`.
|
|
26
|
-
- **`bin/console`** — loads the gem with a sane test config and drops into Pry
|
|
27
|
-
for interactive development.
|
|
28
|
-
- **Docker Compose test environment** — spins up PostgreSQL 16 (`wal_level=logical`),
|
|
29
|
-
MySQL 8, and MariaDB 11 with matching audit databases, init SQL scripts, test
|
|
30
|
-
tables, publication setup, and replication role grants.
|
|
31
|
-
- Development environment setup guide added to docs.
|
|
32
|
-
|
|
33
|
-
### Fixed
|
|
34
|
-
|
|
35
|
-
- Gemspec `homepage_uri` metadata corrected.
|
|
36
|
-
- `pg`, `trilogy`, and `bigdecimal` moved from runtime to `add_development_dependency`
|
|
37
|
-
— consuming apps are no longer forced to install database adapters they don't use.
|
|
38
|
-
- `rubocop-rake` and `rubocop-thread_safety` added to development dependencies.
|
|
39
|
-
|
|
40
|
-
### Chore
|
|
41
|
-
|
|
42
|
-
- `Gemfile.lock` removed from repo.
|
|
43
|
-
- `.gitignore` updated with recommended exclusions.
|
|
44
|
-
|
|
45
|
-
### Docs
|
|
46
|
-
|
|
47
|
-
- Broken links in README fixed.
|
|
48
|
-
- Development environment setup guide added.
|
|
49
|
-
|
|
50
|
-
### ⚠️ Breaking Changes
|
|
51
|
-
|
|
52
|
-
- `pg`, `trilogy`, and `bigdecimal` are no longer runtime dependencies. If your
|
|
53
|
-
application relies on them being pulled in transitively via `whodunit-chronicles`,
|
|
54
|
-
add them explicitly to your own Gemfile.
|
|
55
|
-
- remove ruby@3.1 from the supported versions of Ruby
|
|
56
|
-
|
|
57
|
-
## [0.2.0] - 2025-01-28
|
|
58
|
-
|
|
59
|
-
### Added
|
|
60
|
-
|
|
61
|
-
- **MySQL/MariaDB Support**: Complete multi-database adapter architecture
|
|
62
|
-
- MySQL adapter using trilogy gem for high-performance connections
|
|
63
|
-
- Binary log streaming support for MySQL change capture
|
|
64
|
-
- Cross-database compatibility testing
|
|
65
|
-
- **Enhanced Testing Suite**: Comprehensive test coverage improvements
|
|
66
|
-
- New test files: `table_test.rb`, `connection_test.rb`, `persistence_test.rb`
|
|
67
|
-
- Enhanced PostgreSQL adapter tests with connection and replication scenarios
|
|
68
|
-
- Increased line coverage from 91.28% to 97.29% (+6.01 percentage points)
|
|
69
|
-
- 227 tests with 552 assertions providing robust validation
|
|
70
|
-
- **Ruby 3.4+ Compatibility**: Forward compatibility improvements
|
|
71
|
-
- Added `bigdecimal` dependency for Ruby 3.4+ support
|
|
72
|
-
- Explicit dependency management for removed stdlib components
|
|
73
|
-
- **CI/CD Enhancements**: Improved automation and quality gates
|
|
74
|
-
- Matrix testing across PostgreSQL and MySQL databases
|
|
75
|
-
- Enhanced MySQL integration testing with proper connection handling
|
|
76
|
-
- Security scanning integration and automated dependency updates
|
|
77
|
-
|
|
78
|
-
### Changed
|
|
79
|
-
|
|
80
|
-
- **Architecture Refactoring**: Modular component extraction
|
|
81
|
-
- Extracted AuditProcessor into separate, focused components
|
|
82
|
-
- Improved service layer with multi-adapter support patterns
|
|
83
|
-
- Enhanced configuration system supporting both PostgreSQL and MySQL
|
|
84
|
-
- **Database Adapter Pattern**: Extensible multi-database support
|
|
85
|
-
- Abstract adapter base class for consistent interface
|
|
86
|
-
- Database-specific implementations with optimized performance
|
|
87
|
-
- Unified change event system across different database types
|
|
88
|
-
- **Test Infrastructure**: Comprehensive testing improvements
|
|
89
|
-
- Enhanced mock-based testing for complex database operations
|
|
90
|
-
- Improved test organization with better separation of concerns
|
|
91
|
-
- Integration test scenarios for real-world usage patterns
|
|
92
|
-
|
|
93
|
-
### Fixed
|
|
94
|
-
|
|
95
|
-
- **MySQL CI Integration**: Resolved connection and setup issues
|
|
96
|
-
- Fixed MySQL container configuration and health checks
|
|
97
|
-
- Improved database readiness detection and timeout handling
|
|
98
|
-
- Enhanced error reporting and debugging for CI environments
|
|
99
|
-
- **Dependency Management**: Ruby version compatibility
|
|
100
|
-
- Added explicit `bigdecimal ~> 3.1` dependency for Ruby 3.4+
|
|
101
|
-
- Resolved trilogy gem loading issues in newer Ruby versions
|
|
102
|
-
- Improved gem specification with proper version constraints
|
|
103
|
-
|
|
104
|
-
### Technical Improvements
|
|
105
|
-
|
|
106
|
-
- **Code Coverage**: Significant testing improvements
|
|
107
|
-
- Line coverage: 97.29% (647/665 lines covered)
|
|
108
|
-
- Branch coverage: 83.6% (158/189 branches covered)
|
|
109
|
-
- Comprehensive unit tests for all core modules
|
|
110
|
-
- **Performance Optimizations**: Multi-adapter efficiency
|
|
111
|
-
- Database-specific SQL generation and parameter binding
|
|
112
|
-
- Optimized connection management across different adapters
|
|
113
|
-
- Efficient batch processing for both PostgreSQL and MySQL
|
|
114
|
-
- **Error Handling**: Enhanced resilience and debugging
|
|
115
|
-
- Improved error messages and stack trace reporting
|
|
116
|
-
- Better handling of database-specific error conditions
|
|
117
|
-
- Enhanced logging for troubleshooting and monitoring
|
|
118
|
-
|
|
119
|
-
### Development Experience
|
|
120
|
-
|
|
121
|
-
- **Documentation**: Enhanced developer resources
|
|
122
|
-
- Updated README with MySQL/MariaDB configuration examples
|
|
123
|
-
- Improved inline documentation for multi-adapter usage
|
|
124
|
-
- Better error messages and troubleshooting guides
|
|
125
|
-
- **Testing Framework**: Improved development workflow
|
|
126
|
-
- Faster test execution with better mock strategies
|
|
127
|
-
- More reliable CI/CD pipeline with matrix testing
|
|
128
|
-
- Enhanced debugging capabilities for test failures
|
|
129
|
-
|
|
130
|
-
## [0.1.0] - 2025-01-21
|
|
131
|
-
|
|
132
|
-
### Added
|
|
133
|
-
|
|
134
|
-
- Comprehensive GitHub Actions CI/CD pipeline with multi-Ruby testing
|
|
135
|
-
- Automated security scanning with bundler-audit and CodeQL
|
|
136
|
-
- YARD documentation generation with GitHub Pages deployment
|
|
137
|
-
- Automated gem publishing workflow for tagged releases
|
|
138
|
-
- Structured issue and pull request templates for better contributor experience
|
|
139
|
-
- Dependabot configuration for automated dependency updates
|
|
140
|
-
- Security scanning dependencies (bundler-audit, brakeman)
|
|
141
|
-
- Comprehensive README with architecture diagrams and examples
|
|
142
|
-
- RuboCop configuration with relaxed metrics for test files
|
|
143
|
-
|
|
144
|
-
### Changed
|
|
145
|
-
|
|
146
|
-
- Updated dependencies to latest versions with security patches
|
|
147
|
-
- Improved RuboCop configuration to exclude test files from ClassLength limits
|
|
148
|
-
- Enhanced gemspec with proper metadata and security dependencies
|
|
149
|
-
|
|
150
|
-
## [0.1.0] - 2025-01-21
|
|
151
|
-
|
|
152
|
-
### Added
|
|
153
|
-
|
|
154
|
-
- **Core Architecture**: Complete zero-latency audit streaming implementation
|
|
155
|
-
- **PostgreSQL Adapter**: Logical replication streaming with WAL decoding
|
|
156
|
-
- **ChangeEvent System**: Unified change representation across database adapters
|
|
157
|
-
- **Processor**: Intelligent transformation of changes into audit records
|
|
158
|
-
- **Configuration Management**: Comprehensive settings with validation using dry-configurable
|
|
159
|
-
- **Service Orchestration**: Thread-safe service with error handling and retry logic
|
|
160
|
-
- **Abstract Adapter Pattern**: Extensible design supporting multiple database systems
|
|
161
|
-
- **User Attribution**: Automatic extraction of user information from creator/updater/deleter fields
|
|
162
|
-
- **Batch Processing**: Efficient bulk processing of audit records
|
|
163
|
-
- **Connection Management**: Robust database connection handling with retries
|
|
164
|
-
- **Error Handling**: Comprehensive error recovery and logging
|
|
165
|
-
- **Thread Safety**: Concurrent processing with thread pool management
|
|
166
|
-
|
|
167
|
-
### Technical Implementation
|
|
168
|
-
|
|
169
|
-
- **Modern Ruby Support**: Ruby 3.1+ with frozen string literals
|
|
170
|
-
- **Database Features**:
|
|
171
|
-
- PostgreSQL logical replication with pgoutput plugin
|
|
172
|
-
- Publication and replication slot management
|
|
173
|
-
- WAL position tracking and resumption
|
|
174
|
-
- Connection pooling and management
|
|
175
|
-
- **Event Processing**:
|
|
176
|
-
- Real-time change capture at database level
|
|
177
|
-
- Structured change events with metadata
|
|
178
|
-
- Configurable table and schema filtering
|
|
179
|
-
- Transaction ID and sequence number tracking
|
|
180
|
-
- **Audit Records**:
|
|
181
|
-
- Complete before/after data capture
|
|
182
|
-
- Calculated field-level changes
|
|
183
|
-
- User attribution from standard columns
|
|
184
|
-
- Timestamps and version tracking
|
|
185
|
-
- JSON metadata storage
|
|
186
|
-
|
|
187
|
-
### Development & Testing
|
|
188
|
-
|
|
189
|
-
- **Test Coverage**: 94.3% code coverage (447/474 lines)
|
|
190
|
-
- **Testing Framework**: Minitest with shoulda-style assertions and mocha mocking
|
|
191
|
-
- **Test Suite**: 129 tests covering all components with comprehensive error scenarios
|
|
192
|
-
- **Code Quality**: RuboCop compliance with modern Ruby standards
|
|
193
|
-
- **Security**: bundler-audit integration for vulnerability scanning
|
|
194
|
-
- **Documentation**: Inline YARD documentation for all public APIs
|
|
195
|
-
|
|
196
|
-
### Dependencies
|
|
197
|
-
|
|
198
|
-
- **Core**: concurrent-ruby, dry-configurable, dry-logger, pg
|
|
199
|
-
- **Development**: minitest, rubocop, simplecov, yard
|
|
200
|
-
- **Testing**: mocha for mocking, pry for debugging
|
|
201
|
-
- **Security**: bundler-audit for vulnerability scanning
|
|
202
|
-
|
|
203
|
-
### Configuration Options
|
|
204
|
-
|
|
205
|
-
- Database connection URLs (source and audit)
|
|
206
|
-
- PostgreSQL publication and replication slot names
|
|
207
|
-
- Batch processing sizes and retry policies
|
|
208
|
-
- Table and schema inclusion/exclusion filters
|
|
209
|
-
- Logging levels and output configuration
|
|
210
|
-
- Thread pool and concurrency settings
|
|
211
|
-
|
|
212
|
-
### Performance Features
|
|
213
|
-
|
|
214
|
-
- **Zero Application Overhead**: No Rails callbacks or Active Record hooks
|
|
215
|
-
- **Efficient Streaming**: PostgreSQL logical replication optimization
|
|
216
|
-
- **Memory Management**: Streaming processing without dataset loading
|
|
217
|
-
- **Configurable Batching**: Tunable batch sizes for optimal throughput
|
|
218
|
-
- **Connection Reuse**: Persistent connections with automatic recovery
|
|
219
|
-
- **Background Processing**: Non-blocking operation with thread pools
|
|
220
|
-
|
|
221
|
-
### Production Ready Features
|
|
222
|
-
|
|
223
|
-
- **Monitoring**: Service status and health checking
|
|
224
|
-
- **Resilience**: Automatic retry logic with exponential backoff
|
|
225
|
-
- **Graceful Shutdown**: Clean service termination
|
|
226
|
-
- **Error Recovery**: Robust error handling with detailed logging
|
|
227
|
-
- **Position Tracking**: WAL position persistence for reliable resumption
|
|
228
|
-
- **Resource Management**: Bounded thread pools and memory usage
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.4.0
|
|
6
|
+
|
|
7
|
+
- Rebuilt as a minimal CDC audit sink.
|
|
8
|
+
- Added `Chronicler` as a `CDC::Core::Processor`.
|
|
9
|
+
- Added runtime dependency on `cdc-core`.
|
|
10
|
+
- Added immutable `LedgerEntry`.
|
|
11
|
+
- Added `Ledger` base contract.
|
|
12
|
+
- Added `MemoryLedger`.
|
|
13
|
+
- Added `FileLedger`.
|
|
14
|
+
- Added `SQLiteLedger`.
|
|
15
|
+
- Added ledger lifecycle CLI.
|
|
16
|
+
- Added RBS signatures.
|
|
17
|
+
- Added 100% code coverage and 100% YARD coverage gates.
|
|
18
|
+
- Added runtime dependency on `sqlite3` for built-in SQLite ledger support.
|
|
19
|
+
- Added real SQLite integration coverage for persistence, custom tables, status counts, and duplicate event IDs.
|
|
20
|
+
- Clarified SQLite duplicate append behavior: duplicate `event_id` values raise `Whodunit::Chronicles::AppendError`.
|
|
21
|
+
- Added JSON status output and stricter option validation to the ledger lifecycle CLI.
|
|
22
|
+
- Improved CLI errors for malformed configuration, missing required ledger options, unsupported lifecycle methods, and failed verification.
|
|
23
|
+
- Completed the Steep-backed RBS quality gate.
|
|
24
|
+
- Added GitHub Actions workflows for generated YARD documentation and tagged RubyGems releases.
|
data/LICENSE
CHANGED