Skip to content

docs(spec): fix cdc-drain-mode SHALL validation - #1320

Merged
kalbasit merged 3 commits into
mainfrom
docs-spec-fix-cdc-drain-mode
Jun 3, 2026
Merged

kalbasit merged 3 commits into
mainfrom
docs-spec-fix-cdc-drain-mode

Conversation

@kalbasit

@kalbasit kalbasit commented Jun 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • openspec/specs/cdc-drain-mode/spec.md: fix a pre-existing
    openspec validate failure (requirements.1.text: Requirement must contain SHALL or MUST keyword). The validator parses a requirement's
    text as only its first physical line and checks that line for
    SHALL/MUST. The "server MUST enter drain mode" requirement put its
    normative SHALL on the third wrapped line, so the validator never saw
    it. Reworded to open with The server SHALL enter drain mode when it starts with … — keyword now in the first line. Pure wording; meaning,
    scenarios, and behavior unchanged.
  • docs/.../Chunks to NAR Migration.md: minor code-fence language-tag
    cleanup.

This is independent of #1319 (a pre-existing validation bug), branched off
main so it can merge on its own.

Test plan

  • openspec validate cdc-drain-mode → valid
  • task fmt clean
  • No code changes; no test/lint impact

kalbasit added 2 commits June 3, 2026 14:44
openspec validate parses a requirement's text as only its first
physical line, then checks that line for a SHALL/MUST keyword. The
'server MUST enter drain mode' requirement put its normative SHALL on
the third wrapped line ('the server SHALL enter drain mode by ...'),
so the validator saw only 'When the server starts with cdc.enabled:
false and the stored database configuration' and failed the spec with
'requirements.1.text: Requirement must contain SHALL or MUST keyword'.

Reword the requirement so it opens with 'The server SHALL enter drain
mode when it starts with ...', putting the keyword in the first line.
Pure wording change; the requirement's meaning, scenarios, and the
behavior are unchanged. cdc-drain-mode now validates clean.
@kalbasit

kalbasit commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. documentation Improvements or additions to documentation labels Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 091cf5e4-b33d-4980-b003-b851fae3f076

📥 Commits

Reviewing files that changed from the base of the PR and between 65d7ba8 and 96f9ca1.

📒 Files selected for processing (1)
  • openspec/specs/cdc-drain-mode/spec.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated code block syntax identifiers in migration guide documentation
    • Reformatted CDC Drain Mode specification for improved readability

Walkthrough

This PR updates SQL code block language identifiers in the "Chunks to NAR Migration" user guide and reflows text in the CDC drain mode specification. The migration guide updates the "Exit CDC" verification query from sql to mariadb, and the "Verification" section from mariadb to an untyped fence. The drain mode spec reflows requirement text across lines without changing its meaning.

Changes

Documentation and Specification Formatting

Layer / File(s) Summary
Code block language identifiers and text reflow
docs/docs/User Guide/Operations/Chunks to NAR Migration.md, openspec/specs/cdc-drain-mode/spec.md
SQL code block language identifiers in migration documentation are updated for consistency (sql → mariadb, mariadb → untyped), and drain mode specification requirement text is reflowed across lines while preserving semantic meaning.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🐰 In docs so fine, where SQL queries shine,
Tags hop to place, each code fence aligns,
Spec lines neatly flow, meanings stay true,
A tidy patch, with a nibble of glue,
Hooray — small hops for the doc crew!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing a validation failure in the cdc-drain-mode specification by correcting SHALL keyword placement.
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.
Description check ✅ Passed The pull request description is clearly related to the changeset, explaining the motivation and scope of changes across two files.

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


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

@kalbasit
kalbasit enabled auto-merge (squash) June 3, 2026 21:49

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates documentation and specifications. Specifically, it modifies code block language tags in the Chunks to NAR Migration guide and rephrases a requirement in the CDC drain mode specification. The reviewer recommends using mysql for the code block language tag to preserve syntax highlighting and suggests a grammatically smoother phrasing for the CDC drain mode requirement.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread openspec/specs/cdc-drain-mode/spec.md Resolved

@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/docs/User` Guide/Operations/Chunks to NAR Migration.md:
- Around line 161-164: The fenced code block containing the SQL query ("-- No
chunked NARs should remain after a full migration: SELECT count(*) FROM
nar_files WHERE total_chunks > 0;") needs a language tag to satisfy MD040;
change the opening fence from ``` to ```sql so the block becomes a SQL fenced
code block (```sql ... ```), ensuring the linter recognizes it as SQL.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3303746f-1611-4652-a03a-1a20096eeaf1

📥 Commits

Reviewing files that changed from the base of the PR and between 6233e78 and 65d7ba8.

📒 Files selected for processing (2)
  • docs/docs/User Guide/Operations/Chunks to NAR Migration.md
  • openspec/specs/cdc-drain-mode/spec.md

Comment on lines +161 to 164
```
-- No chunked NARs should remain after a full migration:
SELECT count(*) FROM nar_files WHERE total_chunks > 0;
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the fenced SQL block.

This currently triggers MD040 (fenced-code-language) and may fail docs lint checks.

💡 Proposed fix
-```
+```sql
 -- No chunked NARs should remain after a full migration:
 SELECT count(*) FROM nar_files WHERE total_chunks > 0;
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 161-161: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for 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.

In `@docs/docs/User` Guide/Operations/Chunks to NAR Migration.md around lines 161
- 164, The fenced code block containing the SQL query ("-- No chunked NARs
should remain after a full migration: SELECT count(*) FROM nar_files WHERE
total_chunks > 0;") needs a language tag to satisfy MD040; change the opening
fence from ``` to ```sql so the block becomes a SQL fenced code block (```sql
... ```), ensuring the linter recognizes it as SQL.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@kalbasit
kalbasit disabled auto-merge June 3, 2026 22:49
@kalbasit
kalbasit merged commit e751305 into main Jun 3, 2026
5 checks passed
@kalbasit
kalbasit deleted the docs-spec-fix-cdc-drain-mode branch June 3, 2026 22:49
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant