docs(governance): propose no-work-loss-protection rule via evolution-pipeline#792
docs(governance): propose no-work-loss-protection rule via evolution-pipeline#792jordyamoedo wants to merge 2 commits into
Conversation
|
@jordyamoedo is attempting to deploy a commit to the SINKRA - AIOX Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughTwo new YAML files are added: an audit finding ( ChangesLost Work Protection Audit and Governance Proposal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
|
Welcome to aiox-core! Thanks for your first pull request. What happens next?
PR Checklist:
Thanks for contributing! |
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 `@audits/promoted/AF-20260614-no-work-loss-protection.yaml`:
- Around line 30-32: The references section in the audit finding uses an invalid
kind value of pattern, which is not in the allowed list defined by the
audit-finding-tmpl.yaml template. Change the kind value from pattern to
existing-pattern-source in the references block that contains the path
"Durability = on the remote, not on disk" to conform to the allowed reference
kinds.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 67e88d47-4ac1-4cc4-9cc1-a9ba0ca047a2
📒 Files selected for processing (2)
audits/promoted/AF-20260614-no-work-loss-protection.yamlgovernance/proposals/PROP-20260614-no-work-loss-protection.yaml
| references: | ||
| - kind: pattern | ||
| path: "Durability = on the remote, not on disk" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Extract the allowed kind values from the audit finding template
# Search for the references section and allowed kind values
rg -A 5 -B 2 "Allowed kind values" governance/templates/audit-finding-tmpl.yamlRepository: SynkraAI/aiox-core
Length of output: 377
🏁 Script executed:
#!/bin/bash
# Check the actual file mentioned in the review
cat -n audits/promoted/AF-20260614-no-work-loss-protection.yaml | sed -n '25,35p'Repository: SynkraAI/aiox-core
Length of output: 614
🏁 Script executed:
#!/bin/bash
# Also check if there are other kind values in the file to understand context
rg "kind:" audits/promoted/AF-20260614-no-work-loss-protection.yaml -B 1 -A 1Repository: SynkraAI/aiox-core
Length of output: 150
Invalid reference kind value.
Line 31 uses kind: pattern, which is not in the allowed values list defined by the audit finding template. The template at governance/templates/audit-finding-tmpl.yaml specifies allowed kinds as: ADR | code | hook | governance-doc | existing-pattern-source | voice-clone-finding | voice-clone-personas | handoff-contract | audit | proposal.
Based on the semantic meaning, change this to existing-pattern-source:
Proposed fix
references:
- - kind: pattern
+ - kind: existing-pattern-source
path: "Durability = on the remote, not on disk"📝 Committable suggestion
‼️ 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.
| references: | |
| - kind: pattern | |
| path: "Durability = on the remote, not on disk" | |
| references: | |
| - kind: existing-pattern-source | |
| path: "Durability = on the remote, not on disk" |
🤖 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 `@audits/promoted/AF-20260614-no-work-loss-protection.yaml` around lines 30 -
32, The references section in the audit finding uses an invalid kind value of
pattern, which is not in the allowed list defined by the audit-finding-tmpl.yaml
template. Change the kind value from pattern to existing-pattern-source in the
references block that contains the path "Durability = on the remote, not on
disk" to conform to the allowed reference kinds.
Summary
This proposes adding a git-sync-safety rule to the framework — submitted through the project's own
governance/evolution-pipeline.mdas anAuditFinding+FrameworkProposal(bothPENDINGyour approval). No code paths are touched; it's two governance YAML files.The gap
AIOX already has strong gates for code quality and secrets, but no rule covering one irreversible risk class: lost work. Committed-but-unpushed commits and unpublished git worktrees can vanish to
gc,reset --hard, or a worktree cleanup — with recovery only viagit fsckdangling-commit archaeology.The proposal
A small, additive, advisory-by-default rule built on one idea:
It would add:
is it on the remote?, not the file's date).origin/<base>; base only via PR).git bundlebefore any destructive op; cleanup only after publishing).Why it's good for the project
Submitted in the spirit of the framework's own evolution pipeline. Happy to follow up with the implementation PR (
.claude/rules/git-sync-safety.md+ the optional guard) once the proposal is approved — or to adjust scope per your guidance.Summary by CodeRabbit