chronos-ruby 1.1.3 → 1.1.4
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 +32 -0
- data/README.md +189 -96
- data/docs/adr/legacy-deploy-cli.md +21 -0
- data/docs/compatibility.md +1 -1
- data/docs/deploy-cli.md +36 -0
- data/docs/legacy-test-environment.md +59 -0
- data/docs/modules/sidekiq-legacy.md +1 -1
- data/docs/release-1.1.4-readiness.md +44 -0
- data/exe/chronos +3 -0
- data/lib/chronos/agent.rb +16 -5
- data/lib/chronos/cli.rb +117 -0
- data/lib/chronos/core/bounded_copy.rb +69 -0
- data/lib/chronos/core/notice.rb +4 -28
- data/lib/chronos/core/sanitizer.rb +1 -1
- data/lib/chronos/core/sql_lexer.rb +73 -0
- data/lib/chronos/core/sql_normalizer.rb +7 -7
- data/lib/chronos/core/telemetry_event.rb +5 -18
- data/lib/chronos/deploy/configuration.rb +96 -0
- data/lib/chronos/deploy/error.rb +14 -0
- data/lib/chronos/deploy/installer.rb +65 -0
- data/lib/chronos/deploy/providers.rb +50 -0
- data/lib/chronos/deploy/runner.rb +44 -0
- data/lib/chronos/deploy/secure_directory.rb +125 -0
- data/lib/chronos/rails/active_record_query_inspector.rb +2 -4
- data/lib/chronos/rake_tasks.rb +13 -1
- data/lib/chronos/version.rb +1 -1
- data/lib/generators/chronos/deploy/install/install_generator.rb +26 -0
- metadata +33 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d4fb3acb37582be8f5e5cfb2c83f7f545c994eddc163418374f374df4c10a20
|
|
4
|
+
data.tar.gz: acf91dc9956b8ce3ee01c9965b9cc963ce0fab7da485fdc1114b03ed68fe01cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a55d126a06b8e4e620322b39b24b4a733fd5eec3b816b8dc733964b940ea158cbde8617c8c712b5782579c34674988738be3b102bdaa33887a6a540ea8ec1153
|
|
7
|
+
data.tar.gz: 218cdf2e67881da07faaa858044061e3032b7cf0876fbc021f6f6e65776b20640d830bcbbeee31dfe226be07f5631b855a5e5c0fcfd687abceac3ee49ce99edb
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@ All notable changes are documented here. The project follows Semantic Versioning
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.1.4] - 2026-10-31
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Packaged `chronos` executable with `deploy notify`, `deploy verify`, `deploy diagnose --offline`, and `deploy install`, without requiring Rails or a copied notification script.
|
|
12
|
+
- Explicit CLI configuration through public options, canonical environment variables, compatible aliases, and optional allowlisted YAML; stable publication identity and actual artifact revision/version are required for notification.
|
|
13
|
+
- Idempotent integration installers for Kamal, Capistrano, GitHub Actions, GitLab CI, Jenkins, and Azure DevOps, plus optional Rails generator and Rake task adapters.
|
|
14
|
+
- Versioned JSON outcomes, documented exit codes, bounded transport operations, and a warning policy that preserves unconfirmed delivery status.
|
|
15
|
+
- Local HTTPS tests, installed-package smoke gates, Rails generator smoke coverage, and an isolated Docker helper for individual and combined legacy matrix runs.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Include the executable and deploy implementation in the gem package while preserving the existing Ruby requirement and protocol v1.
|
|
20
|
+
- Disable retries and backlog in the CLI; receipt verification also disables dependency reporting. The existing Ruby API defaults remain unchanged.
|
|
21
|
+
- Translate the README into English and document Docker test preparation and matrix execution.
|
|
22
|
+
- Prepare release metadata, compatibility references, and readiness documentation for 1.1.4. Legacy runtime, supplier, and SaaS validation remain release gates, not claims established by modern local tests.
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
|
|
26
|
+
- Mask SQL literals lexically before output truncation and omit oversized, incomplete, or ambiguous SQL instead of retaining partial private values.
|
|
27
|
+
- Validate the entire original query before optional plan inspection; reject additional statements even when normalized metadata was truncated.
|
|
28
|
+
- Sanitize sensitive symbol values before JSON conversion and copy diagnostic structures with cycle, depth, collection, node, and string limits before event construction.
|
|
29
|
+
- Preserve mutable caller-owned telemetry data and bound scoped context merging to prevent stack exhaustion.
|
|
30
|
+
- Anchor integration installation to opened POSIX directories with no-follow reads and descriptor-relative creation/atomic publication, preventing symlink swaps from redirecting filesystem changes.
|
|
31
|
+
- Add regression coverage for all five security findings and installed-package integration generation.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Reject conflicting configuration aliases, unsupported command options, incomplete offline diagnostics, and oversized deployment metadata before sending.
|
|
36
|
+
- Preserve existing integration files, reject destination symlinks, and expose proposed templates without disclosing customer file contents.
|
|
37
|
+
- Always close the CLI agent and report notification shutdown failures as unconfirmed; keep Rake registration idempotent with bounded method complexity.
|
|
38
|
+
|
|
7
39
|
## [1.1.3] - 2026-08-13
|
|
8
40
|
|
|
9
41
|
### Changed
|
data/README.md
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
1
|
# Chronos Ruby
|
|
2
2
|
|
|
3
|
-
Chronos Ruby 1.1.
|
|
3
|
+
Chronos Ruby 1.1.4 is a framework-independent agent for sending exceptions and bounded telemetry from Ruby applications to Chronos. This is the stable legacy line, compatible with protocol v1 and targeting Ruby 2.2.10–2.6.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What the gem collects
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Version 1.1 can collect:
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
- timestamp,
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- SQL
|
|
16
|
-
-
|
|
17
|
-
- breadcrumbs
|
|
9
|
+
- exception class, message, structured backtrace, and chained causes;
|
|
10
|
+
- timestamp, severity, tags, and an optional fingerprint;
|
|
11
|
+
- context, parameters, session, and user information supplied by the application;
|
|
12
|
+
- Ruby version, engine, platform, PID, opaque thread identifier, and hostname;
|
|
13
|
+
- environment, service, application version, release, revision, deploy ID, region, and instance;
|
|
14
|
+
- Rack/Rails request method, normalized route, status, duration, and timing breakdown;
|
|
15
|
+
- normalized SQL without literals or bind values, plus heuristic performance signals;
|
|
16
|
+
- Sidekiq/Active Job activity, cache operations, explicitly instrumented outbound HTTP, and loaded dependencies;
|
|
17
|
+
- bounded breadcrumbs supplied by the application or integrations.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
See the full inventory in [Collected data](docs/data-collected.md).
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## What is not collected by default
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
The agent does not scan environment variables, the filesystem, or lockfiles. It does not collect HTTP bodies, cookies, authorization headers, email contents, raw SQL, bind values, cache values, or source code. Query plan inspection is disabled by default; when enabled, it uses the original SQL only on the local connection for `EXPLAIN` without `ANALYZE`, then discards it. Dependency inventory includes only names and versions of loaded dependencies, once per agent. The application remains responsible for data minimization and the legal basis for sending data.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The explicit deploy CLI described below reads its documented environment variables and optional configuration file. It does not change how the Ruby configuration API works.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Supported Ruby and Rails versions
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Version 1.1.4 targets the existing legacy matrix: it supports plain Ruby and Rack on Ruby 2.2.10, 2.3.8, 2.4.10, 2.5.9, and 2.6.10. Validated Rails combinations are Rails 4.2 with Ruby 2.2.10/2.3.8 and Rails 5.2 with Ruby 2.5.9/2.6.10. Sidekiq 4.2.10 on Ruby 2.2.10 and Sidekiq 5.2.10 on Ruby 2.5.9 also have dedicated gates. This release does not declare Ruby 2.7/Rails 6 support because a complete application fixture and matrix are not available.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
These older Rubies and frameworks no longer receive security support from their maintainers. Chronos provides technical compatibility, not runtime security maintenance. See [Compatibility](docs/compatibility.md).
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
## Installing in plain Ruby
|
|
34
|
+
|
|
35
|
+
Add the stable version to your `Gemfile`:
|
|
34
36
|
|
|
35
37
|
```ruby
|
|
36
|
-
gem "chronos-ruby", "~> 1.1.
|
|
38
|
+
gem "chronos-ruby", "~> 1.1.4"
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
Use a compatible Bundler on older runtimes:
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
44
|
gem install bundler -v 1.17.3
|
|
43
45
|
bundle _1.17.3_ install
|
|
44
46
|
```
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
Without Bundler:
|
|
47
49
|
|
|
48
50
|
```bash
|
|
49
|
-
gem install chronos-ruby -v 1.1.
|
|
51
|
+
gem install chronos-ruby -v 1.1.4
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
##
|
|
54
|
+
## Installing in Rails
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
Load the Rails integration explicitly to keep Rails/ActiveSupport out of plain Ruby applications:
|
|
55
57
|
|
|
56
58
|
```ruby
|
|
57
|
-
gem "chronos-ruby", "~> 1.1.
|
|
59
|
+
gem "chronos-ruby", "~> 1.1.4", :require => "chronos/rails"
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
Generate the initializer:
|
|
61
63
|
|
|
62
64
|
```bash
|
|
63
65
|
rails generate chronos:install
|
|
64
66
|
```
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
Version 0.5 introduced the Railtie, middleware, and idempotent subscribers through public APIs and feature detection. Automatic collection is disabled in tests and the console by default. See [Legacy Rails](docs/modules/rails-legacy.md).
|
|
67
69
|
|
|
68
|
-
##
|
|
70
|
+
## Minimal configuration
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
`https://chronosmonitor.com.br` por padrão. Recomendado: definir ambiente e serviço explicitamente.
|
|
72
|
+
An enabled agent requires `project_id` and `project_key`. The default `host` is `https://chronosmonitor.com.br`. Set the environment and service explicitly whenever possible.
|
|
72
73
|
|
|
73
74
|
```ruby
|
|
74
75
|
require "chronos"
|
|
@@ -82,28 +83,28 @@ Chronos.configure do |config|
|
|
|
82
83
|
end
|
|
83
84
|
```
|
|
84
85
|
|
|
85
|
-
TLS
|
|
86
|
+
TLS verification is enabled by default. The Ruby API requires an explicit `ssl_verify = false` to use HTTP, which should be restricted to local test endpoints. After configuration, verify credentials and ingestion:
|
|
86
87
|
|
|
87
88
|
```bash
|
|
88
89
|
bundle exec rake chronos:verify_integration
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
|
|
92
|
+
The task sends an identified synthetic exception and returns exit code `0` only after a correlated v1 response. In plain Ruby, register the task with `require "chronos/rake_tasks"` and `Chronos::RakeTasks.install`; from Ruby code, use `Chronos.verify_integration`. See [Integration verification](docs/modules/integration-verification.md).
|
|
92
93
|
|
|
93
|
-
##
|
|
94
|
+
## Automatic capture
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
For Rack applications, optionally install the middleware. It reports unhandled exceptions, preserves the original exception for the application, and does not consume request bodies.
|
|
96
97
|
|
|
97
98
|
```ruby
|
|
98
99
|
use Chronos::Integrations::Rack::Middleware,
|
|
99
100
|
:include_user_agent => false
|
|
100
101
|
```
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
In Rails, the Railtie installs middleware and subscribers once. See [Request monitoring](docs/modules/request-monitoring.md).
|
|
103
104
|
|
|
104
|
-
##
|
|
105
|
+
## Manual capture
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
Use asynchronous capture in application flows:
|
|
107
108
|
|
|
108
109
|
```ruby
|
|
109
110
|
begin
|
|
@@ -114,27 +115,27 @@ rescue StandardError => error
|
|
|
114
115
|
end
|
|
115
116
|
```
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
Synchronous capture is available for scripts and controlled shutdown:
|
|
118
119
|
|
|
119
120
|
```ruby
|
|
120
121
|
delivered = Chronos.notify_sync(RuntimeError.new("import failed"))
|
|
121
122
|
```
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
Internal capture failures return `false` without escaping into the application's main flow.
|
|
124
125
|
|
|
125
|
-
##
|
|
126
|
+
## User context
|
|
126
127
|
|
|
127
|
-
|
|
128
|
+
User context is opt-in. Send only necessary, authorized fields:
|
|
128
129
|
|
|
129
130
|
```ruby
|
|
130
131
|
Chronos.notify(error, :user => {"id" => "customer-42", "role" => "operator"})
|
|
131
132
|
```
|
|
132
133
|
|
|
133
|
-
|
|
134
|
+
Values are bounded and sanitized, but data minimization remains the application's responsibility. See [Execution context](docs/modules/context.md).
|
|
134
135
|
|
|
135
136
|
## Breadcrumbs
|
|
136
137
|
|
|
137
|
-
Breadcrumbs
|
|
138
|
+
Breadcrumbs use a bounded ring buffer in the current scope:
|
|
138
139
|
|
|
139
140
|
```ruby
|
|
140
141
|
Chronos.add_breadcrumb(
|
|
@@ -144,11 +145,11 @@ Chronos.add_breadcrumb(
|
|
|
144
145
|
)
|
|
145
146
|
```
|
|
146
147
|
|
|
147
|
-
|
|
148
|
+
The gem does not turn logs, SQL, or bodies into raw breadcrumbs. See [Breadcrumbs](docs/modules/breadcrumbs.md).
|
|
148
149
|
|
|
149
|
-
##
|
|
150
|
+
## Filters and LGPD
|
|
150
151
|
|
|
151
|
-
|
|
152
|
+
The gem blocks sensitive keys and detects Bearer tokens, JWTs, email addresses, Brazilian CPF/CNPJ identifiers, and valid payment card candidates. IPv4 addresses are anonymized by default. You can extend the blocklist, apply irreversible hashing, or add custom filters:
|
|
152
153
|
|
|
153
154
|
```ruby
|
|
154
155
|
Chronos.configure do |config|
|
|
@@ -158,11 +159,11 @@ Chronos.configure do |config|
|
|
|
158
159
|
end
|
|
159
160
|
```
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
Diagnostic trees are copied with cycle, depth, collection, node, and string limits before immutable event construction. Caller-owned telemetry data is not frozen. Sensitive symbol values are filtered before conversion to JSON text. Sanitization happens before queueing, retries, and backlog storage. See [Privacy and LGPD](docs/privacy-lgpd.md).
|
|
162
163
|
|
|
163
164
|
## Ignore rules
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
Configuration can exclude entire environments. Version `0.9.0.pre.2` introduced bounded local rules, preserved in the stable API:
|
|
166
167
|
|
|
167
168
|
```ruby
|
|
168
169
|
Chronos.ignore_if do |notice|
|
|
@@ -170,11 +171,11 @@ Chronos.ignore_if do |notice|
|
|
|
170
171
|
end
|
|
171
172
|
```
|
|
172
173
|
|
|
173
|
-
|
|
174
|
+
Rules receive a normalized, immutable notice. Only `true` discards it, and callback failures are contained. See [Ignore rules](docs/modules/ignore-rules.md).
|
|
174
175
|
|
|
175
|
-
##
|
|
176
|
+
## Performance monitoring
|
|
176
177
|
|
|
177
|
-
|
|
178
|
+
Version 0.7 introduced local request, query, and job aggregation into `metric_batch`; Version 0.8 added outbound HTTP. Groups contain bounded counts, errors, durations, histograms, approximate percentiles, severities, diagnostics, statuses, and timing breakdowns.
|
|
178
179
|
|
|
179
180
|
```ruby
|
|
180
181
|
Chronos.configure do |config|
|
|
@@ -189,7 +190,7 @@ Chronos.configure do |config|
|
|
|
189
190
|
config.apm_query_analysis_enabled = true
|
|
190
191
|
config.apm_query_analysis_max_queries = 100
|
|
191
192
|
|
|
192
|
-
# Opt-in:
|
|
193
|
+
# Opt-in: each eligible fingerprint may inspect catalogs, statistics, or plans.
|
|
193
194
|
config.apm_query_inspection_enabled = false
|
|
194
195
|
config.apm_query_statistics_enabled = false
|
|
195
196
|
config.apm_query_plan_enabled = false
|
|
@@ -200,24 +201,24 @@ Chronos.configure do |config|
|
|
|
200
201
|
end
|
|
201
202
|
```
|
|
202
203
|
|
|
203
|
-
|
|
204
|
+
By default, the analysis pipeline does not read raw SQL or bind values. Opt-in inspection uses the original SQL only locally to request `EXPLAIN` without `ANALYZE`; it never includes that SQL in the event. Oversized, incomplete, or lexically ambiguous SQL is omitted instead of emitting partial literals. Plan inspection validates the entire original query and rejects multiple statements independently of normalized metadata. Static analysis produces candidates rather than instructions to create indexes. Errors use `error` severity; slowness and risks use `warning`; observed patterns use `info`; proposed fixes use `suggestion`. See [APM](docs/modules/apm-aggregation.md), [Requests](docs/modules/request-monitoring.md), and [SQL](docs/modules/sql-monitoring.md).
|
|
204
205
|
|
|
205
|
-
## Sidekiq
|
|
206
|
+
## Sidekiq and Active Job
|
|
206
207
|
|
|
207
|
-
|
|
208
|
+
Version `0.6.0.pre.1` introduced Sidekiq 4/5 middleware. In Rails, version 1.1.3 detects Sidekiq and automatically installs client and server middleware:
|
|
208
209
|
|
|
209
210
|
```ruby
|
|
210
211
|
gem "sidekiq", "~> 5.0"
|
|
211
|
-
gem "chronos-ruby", "~> 1.1.
|
|
212
|
+
gem "chronos-ruby", "~> 1.1.4", :require => "chronos/rails"
|
|
212
213
|
```
|
|
213
214
|
|
|
214
|
-
|
|
215
|
+
Ruby applications without Rails still use an explicit `require "chronos/sidekiq"`.
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
The context envelope preserves public job arguments and contains only bounded trace/request IDs. Active Job uses a namespaced serialized field (`chronos_context`) and public hooks. Nested errors are deduplicated and re-raised. See [Legacy Sidekiq](docs/modules/sidekiq-legacy.md), [Active Job](docs/modules/active-job.md), and [Jobs](docs/modules/job-monitoring.md).
|
|
217
218
|
|
|
218
219
|
## Deploy tracking
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
Version 0.9 introduced synchronous deploy reporting and fixed correlation across events:
|
|
221
222
|
|
|
222
223
|
```ruby
|
|
223
224
|
Chronos.notify_deploy(
|
|
@@ -229,35 +230,45 @@ Chronos.notify_deploy(
|
|
|
229
230
|
)
|
|
230
231
|
```
|
|
231
232
|
|
|
232
|
-
Configure release/revision/deploy
|
|
233
|
+
Configure release/revision/deploy metadata when each new process starts. The Ruby API does not read Git or environment variables automatically. Capistrano is optional; Kamal and GitHub Actions recipes are available in `examples/deploy/`. See [Deploys](docs/modules/deploys.md).
|
|
234
|
+
|
|
235
|
+
Version 1.1.4 adds a packaged deploy command without a copied Ruby notification script:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
bundle exec chronos deploy notify
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Supply `CHRONOS_PROJECT_ID`, `CHRONOS_PROJECT_KEY`, `CHRONOS_ENVIRONMENT`, a stable `CHRONOS_DEPLOY_ID`, and `CHRONOS_DEPLOY_REVISION` or `CHRONOS_DEPLOY_VERSION` for the artifact actually published. The CLI reads explicit ENV and optional public YAML without booting Rails. It requires HTTPS and never accepts the project key as a process argument. Optional integration installers cover Kamal, Capistrano, GitHub Actions, GitLab CI, Jenkins, and Azure DevOps. Integration file installation requires POSIX filesystem support (Linux/macOS) and anchors operations to opened directories to prevent symlink redirection.
|
|
233
242
|
|
|
234
|
-
|
|
243
|
+
This branch prepares 1.1.4; publication remains subject to the [release gates](docs/release-1.1.4-readiness.md). See the [CLI guide](docs/deploy-cli.md) for configuration, receipt verification, exit codes, and integration fragments.
|
|
235
244
|
|
|
236
|
-
|
|
245
|
+
## Asynchronous queue
|
|
246
|
+
|
|
247
|
+
The queue has a fixed capacity, drops the newest event when full, and starts workers only after the first accepted capture.
|
|
237
248
|
|
|
238
249
|
```mermaid
|
|
239
250
|
flowchart LR
|
|
240
|
-
E[
|
|
241
|
-
N --> P[
|
|
242
|
-
P --> S[
|
|
243
|
-
S --> D[
|
|
244
|
-
D --> Q[
|
|
245
|
-
Q --> W[
|
|
251
|
+
E[Exception or telemetry] --> N[Normalization]
|
|
252
|
+
N --> P[Sanitization]
|
|
253
|
+
P --> S[Bounded serialization]
|
|
254
|
+
S --> D[Delivery pipeline]
|
|
255
|
+
D --> Q[Bounded queue]
|
|
256
|
+
Q --> W[Fixed workers]
|
|
246
257
|
W --> H[Net::HTTP]
|
|
247
|
-
W --> B[
|
|
258
|
+
W --> B[In-memory backlog]
|
|
248
259
|
```
|
|
249
260
|
|
|
250
|
-
Use `Chronos.flush(timeout)`
|
|
261
|
+
Use `Chronos.flush(timeout)` before termination and `Chronos.close(timeout)` during shutdown. Workers are recreated after a fork. See [Asynchronous queue](docs/modules/async-queue.md).
|
|
251
262
|
|
|
252
|
-
## Retry
|
|
263
|
+
## Retry and backlog
|
|
253
264
|
|
|
254
|
-
|
|
265
|
+
Retries cover network errors and HTTP `408`, `429`, and `5xx`, with exponential backoff, jitter, and bounded attempts. Other `4xx` responses are permanent failures. A circuit breaker reduces retry storms.
|
|
255
266
|
|
|
256
|
-
|
|
267
|
+
The backlog stores only sanitized, serialized events. It has a fixed capacity, lives in memory, and is lost on shutdown. Remote configuration accepts only sampling, enabled event types, a smaller payload limit, exact fingerprints, send interval, and a kill switch; it never changes the host, credentials, or TLS settings, or executes code. See [Retry and backlog](docs/modules/retry-backlog.md), [Sampling](docs/modules/sampling.md), and [Remote configuration](docs/modules/remote-configuration.md).
|
|
257
268
|
|
|
258
|
-
##
|
|
269
|
+
## Environment-based configuration
|
|
259
270
|
|
|
260
|
-
|
|
271
|
+
The Ruby API does not scan the environment. Read only variables chosen by your application:
|
|
261
272
|
|
|
262
273
|
```ruby
|
|
263
274
|
Chronos.configure do |config|
|
|
@@ -280,56 +291,138 @@ Chronos.configure do |config|
|
|
|
280
291
|
end
|
|
281
292
|
```
|
|
282
293
|
|
|
283
|
-
|
|
294
|
+
See [Configuration](docs/configuration.md) for all options, defaults, and limits.
|
|
284
295
|
|
|
285
296
|
## Troubleshooting
|
|
286
297
|
|
|
287
|
-
|
|
298
|
+
Configuration errors are raised during `Chronos.configure`; capture and delivery failures are contained and may be reported to the safe logger. Check TLS, credentials, timeouts, and the return value of `flush`. See [Troubleshooting](docs/troubleshooting.md).
|
|
288
299
|
|
|
289
|
-
##
|
|
300
|
+
## Benchmarks
|
|
290
301
|
|
|
291
|
-
|
|
302
|
+
The stable release gate runs a repeatable Rack comparison and load against a fake endpoint:
|
|
292
303
|
|
|
293
304
|
```bash
|
|
294
305
|
ITERATIONS=50000 WARMUP=5000 SAMPLES=7 bundle _1.17.3_ exec ruby benchmarks/comparative.rb
|
|
295
306
|
ITERATIONS=500 bundle _1.17.3_ exec ruby benchmarks/fake_endpoint_load.rb
|
|
296
307
|
```
|
|
297
308
|
|
|
298
|
-
|
|
309
|
+
Results depend on the runtime and hardware. There is no general claim of superiority: record CPU, OS, Ruby, commit, warmup, samples, median, and dispersion. Additional benchmarks are in `benchmarks/` and documented in [Performance](docs/performance.md).
|
|
299
310
|
|
|
300
|
-
##
|
|
311
|
+
## Migrating from Airbrake
|
|
301
312
|
|
|
302
|
-
|
|
313
|
+
Migrate in stages. Run both agents together only during validation to avoid prolonged duplicate reporting. Callbacks and notices are not API-compatible and must be translated and tested explicitly. See the [Airbrake migration guide](docs/migration-from-airbrake.md).
|
|
303
314
|
|
|
304
|
-
##
|
|
315
|
+
## Local development
|
|
305
316
|
|
|
306
|
-
|
|
317
|
+
On a supported legacy Ruby, install Bundler 1.17.3 and the dependencies:
|
|
307
318
|
|
|
308
319
|
```bash
|
|
309
320
|
gem install bundler -v 1.17.3
|
|
310
321
|
bin/setup
|
|
311
322
|
```
|
|
312
323
|
|
|
313
|
-
Use `bin/console`
|
|
324
|
+
Use `bin/console` for inspection and `bundle _1.17.3_ exec rake install` to install the source locally. See [Architecture](docs/architecture.md) for the hexagonal design.
|
|
314
325
|
|
|
315
|
-
##
|
|
326
|
+
## Tests
|
|
316
327
|
|
|
317
|
-
|
|
328
|
+
On a supported Ruby with dependencies installed, run the existing suite and lint:
|
|
318
329
|
|
|
319
330
|
```bash
|
|
320
331
|
bundle _1.17.3_ exec rake
|
|
321
332
|
```
|
|
322
333
|
|
|
323
|
-
|
|
334
|
+
To also run the deploy CLI, adapter, HTTPS receiver, and installed-package checks, use the legacy CI entry point:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
sh script/ci_legacy
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
The CI matrix covers Ruby 2.2.10–2.6.10, Rails 4.2/5.2 applications, and Sidekiq 4/5. The release workflow repeats the compatibility matrix, documentation checks, comparative benchmark, and load gate before publishing. Tests on a modern Ruby alone do not establish legacy compatibility.
|
|
341
|
+
|
|
342
|
+
### Prepare Docker
|
|
343
|
+
|
|
344
|
+
Install Docker Desktop for your platform, start its engine, and run these checks from the repository root:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
# macOS: start Docker Desktop; on other systems, start your Docker engine.
|
|
348
|
+
open -a Docker
|
|
349
|
+
docker version
|
|
350
|
+
docker info
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
`docker version` must show both Client and Server. The commands below require access to the image registry and RubyGems to download images and dependencies. No SaaS credentials are required.
|
|
354
|
+
|
|
355
|
+
The helper uses `linux/amd64`, including on Apple Silicon through emulation. It mounts the repository read-only and runs tests against a temporary copy inside the container. It excludes local Bundler configuration, credentials directories, and `.env` files, and removes lockfiles only from that copy. Your host Bundler, installed gems, and `Gemfile.lock` remain unchanged.
|
|
356
|
+
|
|
357
|
+
### Run one Ruby version
|
|
358
|
+
|
|
359
|
+
Choose any supported version and run its complete legacy checks:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
sh script/test_legacy_docker 2.2.10
|
|
363
|
+
sh script/test_legacy_docker 2.3.8
|
|
364
|
+
sh script/test_legacy_docker 2.4.10
|
|
365
|
+
sh script/test_legacy_docker 2.5.9
|
|
366
|
+
sh script/test_legacy_docker 2.6.10
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Each line is independent. The helper installs Bundler 1.17.3 and dependencies inside the container, then runs `script/ci_legacy`, including the installed-gem smoke tests against a local HTTPS receiver.
|
|
370
|
+
|
|
371
|
+
### Run all Ruby versions
|
|
372
|
+
|
|
373
|
+
Run this block to execute the five versions sequentially and stop at the first failure with a nonzero exit status:
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
(
|
|
377
|
+
set -e
|
|
378
|
+
for version in 2.2.10 2.3.8 2.4.10 2.5.9 2.6.10; do
|
|
379
|
+
sh script/test_legacy_docker "$version"
|
|
380
|
+
done
|
|
381
|
+
)
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Run one Rails/Ruby combination
|
|
385
|
+
|
|
386
|
+
Select one of the documented pairs:
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
sh script/test_legacy_docker 2.2.10 examples/rails-4.2
|
|
390
|
+
sh script/test_legacy_docker 2.3.8 examples/rails-4.2
|
|
391
|
+
sh script/test_legacy_docker 2.5.9 examples/rails-5.2
|
|
392
|
+
sh script/test_legacy_docker 2.6.10 examples/rails-5.2
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Each command runs the Rails application smoke and deploy generator checks. These are separate from the plain Ruby suite; run both groups before approving a release.
|
|
396
|
+
|
|
397
|
+
### Run the complete Ruby and Rails matrix
|
|
398
|
+
|
|
399
|
+
Run this block to execute all five Ruby checks followed by all four supported Rails pairs. It stops at the first failure:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
(
|
|
403
|
+
set -e
|
|
404
|
+
for version in 2.2.10 2.3.8 2.4.10 2.5.9 2.6.10; do
|
|
405
|
+
sh script/test_legacy_docker "$version"
|
|
406
|
+
done
|
|
407
|
+
for version in 2.2.10 2.3.8; do
|
|
408
|
+
sh script/test_legacy_docker "$version" examples/rails-4.2
|
|
409
|
+
done
|
|
410
|
+
for version in 2.5.9 2.6.10; do
|
|
411
|
+
sh script/test_legacy_docker "$version" examples/rails-5.2
|
|
412
|
+
done
|
|
413
|
+
)
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Keep the logs for each combination. The helper prints Ruby, OpenSSL, and JSON versions. A stopped matrix does not approve the remaining combinations, and these commands do not run the separate Sidekiq gates or validate SaaS ledger/projection behavior. If certificate or dependency resolution fails, fix the compatible image or dependency versions while keeping HTTPS verification enabled. See the [detailed legacy test environment guide](docs/legacy-test-environment.md).
|
|
324
417
|
|
|
325
|
-
##
|
|
418
|
+
## Contributing
|
|
326
419
|
|
|
327
|
-
|
|
420
|
+
Open an issue before adding a public API or dependency. Public classes require YARD documentation, tests, module documentation, and compatibility evidence. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
328
421
|
|
|
329
|
-
##
|
|
422
|
+
## Security
|
|
330
423
|
|
|
331
|
-
|
|
424
|
+
Never include credentials in context. Releases use Trusted Publishing, SHA-256 checksums, and an SBOM; dependencies are audited. Report vulnerabilities through the private channel in [SECURITY.md](SECURITY.md).
|
|
332
425
|
|
|
333
|
-
##
|
|
426
|
+
## License
|
|
334
427
|
|
|
335
|
-
Chronos Ruby
|
|
428
|
+
Chronos Ruby is distributed under the MIT license. See [LICENSE.txt](LICENSE.txt).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# CLI de deploy legada — implementação para revisão
|
|
2
|
+
|
|
3
|
+
Em 31/10/2026, a branch de trabalho é `legacy/1`, baseline `a8ab679`, versão 1.1.3, Ruby >= 2.2.10 e < 2.7. A autorização para executar o plano permite desenvolver esta exceção limitada ao congelamento. A versão de lançamento foi definida como 1.1.4; sua publicação continua condicionada aos gates e ao aceite. O artefato local 1.1.3 anterior serviu somente para validação, nunca para substituir uma versão publicada.
|
|
4
|
+
|
|
5
|
+
A CLI usa OptionParser, configuração explícita e a API existente, sem boot Rails. ENV pertence à CLI. O alias Rake também não inicializa Rails. O generator Rails é somente um adaptador do instalador. Não há descoberta de revisão ou identidade por variáveis do fornecedor.
|
|
6
|
+
|
|
7
|
+
`legacy/1.2` aponta para código anterior (b2a1347), portanto não foi adotada como ref transitória. O backport deve partir de uma ref de manutenção confirmada baseada em 1.2.1; nenhuma branch foi trocada automaticamente.
|
|
8
|
+
|
|
9
|
+
A implementação atual fornece JSON em todas as respostas operacionais. O contrato desta entrega mantém a CLI leve: não oferece boot Rails; credenciais de initializer continuam atendidas pela API existente. Conflitos exibem o template proposto com o conteúdo anterior omitido por privacidade; faça merge manual ou use force explicitamente. Não gera configuração pública automaticamente. Templates de CI são fragmentos para merge manual e exigem os outputs reais exportados pelo cliente.
|
|
10
|
+
|
|
11
|
+
Gates pendentes: instalação e execução em cada Ruby legado, Rails 4.2/5.2 nos pares documentados, receipt/ledger/projeção no SaaS local, execução nos fornecedores, backport transitório e aceite de manutenção/release. A suíte standalone e o smoke do pacote foram adicionados à matriz existente; testes locais no Ruby 3.4 não comprovam suporte legado.
|
|
12
|
+
|
|
13
|
+
Revisão do contrato: diagnose exige a configuração completa de notificação, mas não autentica; host HTTPS obrigatório; metadados acima do limite do protocolo são rejeitados. Opções fora do comando correto são erros. Verify preserva verification_status do receipt, desliga dependências e nunca envia deploy. A CLI desativa retries e backlog; notify ainda pode enviar eventos de dependências. Falha no close após notify impede sucesso confirmado. Escrita usa arquivo temporário, criação exclusiva ou substituição explícita, com rechecagem de symlinks.
|
|
14
|
+
|
|
15
|
+
Preparação da matriz: [procedimento e helper Docker](../legacy-test-environment.md). Sintaxe validada com gramática Ruby 2.2 é evidência estática apenas.
|
|
16
|
+
|
|
17
|
+
Evidência local desta revisão: 201 exemplos RSpec passaram com Gemfile temporário e ferramentas locais no Ruby 3.4; 17 testes de CLI/configuração/fechamento (84 assertions), 2 testes de adaptadores (7 assertions) e 6 testes HTTPS (36 assertions) passaram. O pacote foi construído e o executável extraído respondeu help. Isso não equivale à instalação em Ruby suportado. A gramática Ruby 2.2 foi verificada estaticamente. RuboCop local 1.57 é suplementar; o gate oficial continua sendo 0.49 nas imagens legadas.
|
|
18
|
+
|
|
19
|
+
Correções da revisão de segurança: lexer SQL conservador com rejeição de entrada truncada/ambígua e validação completa antes de inspeção; sanitização de Symbol; cópia estrutural limitada antes da construção e merge de eventos; instalador POSIX baseado em descritores, usando Fiddle da biblioteca padrão para openat/mkdirat/linkat/renameat/unlinkat. Não há shell ou biblioteca nativa escolhida pelo usuário. A raiz é aberta uma vez por instalação e os descendentes são abertos sem seguir symlinks; a escrita fica ancorada aos diretórios abertos. Os testes de corrida simulam substituições entre as operações e verificam ausência de alteração em diretório externo.
|
|
20
|
+
|
|
21
|
+
Evidência após as correções de segurança: gates de core/segurança/pacote passaram em Docker Linux/amd64 nos cinco Rubies 2.2.10–2.6.10, com 221 exemplos RSpec, RuboCop 0.49.1 sem ocorrências em 225 arquivos, 25 testes adicionais de fonte (127 assertions) e 6 testes HTTPS da gem instalada (36 assertions) por runtime. Os gates Rails/Sidekiq, fornecedores, SaaS e promoção continuam separados.
|
data/docs/compatibility.md
CHANGED
|
@@ -33,7 +33,7 @@ Chronos Ruby 1.1 is the current stable legacy line. Technical compatibility does
|
|
|
33
33
|
|
|
34
34
|
Active Job uses the public `serialize`, `deserialize`, and `perform_now` extension points with a bounded namespaced field. Support follows the validated Rails pairs above. Adapters that bypass these hooks require their own evidence.
|
|
35
35
|
|
|
36
|
-
The release workflow repeats every supported pair before publishing. Version 1.1.
|
|
36
|
+
The release workflow repeats every supported pair before publishing. Version 1.1.4 preparation and pending gates are recorded in [Version 1.1.4 readiness](release-1.1.4-readiness.md); historical evidence remains in [Version 1.1.3 readiness](release-1.1.3-readiness.md), [Version 1.1.2 readiness](release-1.1.2-readiness.md), [Version 1.0 readiness](release-1.0-readiness.md), and [Version 1.1 readiness](release-1.1-readiness.md).
|
|
37
37
|
|
|
38
38
|
Status meanings:
|
|
39
39
|
|