From d66021b3e8b6b96418625121f9b2ce7609f0144c Mon Sep 17 00:00:00 2001 From: "Claude Code (Anthropic coding agent)" Date: Sun, 22 Nov 2026 16:48:04 +0100 Subject: [PATCH 1/4] forge-standards: add .gitea/CODEOWNERS (pilot) --- .gitea/CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitea/CODEOWNERS diff --git a/.gitea/CODEOWNERS b/.gitea/CODEOWNERS new file mode 100644 index 0000000..80abfba --- /dev/null +++ b/.gitea/CODEOWNERS @@ -0,0 +1,5 @@ +# CODEOWNERS (Hoppe.home standard). Install as .gitea/CODEOWNERS in the repo. +# Gitea reads it from the repo root, docs/CODEOWNERS or .gitea/CODEOWNERS, NOT from .github/. +# Gitea user names, not display names. Last matching rule wins. +# Repos with a real specialist owner add narrower rules ABOVE this default line, never instead of it. +* @Joern @joanna -- 2.54.0 From d75a8aa7b5c181d69307bacf3ef01f7c687c8c63 Mon Sep 17 00:00:00 2001 From: "Claude Code (Anthropic coding agent)" Date: Sun, 22 Nov 2026 16:48:06 +0100 Subject: [PATCH 2/4] forge-standards: add issue template (pilot) --- .gitea/ISSUE_TEMPLATE/bug_or_task.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitea/ISSUE_TEMPLATE/bug_or_task.md diff --git a/.gitea/ISSUE_TEMPLATE/bug_or_task.md b/.gitea/ISSUE_TEMPLATE/bug_or_task.md new file mode 100644 index 0000000..0741f8c --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug_or_task.md @@ -0,0 +1,10 @@ +--- +name: Bug or task +about: Something concrete enough that "closes when this diff merges" makes sense +--- + +## What's wrong / what's needed + +## Related Work Order or Idea Hub id (if any) + +## Expected vs. actual (for bugs) -- 2.54.0 From 75d00829ffb239c98298d9d05835811c85242478 Mon Sep 17 00:00:00 2001 From: "Claude Code (Anthropic coding agent)" Date: Sun, 22 Nov 2026 16:48:09 +0100 Subject: [PATCH 3/4] forge-standards: add PR template (pilot) --- .gitea/PULL_REQUEST_TEMPLATE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitea/PULL_REQUEST_TEMPLATE.md diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..453962a --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +## What + + + +## Work Order / Request / Idea Hub reference + + + +## Testing + + -- 2.54.0 From e5b83db6062c05fda03d5f94cee9ee27eb974aab Mon Sep 17 00:00:00 2001 From: "Claude Code (Anthropic coding agent)" Date: Sun, 22 Nov 2026 16:48:24 +0100 Subject: [PATCH 4/4] forge-standards: add baseline-pr-check workflow (pilot) --- .gitea/workflows/baseline-pr-check.yml | 99 ++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .gitea/workflows/baseline-pr-check.yml diff --git a/.gitea/workflows/baseline-pr-check.yml b/.gitea/workflows/baseline-pr-check.yml new file mode 100644 index 0000000..f1fa8a4 --- /dev/null +++ b/.gitea/workflows/baseline-pr-check.yml @@ -0,0 +1,99 @@ +# Forge standards baseline PR check (Hoppe.home, 2026-11-22). Copy to .gitea/workflows/baseline-pr-check.yml +# in a repo; see forge-standards/README.md and ROLLOUT.md. +# +# Required status check name (Gitea context): baseline-pr-check / baseline (pull_request) +# Keep BOTH the workflow `name:` and the job id `baseline` unchanged, or the required check never reports. +# +# Design: same pattern as the codebox-ci hygiene job (.gitea/workflows/ci.yml): label linux-python, treeless +# clone into /tmp/src with the job's own token (the job workspace is not writable and there is no checkout +# action), no third-party action, no repository secret, read-only. Looks only at files the PR adds or changes +# (trash patterns also at path level), so old debt never blocks an unrelated PR. +# Runner image (per ci.yml header, NOT re-verified here): python 3.12, git, ruff, detect-secrets 1.5.0. +name: baseline-pr-check + +on: + pull_request: + branches: [main] + +permissions: + contents: read + +concurrency: + group: baseline-pr-check-${{ github.ref }} + cancel-in-progress: true + +jobs: + baseline: + runs-on: linux-python + timeout-minutes: 5 + steps: + - name: checkout (treeless clone, diff against base) + working-directory: /tmp + env: + GIT_CONFIG_COUNT: "1" + GIT_CONFIG_KEY_0: http.extraHeader + GIT_CONFIG_VALUE_0: "Authorization: token ${{ github.token }}" + run: | + set -eu + git init -q /tmp/src && cd /tmp/src + git remote add origin "${{ github.server_url }}/${{ github.repository }}.git" + git fetch -q --filter=blob:none origin "${{ github.base_ref }}" "${{ github.sha }}" + git checkout -q FETCH_HEAD + git fetch -q origin "${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}" + git diff --name-only --diff-filter=ACMR "origin/${{ github.base_ref }}...HEAD" > /tmp/changed.txt + echo "changed or added files: $(wc -l < /tmp/changed.txt)" + + - name: trash check (files this PR adds or changes) + working-directory: /tmp/src + run: | + set -eu + # Patterns mirror CLAUDE.md rule 10 ("never commit trash") and the secret-file ban. + # Opt-out for a deliberate file: list its exact path in .gitea/baseline-allow.txt (one per line). + allow=/dev/null; [ -f .gitea/baseline-allow.txt ] && allow=.gitea/baseline-allow.txt + bad=0 + while IFS= read -r f; do + [ -z "$f" ] && continue + grep -qxF -- "$f" "$allow" && continue + case "$f" in + *.bak|*.bak.*|*.bak[0-9]*|*.orig|*.rej) why="backup/merge leftover" ;; + *.log) why="log file" ;; + *.pyc|*/__pycache__/*|__pycache__/*) why="python bytecode" ;; + node_modules/*|*/node_modules/*) why="node_modules" ;; + db/archive/*|*/db/archive/*|*.dump|*.sql.gz) why="database archive/dump" ;; + .env|*/.env|.env.*|*/.env.*) case "$f" in *.example|*.sample|*.template) continue ;; esac; why="env file" ;; + *.pem|*.key|*.pfx|*.p12) why="key or certificate material" ;; + *) continue ;; + esac + echo "::error file=$f::trash/secret file not allowed ($why)" + bad=1 + done < /tmp/changed.txt + if [ "$bad" -ne 0 ]; then + echo "Remove the file(s), or if deliberate list the exact path in .gitea/baseline-allow.txt." + exit 1 + fi + echo "trash check: clean" + + - name: secret scan (changed files) + working-directory: /tmp/src + run: | + set -eu + [ -s /tmp/changed.txt ] || { echo "no changed files"; exit 0; } + if command -v detect-secrets-hook >/dev/null 2>&1; then + # With the repo's baseline when present (known, audited findings are tolerated), else a plain scan. + base=""; [ -f .secrets.baseline ] && base="--baseline .secrets.baseline" + xargs -d '\n' detect-secrets-hook $base < /tmp/changed.txt + echo "detect-secrets: clean" + else + # Documented fallback (runner image without detect-secrets): high-confidence shapes only, + # so it fails on real findings, not on words like "password" in docs. + echo "detect-secrets not on this runner: using the grep fallback" + pat='-----BEGIN ((RSA|EC|DSA|OPENSSH|PGP) )?PRIVATE KEY-----|AKIA[0-9A-Z]{16}|gh[pousr]_[A-Za-z0-9]{36,}|xox[baprs]-[A-Za-z0-9-]{10,}|hvs\.[A-Za-z0-9]{20,}|sk-[A-Za-z0-9]{32,}|(password|passwd|secret|api[_-]?key|token)[A-Za-z0-9_]*[[:space:]]*[:=][[:space:]]*["'"'"'][A-Za-z0-9/+_.=-]{20,}["'"'"']' + hits=$(xargs -d '\n' grep -InEH -e "$pat" < /tmp/changed.txt 2>/dev/null || true) + if [ -n "$hits" ]; then + # Print file:line only, never the matched value. + echo "$hits" | cut -d: -f1,2 | sed 's/^/possible secret at /' + echo "If a hit is a false positive, add the repo's detect-secrets baseline instead of weakening this check." + exit 1 + fi + echo "grep fallback: clean" + fi -- 2.54.0