-
-
Notifications
You must be signed in to change notification settings - Fork 934
docs(governance): propose no-work-loss-protection rule via evolution-pipeline #792
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
Open
jordyamoedo
wants to merge
2
commits into
SynkraAI:main
Choose a base branch
from
jordyamoedo:contrib/no-work-loss-protection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| audit_finding: | ||
| version: "1.0" | ||
| id: "AF-20260614-no-work-loss-protection" | ||
| date: "2026-06-14" | ||
| auditor: "external-contributor (@aiox-master in a consumer project)" | ||
| source_session: "Comparative audit of a hardened consumer fork against aiox-core v5.2.9" | ||
|
|
||
| context: | ||
| project: "a production consumer project (anonymized)" | ||
| epic: "framework learning-loop audit" | ||
| triggered_by: "Repeated near-loss of committed-but-unpushed work and removed worktrees during day-to-day and agentic git operations" | ||
|
|
||
| finding: | ||
| summary: "The framework gates quality and secrets but has no rule covering the irreversible risk class of LOST WORK (committed-but-unpushed commits, unpublished worktrees)." | ||
| evidence: | ||
| - "No rule defines durability as 'present on the remote' vs merely 'present on disk'" | ||
| - "No guard prevents cleanup/removal of a worktree whose commits were never pushed" | ||
| - "No standard 'backup bundle before a destructive op' (branch -D, worktree remove, reset --hard, push --force)" | ||
| impact_observed: | ||
| blast_radius: "high" | ||
| affected_artifacts: ["any local commit", "any git worktree"] | ||
| cost: "Near-permanent loss of work; recovery only via `git fsck` dangling-commit archaeology" | ||
|
|
||
| framework_candidate: true | ||
| framework_candidate_rationale: | | ||
| The failure mode is project-agnostic: any project where contributors commit | ||
| locally and/or use git worktrees faces it. The fix is a generic process rule | ||
| (plus an optional advisory cleanup guard), not project-specific logic. | ||
|
|
||
| references: | ||
| - kind: pattern | ||
| path: "Durability = on the remote, not on disk" | ||
|
|
||
| proposed_disposition: | ||
| - "Add a git-sync-safety process rule (durability test, branch hygiene, base-via-PR)" | ||
| - "Optionally add an advisory worktree-cleanup guard that refuses to remove unpublished work" | ||
| - "Standardize 'backup bundle (git bundle) before any destructive git op'" | ||
51 changes: 51 additions & 0 deletions
51
governance/proposals/PROP-20260614-no-work-loss-protection.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| framework_proposal: | ||
| version: "1.0" | ||
| id: "PROP-20260614-no-work-loss-protection" | ||
| date: "2026-06-14" | ||
| proposer: "external-contributor (consumer-project audit)" | ||
| source_finding: "AF-20260614-no-work-loss-protection" | ||
|
|
||
| target: | ||
| layer: "L2" | ||
| artifact_type: "rule" | ||
| artifact_path: ".claude/rules/git-sync-safety.md (NEW) + optional advisory worktree-cleanup guard" | ||
| operation: "create" | ||
|
|
||
| generalization: | ||
| pattern_name: "Durability = on the remote, not on disk" | ||
| when_to_apply: | | ||
| Any project where contributors commit locally and/or use git worktrees. | ||
| Committed-but-unpushed work and unpublished worktrees are at risk from | ||
| `gc`, `reset --hard`, or a worktree cleanup. The framework already gates | ||
| quality and secrets, but not the irreversible risk class of LOST WORK. | ||
| examples_from_other_domains: | ||
| - "Multi-branch team: a worktree removed before publishing loses local commits" | ||
| - "Solo dev on a long-running task: reset --hard wipes uncommitted/unpushed work" | ||
| - "Agentic/CI flows: an automated cleanup removes a worktree the human never pushed" | ||
|
|
||
| migration_path: | ||
| breaking_change: false | ||
| affected_consumers: [] | ||
| rollout_plan: | | ||
| Additive. Adds a process rule and (optionally) an advisory cleanup guard. | ||
| No existing behavior changes. Projects opt into the guard via config. | ||
|
|
||
| deprecation_plan: | ||
| deprecates: [] | ||
| sunset_window: "n/a" | ||
|
|
||
| cost_benefit: | ||
| cost: "~1 documentation rule; optional advisory hook (~50 LOC)" | ||
| benefit: "Prevents an irreversible failure mode (lost work) framework-wide. Battle-tested in a production consumer fork, then generalized." | ||
| risk: "low — additive; advisory by default" | ||
|
|
||
| approval: | ||
| eliel_decision: "PENDING" | ||
| eliel_decision_at: null | ||
| eliel_decision_rationale: "" | ||
| revision_request: [] | ||
|
|
||
| implementation: | ||
| pr_url: "" | ||
| merged_at: "" | ||
| distributed_to: [] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: SynkraAI/aiox-core
Length of output: 377
🏁 Script executed:
Repository: SynkraAI/aiox-core
Length of output: 614
🏁 Script executed:
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 atgovernance/templates/audit-finding-tmpl.yamlspecifies 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
📝 Committable suggestion
🤖 Prompt for AI Agents