Compare commits
No commits in common. "07b6dceca45673069898867cfc84970b2aed1abc" and "cce8d6c332d860a2ce2bfd5fe3a27916d7476be9" have entirely different histories.
07b6dceca4
...
cce8d6c332
4 changed files with 17 additions and 43 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
**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
|
||||
**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)
|
||||
**Model:** n/a (Script) für den Lint, dann `ollama/glm-5.1` für die Topic-Zusammenfassung
|
||||
|
||||
## Aufgabe
|
||||
|
||||
|
|
@ -53,10 +52,9 @@ tea push # falls nötig
|
|||
|
||||
## Failover
|
||||
|
||||
Falls Model-Aufruf fehlschlägt (`ollama/minimax-m3`):
|
||||
1. `ollama/deepseek-v4-flash:cloud`
|
||||
2. `ollama/glm-5`
|
||||
Falls Model-Aufruf fehlschlägt (`ollama/glm-5.1`):
|
||||
1. `ollama/minimax-m3`
|
||||
2. `ollama/deepseek-v4-flash:cloud`
|
||||
3. `ollama/glm-5`
|
||||
|
||||
**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).
|
||||
Bei 3 aufeinanderfolgenden Failures: Topic-Post mit Fehler, dann aufgeben (Hauptagent übernimmt).
|
||||
|
|
|
|||
|
|
@ -99,24 +99,13 @@ assert_report_contains "$REPORT" "orphan" "broken-wiki orphans detected"
|
|||
rm -f "$REPORT"
|
||||
|
||||
echo ""
|
||||
echo "=== Test 4: real repo (smoke-test, exit 0=clean OR 1=issues, NEVER 2)==="
|
||||
echo "=== Test 4: real repo (sanity check, expect exit 1)==="
|
||||
REPORT=$(mktemp)
|
||||
run_lint "$REPO_ROOT" "$REPORT"
|
||||
EXIT=$?
|
||||
# Smoke-test: exit 0 (clean state nach WMT-002) oder 1 (legitime Issues) ist OK.
|
||||
# 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_exit 1 $EXIT "real-repo exit code"
|
||||
assert_report_contains "$REPORT" "frontmatter" "real-repo frontmatter 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"
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# wiki-lint.sh — Mechanischer Wiki-Health-Check (kein LLM)
|
||||
# Version: 1.0 (Final 2026-06-17)
|
||||
# Version: 0.1 (Draft 2026-06-16)
|
||||
# Repo: knowledge-base
|
||||
# Usage: ./scripts/wiki-lint.sh [repo-root] [output-file]
|
||||
|
||||
set -u # nounset; NICHT -e, weil wir alle Checks durchlaufen wollen
|
||||
|
||||
# --- Konfiguration (Schwellwerte) ---
|
||||
SCRIPT_VERSION="1.0"
|
||||
STUB_WARN_PCT=10
|
||||
STUB_FAIL_PCT=25
|
||||
DIR_WARN_FILES=12
|
||||
|
|
@ -70,8 +69,6 @@ for dir in $(printf '%s\n' "${!dir_count[@]}" | sort); do
|
|||
add_line "| $dir | $cnt | ✅ |"
|
||||
fi
|
||||
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
|
||||
|
|
@ -345,7 +342,7 @@ fi
|
|||
echo ""
|
||||
echo "*Generated: $TIMESTAMP*"
|
||||
echo "*Repo: $REPO_ROOT*"
|
||||
echo "*Script: scripts/wiki-lint.sh v$SCRIPT_VERSION*"
|
||||
echo "*Script: scripts/wiki-lint.sh v0.1*"
|
||||
echo ""
|
||||
printf '%s\n' "${section_lines[@]}"
|
||||
} > "$OUTPUT"
|
||||
|
|
|
|||
|
|
@ -7,27 +7,17 @@
|
|||
|
||||
## ToDo
|
||||
|
||||
- [x] **WMT-001** — `scripts/wiki-lint.sh` finalisieren + Test-Fixtures | tooling | M | 2026-06-17
|
||||
- [ ] **WMT-001** — `scripts/wiki-lint.sh` finalisieren + Test-Fixtures
|
||||
- Category: tooling | Effort: M | Status: in-progress (gestartet 2026-06-17 13:19, wiki-do von k9ert)
|
||||
- Subagent: `scripts/subagents/wiki-lint-runner.md`
|
||||
- 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.
|
||||
- Code-Changes:
|
||||
- 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):
|
||||
- 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.
|
||||
- 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).
|
||||
- Subagent-Auftrag inkl. konkreter Fixes:
|
||||
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.
|
||||
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.
|
||||
- **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.
|
||||
- Definition of Done: alle 17 Test-Asserts grün, Header-Version 1.0, Fixtures-Check dokumentiert, Commit auf Remote.
|
||||
|
||||
- [x] **WMT-002** — 12 Wiki-Pages mit Frontmatter nachziehen | schema | S | 2026-06-16
|
||||
- Schema: siehe `AGENTS.md` § "Wiki-Pages haben minimales Frontmatter"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue