From 08fcc8be5620a18ad5ea217e88f0fe0586b34645 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 6 Dec 2026 18:32:04 +0000 Subject: [PATCH] test(plugins): assert git and gitea content is consumer-neutral Add an acceptance test for #177. It fails, printing file:line, when the git or gitea .apm/ content carries a Co-authored-by trailer example, an ADR citation or docs/adr path, or the Mortis/Holocron slug, or when any of git, gitea, delivery, core and kyberforge cite ADR-0023 or ADR-0020. run-tests picks it up as a tracked tests/test-*.sh suite. Refs: #177 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi --- tests/test-plugin-content-consumer-neutral.sh | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 tests/test-plugin-content-consumer-neutral.sh diff --git a/tests/test-plugin-content-consumer-neutral.sh b/tests/test-plugin-content-consumer-neutral.sh new file mode 100755 index 0000000..8258129 --- /dev/null +++ b/tests/test-plugin-content-consumer-neutral.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Acceptance test for issue #177: deployed plugin content must not carry this +# repo's internal references, because it ships into consumer repos where those +# references point nowhere. +# +# * git and gitea `.apm/` content: no Co-authored-by trailer examples (any +# case), no ADR citations (`ADR-0`, `docs/adr`), no `Mortis/Holocron` slug. +# * git, gitea, delivery, core and kyberforge `.apm/` content: no ADR-0023 +# (now the `rtk-bare:` marker) and no ADR-0020 (the rule is stated inline). +# +# Other ADR citations in delivery, core and kyberforge are out of #177's scope +# and deliberately not asserted here. Every hit is printed as file:line. + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +PASS=0 +FAIL=0 + +pass() { echo " PASS: $1"; PASS=$((PASS + 1)); } +fail() { echo " FAIL: $1"; FAIL=$((FAIL + 1)); } + +# assert_absent