Skip to content

docs(spec): Discovery-Tracking-Baseline P1 (WORKFLOW §3.3)#54

Merged
MoltyCel merged 1 commit into
mainfrom
docs/discovery-tracking-baseline-spec
May 20, 2026
Merged

docs(spec): Discovery-Tracking-Baseline P1 (WORKFLOW §3.3)#54
MoltyCel merged 1 commit into
mainfrom
docs/discovery-tracking-baseline-spec

Conversation

@MoltyCel
Copy link
Copy Markdown
Owner

Summary

P1-SPEC für ein tägliches Discovery-Tracking-Dashboard, das messbar macht, ob die Discovery-Investments der letzten Sprints (sitemap-sync PR #30, MoltGuard-Discovery-Trio PRs #48/#51/#32, moltguard-Remote-Migration PR #52 → moltguard #1+#2) wirken. Reine Doku, kein Code, kein Deploy.

Adressiert die 6 Lars-Fragen

  1. METRIKEN (5 Sources): GSC + nginx-Bot-Hits + GitHub Stars/Clones/Views + Self-Probes (Surface-Health). Quelle + Aufwand + Privacy pro Metrik.
  2. WO TRACKEN: Empfehlung (a) neuer Block auf existierendem /admin/dashboard — 14 Endpoints schon live, admin_auth.py + admin_rbac.py existieren. Niedrigster Implementation-Aufwand.
  3. AGGREGATIONS-FREQUENZ: täglich 00:30 UTC in neue discovery_snapshots-Tabelle (PostgreSQL moltstack DB, JSONB-payload für Schema-Flexibilität).
  4. BASELINE-SNAPSHOT: P2 heute Abend Pflicht — ohne Baseline kein Delta morgen messbar.
  5. PRIVACY: 4 Quellen-DSGVO-Status verifiziert. request_log + moltguard requestLogger schon last-octet-anonym. Nur nginx /var/log/nginx/access.log braucht neuen Anonymisierungs-Step im Parser. Discovery-Snapshots persistieren keine IPs, nur User-Agent-Counts.
  6. EXISTING TOOLING: read-only Inventar (siehe Appendix A) — request_log, caller_labels, known_callers, alle /admin/dashboard/*-Endpoints. Lücke ist nur die Discovery-Surface-Aggregation, nicht die Infrastructure.

Phasen-Plan

Phase Inhalt Aufwand
P1 (dieser PR) Architektur-Briefing
P2 (heute Abend) Migration + Baseline-Snapshot manuell ~1h
P3 Cron-Script + /admin/dashboard/discovery-Endpoint + Frontend-Block ~3h
P4 (optional) GSC-OAuth-API-Integration (replaces V0 manual paste) ~2h

9 Open Decisions (§9) für deine Sichtung

  • 9.1 GSC V0 manual paste vs V1 API integration (Empfehlung: V0 in P2, V1 in P4 nach Success-Criterion fix: persist Moltbook auth DIDs and deduplicate by moltbook_id #4 erfüllt)
  • 9.2 GitHub-API: gh-CLI installieren auf Server vs PAT in ~/.moltrust_secrets (Empfehlung: PAT, niedrigste neue Surface)
  • 9.3 nginx-Log-Parsing: daily batch vs live tail (Empfehlung: daily batch)
  • 9.4 Endpoint-Klassen-Stabilität (Empfehlung: V1 festschreiben, JSONB-Schema erlaubt iterative Erweiterung ohne ALTER TABLE)
  • 9.5 Cross-repo BACKLOG-Sync nach P3 (Empfehlung: kein separates Item)
  • 9.6 §2.3-Cross-Review-Timing P3 (Empfehlung: Skip wenn nur User-Agent-Counts persistiert; Required wenn GSC-OAuth oder GitHub-PAT-Integration mitkommt)

Pre-Commit-Diff-Verifikation (§8)

 docs/specs/2026-05-21_discovery-tracking-baseline-SPEC.md | 329 ++++++++++++++++
 1 file changed, 329 insertions(+)

Genau 1 neues File, etabliertes docs/specs/YYYY-MM-DD_xxx-SPEC.md-Schema, kein Fremd-Scope.

Branch-Hygiene (§11.4)

Branch ab frischem origin/main (0 behind), Worktree ~/moltrust-api-H — kein shared anchor.

§2.3 Cross-Review

Skip — reine Doku, kein Auth-/Credential-/Token-Pfad. Re-evaluate falls P3-Implementation unerwartet GSC-OAuth oder GitHub-PAT-Integration mitbringt (siehe §9.6).

Test plan

  • Lars liest SPEC, kommentiert §9 Open Decisions (vor allem 9.1 GSC + 9.2 GitHub-Auth)
  • Bei OK: Merge, dann P2 heute Abend starten (Baseline-Snapshot — Pflicht-Termin, sonst morgen kein Delta-Messpunkt)
  • P3 Dashboard-Implementation als separater Sprint
  • Kein Deploy für P1

Architektur-Briefing vor Code für ein tägliches Discovery-Tracking-
Dashboard, das messbar macht, ob die Discovery-Investments der
letzten Sprints (sitemap-sync, MoltGuard-Discovery-Trio, moltguard-
Remote-Migration) wirken.

Adressiert die 6 Lars-Fragen aus dem Sprint-Auftrag:

1. METRIKEN (5): GSC + nginx-Bot-Hits (FastAPI + nginx static +
   /guard proxy) + GitHub Stars/Clones/Views + Self-Probes
   (Discovery-Surface-Health). Quelle + Aufwand + Privacy pro Metrik.

2. WO TRACKEN: Empfehlung (a) neuer Block auf existierendem
   /admin/dashboard (14 Endpoints schon live, admin_auth.py + admin_rbac.py
   existieren). Niedrigster Implementation-Aufwand + höchste Wahrscheinlichkeit
   täglicher Lars-Konsumtion.

3. AGGREGATIONS-FREQUENZ: täglicher Snapshot 00:30 UTC in neue
   PostgreSQL-Tabelle discovery_snapshots mit JSONB-payload (schema-
   flexibel ohne ALTER TABLE).

4. BASELINE-SNAPSHOT: P2 heute Abend Pflicht — ohne Baseline kein
   Delta-Messpunkt morgen.

5. PRIVACY: 4 Quellen-DSGVO-Status verifiziert (3 schon konform via
   bestehender Schicht, nur nginx /var/log/nginx/access.log braucht
   neuen Anonymisierungs-Step im Parser). Keine IPs in
   discovery_snapshots.payload persistiert — nur User-Agent-Counts.

6. EXISTING TOOLING: 14 admin-endpoints schon live, request_log-
   Tabelle DSGVO-konform, caller_labels + known_callers existieren.
   Lücke: nur Discovery-Surface-Aggregation fehlt, nicht die
   Infrastructure.

9 Open Decisions in §9 für Lars-Sichtung. P2-Pflicht heute Abend
(Baseline), P3 Dashboard-Implementation danach.

Reine Doku, kein Code, kein Deploy.
@MoltyCel MoltyCel merged commit cd1b0e5 into main May 20, 2026
10 checks passed
@MoltyCel MoltyCel deleted the docs/discovery-tracking-baseline-spec branch May 20, 2026 23:00
HaraldeRoessler pushed a commit to HaraldeRoessler/moltrust-api that referenced this pull request May 22, 2026
Migration per Discovery-Tracking-Baseline SPEC (PR MoltyCel#54 merged 2026-05-20)
§3.5 + §4 + §6 P2.

Schema:
- BIGSERIAL primary key
- DATE-unique (one row per day; UPSERT-safe)
- JSONB payload (schema-flexible — V1 fields can grow without ALTER TABLE)
- source_run_status enum (ok/partial/failed) for daily-cron-health visibility

Idempotent (IF NOT EXISTS on table + index).

Baseline row for 2026-05-21 will be INSERTed manually post-migration-apply
(SPEC §3.6 — Pflicht-Termin heute Abend für Delta-Messbarkeit morgen).
Cron-Script (scripts/discovery_snapshot.py) folgt in P3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant