Skip fenced-code blocks in report validator and add Omni-Sentinel runbook docs#143
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The files' contents are under analysis for test generation. |
Changed Files
|
|
Review these changes at https://app.gitnotebooks.com/OneFineStarstuff/OneFineStarstuff.github.io/pull/143 |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
View changes in DiffLens |
Reviewer's GuideValidator now strips fenced code blocks before running structural checks, ensuring example XML/markdown doesn’t affect required tags/headings, and governance reports gain new Omni-Sentinel operational and regulator-ready ZK compliance content and templates. Flow diagram for governance report validation with fenced-code strippingflowchart TD
A[validate_file path required_headings] --> B[Path.exists]
B -->|missing| C[return missing file error]
B -->|exists| D[Path.read_text]
D --> E[markdown_without_fenced_code_blocks text]
E --> F[check REQUIRED_TAGS in structural_text]
F --> G[count title abstract content tags in structural_text]
G --> H[validate <title> length in structural_text]
H --> I[check required_headings present in structural_text]
I --> J[return errors]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | Jul 6, 2026 10:47a.m. | Review ↗ | |
| JavaScript | Jul 6, 2026 10:47a.m. | Review ↗ | |
| Shell | Jul 6, 2026 10:47a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
View changes in DiffLens |
📝 WalkthroughWalkthroughThis PR expands three governance documentation reports with new sections (daily operational checks runbook, 2031-2035 extension roadmap/ZK compliance model, and regulator-ready XML report templates), and updates the report validator tool to strip fenced Markdown code blocks before checking required tags/headings, with accompanying unit tests. ChangesGovernance Documentation Additions
Fenced-Code-Aware Validation Tool
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
markdown_without_fenced_code_blocks, if a fenced block is never closed the function currently drops the rest of the file, which could cause required tags/headings to be missed; consider treating EOF as an implicit fence closer so non-fenced content after a malformed block is preserved. - Inside
markdown_without_fenced_code_blocks, the closing-fence regex is rebuilt on every line whilein_fenceis true; you could precompute it once when the opener is matched to avoid repeated string interpolation and compilation in the hot path.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `markdown_without_fenced_code_blocks`, if a fenced block is never closed the function currently drops the rest of the file, which could cause required tags/headings to be missed; consider treating EOF as an implicit fence closer so non-fenced content after a malformed block is preserved.
- Inside `markdown_without_fenced_code_blocks`, the closing-fence regex is rebuilt on every line while `in_fence` is true; you could precompute it once when the opener is matched to avoid repeated string interpolation and compilation in the hot path.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 4 minor |
| CodeStyle | 40 minor |
🟢 Metrics 4 complexity · 0 duplication
Metric Results Complexity 4 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Blocking feedback
- Fenced-block closing currently fails on CRLF line endings, so the validator can treat the first fence as unclosed and drop the rest of the document from structural checks — tools/validate_governance_reports.py#L67 · inline thread
If you want me to apply a fix, reply with the item number (for example: please fix 1).
✅ Deploy Preview for onefinestarstuff canceled.
|
|
View changes in DiffLens |
|
View changes in DiffLens |
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/reports/REGULATOR_EXAM_PACK_AI_GOVERNANCE_2026_2030.md`:
- Around line 53-97: The three XML templates in the report structure need the
mandatory metadata envelope that the section requires. Update each template
title/abstract/content block to include fields for immutable evidence URIs,
signer identity, control owner, regulator profile, and OSCAL control mapping so
generated submissions from these templates are compliant. Use the existing
template identifiers like Daily Omni-Sentinel DevSecOps and Containment
Attestation, G-SRI Privacy-Preserving Systemic Risk Compliance Proof, and Red
Dawn AGI/ASI Containment Simulation Technical Dossier to keep the metadata
consistent across all report types.
🪄 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: 80e70ec3-f381-4f80-bd70-3f5ddaae10ee
📒 Files selected for processing (5)
docs/reports/ENGINEERING_IMPLEMENTATION_PLAYBOOK_AI_GOVERNANCE_2026_2030.mddocs/reports/INSTITUTIONAL_GRADE_AGI_ASI_GOVERNANCE_2026_2030.mddocs/reports/REGULATOR_EXAM_PACK_AI_GOVERNANCE_2026_2030.mdtool_tests/test_validate_governance_reports.pytools/validate_governance_reports.py
|
View changes in DiffLens |
Motivation
Description
markdown_without_fenced_code_blockstotools/validate_governance_reports.pyand updatevalidate_fileto run structural checks against the fence-stripped text so wrapper tags and headings inside fenced examples are ignored.tool_tests/test_validate_governance_reports.pywith tests covering fenced-code fence variants, ignoring wrapper tags inside examples, and ensuring headings inside fences do not count toward required headings.docs/reports/ENGINEERING_IMPLEMENTATION_PLAYBOOK_AI_GOVERNANCE_2026_2030.md(Omni-Sentinel daily DevSecOps checks and runbook),docs/reports/INSTITUTIONAL_GRADE_AGI_ASI_GOVERNANCE_2026_2030.md(extension roadmap, reference architecture, ZK compliance model), anddocs/reports/REGULATOR_EXAM_PACK_AI_GOVERNANCE_2026_2030.md(regulator-ready technical report structures and templates).Testing
python3 -m unittest discover tool_tests, exercising the newtest_markdown_without_fenced_code_blocks,test_validate_file_ignores_wrapper_tags_inside_fenced_code_blocks, andtest_validate_file_does_not_accept_required_headings_inside_fenced_code_blockstests, and all tests passed.Codex Task
Summary by Sourcery
Adjust governance report validation to ignore XML tags and headings inside fenced code blocks and expand Omni-Sentinel governance documentation with operational and regulator-ready templates.
New Features:
Enhancements:
Tests:
Summary by CodeRabbit
New Features
Bug Fixes