chore(remotes,docs): rename remotes to match source-of-truth doctrine

Local remote renames (URLs unchanged):
  backend-v4  → origin-backend   (canonical backend)
  frontend-v4 → origin-frontend  (canonical frontend)
  origin      → mirror-monorepo  (secondary full-tree mirror)

The `v4` branch auto-updated to track `mirror-monorepo/v4`.

Docs:
- Header banner: new 2026-04-19 "remote rename" entry; release entry now
  references `mirror-monorepo/v4` instead of `origin/v4`.
- §6.2 remotes table updated with the new names (plus a rename-history note)
  and reordered so the two canonical repos lead.
- §6.3 feature workflow now uses `git pull/push mirror-monorepo v4`.
- §6.4 publish commands now use `origin-backend` / `origin-frontend`.

Made-with: Cursor
This commit is contained in:
Yamen Ahmad
2026-04-19 03:29:42 +04:00
parent 7737f6def5
commit 7f23127e44

View File

@@ -5,8 +5,9 @@
> This workspace (`odoo19/`) is a **developer monorepo / working tree only** — it conveniently contains both halves side-by-side for local development and testing. The two split repos above are the **authoritative origins** for each half: every change must be published to them (via `git subtree split + push`) before the team lead can deploy. See **§6 Git Remotes & Repositories** for the exact workflow.
> **Latest events:**
> - **2026-04-19 (remote rename):** Aligned local remote names with the new doctrine — `backend-v4 → origin-backend`, `frontend-v4 → origin-frontend`, `origin → mirror-monorepo`. The `v4` branch now tracks `mirror-monorepo/v4`. All publishing commands in §6 updated. No remote URLs changed.
> - **2026-04-19 (repos-of-record reorganization):** Declared `encoach_backend_v4` and `encoach_frontend_v4` as the canonical origins for their respective halves; the monorepo `encoach_backend_new_v2/v4` is now a secondary working-tree mirror kept only for history/convenience. §6 rewritten around this model.
> - **2026-04-19 (release to VPS repos):** Pushed the accumulated institutional + support + training work. Frontend canonical → `encoach_frontend_v4/main` (`b78124bb..435930a8`, 403 files, clean fast-forward). Backend canonical → `encoach_backend_v4/main` (`74d83af5..6ec68160`, 420 files, clean fast-forward). Monorepo mirror → `v4` (`98b9837a`). `.gitignore` now excludes `pgdata_bak_*/`, `frontend/.vite/`, `frontend/dist/`, `frontend/node_modules/` so the 674 MB of local pgdata backups never leak into a push. See §6.
> - **2026-04-19 (release to VPS repos):** Pushed the accumulated institutional + support + training work. Frontend canonical → `encoach_frontend_v4/main` (`b78124bb..435930a8`, 403 files, clean fast-forward). Backend canonical → `encoach_backend_v4/main` (`74d83af5..6ec68160`, 420 files, clean fast-forward). Monorepo mirror → `mirror-monorepo/v4` (`98b9837a`). `.gitignore` now excludes `pgdata_bak_*/`, `frontend/.vite/`, `frontend/dist/`, `frontend/node_modules/` so the 674 MB of local pgdata backups never leak into a push. See §6.
> - **2026-04-18 (training section):** Built the Training section end-to-end — the `Vocabulary` and `Grammar` pages (previously pure hard-coded mocks) are now wired to real Odoo data with CRUD, search, level filtering, and per-user progress tracking. New `encoach.vocab.item` / `encoach.vocab.progress` / `encoach.grammar.rule` / `encoach.grammar.progress` models + `/api/training/vocabulary` and `/api/training/grammar` controllers. 26/26 API write-flow actions passing (`test_training_flows.py`); both pages verified live in-browser. See §19.
> - **2026-04-18 (support section):** Built the Support section end-to-end — the `Tickets`, `Payment Record`, and `Settings` pages are now wired to real Odoo data (they were previously mocks/404s). New `encoach.ticket` model + full CRUD controller, `/api/payment-records` deriving from `op.student.fees.details` + `account.move`, `/api/codes` + `/api/packages` + `/api/grading-config` powering the Settings tabs. 29/29 API write-flow actions passing (`test_support_flows.py`); all 3 pages verified live in-browser. See §18.
> - **2026-04-18 (institutional pages write-flow):** API-level write-flow sweep across all 14 institutional admin pages — **44/44 actions passing** (CREATE / EDIT / DELETE / WORKFLOW). Numerous backend gaps fixed: missing DELETE routes added (admission-registers, admissions, result-templates, student-leaves), lesson/library detail endpoints added, custom `encoach.asset` model introduced to replace the missing `op.asset`, marksheet generate endpoint aliased for Odoo 19's `generate_result`, fees `create-invoice` auto-wires the product income account via Odoo 19's JSONB property storage, academic-year DELETE now cascades dependent terms. See §17.
@@ -192,20 +193,22 @@ odoo19/ ← developer working tree (NOT source of truth
### 6.2 Remotes Configured on This Clone
Listed in order of importance. The two bold rows are the **repos of record**;
everything else is either a secondary mirror or legacy.
everything else is a secondary mirror or legacy.
| Remote | URL | Role |
|--------|-----|------|
| **`backend-v4`** | `https://git.albousalh.com/devops/encoach_backend_v4.git` | **Canonical backend** — branch `main`. VPS deploy target. |
| **`frontend-v4`** | `https://git.albousalh.com/devops/encoach_frontend_v4.git` | **Canonical frontend** — branch `main`. VPS deploy target. |
| `origin` | `https://git.albousalh.com/devops/encoach_backend_new_v2.git` | Secondary monorepo mirror (branch `v4`). Handy for a full-tree backup but **not** the source of truth. |
| `ip-origin` | `https://5.189.151.117/devops/encoach_backend_new_v2.git` | IP fallback for `origin` when DNS is flaky. |
| **`origin-backend`** | `https://git.albousalh.com/devops/encoach_backend_v4.git` | **Canonical backend** — branch `main`. VPS deploy target. |
| **`origin-frontend`** | `https://git.albousalh.com/devops/encoach_frontend_v4.git` | **Canonical frontend** — branch `main`. VPS deploy target. |
| `mirror-monorepo` | `https://git.albousalh.com/devops/encoach_backend_new_v2.git` | Secondary full-tree mirror (branch `v4` tracked here). Useful for history/backup and for docs that live only in the workspace root (e.g. this file). **Not** the source of truth. |
| `ip-origin` | `https://5.189.151.117/devops/encoach_backend_new_v2.git` | IP fallback for `mirror-monorepo` when DNS is flaky. |
| `backend-v3` | `https://git.albousalh.com/devops/encoach_backend_new_v3.git` | Legacy v3 monorepo mirror — rarely used. |
| `frontend-v3` | `https://git.albousalh.com/devops/encoach_frontend_new_v3.git` | Legacy v3 frontend mirror — rarely used. |
| `frontend` | `https://git.albousalh.com/devops/encoach_frontend_new_v2.git` | Legacy v2 frontend monorepo — rarely used. |
> The remote names `backend-v4` / `frontend-v4` pre-date this reorg; conceptually
> treat them as `origin-backend` / `origin-frontend`. Feel free to add aliases
> with `git remote rename` if you prefer different names.
> Rename history: `backend-v4 → origin-backend`, `frontend-v4 → origin-frontend`,
> `origin → mirror-monorepo` (applied 2026-04-19). If you have old scripts or
> notes referencing the old names, update them or add aliases via
> `git remote rename`.
### 6.3 Feature Development Workflow
@@ -213,9 +216,9 @@ Everything is edited inside this workspace, but a change is only **merged**
once it lands on `main` of the two canonical repos.
```bash
# 1. Start from clean workspace synced with canonical
# 1. Start from a clean workspace synced with the monorepo mirror
git checkout v4
git pull origin v4 # optional: keep monorepo mirror in sync
git pull mirror-monorepo v4 # optional: refresh full-tree mirror
# 2. Create a feature branch
git checkout -b feature/<short-name>
@@ -229,10 +232,10 @@ git checkout v4
git merge --no-ff feature/<short-name>
# 5. Publish to the CANONICAL repos (mandatory — see §6.4)
# This is what the team lead / CI will see.
# This is what the team lead / CI will see on the VPS.
# 6. (Optional) push the monorepo mirror for a full-tree backup
git push origin v4
# 6. (Optional) push the monorepo mirror for a full-tree backup / docs
git push mirror-monorepo v4
```
### 6.4 Publishing to the Canonical Repos (MANDATORY)
@@ -246,21 +249,21 @@ from elsewhere — which is the invariant we enforce.
```bash
# ── Publish BACKEND → encoach_backend_v4 ─────────────────────────────────
git subtree split --prefix=backend HEAD -b split-backend-v4
git push backend-v4 split-backend-v4:main
git push origin-backend split-backend-v4:main
git branch -D split-backend-v4 # cleanup the temp branch
# ── Publish FRONTEND → encoach_frontend_v4 ───────────────────────────────
git subtree split --prefix=frontend HEAD -b split-frontend-v4
git push frontend-v4 split-frontend-v4:main
git push origin-frontend split-frontend-v4:main
git branch -D split-frontend-v4
```
If a push is rejected as non-fast-forward, fetch and inspect before forcing:
```bash
git fetch backend-v4 frontend-v4
git log --oneline backend-v4/main..split-backend-v4 # what we're adding
git log --oneline split-backend-v4..backend-v4/main # divergence, if any
git fetch origin-backend origin-frontend
git log --oneline origin-backend/main..split-backend-v4 # what we're adding
git log --oneline split-backend-v4..origin-backend/main # divergence, if any
```
Only use `--force` after confirming the remote `main` has no commits worth