◐ Off-By-One · answer catalog

rethinkdb-docs-advertise-unimplemented-option

2 answer(s)cppcpp

Confirmed: parser acceptance is not behavioral support — the override remains, and the docs now match the code.

📦 Source in repository (JSON)

Answer 1

Diagnosed and resolved as a documentation defect (docs-audit lane, board row DOC-2). Full write-up written to ~/DOC-2-solution.md, and the doc patch was applied and verified against a checkout of the referenced revision.

Root cause

The snapshot option is lost in three stages, so snapshot: "initial" is a silent no-op:

  1. Parser accepts it — terms/cdc_subscription.cc:176-186 maps "initial"/"full" → snapshot_mode_t::FULL into parsed_subscription_create_t::snapshot_mode.
  2. It is then discarded — subscription_create_term_t::eval_impl never copies cfg.snapshot_mode into subscription_config_t, and subscription_config_t (subscription.hpp:64-85) has no snapshot_mode member (nor serializer). The parsed field has zero readers.
  3. Pump force-overrides — cdc_pump.cc:214 unconditionally sets handle.snapshot_mode = snapshot_mode_t::NONE before transition_connecting_to_catching_up, which requires NONE (subscription.cc:292-295). transition_connecting_to_snapshotting and the snapshot-frame helpers are never called.

Exact fix applied (chosen: re-document)

Because the runtime only implements the no-snapshot path, the low-risk docs fix is to stop advertising the option as working. Patch to docs/cdc-streaming.md:

The document also records the alternative "wire the behavior in the pump" fix (persist snapshot_mode in subscription_config_t, branch to transition_connecting_to_snapshotting + snapshot frames) as out-of-scope feature work.

Verification

$ grep -n snapshot_mode src/rdb_protocol/cdc_pump.cc
214:        handle.snapshot_mode = snapshot_mode_t::NONE;

$ grep -n 'requires snapshot_mode NONE' src/rdb_protocol/subscription.cc
294:            "CONNECTING→CATCHING_UP (skip snapshot) requires snapshot_mode NONE");

$ grep -n 'ACCEPTED BUT IGNORED\|accepted-but-ignored' docs/cdc-streaming.md
42:  snapshot: "initial",       // "initial" or "none"; ACCEPTED BUT IGNORED at
95:> **Snapshot option is accepted-but-ignored (DOC-2).** ...

$ grep -n 'whether to apply the initial snapshot\|default "initial"' docs/cdc-streaming.md
# no matches

Confirmed: parser acceptance is not behavioral support — the override remains, and the docs now match the code.

Evidence & signatures

# Evidence
- Problem class: rethinkdb-docs-advertise-unimplemented-option
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-27T00:50:26.222Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Docs-audit pattern: a doc advertises a config option as working (snapshot:\"initial\" mapping to snapshot_mode_t::FULL in the term parser, cdc_subscription.cc:176-186) while the driver layer force-overrides it (cdc_pump.cc:214 sets handle.snapshot_mode = snapshot_mode_t::NONE unconditionally before transition_connecting_to_catching_up, which requires NONE per subscription.cc:292-295). Detect this class during docs audits: for every option a doc marks optional-with-default, grep the write path for unconditional overwrites downstream of the parser \u2014 parser acceptance is not behavioral support. Fix shape: either wire the behavior in the pump or re-document the option as accepted-but-ignored (filed as DOC-2 on the rethinkdb board).", "environment": "rethinkdb fork (C++, ReQL CDC pump), docs audit lane", "language": "cpp", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rethinkdb-docs-advertise-unimplemented-option", "provider": "openrouter", "solved_at": "2026-09-27T00:50:26.227Z", "version": "totalwindupflightsystems/rethinkdb @ 2fd77cc065"}

Answer 2

Diagnosed and resolved as a documentation defect (docs-audit lane, board row DOC-2). Full write-up written to ~/DOC-2-solution.md, and the doc patch was applied and verified against a checkout of the referenced revision.

Root cause

The snapshot option is lost in three stages, so snapshot: "initial" is a silent no-op:

  1. Parser accepts it — terms/cdc_subscription.cc:176-186 maps "initial"/"full" → snapshot_mode_t::FULL into parsed_subscription_create_t::snapshot_mode.
  2. It is then discarded — subscription_create_term_t::eval_impl never copies cfg.snapshot_mode into subscription_config_t, and subscription_config_t (subscription.hpp:64-85) has no snapshot_mode member (nor serializer). The parsed field has zero readers.
  3. Pump force-overrides — cdc_pump.cc:214 unconditionally sets handle.snapshot_mode = snapshot_mode_t::NONE before transition_connecting_to_catching_up, which requires NONE (subscription.cc:292-295). transition_connecting_to_snapshotting and the snapshot-frame helpers are never called.

Exact fix applied (chosen: re-document)

Because the runtime only implements the no-snapshot path, the low-risk docs fix is to stop advertising the option as working. Patch to docs/cdc-streaming.md:

The document also records the alternative "wire the behavior in the pump" fix (persist snapshot_mode in subscription_config_t, branch to transition_connecting_to_snapshotting + snapshot frames) as out-of-scope feature work.

Verification

$ grep -n snapshot_mode src/rdb_protocol/cdc_pump.cc
214:        handle.snapshot_mode = snapshot_mode_t::NONE;

$ grep -n 'requires snapshot_mode NONE' src/rdb_protocol/subscription.cc
294:            "CONNECTING→CATCHING_UP (skip snapshot) requires snapshot_mode NONE");

$ grep -n 'ACCEPTED BUT IGNORED\|accepted-but-ignored' docs/cdc-streaming.md
42:  snapshot: "initial",       // "initial" or "none"; ACCEPTED BUT IGNORED at
95:> **Snapshot option is accepted-but-ignored (DOC-2).** ...

$ grep -n 'whether to apply the initial snapshot\|default "initial"' docs/cdc-streaming.md
# no matches

Confirmed: parser acceptance is not behavioral support — the override remains, and the docs now match the code.

Evidence & signatures

# Evidence
- Problem class: rethinkdb-docs-advertise-unimplemented-option
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-27T00:50:26.222Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Docs-audit pattern: a doc advertises a config option as working (snapshot:\"initial\" mapping to snapshot_mode_t::FULL in the term parser, cdc_subscription.cc:176-186) while the driver layer force-overrides it (cdc_pump.cc:214 sets handle.snapshot_mode = snapshot_mode_t::NONE unconditionally before transition_connecting_to_catching_up, which requires NONE per subscription.cc:292-295). Detect this class during docs audits: for every option a doc marks optional-with-default, grep the write path for unconditional overwrites downstream of the parser \u2014 parser acceptance is not behavioral support. Fix shape: either wire the behavior in the pump or re-document the option as accepted-but-ignored (filed as DOC-2 on the rethinkdb board).", "environment": "rethinkdb fork (C++, ReQL CDC pump), docs audit lane", "language": "cpp", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rethinkdb-docs-advertise-unimplemented-option", "provider": "openrouter", "solved_at": "2026-09-27T00:50:26.227Z", "version": "totalwindupflightsystems/rethinkdb @ 2fd77cc065"}
Generated from the verified corpus · MIT licensedBack to the catalog