Skip to content

docs(v2): align v2 docs with actual implementation#937

Merged
scarmuega merged 4 commits into
mainfrom
docs/v2-fitness-fixes
Jun 14, 2026
Merged

docs(v2): align v2 docs with actual implementation#937
scarmuega merged 4 commits into
mainfrom
docs/v2-fitness-fixes

Conversation

@scarmuega

@scarmuega scarmuega commented Jun 14, 2026

Copy link
Copy Markdown
Member

Context

An audit of docs/v2/ against the v2 implementation in src/ (and the CI workflows in .github/workflows/) surfaced several config-breaking inaccuracies, missing components, and stale references. A user copy-pasting some documented configs today would hit deserialization errors. Every claim in this PR was verified directly against the config structs/enums — the loader uses serde tag = "type" with no rename_all, so type tags must match the enum variant names verbatim.

Config-breaking fixes (documented config would fail to load)

  • webhook (src/sinks/mod.rs): type = "Webhook""WebHook"; removed nonexistent error_policy field.
  • elasticsearch: type = "Elastic""ElasticSearch".
  • gcp_cloudfunction (src/sinks/gcp_cloudfunction.rs): documented authorization (string) replaced with the real field authentication (bool).
  • pipeline_metrics (src/daemon/mod.rs): removed nonexistent endpoint field (MetricsConfig only has address; the path is fixed by gasket_prometheus).
  • stateful_cursor (src/cursor/): Memory is the default backend; File default path is ./cursor.json (not var/oura/cursor); documented max_breadcrumbs/flush_interval and added the Redis backend.

Newly documented components (implemented, previously undocumented)

  • Sinks: SqlDb, Zeromq
  • Filters: IntoJson, WorkStats

Backfilled stale field lists

  • kafka: ack_timeout_secs, paritioning (key intentionally matches the spelling in the code).
  • redis sink: corrected default to oura-sink; added stream_max_length.
  • terminal: adahandle_policy.
  • finalize: max_block_quantity.

Docker installation reference (vs. .github/workflows/docker.yml)

The install doc only mentioned latest plus a single pre-release versioned example, but the Docker workflow publishes many more tags.

  • Documented every published tag: latest (main tip), stable (newest release), v{major}, v{major}.{minor}, v{version}, and sha-{commit}.
  • Clarified that latest tracks the main branch rather than the latest release.
  • Replaced the pre-release pin example (v2.0.0-alpha.1) with the v2.1.0 release.

Data dictionary

Added a Pipeline Data Model section documenting the v2-native ChainEvent envelope (apply/undo/reset + point) and the Record variants (CBOR block/tx, UTxORPC parsed block/tx, generic JSON, legacy v1) — previously only the legacy v1 catalogue was described.

Notes

  • Sources, intersect, and chain docs were already accurate and left unchanged.
  • The retry-policy doc is correct (gasket 0.11 renames the TOML keys to backoff_unit_sec/max_backoff_sec via serde) — no change needed.
  • Noop/Assert sinks and the Noop filter were intentionally left undocumented as internal/testing utilities.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added documentation for the into_json and work_stats filters.
    • Added new sink docs for the ZeroMQ and SQL Database sinks.
    • Expanded advanced configuration docs for finalize options, metrics configuration requirements, and the stateful cursor (including backend-specific settings).
    • Updated sink and reference docs: Elasticsearch sink type naming, GCP Cloud Function authentication, Kafka ack_timeout_secs and paritioning, Redis stream_max_length, Terminal ADA Handle support, Webhook type naming, and the pipeline data model reference.
    • Updated Docker installation docs with an “Available Tags” section.

Audit of docs/v2 against src/ surfaced several config-breaking
inaccuracies, missing components, and stale field lists. All claims
verified directly against the config structs/enums (serde `tag = "type"`,
no `rename_all`, so type tags must match variant names verbatim).

Config-breaking fixes:
- webhook: type "Webhook" -> "WebHook"; drop nonexistent error_policy
- elasticsearch: type "Elastic" -> "ElasticSearch"
- gcp_cloudfunction: authorization (string) -> authentication (bool)
- pipeline_metrics: drop nonexistent `endpoint` field
- stateful_cursor: Memory is the default; File default path is
  ./cursor.json; document max_breadcrumbs/flush_interval and Redis backend

