From 80c1df5ae7f7f819c4221c7aa3f45b7e32a48073 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Fri, 3 Jul 2026 05:42:25 +0200 Subject: [PATCH] =?UTF-8?q?docs(shared):=20S4=20=E2=80=94=20sync=20policy?= =?UTF-8?q?=20is=20pull-only=20(subtree=20push=20leaks=20consumer=20histor?= =?UTF-8?q?y)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AaQCFnfsh3tfq1VfzdJpoi --- shared/README.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/shared/README.md b/shared/README.md index 7fb0e11..66da623 100644 --- a/shared/README.md +++ b/shared/README.md @@ -42,24 +42,21 @@ so the only thing that differs is the agent framework itself. at this unchanged `shared/` path (so tests and the `PORTFOLIO_SHARED_ROOT` default resolver are unaffected). Do not edit commons content anywhere else without syncing. -## Subtree sync (run from the consuming repo's root) +## Subtree sync (pull-only — run from the consuming repo's root) The remote is registered as `commons` (`ssh://git@git.fromaitochitta.com/ktg/portfolio-optimiser-commons.git`). -- **Pull** upstream changes from commons into this repo: +**All edits land in commons first** (clone it, commit, push there), then each +consuming repo pulls them in: - ```sh - git subtree pull --prefix=shared commons main --squash - ``` +```sh +git subtree pull --prefix=shared commons main --squash +``` -- **Push** local `shared/` edits (committed here first) back to commons: - - ```sh - git subtree push --prefix=shared commons main - ``` - -Edits should preferably land in commons first and be pulled; pushing from a consumer -is for small fixes made in place. Either way, commons remains the source of truth. +**Never run `git subtree push` from a consuming repo.** Observed 2026-07-03: because +this repo's history contains commits that create/delete the `shared/` prefix, the +push re-split leaked the consumer's *entire* history into commons (cleaned up by +force-push the same day). Pull-only keeps commons the clean source of truth. See the target picture for the full architecture: `docs/plan/2026-06-26-maalbilde-agentic-loop.md`.