Sprint 1.2.2: seed consolidation + score hardening#70
Open
MoltyCel wants to merge 4 commits into
Open
Conversation
01_migration.sql: RAISE EXCEPTION guards on endorsement-count for B/C/E, DO-block transactional with ROW_COUNT diagnostics, cache invalidation §F. 99_rollback.sql: targeted INSERT for 662a7181 with ON CONFLICT DO NOTHING, vcone + display_name 'TrustScout' intentionally not reverted, cache §F symmetric to forward. .gitignore: scoped re-include for migrations/sprint-1.2.2/*.sql. 02_code_patches.md and 03_verify_post_deploy.sh follow in next commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…_did 01_migration.sql §B/§C/§E referenced non-existent column 'target_did' in the endorsement-count guards. Verified against live schema 2026-05-22: the column is 'endorsed_did' (unique constraint endorser_did/endorsed_did/ evidence_hash + idx_endorsements_endorsed_did). As committed in e7bc41a the migration aborts on the first guard under ON_ERROR_STOP=on (column does not exist) - fail-safe, but never applies. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
02_code_patches.md: Sybil-whitelist, SeedRequest strict validator, avg_trust_score aggregation fix, propagation_depth diagnostic brief. 03_verify_post_deploy.sh: 7-block verify with exit code (CI-ready). README.md: scope, blast radius, apply/rollback runbooks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
README: PR #67 -> PR #70 (actual PR number after #68/#69 landed). 02_code_patches.md: intro names both files - Patch 1 in app/swarm/trust_score.py (compute_phase2_score), Patch 2+3 in app/main.py; Patch 3 header path made explicit. 03_verify_post_deploy.sh Block 6: sources ADMIN_KEY from ~/.moltrust_secrets and sends x-admin-key header, skips gracefully when key absent or auth fails, only fails on real validator miss. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #70 — Sprint 1.2.2: Seed-Konsolidierung + Score-Härtung
Repo: moltrust-api · Voraussetzung: PR #66 deployed
Reviewer: §2.3 Cross-Review (GPT-4o + Gemini + Perplexity)
Scope
01_migration.sql): Seeds + Stale-Agents02_code_patches.md): Sybil-Whitelist + SeedRequest-Validator + stats-Stabilität02_code_patches.md§Patch 4): propagation_depth=0Was wird verändert
agentsd34ed796...("moltguard_v1" → "TrustScout")agents28a0984ab85d4c40,te5tharne550001,vconeswarm_seedsvcone,662a7181e0154998compute_phase2_scoreSeedRequestPydanticGET /swarm/statsavg_trust_scorestabilBlast-Radius
Hoch:
compute_phase2_score-Änderung wirkt auf alle Score-Endpoints. Ambassador-Score steigt sichtbar (80 → ~90).Mittel:
swarm/stats top_trusted-Liste schrumpft. Memory-Eintrag #5 (agent count, Seed-Anzahl) updaten.Niedrig: SeedRequest-Validator wirkt nur auf NEUE POSTs. Revozierte Stubs hatten 0 Endorsements.
Apply-Reihenfolge
Rollback
psql -h localhost -U moltstack -d moltstack \ --set ON_ERROR_STOP=on \ -f migrations/sprint-1.2.2/99_rollback.sql sudo systemctl restart moltstack curl -X POST https://api.moltrust.ch/swarm/propagate/did:moltrust:662a7181e0154998 bash migrations/sprint-1.2.2/03_verify_post_deploy.shvcone und display_name 'TrustScout' werden BEWUSST nicht rolled back (siehe Header-Kommentare in
99_rollback.sql).Offen nach Sprint 1.2.2
propagation_depth: 0Root-Cause (3 Hypothesen in02_code_patches.md§Patch 4)