Newly documented components:
- sinks: SqlDb, Zeromq
- filters: IntoJson, WorkStats

Backfilled fields:
- kafka: ack_timeout_secs, paritioning
- redis sink: correct default (oura-sink), add stream_max_length
- terminal: adahandle_policy
- finalize: max_block_quantity

Data dictionary:
- document the v2-native pipeline data model (ChainEvent envelope and
  Record variants) alongside the legacy v1 event catalogue

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scarmuega scarmuega requested a review from paulobressan as a code owner June 14, 2026 12:35
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@scarmuega, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 10 minutes and 7 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 12a8a649-b4e2-4f73-b63d-3f5c70fdb717

📥 Commits

Reviewing files that changed from the base of the PR and between 5c69873 and 0e66383.

📒 Files selected for processing (6)
  • docs/v2/advanced/finalize_options.mdx
  • docs/v2/advanced/intersect_options.mdx
  • docs/v2/filters/work_stats.mdx
  • docs/v2/installation/docker.mdx
  • docs/v2/sinks/sql_db.mdx
  • docs/v2/sinks/zeromq.mdx
📝 Walkthrough

Walkthrough

Documentation-only update for Oura v2: adds new pages for the into_json filter, work_stats filter, SqlDb sink, and ZeroMQ sink; expands advanced configuration docs for finalize options, pipeline metrics, and stateful cursor backends; updates the data dictionary with a Pipeline Data Model section; corrects config literals and adds fields across several existing sink pages; and documents Docker image tag formats and versioning.

Changes

Oura v2 Documentation

Layer / File(s) Summary
Pipeline data model reference
docs/v2/reference/data_dictionary.mdx
Introduces a "Pipeline Data Model" section documenting the ChainEvent JSON envelope (event, point, record) and a table of record payload variants. Updates ParseCbor wording to reference UTxORPC Block/Tx structures.
Advanced configuration docs
docs/v2/advanced/finalize_options.mdx, docs/v2/advanced/pipeline_metrics.mdx, docs/v2/advanced/stateful_cursor.mdx
Adds max_block_quantity to finalize options. Removes endpoint from metrics docs. Expands stateful cursor section to document Memory, File, and Redis backends with per-backend fields and defaults.
New filter docs
docs/v2/filters/into_json.mdx, docs/v2/filters/work_stats.mdx
Adds into_json filter page (record-to-JSON conversion, no extra options) and work_stats filter page (pipeline progress tracking with optional stop conditions).
New sink docs
docs/v2/sinks/sql_db.mdx, docs/v2/sinks/zeromq.mdx
Adds sql_db sink page (per-event SQL via Handlebars templates, requires sql feature) and zeromq sink page (JSON events over ZeroMQ PUSH socket, requires zeromq feature).
Sink config corrections and additions
docs/v2/sinks/elasticsearch.mdx, docs/v2/sinks/gcp_cloudfunction.mdx, docs/v2/sinks/kafka.mdx, docs/v2/sinks/redis.mdx, docs/v2/sinks/terminal.mdx, docs/v2/sinks/webhook.mdx
Renames type literals (ElasticElasticSearch, WebhookWebHook), renames authorizationauthentication in GCP Cloud Function, adds ack_timeout_secs/paritioning to Kafka, adds stream_max_length and corrects stream_name default in Redis, adds adahandle_policy to Terminal.
Docker installation and tag documentation
docs/v2/installation/docker.mdx
Adds "Available Tags" section documenting image tag formats (latest, stable, versioned, immutable sha-{commit}). Revises versioning guidance to clarify production pinning and latest branch tracking behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • paulobressan

Poem

