Compare commits
4 commits
cce8d6c332
...
07b6dceca4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07b6dceca4 | ||
|
|
40463cbf4a | ||
|
|
d07bf1690a | ||
|
|
f5594d7a04 |
4 changed files with 43 additions and 17 deletions
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
**Trigger:** On-demand (`wiki-do WMT-001`) oder weekly cron (So 04:30 CEST)
|
**Trigger:** On-demand (`wiki-do WMT-001`) oder weekly cron (So 04:30 CEST)
|
||||||
**Output:** Lint-Report in `scripts/wiki-lint-report.md` + Topic-Post
|
**Output:** Lint-Report in `scripts/wiki-lint-report.md` + Topic-Post
|
||||||
**Model:** n/a (Script) für den Lint, dann `ollama/glm-5.1` für die Topic-Zusammenfassung
|
**Model:** n/a (Script) für den Lint, dann `ollama/minimax-m3` für die Topic-Zusammenfassung
|
||||||
|
**Lint-Script-Version:** v1.0 (2026-06-17, SCRIPT_VERSION-Variable im Header)
|
||||||
|
|
||||||
## Aufgabe
|
## Aufgabe
|
||||||
|
|
||||||
|
|
@ -52,9 +53,10 @@ tea push # falls nötig
|
||||||
|
|
||||||
## Failover
|
## Failover
|
||||||
|
|
||||||
Falls Model-Aufruf fehlschlägt (`ollama/glm-5.1`):
|
Falls Model-Aufruf fehlschlägt (`ollama/minimax-m3`):
|
||||||
1. `ollama/minimax-m3`
|
1. `ollama/deepseek-v4-flash:cloud`
|
||||||
2. `ollama/deepseek-v4-flash:cloud`
|
2. `ollama/glm-5`
|
||||||
3. `ollama/glm-5`
|
|
||||||
|
|
||||||
Bei 3 aufeinanderfolgenden Failures: Topic-Post mit Fehler, dann aufgeben (Hauptagent übernimmt).
|
**Wichtig:** `ollama/glm-5.1` ist seit 2026-06-16 von zai-Billing-Errors blockiert — **nicht** als Primary einsetzen.
|
||||||
|
|
||||||
|
Bei 2 aufeinanderfolgenden Failures: Topic-Post mit Fehler, dann aufgeben (Hauptagent übernimmt).
|
||||||
|
|
|
||||||
|
|
@ -99,13 +99,24 @@ assert_report_contains "$REPORT" "orphan" "broken-wiki orphans detected"
|
||||||
rm -f "$REPORT"
|
rm -f "$REPORT"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Test 4: real repo (sanity check, expect exit 1)==="
|
echo "=== Test 4: real repo (smoke-test, exit 0=clean OR 1=issues, NEVER 2)==="
|
||||||
REPORT=$(mktemp)
|
REPORT=$(mktemp)
|
||||||
run_lint "$REPO_ROOT" "$REPORT"
|
run_lint "$REPO_ROOT" "$REPORT"
|
||||||
EXIT=$?
|
EXIT=$?
|
||||||
assert_exit 1 $EXIT "real-repo exit code"
|
# Smoke-test: exit 0 (clean state nach WMT-002) oder 1 (legitime Issues) ist OK.
|
||||||
assert_report_contains "$REPORT" "frontmatter" "real-repo frontmatter section"
|
# Nur exit 2 (Script-Crash) ist fail.
|
||||||
|
if [ "$EXIT" -eq 0 ] || [ "$EXIT" -eq 1 ]; then
|
||||||
|
echo -e "${GREEN}✓${NC} real-repo exit code (exit=$EXIT, ok: 0 or 1)"
|
||||||
|
PASS=$((PASS+1))
|
||||||
|
else
|
||||||
|
echo -e "${RED}✗${NC} real-repo exit code (expected 0 or 1, got $EXIT — Script-Crash?)"
|
||||||
|
FAIL=$((FAIL+1))
|
||||||
|
fi
|
||||||
|
# Section heißt jetzt "Frontmatter Präsenz" (mit Umlaut) — case-sensitive nach Umlaut suchen
|
||||||
|
assert_report_contains "$REPORT" "Frontmatter Präsenz" "real-repo frontmatter section (Schema v1.5)"
|
||||||
assert_report_contains "$REPORT" "Stub-Quote" "real-repo stub section"
|
assert_report_contains "$REPORT" "Stub-Quote" "real-repo stub section"
|
||||||
|
# Generische Sanity: Summary-Linie existiert (egal ob Issues oder nicht)
|
||||||
|
assert_report_contains "$REPORT" "Total Wiki-Pages:" "real-repo summary line present"
|
||||||
rm -f "$REPORT"
|
rm -f "$REPORT"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# wiki-lint.sh — Mechanischer Wiki-Health-Check (kein LLM)
|
# wiki-lint.sh — Mechanischer Wiki-Health-Check (kein LLM)
|
||||||
# Version: 0.1 (Draft 2026-06-16)
|
# Version: 1.0 (Final 2026-06-17)
|
||||||
# Repo: knowledge-base
|
# Repo: knowledge-base
|
||||||
# Usage: ./scripts/wiki-lint.sh [repo-root] [output-file]
|
# Usage: ./scripts/wiki-lint.sh [repo-root] [output-file]
|
||||||
|
|
||||||
set -u # nounset; NICHT -e, weil wir alle Checks durchlaufen wollen
|
set -u # nounset; NICHT -e, weil wir alle Checks durchlaufen wollen
|
||||||
|
|
||||||
# --- Konfiguration (Schwellwerte) ---
|
# --- Konfiguration (Schwellwerte) ---
|
||||||
|
SCRIPT_VERSION="1.0"
|
||||||
STUB_WARN_PCT=10
|
STUB_WARN_PCT=10
|
||||||
STUB_FAIL_PCT=25
|
STUB_FAIL_PCT=25
|
||||||
DIR_WARN_FILES=12
|
DIR_WARN_FILES=12
|
||||||
|
|
@ -69,6 +70,8 @@ for dir in $(printf '%s\n' "${!dir_count[@]}" | sort); do
|
||||||
add_line "| $dir | $cnt | ✅ |"
|
add_line "| $dir | $cnt | ✅ |"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
add_line ""
|
||||||
|
add_line "_Schema v1.5 Sub-Categories: \`concepts/hardware\`, \`concepts/agi\`, \`people/\`, \`institutions/\` (alle in Counts oben enthalten)_"
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# CHECK 2: Stubs (<30 Zeilen) + Stub-Quote
|
# CHECK 2: Stubs (<30 Zeilen) + Stub-Quote
|
||||||
|
|
@ -342,7 +345,7 @@ fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "*Generated: $TIMESTAMP*"
|
echo "*Generated: $TIMESTAMP*"
|
||||||
echo "*Repo: $REPO_ROOT*"
|
echo "*Repo: $REPO_ROOT*"
|
||||||
echo "*Script: scripts/wiki-lint.sh v0.1*"
|
echo "*Script: scripts/wiki-lint.sh v$SCRIPT_VERSION*"
|
||||||
echo ""
|
echo ""
|
||||||
printf '%s\n' "${section_lines[@]}"
|
printf '%s\n' "${section_lines[@]}"
|
||||||
} > "$OUTPUT"
|
} > "$OUTPUT"
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,27 @@
|
||||||
|
|
||||||
## ToDo
|
## ToDo
|
||||||
|
|
||||||
- [ ] **WMT-001** — `scripts/wiki-lint.sh` finalisieren + Test-Fixtures
|
- [x] **WMT-001** — `scripts/wiki-lint.sh` finalisieren + Test-Fixtures | tooling | M | 2026-06-17
|
||||||
- Category: tooling | Effort: M | Status: in-progress (gestartet 2026-06-17 13:19, wiki-do von k9ert)
|
|
||||||
- Subagent: `scripts/subagents/wiki-lint-runner.md`
|
- Subagent: `scripts/subagents/wiki-lint-runner.md`
|
||||||
- Notes: Draft v0.1 läuft (`output/draft-wiki-lint.sh`), Report korrekt, Exit-Code 1 bei Issues. Muss noch von `output/` → `scripts/` und Fixtures.
|
- Commits (4): `f5594d7` (wiki-lint.sh v1.0 + SCRIPT_VERSION + v1.5 Note), `d07bf16` (Test 4 smoke-test), `40463cb` (fixtures-validation note), ToDo-Close-Commit folgt.
|
||||||
- Stand 2026-06-17: `wiki-lint.sh` (360 Zeilen) ist bereits in `scripts/` und läuft sauber (letzter Run: 51 Pages, 0 Issues). Draft-Wegfall bereits erfolgt. Übrig: Header-Version 0.1 → 1.0, Fixtures-Validierung, Test-Suite hat 2 veraltete Asserts (Test 4 real-repo).
|
- Code-Changes:
|
||||||
- Subagent-Auftrag inkl. konkreter Fixes:
|
- Header `Version: 0.1 (Draft 2026-06-16)` → `1.0 (Final 2026-06-17)` + `SCRIPT_VERSION="1.0"` Variable
|
||||||
|
- Optional: `_Schema v1.5 Sub-Categories: ..._` Notiz im File-Count-Section
|
||||||
|
- Test 4: smoke-test mit Exit-Erwartung 0 ODER 1 (nie 2); Section-Suche `"Frontmatter Präsenz"` (Umlaut case-sensitive); Bonus-Assert `"Total Wiki-Pages:"`
|
||||||
|
- subagents/wiki-lint-runner.md: v1.0-Hinweis, Failover-Kette angepasst (m3 primary, KEIN glm-5.1)
|
||||||
|
- Fixtures: alle 3 weiterhin v1.5-kompatibel (clean/messy/broken)
|
||||||
|
- Lint-Verify: `./scripts/wiki-lint-test.sh` → `18/18 ✅` (17 original + 1 neuer Assert), `./scripts/wiki-lint.sh .` → `Total: 51 | Issues: 0`
|
||||||
|
- Notes (historisch): Draft v0.1 wurde in Iteration 1 erstellt, dann nach `scripts/` verschoben (Draft-Wegfall bereits erfolgt).
|
||||||
|
- Subagent-Auftrag (historisch):
|
||||||
1. Header-Version `0.1 (Draft 2026-06-16)` → `1.0 (2026-06-17)`
|
1. Header-Version `0.1 (Draft 2026-06-16)` → `1.0 (2026-06-17)`
|
||||||
2. Test 4 Erwartung anpassen: real-repo kann jetzt exit=0 oder 1 sein (clean state). Test soll **„irgendeine Section"** prüfen, nicht spezifisch „frontmatter" — Section heißt jetzt „Frontmatter Präsenz" mit Umlaut.
|
2. Test 4 Erwartung anpassen: real-repo kann jetzt exit=0 oder 1 sein (clean state). Test soll **„irgendeine Section"** prüfen, nicht spezifisch „frontmatter" — Section heißt jetzt „Frontmatter Präsenz" mit Umlaut.
|
||||||
3. Fixtures in `scripts/test-fixtures/wiki-lint/{clean,messy,broken}-wiki/` durchgehen — passen die noch zur aktuellen Wiki-Struktur (Schema v1.5: people/, institutions/, hardware/ in concepts/)?
|
3. Fixtures in `scripts/test-fixtures/wiki-lint/{clean,messy,broken}-wiki/` durchgehen — passen die noch zur aktuellen Wiki-Struktur (Schema v1.5: people/, institutions/, hardware/ in concepts/)?
|
||||||
4. Optional: Falls Schema v1.5 Sections (`concepts/hardware`, `concepts/agi`) im Lint-Output als „neu seit v1.4" markiert werden sollen, Changelog-Hinweis im Header.
|
4. Optional: Falls Schema v1.5 Sections (`concepts/hardware`, `concepts/agi`) im Lint-Output als „neu seit v1.4" markiert werden sollen, Changelog-Hinweis im Header.
|
||||||
- Definition of Done: alle 17 Test-Asserts grün, Header-Version 1.0, Fixtures-Check dokumentiert, Commit auf Remote.
|
- **Fixtures-Validierung (2026-06-17):**
|
||||||
|
- `clean-wiki`: 3 Files, Exit 0, alle Sections grün ✅. Passt weiterhin — keine Schema-Abhängigkeit.
|
||||||
|
- `messy-wiki`: 3 Files, Exit 1, Issues=2 (Stubs + Missing Frontmatter). Detektiert polymarket-Cluster ✅. Passt weiterhin.
|
||||||
|
- `broken-wiki`: 3 Files, Exit 1, Issues=3 (Stubs + Missing Frontmatter + Broken Ref + Uncovered Raw). Passt weiterhin.
|
||||||
|
- **Fazit:** Alle 3 Fixtures sind v1.5-kompatibel. Keine Anpassung nötig. Die Fixtures testen nur die Mechanik (Stub/Frontmatter/Orphan/Broken-Ref/Raw-Coverage), nicht spezifische Sub-Categories — daher Schema-stabil.
|
||||||
|
|
||||||
- [x] **WMT-002** — 12 Wiki-Pages mit Frontmatter nachziehen | schema | S | 2026-06-16
|
- [x] **WMT-002** — 12 Wiki-Pages mit Frontmatter nachziehen | schema | S | 2026-06-16
|
||||||
- Schema: siehe `AGENTS.md` § "Wiki-Pages haben minimales Frontmatter"
|
- Schema: siehe `AGENTS.md` § "Wiki-Pages haben minimales Frontmatter"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue