chore(release): compact the fork history at 0.9.0 #60

Open
opened 2026-10-25 00:49:24 +00:00 by dsh · 2 comments
Owner

Why

master is 62+ commits ahead of the upstream base (abfd952) and almost all of them are incremental fixes. The operator's decision (2026-10-25): every minor/major release compacts the fork history a little, starting with 0.9.0. This issue is the 0.9.0 dependency that tracks it.

What "compact" means

Rewrite the fork commits into a handful of logical commits before the tag, keeping the same final tree:

  • the upstream base commit stays untouched;
  • the squash happens on a temporary branch and master is force-pushed once, with operator approval (the single sanctioned exception to Ground rule 5);
  • v0.8.* tags are kept, so the pre-squash commits that issues, LOGS.md and this file quote stay resolvable;
  • the narrative lives in CHANGELOG.md and LOGS.md, so nothing is lost.

Mechanics (proposal)

Because the final tree is what matters, derive the compaction from the tree rather than replaying history:

# 1. branch from the upstream base
git checkout -b release/0.9.0-compact abfd952

# 2. lay the current tree down in logical groups and commit each
git checkout master -- package.json cordis.patch.yml README.md CHANGELOG.md AGENTS.md LOGS.md LICENSE .forgejo/
git commit -m "feat: deploy fork of dsh-gitea — identity, bundle, CI/release automation"

git checkout master -- lib/tool-defs.js lib/tool-defs/ lib/selection.js lib/dispatcher.js
git commit -m "feat(tools): 96 canonical tools, presets and the dispatcher surface"

git checkout master -- lib/ ... (handlers, client bundle, routes, guard, client)
git commit -m "feat(tools): handlers, formatters, settings UI and HTTP routes"

git checkout master -- lib/ ... (updater, scheduler, release/CI helpers)
git commit -m "feat(ops): updater, background scheduler and release helpers"

git checkout master -- test/ scripts/
git commit -m "test: fork regression suite and repository scripts"

# 3. verify, then swap
npm run check
git diff master release/0.9.0-compact --stat      # must be empty
git checkout master && git reset --hard release/0.9.0-compact
git push --force-with-lease origin master

Target: <= 6 fork commits on top of abfd952, each Conventional and reviewable by path. Exact grouping is flexible; the hard requirement is the empty diff.

Risks / mitigations

Risk Mitigation
Force push breaks the GitHub push mirror operator re-pushes the mirror after the swap (it is force-pushed anyway)
Old shas in issues / LOGS.md / CHANGELOG.md stop resolving on master v0.8.* tags keep the objects reachable; add a one-line note to LOGS.md that pre-squash shas live in the tags
Files cannot be split cleanly mid-history grouping is by area of the final tree, not by replaying commits — the diff is the acceptance test
Losing GPG-signed provenance new commits are signed by the same identity; old signed commits remain reachable through tags

Acceptance

  • master = abfd952 + <= 6 fork commits, all Conventional and GPG-signed
  • git diff <old-master> master is empty (same tree, byte for byte)
  • npm run check green on the compacted tree
  • all v0.8.* tags still resolve (git tag -l, git show v0.8.8 --stat)
  • GitHub mirror force-pushed and verified by the operator
  • AGENTS.md "Fork status" updated: new commit count, compaction date, and the tag rule
  • LOGS.md gets a short "history compaction" section with the old->new mapping note

References

  • Policy recorded in AGENTS.md: CI and releases → Major releases compact the history, and Ground rule 5 (the sanctioned force-push exception).
  • v0.8.8 (c47fb88) is the state to compact from.