🐇 Hippity-hoppity, docs are in bloom,
New sinks and filters fill up the room!
ZeroMQ pushes, SqlDb writes neat,
Cursor backends make restarts complete.
Docker tags shine bright and clear—
This bunny approves! Configuration's here! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'docs(v2): align v2 docs with actual implementation' directly summarizes the primary change—updating v2 documentation to match the current codebase implementation across multiple components, sinks, filters, and configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/v2-fitness-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/v2/sinks/sql_db.mdx`:
- Line 41: The documentation incorrectly states that the `record` field is
omitted for `reset` events, but the actual behavior is that `record` is always
included in the data context and set to `null` for `reset` events. Update the
description of the `record` field to clarify that it is set to `null` for
`reset` events rather than being omitted, so template authors understand they
should check for null values rather than field existence when handling reset
events.

In `@docs/v2/sinks/zeromq.mdx`:
- Line 7: The documentation on line 7 states that the ZeroMQ sink "publishes
each event," which is too broad and doesn't match the actual implementation
behavior. The implementation skips reset events (events with no record). Revise
the sentence starting with "A sink that publishes each event" to clarify that
only events with records are published, and explicitly note that reset events
are not published over the socket.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c5eaa00-ec31-4f49-9db3-cb201408ce12

📥 Commits

Reviewing files that changed from the base of the PR and between ca332c8 and f338981.

📒 Files selected for processing (14)
  • docs/v2/advanced/finalize_options.mdx
  • docs/v2/advanced/pipeline_metrics.mdx
  • docs/v2/advanced/stateful_cursor.mdx
  • docs/v2/filters/into_json.mdx
  • docs/v2/filters/work_stats.mdx
  • docs/v2/reference/data_dictionary.mdx
  • docs/v2/sinks/elasticsearch.mdx
  • docs/v2/sinks/gcp_cloudfunction.mdx
  • docs/v2/sinks/kafka.mdx
  • docs/v2/sinks/redis.mdx
  • docs/v2/sinks/sql_db.mdx
  • docs/v2/sinks/terminal.mdx
  • docs/v2/sinks/webhook.mdx
  • docs/v2/sinks/zeromq.mdx

Comment thread docs/v2/sinks/sql_db.mdx Outdated
Comment thread docs/v2/sinks/zeromq.mdx Outdated
The docker install reference only mentioned `latest` plus a single
pre-release versioned example. The Docker CI workflow
(.github/workflows/docker.yml) actually publishes: latest (main tip),
stable (newest release), v{major}, v{major}.{minor}, v{version}, and
sha-{commit}.

- add a table covering every published tag and when it updates
- clarify that `latest` tracks `main`, not the latest release
- use the v2.1.0 release (not a pre-release) as the pin example

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/v2/installation/docker.mdx`:
- Around line 37-47: The introductory sentence at the beginning of the Docker
tags table is misleading because it states that each build publishes several
tags, when in fact only the sha-{commit} tag is published on every build; the
other tags (latest, stable, and semver tags) are published conditionally based
on branch or release events. Reword the introduction to clarify that different
tags follow different publication triggers: latest tracks the main branch,
stable and semver tags are published only on releases, and sha-{commit} is the
only truly per-build tag. This will prevent users from incorrectly assuming all
listed tags are available after every build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 653c5101-9068-4aea-8bd7-7f5ef0c2e601

📥 Commits

Reviewing files that changed from the base of the PR and between f338981 and 5c69873.

📒 Files selected for processing (1)
  • docs/v2/installation/docker.mdx

Comment thread docs/v2/installation/docker.mdx Outdated
scarmuega and others added 2 commits June 14, 2026 09:51
…level [finalize]

The top-level [finalize] block is not wired to the runtime (ConfigRoot.finalize /
Context.finalize is deserialized but never consumed). The WorkStats filter is the
only working finalization mechanism, so document it as such. Follow-up to remove the
dead config tracked in #938.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
All three findings verified against the implementation:

- sql_db: `record` is `null` on reset events (hbs_data renders the reset
  template with record=None -> null), not omitted.
- zeromq: clarify that events without a record (resets) are skipped and
  not published (zeromq.rs returns early when record.is_none()).
- docker: reword the tags intro; only `sha-*` is per-build, while
  `latest`/`stable`/semver tags are gated by branch/tag triggers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scarmuega scarmuega merged commit f0ee7d9 into main Jun 14, 2026
12 checks passed
@scarmuega scarmuega deleted the docs/v2-fitness-fixes branch June 14, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant