-
Notifications
You must be signed in to change notification settings - Fork 0
Feature - Improve Validate Docs Code Blocks #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…rt handling User request: "look at the improvements made in ~/hc/cloud-agf-devportal/tooling/validate_docs.py and merge those changes into our local implementation create a feature branch for this work and make sure you're up to date with origin/main" Key improvements merged from cloud-agf-devportal: 1. **Better import handling**: Added fallback strategy to import doc_schemas - Try importing as package (tooling.doc_schemas) first - Fall back to module import (doc_schemas) if package import fails - Improves script portability and execution from different contexts 2. **Enhanced code block validation with blank line checking**: - Validates blank line before opening code fence (except after frontmatter/document start) - Validates blank line after closing code fence (except at document end) - Tracks frontmatter boundaries to handle edge cases correctly - Tracks previous line blank state for accurate validation - Detects closing fence followed immediately by content 3. **Enforced lowercase filename standard**: - Changed patterns to lowercase-only (adr-, rfc-, memo-) - Removed case-insensitive matching (no more ADR-, RFC-, MEMO-) - Updated error messages to indicate lowercase requirement - Aligns with project's lowercase naming standard Testing shows script correctly identifies: - 32 files with uppercase names needing lowercase conversion - Missing blank lines in code blocks in intro.md and analysis-summary.md - All existing validation checks continue to work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…spacing fixer User request: "use the validate_docs script to begin fixing our documentation" Fixed 32 filename violations identified by enhanced validate_docs.py: **ADR Files (2)**: - ADR-000-template.md → adr-000-template.md - ADR-058-proxy-drain-on-shutdown.md → adr-058-proxy-drain-on-shutdown.md **RFC Files (11)**: - RFC-028 through RFC-040 → rfc-028 through rfc-040 **MEMO Files (19)**: - MEMO-010 through MEMO-036 → memo-010 through memo-036 All renames follow lowercase naming convention (adr-, rfc-, memo-) as enforced by the enhanced validation script. Also added: - tooling/fix_code_block_spacing.py: Script to automatically fix missing blank lines before/after code fences (for future use) This fixes all 32 filename validation errors. Remaining issues are code block blank line formatting (87 documents) which will be addressed separately. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ate-docs-code-blocks
User request: "merge with main, re-run lint" Merged main branch and fixed linting issues found by ruff and black: - Remove unused variables (fence_backticks, remainder) in fix_code_block_spacing.py - Replace 'not x == y' with 'x != y' for cleaner comparison - Apply ruff format to ensure consistent formatting All ruff checks now pass. Pylint shows 9.99/10 rating with only nested block complexity warnings (acceptable). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Automatically fixed 1519 spacing issues across ADRs, RFCs, and MEMOs: - Added missing blank lines before opening code fences - Added missing blank lines after closing code fences - Ensures MDX compatibility and proper rendering in Docusaurus Fixed files: - 58 ADRs: adr-002 through adr-057 - 35 RFCs: rfc-001 through rfc-040 - 18 MEMOs: memo-002 through memo-036 All documentation now passes validation with zero errors. User request: "switch to PR 18, update it to latest by merging main and address any CI failures including doc validation" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The PR Status Check has failed. Please review the CI logs and fix any issues. Common issues:
You can run checks locally: task test-parallel-fast # Run tests
task lint-parallel # Run linters
uv run tooling/validate_docs.py # Validate docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses unresolved Git merge conflicts in documentation files. The changes involve cleaning up merge conflict markers (<<<<<<< HEAD, =======, >>>>>>> origin/main) that were left in three ADR (Architecture Decision Record) markdown files after a merge operation.
Key Changes:
- Multiple merge conflict markers need to be resolved across documentation files
- Code block formatting inconsistencies between merged versions
- Frontmatter conflicts in the ADR template file
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 31 comments.
| File | Description |
|---|---|
| docs-cms/adr/adr-037-kubernetes-operator.md | Contains merge conflicts in architecture diagrams and code block examples |
| docs-cms/adr/adr-023-grpc-first-interface-design.md | Contains merge conflicts in code snippets and formatting across multiple sections |
| docs-cms/adr/adr-000-template.md | Contains merge conflicts in frontmatter structure and template sections |
Comments suppressed due to low confidence (1)
docs-cms/adr/adr-037-kubernetes-operator.md:1
- Unresolved Git merge conflict markers present in documentation. These conflict markers (<<<<<<< HEAD, =======, >>>>>>> origin/main) must be resolved by choosing one version or manually merging the content before the PR can be merged.
---
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <<<<<<< HEAD | ||
| ``` | ||
| ======= | ||
| ```text | ||
| >>>>>>> origin/main | ||
| # Must manually define: | ||
| - Deployment for each shard | ||
| - StatefulSet for SQLite persistence | ||
| - Services for each shard | ||
| - ConfigMaps for namespace configs (must sync manually!) | ||
| - Plugin sidecar injection (manual, error-prone) | ||
| <<<<<<< HEAD | ||
| ```text | ||
| **With Operator**: | ||
| ``` | ||
|
|
||
| ======= | ||
| ``` | ||
| **With Operator**: | ||
| ```yaml | ||
| >>>>>>> origin/main | ||
| # Just define: |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in code block fence formatting. Choose either plain ortext and remove conflict markers.
| <<<<<<< HEAD | |
| ``` | |
| ======= | |
| ```text | |
| >>>>>>> origin/main | |
| # Must manually define: | |
| - Deployment for each shard | |
| - StatefulSet for SQLite persistence | |
| - Services for each shard | |
| - ConfigMaps for namespace configs (must sync manually!) | |
| - Plugin sidecar injection (manual, error-prone) | |
| <<<<<<< HEAD | |
| ```text | |
| **With Operator**: | |
| ``` | |
| ======= | |
| ``` | |
| **With Operator**: | |
| ```yaml | |
| >>>>>>> origin/main | |
| # Just define: | |
| ```text | |
| # Must manually define: | |
| - Deployment for each shard | |
| - StatefulSet for SQLite persistence | |
| - Services for each shard | |
| - ConfigMaps for namespace configs (must sync manually!) | |
| - Plugin sidecar injection (manual, error-prone) |
With Operator:
| <<<<<<< HEAD | ||
| ``` | ||
| ======= | ||
| ```text | ||
| >>>>>>> origin/main | ||
| # Must manually define: | ||
| - Deployment for each shard | ||
| - StatefulSet for SQLite persistence | ||
| - Services for each shard | ||
| - ConfigMaps for namespace configs (must sync manually!) | ||
| - Plugin sidecar injection (manual, error-prone) | ||
| <<<<<<< HEAD | ||
| ```text | ||
| **With Operator**: | ||
| ``` | ||
|
|
||
| ======= | ||
| ``` | ||
| **With Operator**: | ||
| ```yaml | ||
| >>>>>>> origin/main |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict with inconsistent code block language identifiers. The closing on line 326 should useyaml for the YAML example that follows, and all conflict markers must be removed.
| <<<<<<< HEAD | |
| ``` | |
| ======= | |
| ```text | |
| >>>>>>> origin/main | |
| # Must manually define: | |
| - Deployment for each shard | |
| - StatefulSet for SQLite persistence | |
| - Services for each shard | |
| - ConfigMaps for namespace configs (must sync manually!) | |
| - Plugin sidecar injection (manual, error-prone) | |
| <<<<<<< HEAD | |
| ```text | |
| **With Operator**: | |
| ``` | |
| ======= | |
| ``` | |
| **With Operator**: | |
| ```yaml | |
| >>>>>>> origin/main | |
| ```text | |
| # Must manually define: | |
| - Deployment for each shard | |
| - StatefulSet for SQLite persistence | |
| - Services for each shard | |
| - ConfigMaps for namespace configs (must sync manually!) | |
| - Plugin sidecar injection (manual, error-prone) |
With Operator:
| backend: postgres | ||
| pattern: keyvalue | ||
| # Operator handles the rest! | ||
| <<<<<<< HEAD |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in closing code block fence. Remove conflict markers and use a single ``` to close the code block.
| <<<<<<< HEAD | ||
| ```text | ||
| ======= | ||
| ``` | ||
| >>>>>>> origin/main | ||
| ### Service Organization | ||
|
|
||
| Each access pattern gets its own service: | ||
|
|
||
| <<<<<<< HEAD |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in code block closing fence. Remove conflict markers and decide between ortext.
| <<<<<<< HEAD | |
| ```text | |
| ======= | |
| ``` | |
| >>>>>>> origin/main | |
| ### Service Organization | |
| Each access pattern gets its own service: | |
| <<<<<<< HEAD | |
| ```text | |
| ### Service Organization | |
| Each access pattern gets its own service: |
| <<<<<<< HEAD | ||
| ```text | ||
| ======= | ||
| ``` | ||
| >>>>>>> origin/main | ||
| ### Service Organization | ||
|
|
||
| Each access pattern gets its own service: | ||
|
|
||
| <<<<<<< HEAD | ||
| ``` | ||
| ======= |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in code block opening fence. The protobuf code that follows requires protobuf language identifier. Remove conflict markers and use protobuf.
| <<<<<<< HEAD | |
| ```text | |
| ======= | |
| ``` | |
| >>>>>>> origin/main | |
| ### Service Organization | |
| Each access pattern gets its own service: | |
| <<<<<<< HEAD | |
| ``` | |
| ======= | |
| ```protobuf | |
| ### Service Organization | |
| Each access pattern gets its own service: | |
| - **Performance** (weight: X%): Description | ||
| - **Developer Experience** (weight: Y%): Description | ||
| - **Cost/Maintenance** (weight: Z%): Description | ||
| >>>>>>> origin/main |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict marker. Remove this marker and ensure the preceding content is properly merged.
| <<<<<<< HEAD | ||
| - Pros: ... | ||
| - Cons: ... | ||
| - Rejected because: ... | ||
|
|
||
| 2. **Alternative 2**: Description | ||
| - Pros: ... | ||
| - Cons: ... | ||
| - Rejected because: ... | ||
|
|
||
| ## Consequences | ||
|
|
||
| ### Positive | ||
|
|
||
| - What becomes easier | ||
| - What capabilities do we gain | ||
|
|
||
| ### Negative | ||
|
|
||
| - What becomes harder | ||
| - What trade-offs are we making | ||
|
|
||
| ### Neutral | ||
|
|
||
| - What stays the same | ||
| - What new considerations emerge | ||
|
|
||
| ## Implementation Notes | ||
|
|
||
| Key technical details, gotchas, or migration steps. | ||
| ======= |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in template sections. Choose one version of the Alternatives Considered, Consequences, and Implementation Notes sections and remove all conflict markers.
| Optional section for implementation details, milestones, or technical specifics. | ||
|
|
||
| Key technical details, gotchas, or migration steps: | ||
| >>>>>>> origin/main |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict marker. Remove this marker and ensure the preceding content is properly merged.
| <<<<<<< HEAD | ||
| ## References | ||
|
|
||
| - [Link to related ADRs] | ||
| - [Link to external resources] | ||
| - [Link to requirements docs] | ||
|
|
||
| ## Revision History | ||
|
|
||
| - YYYY-MM-DD: Initial draft | ||
| - YYYY-MM-DD: Accepted after review | ||
| ======= |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict in References and Revision History sections. Choose one version and remove conflict markers.
| - YYYY-MM-DD: Initial draft (Author Name) | ||
| - YYYY-MM-DD: Accepted after review (Deciders) | ||
| - YYYY-MM-DD: Amended with clarification (Author Name) | ||
| >>>>>>> origin/main |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolved Git merge conflict marker at end of file. Remove this marker to complete the merge resolution.
|
The PR Status Check has failed. Please review the CI logs and fix any issues. Common issues:
You can run checks locally: task test-parallel-fast # Run tests
task lint-parallel # Run linters
uv run tooling/validate_docs.py # Validate docs |
User request: "look at all local branches for unmerged commits, create PRs if they are found by first merging origin/main and submitting the commit data"
This branch contains 8 unmerged commit(s). Final aggressive resolution applied.
Co-Authored-By: Claude noreply@anthropic.com