Skip to content

docs(governance): propose no-work-loss-protection rule via evolution-pipeline#792

Open
jordyamoedo wants to merge 2 commits into
SynkraAI:mainfrom
jordyamoedo:contrib/no-work-loss-protection
Open

docs(governance): propose no-work-loss-protection rule via evolution-pipeline#792
jordyamoedo wants to merge 2 commits into
SynkraAI:mainfrom
jordyamoedo:contrib/no-work-loss-protection

Conversation

@jordyamoedo

@jordyamoedo jordyamoedo commented Jun 15, 2026

Copy link
Copy Markdown

Summary

This proposes adding a git-sync-safety rule to the framework — submitted through the project's own governance/evolution-pipeline.md as an AuditFinding + FrameworkProposal (both PENDING your 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 via git fsck dangling-commit archaeology.

The proposal

A small, additive, advisory-by-default rule built on one idea:

Work is "safe" only when it's on the remote — never just on disk.

It would add:

  • A mechanical durability test (is it on the remote?, not the file's date).
  • Branch hygiene (one branch per task; branch from an updated origin/<base>; base only via PR).
  • Anti-loss mechanisms (a backup git bundle before any destructive op; cleanup only after publishing).
  • (Optional) an advisory guard that refuses to remove a worktree whose commits were never pushed.

Why it's good for the project

  • It covers the only irreversible class still unguarded — quality and secrets are reversible; lost work isn't.
  • It's generic — applies to any project using AIOX (multi-branch teams, solo long-running tasks, agentic/CI flows).
  • It's additive and low-risk — no existing behavior changes; advisory by default.
  • It's battle-tested in a production consumer fork, then generalized here (no project-specific content).

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

  • Chores
    • Added audit documentation identifying work loss risks when using local commits, unpushed work, or git worktrees without adequate safeguards
    • Added governance framework proposal establishing new rules and optional advisory guardrails to prevent irreversible work loss during git operations

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@jordyamoedo is attempting to deploy a commit to the SINKRA - AIOX Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the area: docs Documentation (docs/) label Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Two new YAML files are added: an audit finding (AF-20260614-no-work-loss-protection) documenting a "LOST WORK" risk for local commits and git worktrees due to missing durability-on-remote rules, and a corresponding governance proposal (PROP-20260614-no-work-loss-protection) defining an L2 rule artifact, rollout plan, and pending approval placeholders.

Changes

Lost Work Protection Audit and Governance Proposal

Layer / File(s) Summary
Audit finding and governance proposal
audits/promoted/AF-20260614-no-work-loss-protection.yaml, governance/proposals/PROP-20260614-no-work-loss-protection.yaml
The promoted audit finding records the evidence gaps, high blast-radius impact, framework-candidate rationale, and proposed dispositions (durability test/process rule, optional advisory worktree-cleanup guard, backup bundle guidance). The linked governance proposal references the audit finding as its source and defines the new L2 rule doc target path, applicability conditions, non-breaking migration/rollout plan, and placeholder approval/implementation fields.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

area: docs, area: devops

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: proposing a new governance rule through the evolution pipeline. It is concise, specific, and directly reflects the pull request's primary objective.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to aiox-core! Thanks for your first pull request.

What happens next?

  1. Automated checks will run on your PR
  2. A maintainer will review your changes
  3. Once approved, we'll merge your contribution!

PR Checklist:

Thanks for contributing!

@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 `@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

📥 Commits

Reviewing files that changed from the base of the PR and between 77265d5 and c385d90.

📒 Files selected for processing (2)
  • audits/promoted/AF-20260614-no-work-loss-protection.yaml
  • governance/proposals/PROP-20260614-no-work-loss-protection.yaml

Comment on lines +30 to +32
references:
- kind: pattern
path: "Durability = on the remote, not on disk"

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 | 🟠 Major

🧩 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.yaml

Repository: 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 1

Repository: 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.

Suggested change
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.

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

Labels

area: docs Documentation (docs/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant