Repository navigation
docs(spec): fix cdc-drain-mode SHALL validation - #1320
Conversation
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.
|
This change is part of the following stack: Change managed by git-spice. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis 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 ChangesDocumentation and Specification Formatting
🎯 1 (Trivial) | ⏱️ ~2 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
docs/docs/User Guide/Operations/Chunks to NAR Migration.mdopenspec/specs/cdc-drain-mode/spec.md
| ``` | ||
| -- No chunked NARs should remain after a full migration: | ||
| SELECT count(*) FROM nar_files WHERE total_chunks > 0; | ||
| ``` |
There was a problem hiding this comment.
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>
Summary
openspec/specs/cdc-drain-mode/spec.md: fix a pre-existingopenspec validatefailure (requirements.1.text: Requirement must contain SHALL or MUST keyword). The validator parses a requirement'stext as only its first physical line and checks that line for
SHALL/MUST. The "server MUST enter drain mode" requirement put itsnormative
SHALLon the third wrapped line, so the validator never sawit. 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-tagcleanup.
This is independent of #1319 (a pre-existing validation bug), branched off
mainso it can merge on its own.Test plan
openspec validate cdc-drain-mode→ validtask fmtclean