diff --git a/AGENTS.md b/AGENTS.md index 00883af..bb18bd7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,7 @@ Fall back to raw shell only when no skill covers it. - **`apm.lock.yaml` turning up modified is expected, not a bug.** kyberforge's `SessionStart` hook keeps the install current on launch and rewrites the lock in the process (ADR-0019). On `main`, commit or discard it deliberately. On a feature branch, discard it (`git checkout -- apm.lock.yaml`, then `apm install`). This keeps unrelated lock churn out of the branch diff and keeps `apm pack --check-clean` consistent with the committed lock. The session then runs the older `main` that the lock records, which is accepted on a branch, and the next session start refreshes again. - **A `.apm/` edit is not live until it is on the remote's `main`.** Root `apm.yml`'s first-party dependencies resolve from the holocron remote, unpinned against the default branch, so pushing a feature branch does not deploy it (ADR-0019). `apm install` deploys from the lock; `apm update` is what re-resolves refs. - **No pre-push hook needs the network — once `apm install` has run.** Root `apm.yml`'s marketplace has no remote package entries, so every hook resolves locally. The guarantee is a property of a populated `apm_modules/`, not of the hook set: on a fresh clone `apm-audit-ci`'s `deployed-files-present` fails outright, and its `drift` and `config-consistency` install-replays have no cache to replay from and clone from the remote. Run `apm install` once on a new checkout and the offline guarantee holds from then on (`docs/spec/gates.md`, "Pushing without a network"). -- **A plugin `version:` bump that has merged to `main` gets its release tag.** Run `git fetch origin --tags`, then `scripts/tag-plugin-releases.sh`; exit 1 means a tag is missing, and `--apply` creates it locally and prints the push command. Pushing a release tag is the maintainer's action, not a Propose-tier push (ADR-0032): show them that command and wait for their yes. Release tags come only from the script, which never moves or deletes one (ADR-0033). +- **A plugin `version:` bump that has merged to `main` gets its release tag.** Run `git fetch origin --tags`, then `scripts/tag-plugin-releases.sh`; exit 1 means a tag is missing, and `--apply` creates it locally and prints the push command. Pushing a release tag is the maintainer's action, not a Propose-tier push (ADR-0032): show them that command and wait for their yes. Agents cut release tags only with the script, which never moves or deletes one (ADR-0033). - **This repo and Gitea are the only source of truth.** All project state, decisions, and working conventions live here. Do not use an external memory system for this project — cached state diverges from the repo and you get a split brain. Before answering any design or architecture question, check `docs/adr/` for an existing decision. ## Key documents diff --git a/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md b/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md index 17f7b53..ab39217 100644 --- a/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md +++ b/docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md @@ -38,7 +38,12 @@ Two facts limit where enforcement can live: landed on `main`, never a feature-branch commit. An `apm.yml` edit that leaves `version:` alone does not start a new run. - **Immutability.** Tags are never moved, overwritten or silently re-cut. A tag that is lightweight - or that peels to the wrong commit is reported as an error for a human to resolve. + or that peels to no landing of its version is reported as an error for a human to resolve. +- **A version is released once, at its first landing.** When a version comes back (a reverted + bump, or an `apm.yml` deleted and re-added), the later run is not tagged again: its tag already + exists on the earlier run, so the script reports that run `RELEASED` and it blocks nothing. An + untagged version that recurs within the wanted runs is tagged at its first landing there, and + the later runs report `RELEASED`. - **Mechanism.** `scripts/tag-plugin-releases.sh` computes the targets from `origin/main`'s history and cuts the tags after merge. Without arguments it is a dry run: it prints a `plugin version commit status` table and exits 1 if any tag is missing. `--apply` creates the @@ -46,25 +51,31 @@ Two facts limit where enforcement can live: exact `git push origin …` line, naming each tag explicitly and never using `--tags`. The script never fetches and never pushes. No hook gates any of this. - **Which versions are wanted.** If a plugin already has a `-v*` tag reachable from - `main`, the script wants every version run from the newest such tag onward. If it has none, the - script wants only the current run. That second rule is the backfill: older history is not + `main`, the script wants every version run from the newest such tag onward, including a reverted + version's run, which then reports `RELEASED` as above. If it has none, the script wants only the + current run. That second rule is the backfill: older history is not tagged retroactively. - **One deliberate exception to the backfill: git's previous version, `git-v1.3.8`, is also tagged**, on `32fbe39fb8923854ca8e743a0d2cad81720c736c`, where 1.3.8 first landed on `main`. This gives a consumer pinned to an older git tag something real to check `apm outdated` against. It is - a one-off, cut by hand or with `--ref`. After it, the "from the newest tag onward" rule covers - git like every other plugin. + a one-off, cut with exactly + `scripts/tag-plugin-releases.sh --ref 32fbe39fb8923854ca8e743a0d2cad81720c736c --plugin git --apply`, + which tags git alone; without `--plugin git` that `--ref` would tag every plugin's version at + that commit. After it, the "from the newest tag onward" rule covers git like every other plugin. - **Pushing a release tag is a maintainer-only action. It is not a Propose-tier push under ADR-0032.** ADR-0032's Propose tier ("branch, commit, push, open a PR, comment") covers pushes that propose a change for review: a human still approves the change before it merges. A tag push has no review step behind it. It publishes a release that consumers pin, and because tags are immutable it cannot be quietly taken back. An agent may run the dry run, and may run `--apply` - only when a maintainer asks it to. The push itself is always the maintainer's. + locally once a version bump has merged. It then shows the maintainer the push command the + script printed and waits; the push itself is always the maintainer's. +- **Agents cut release tags only with the script.** Cutting one by hand or with Gitea's + `create_tag` (consequence 4) is a maintainer path. - **Wiring elsewhere:** - Root `apm.yml`'s `marketplace.build.tagPattern` is `{name}-v{version}`. - - `docs/agents/delivery.md` lists the script's dry run under Conventions as a post-merge check. - It does not go under Post-merge checks, because that section accepts only forge status names - and the repo has no CI. + - `docs/agents/delivery.md` points at `AGENTS.md` and this ADR under Conventions. The dry run + does not go under Post-merge checks, because that section accepts only forge status names and + the repo has no CI. - `AGENTS.md` carries the agent-facing rule and cites this ADR. ## Considered options @@ -126,9 +137,9 @@ rewrites it. **It is untested.** } ``` -**4. Gitea's `create_tag` is an equivalent way to cut a tag**, provided `git cat-file -t ` -reports `tag` after fetching. That confirms it is annotated; the script reports a lightweight tag -as an error. +**4. For a maintainer, Gitea's `create_tag` is an equivalent way to cut a tag**, provided +`git cat-file -t ` reports `tag` after fetching. That confirms it is annotated; the script +reports a lightweight tag as an error. **5. Enforcement is by convention for now.** Nothing fails when a maintainer forgets to tag. A `post-merge:` assertion that the verify stage checks on version-bump PRs is the natural next step diff --git a/docs/agents/delivery.md b/docs/agents/delivery.md index 3454832..d52e9a0 100644 --- a/docs/agents/delivery.md +++ b/docs/agents/delivery.md @@ -32,10 +32,8 @@ - Repo conventions and session rules: `AGENTS.md`; decisions: `docs/adr/`. - No forge CI: every check is a local pre-commit or pre-push hook, listed with its reason in `docs/spec/gates.md`; test commands in `README.md`. -- An `.apm/` edit is live only once on the remote's `main` (ADR-0019). -- A merged `version:` bump in `plugins//apm.yml` needs its release tag: after - `git fetch origin --tags`, `scripts/tag-plugin-releases.sh` (dry run) exits 1 when one is - missing. Tag form and who pushes: ADR-0033. +- When an `.apm/` edit goes live: `AGENTS.md`, session rules; ADR-0019. +- Release tags after a `version:` bump merges: `AGENTS.md`; ADR-0033. ## Post-merge checks