mirror of
git://f0xx.org/android_cast
synced 2026-07-29 03:38:52 +03:00
BE sync
This commit is contained in:
@@ -4,8 +4,8 @@ This document defines how we develop, integrate, release, and hotfix. **Cursor a
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Version | 1.3 |
|
||||
| Published | 2026-05-23 |
|
||||
| Version | 1.4 |
|
||||
| Published | 2026-06-08 |
|
||||
| Author(s) | Anton Afanaasyeu |
|
||||
| Markdown source | `docs/GIT_FLOW.md` |
|
||||
| PDF | `docs/GIT_FLOW.pdf` |
|
||||
@@ -24,6 +24,7 @@ This document defines how we develop, integrate, release, and hotfix. **Cursor a
|
||||
- [2. Branches](#2-branches)
|
||||
- [3. Branch diagram (steady state)](#3-branch-diagram-steady-state)
|
||||
- [4. Daily development](#4-daily-development)
|
||||
- [4.1 Fast track on `next` (alpha sprint)](#41-fast-track-on-next-alpha-sprint)
|
||||
- [5. Release: next → master](#5-release-next-master)
|
||||
- [6. Hotfixes — chosen strategy](#6-hotfixes-chosen-strategy)
|
||||
- [Default: hotfix from master (option 1) ✓](#default-hotfix-from-master-option-1)
|
||||
@@ -64,7 +65,7 @@ This document defines how we develop, integrate, release, and hotfix. **Cursor a
|
||||
| Branch | Role | Direct commits? |
|
||||
|--------|------|-----------------|
|
||||
| **`master`** | Production line; **green** (build + tests pass); release tags (`v0.1.2`) | **No** — merge only |
|
||||
| **`next`** | Integration / release candidate; absorbs features until a release is approved | **No** — merge only |
|
||||
| **`next`** | Integration / release candidate; absorbs features until a release is approved | **No** — merge only (exception: alpha sprint direct commits when maintainer/agent explicitly commits here — [§4.1](GIT_FLOW.md#41-fast-track-on-next-alpha-sprint)) |
|
||||
| **`feature/*`**, **`fix/*`**, **`topic/*`** | Short-lived work; fork **`next`** | Yes (normal dev) |
|
||||
| **`hotfix/*`** | Urgent fix for **released** code | Yes; merge target **`master`** first |
|
||||
|
||||
@@ -124,6 +125,43 @@ sequenceDiagram
|
||||
Dev->>F: delete branch
|
||||
```
|
||||
|
||||
### 4.1 Fast track on `next` (alpha sprint)
|
||||
|
||||
During intensive alpha work, the team may commit **directly on `next`** instead of short-lived `feature/*` branches — to move faster and avoid branch overhead.
|
||||
|
||||
**Trade-off:** integration history on `next` is harder to read; **mitigation: atomic, revert-friendly commits.**
|
||||
|
||||
| Rule | Why |
|
||||
|------|-----|
|
||||
| **One feature (or one logical slice) per commit** | `git revert <hash>` removes only that slice |
|
||||
| **Do not mix** unrelated areas in one commit (e.g. RSSH + graphs + stream dump) | Avoids reverting good work when one feature misbehaves |
|
||||
| **Commit message names the feature** | e.g. `dev: stream dump writer (FR 0.1)` — easy to find in `git log` |
|
||||
| **Tests/docs for that slice in the same commit** when small | Keeps revert self-contained |
|
||||
| **Prefer revert over edit** when a feature is rejected | `git revert` on `next`; do not leave half-removed code across commits |
|
||||
|
||||
**Good split (three commits on `next`):**
|
||||
|
||||
```text
|
||||
dev: network self-test — fix BACKEND head/uplink probes
|
||||
dev: diagnostics — full advertisement info card
|
||||
be: config.example mail stub for 2FA SMTP
|
||||
```
|
||||
|
||||
**Bad (one commit):**
|
||||
|
||||
```text
|
||||
alpha wip: self-test, diagnostics, mail config, ingest script, docs
|
||||
```
|
||||
|
||||
**Revert one feature:**
|
||||
|
||||
```bash
|
||||
git log --oneline -20 # find the commit
|
||||
git revert <hash> # new commit undoing only that change
|
||||
```
|
||||
|
||||
Agents: only commit to `next` when the user asks. When they do, follow the atomic rules above. Default remains **topic branch from `next`** for longer or risky work.
|
||||
|
||||
---
|
||||
|
||||
## 5. Release: `next` → `master`
|
||||
@@ -297,6 +335,7 @@ Agents working in this repo **must**:
|
||||
5. **Hotfixes on released code:** branch from `master`, merge back to `master`, tag, then **merge `master` into `next`**.
|
||||
6. **Set active branch** metadata when using a named topic branch (project convention).
|
||||
7. **Do not** force-push `master`; avoid force-push on `next` unless the user explicitly requests integration history rewrite.
|
||||
8. **Fast track on `next`:** when the user commits directly on `next` (alpha sprint), use **atomic commits** — one feature per commit so `git revert <hash>` can drop a bad feature without touching others ([§4.1](GIT_FLOW.md#41-fast-track-on-next-alpha-sprint)).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user