## Why `master` is 62+ commits ahead of the upstream base (`abfd952`) and almost all of them are incremental fixes. The operator's decision (2026-10-25): **every minor/major release compacts the fork history a little, starting with 0.9.0.** This issue is the 0.9.0 dependency that tracks it. ## What "compact" means Rewrite the fork commits into a handful of logical commits **before** the tag, keeping the same final tree: - the upstream base commit stays untouched; - the squash happens on a temporary branch and `master` is force-pushed **once**, with operator approval (the single sanctioned exception to Ground rule 5); - `v0.8.*` tags are kept, so the pre-squash commits that issues, `LOGS.md` and this file quote stay resolvable; - the narrative lives in `CHANGELOG.md` and `LOGS.md`, so nothing is lost. ## Mechanics (proposal) Because the final tree is what matters, derive the compaction from the tree rather than replaying history: ```bash # 1. branch from the upstream base git checkout -b release/0.9.0-compact abfd952 # 2. lay the current tree down in logical groups and commit each git checkout master -- package.json cordis.patch.yml README.md CHANGELOG.md AGENTS.md LOGS.md LICENSE .forgejo/ git commit -m "feat: deploy fork of dsh-gitea — identity, bundle, CI/release automation" git checkout master -- lib/tool-defs.js lib/tool-defs/ lib/selection.js lib/dispatcher.js git commit -m "feat(tools): 96 canonical tools, presets and the dispatcher surface" git checkout master -- lib/ ... (handlers, client bundle, routes, guard, client) git commit -m "feat(tools): handlers, formatters, settings UI and HTTP routes" git checkout master -- lib/ ... (updater, scheduler, release/CI helpers) git commit -m "feat(ops): updater, background scheduler and release helpers" git checkout master -- test/ scripts/ git commit -m "test: fork regression suite and repository scripts" # 3. verify, then swap npm run check git diff master release/0.9.0-compact --stat # must be empty git checkout master && git reset --hard release/0.9.0-compact git push --force-with-lease origin master ``` Target: **<= 6 fork commits** on top of `abfd952`, each Conventional and reviewable by path. Exact grouping is flexible; the hard requirement is the empty diff. ## Risks / mitigations | Risk | Mitigation | |---|---| | Force push breaks the GitHub push mirror | operator re-pushes the mirror after the swap (it is force-pushed anyway) | | Old shas in issues / `LOGS.md` / `CHANGELOG.md` stop resolving on `master` | `v0.8.*` tags keep the objects reachable; add a one-line note to `LOGS.md` that pre-squash shas live in the tags | | Files cannot be split cleanly mid-history | grouping is by *area of the final tree*, not by replaying commits — the diff is the acceptance test | | Losing GPG-signed provenance | new commits are signed by the same identity; old signed commits remain reachable through tags | ## Acceptance - [ ] `master` = `abfd952` + **<= 6** fork commits, all Conventional and GPG-signed - [ ] `git diff <old-master> master` is empty (same tree, byte for byte) - [ ] `npm run check` green on the compacted tree - [ ] all `v0.8.*` tags still resolve (`git tag -l`, `git show v0.8.8 --stat`) - [ ] GitHub mirror force-pushed and verified by the operator - [ ] `AGENTS.md` "Fork status" updated: new commit count, compaction date, and the tag rule - [ ] `LOGS.md` gets a short "history compaction" section with the old->new mapping note ## References - Policy recorded in `AGENTS.md`: *CI and releases → Major releases compact the history*, and Ground rule 5 (the sanctioned force-push exception). - `v0.8.8` (`c47fb88`) is the state to compact from.
dsh added this to the 0.9.0 milestone 2026-10-25 00:49:25 +00:00
Author
Owner

Operator decision 2026-11-08: this compaction must also purge devops/ and LOGS.md from the rewritten history — both were public here and on the GitHub push mirror (devops/ since 2026-10-27). They left the tracked tree in #74 / #75 and are gitignored now, so the squash must not reintroduce them.

Not force-pushing today; this issue is the sanctioned slot for the rewrite. After the squash: force-push master once with operator approval, let the Forgejo push mirror follow, then verify git log --all -- devops LOGS.md is empty on the new refs.

Operator decision 2026-11-08: this compaction must also **purge `devops/` and `LOGS.md` from the rewritten history** — both were public here and on the GitHub push mirror (devops/ since 2026-10-27). They left the tracked tree in #74 / #75 and are gitignored now, so the squash must not reintroduce them. Not force-pushing today; this issue is the sanctioned slot for the rewrite. After the squash: force-push `master` once with operator approval, let the Forgejo push mirror follow, then verify `git log --all -- devops LOGS.md` is empty on the new refs.
Author
Owner

Follow-up to the 2026-11-08 decision: the old internal AGENTS.md (project contract, trigger table, traps, layout, environment) was public since 0.8.2 and must be treated like devops/ — the rewrite must not reintroduce it. The public AGENTS.md is now a project-agnostic guide to the agents-MOC system (#76, commit 29b5cfe); the project map lives in operator-local devops/agents.md. So the 0.9.0 purge targets devops/, LOGS.md and the pre-#76 AGENTS.md blobs.

Follow-up to the 2026-11-08 decision: the old **internal `AGENTS.md`** (project contract, trigger table, traps, layout, environment) was public since 0.8.2 and must be treated like `devops/` — the rewrite must not reintroduce it. The public `AGENTS.md` is now a project-agnostic guide to the agents-MOC system (#76, commit `29b5cfe`); the project map lives in operator-local `devops/agents.md`. So the 0.9.0 purge targets `devops/`, `LOGS.md` **and** the pre-#76 `AGENTS.md` blobs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
dsh-plugins/dsh-gitea#60
No description provided.