Showing 3 changed files with 49 additions and 17 deletions
+11 -9
.doc/development-log.md
@@ -121,20 +121,22 @@ Scop:
121 121
 - compatibilitate mai bună cu password managere și autofill mobil
122 122
 - fără a complica interfața vizibilă
123 123
 
124
-## 2026-06-08 - Manual Deploy Script Is the Development Contract
124
+## 2026-06-08 - Commit and Push Is the Development Contract
125 125
 
126
-Observație: hook-urile locale `post-commit` pentru deploy automat nu sunt potrivite pentru lucrul pe mai multe fronturi. Varianta cu `git push jumper-runtime HEAD:main` era fragilă pentru că jumper este un checkout live, iar `receive.denyCurrentBranch=updateInstead` refuză push-ul dacă working tree-ul runtime are orice modificare locală în fișiere versionate. Varianta care rula deploy-ul din `post-commit` făcea propagarea mai deterministă, dar tot muta un singur runtime global la fiecare commit pe `main`, deci nu ajuta la lucru paralel.
126
+Observație: schimbările lăsate mult timp ca dirty working tree se pierd ușor în timpul deploy-urilor, reseturilor și schimbărilor de context. Pentru development, unitatea de lucru trebuie să fie commit-ul local, nu un set de fișiere uitate în stare necomisă.
127 127
 
128 128
 Decizie:
129 129
 
130
-- nu se folosește deploy automat la commit
131
-- commit-ul local și push-ul în GitPrep rămân operații Git separate de runtime
132
-- deploy-ul către jumper se face explicit cu `scripts/deploy_to_jumper.sh`
133
-- deploy-ul continuă să nu copieze implicit `config/`
134
-- `BUILD` este scris din commit-ul exact și devine sursa vizibilă pentru ce versiune rulează
130
+- se lucrează cu commit-uri locale mici și coerente
131
+- pentru test live, commit-ul se împinge în checkout-ul runtime de pe jumper cu `git push jumper-runtime HEAD:main`
132
+- pentru arhivare și istoric canonic, același commit se împinge în GitPrep cu `git push origin main`
133
+- jumper rămâne target de test live, nu locul principal de editare
134
+- `scripts/deploy_to_jumper.sh` rămâne unealtă explicită de rsync deploy, dar nu înlocuiește disciplina commit/push
135
+- `BUILD` rămâne sursa vizibilă pentru ce versiune rulează
135 136
 
136 137
 Scop:
137 138
 
138
-- operatorul decide explicit când schimbă runtime-ul testat pe jumper
139
-- lucrul pe fronturi paralele nu declanșează deploy-uri surpriză
139
+- niciun front de lucru să nu rămână doar în fișiere dirty locale sau runtime
140
+- testul live pe jumper să fie legat de un commit identificabil
141
+- GitPrep să păstreze istoria canonică pentru arhivare și recuperare
140 142
 - badge-ul de build și meta tag-ul `xdev-build` devin verificarea rapidă pentru ce rulează
+25 -4
README.md
@@ -44,16 +44,37 @@ For agent/operator context, see:
44 44
 - [`.doc/host-manager.md`](.doc/host-manager.md)
45 45
 - [`.doc/local-hosts.md`](.doc/local-hosts.md)
46 46
 
47
-## Local development and deployment
47
+## Local development and live testing
48 48
 
49
-Work on application code locally, commit changes, then deploy to jumper:
49
+Work on application code locally. Do not leave changes parked in a dirty working
50
+tree; commit small, coherent changes so they cannot be lost during deploy,
51
+reset, or context switches.
50 52
 
51 53
 ```bash
52 54
 cd /Users/bogdan/Documents/Workspaces/Xdev/Madagascar/LocalAuthority
53
-scripts/deploy_to_jumper.sh
55
+git status --short
56
+git add ...
57
+git commit -m "Describe the change"
54 58
 ```
55 59
 
56
-The deploy script copies code, docs and deployment assets, restarts `host-manager`, and checks `/healthz`.
60
+For live testing, push the committed code to the runtime checkout on jumper:
61
+
62
+```bash
63
+git push jumper-runtime HEAD:main
64
+```
65
+
66
+The jumper receive hook validates the Perl scripts, restarts `host-manager`,
67
+writes `BUILD`, and checks `/healthz`.
68
+
69
+For archival/canonical history, push the same commits to GitPrep:
70
+
71
+```bash
72
+git push origin main
73
+```
74
+
75
+`scripts/deploy_to_jumper.sh` remains available as an explicit rsync deploy
76
+tool, but the normal development loop is commit plus push: `jumper-runtime` for
77
+live testing, `origin`/GitPrep for archive and sharing.
57 78
 
58 79
 `config/` is not deployed by default because `hosts.yaml`, `local-hosts.tsv`, and `work-orders.yaml` are operational data that may be changed on jumper by the application. Deploy config only when intentionally replacing runtime registry data:
59 80
 
+13 -4
agents.md
@@ -14,7 +14,10 @@ Operational rules:
14 14
 - Develop in this checkout: `/Users/bogdan/Documents/Workspaces/Xdev/Madagascar/LocalAuthority`.
15 15
 - Canonical git remote is GitPrep: `git@192.168.2.102:repositories/bogdan/LocalAuthority.git`.
16 16
 - Jumper is the runtime/deployment target, not the primary editing location.
17
-- Deploy application code with `scripts/deploy_to_jumper.sh`.
17
+- Development work must be committed locally before testing or archiving; do not leave useful changes as forgotten dirty working-tree state.
18
+- Push committed code to `jumper-runtime` for live testing on jumper.
19
+- Push committed code to `origin`/GitPrep for archival/canonical history.
20
+- `scripts/deploy_to_jumper.sh` is available for explicit rsync deploys, but the normal development loop is commit plus push.
18 21
 - Do not deploy `config/` unless the user explicitly asks to replace runtime registry data.
19 22
 - Treat `config/hosts.yaml`, `config/local-hosts.tsv`, and `config/work-orders.yaml` as operational data that may be changed by the live app.
20 23
 - Do not install npm, pip, or CPAN packages directly on hosts. Distribution packages are acceptable when needed.
@@ -32,13 +35,19 @@ Before deployment:
32 35
 
33 36
 ```bash
34 37
 perl -c scripts/host_manager.pl
35
-scripts/deploy_to_jumper.sh --dry-run --allow-dirty
38
+perl -c scripts/mdns_host_seed.pl
36 39
 ```
37 40
 
38
-Normal deployment after a committed change:
41
+Normal live-test deployment after a committed change:
39 42
 
40 43
 ```bash
41
-scripts/deploy_to_jumper.sh
44
+git push jumper-runtime HEAD:main
45
+```
46
+
47
+Archive/canonical push:
48
+
49
+```bash
50
+git push origin main
42 51
 ```
43 52
 
44 53
 After deployment, verify: