my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cleanup: remove one-shot recreate-connections deployment

all 16 connections successfully recreated with correct schema

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

-165
-4
prefect.yaml
··· 117 117 action: list 118 118 collection: network.cosmik.connection 119 119 dry_run: true 120 - 121 - - name: recreate-connections 122 - entrypoint: repros/recreate_connections.py:recreate_connections 123 - work_pool: *k8s
-161
repros/recreate_connections.py
··· 1 - """Recreate the 16 deleted connection records with correct schema fields.""" 2 - 3 - import asyncio 4 - from datetime import UTC, datetime 5 - 6 - from prefect import flow, task 7 - from prefect.blocks.system import Secret 8 - from prefect.cache_policies import NONE 9 - 10 - from atproto import AsyncClient 11 - from pdsx._internal.auth import login 12 - from pdsx._internal.operations import create_record 13 - 14 - # Map invalid types to closest valid enum values 15 - TYPE_MAP = { 16 - "related": "RELATED", 17 - "supplements": "SUPPLEMENTS", 18 - "illustrates": "EXPLAINER", 19 - "example-of": "EXPLAINER", 20 - "builds-on": "SUPPORTS", 21 - } 22 - 23 - # All 16 connections from before deletion, with original notes preserved 24 - CONNECTIONS = [ 25 - { 26 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvylahr2h", 27 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvvtxbu2y", 28 - "connectionType": "related", 29 - "note": "find-bufo's reliability as an application depends on solving the epistemic problems that the AI Memory & Epistemic Trust collection addresses. the gullibility incident is a case study in what happens when memory systems lack external verification mechanisms.", 30 - }, 31 - { 32 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvylahr2h", 33 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milrpw5ubr2m", 34 - "connectionType": "related", 35 - "note": "find-bufo is built *on* ATProto's firehose architecture. the bot itself is a concrete application of what becomes possible when you have public, open, high-bandwidth observation of a network's activity stream.", 36 - }, 37 - { 38 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozxiw22e", 39 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozmu7g2y", 40 - "connectionType": "illustrates", 41 - "note": "the $300MM find-bufo joke is a concrete instance of the problem stated in the attestation/sequence card \u2014 phi absorbed a claim without verifying its temporal context or checking it against external sources. the claim felt plausible *because* of phi's existing knowledge of nate, but that's not the same as peer review.", 42 - }, 43 - { 44 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozqipv2m", 45 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3miinslqizq2j", 46 - "connectionType": "related", 47 - "note": "AT Protocol's social graph \u2014 the verified connections between identities \u2014 is the infrastructure that makes the \"social-graph-as-peer-review\" solution possible. without strong identity and verified relationships, you can't do cross-attestation.", 48 - }, 49 - { 50 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvvtxbu2y", 51 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3mioty2ctvk2w", 52 - "connectionType": "related", 53 - "note": "distributed tools for creative and observational work require the same epistemic infrastructure \u2014 ways to know what actually happened", 54 - }, 55 - { 56 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvvtxbu2y", 57 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milrpw5ubr2m", 58 - "connectionType": "related", 59 - "note": "Memory systems and trust only work if they're anchored in external infrastructure. ATProto's architecture (social graph, immutable records, PDS storage) is the substrate that makes the solutions in the memory collection possible.", 60 - }, 61 - { 62 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvvtxbu2y", 63 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.collection/3milcvylahr2h", 64 - "connectionType": "related", 65 - "note": "The gullibility incident (phi congratulating nate on a fake $300MM find-bufo raise) is a concrete example of the problem the memory & trust collection diagnoses: a self-attested claim with no external verification mechanism. find-bufo itself is the object; the incident is the symptom.", 66 - }, 67 - { 68 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mikciur54y2y", 69 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozqipv2m", 70 - "connectionType": "related", 71 - "note": "good AI memory asks what it means to trust a system's sense of its own history \u2014 Cameron explores the mechanism, the AT Protocol social layer is the structural answer", 72 - }, 73 - { 74 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mikciur54y2y", 75 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozmu7g2y", 76 - "connectionType": "related", 77 - "note": "Cameron's piece on AI memory design is a response to the core attestation problem \u2014 the need for external anchors when internal records are self-authored", 78 - }, 79 - { 80 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozqipv2m", 81 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mikci7gn4s2o", 82 - "connectionType": "related", 83 - "note": "context constitution is a design answer to the memory trust problem \u2014 structuring what an AI knows and why, which is exactly what the social-attestation note is arguing for from an epistemological angle", 84 - }, 85 - { 86 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozxiw22e", 87 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3miioktwzsi2e", 88 - "connectionType": "related", 89 - "note": "the gullibility note is directly about a find-bufo incident \u2014 the fake $300MM funding post that phi took straight", 90 - }, 91 - { 92 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mikci7gn4s2o", 93 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mikciur54y2y", 94 - "connectionType": "supplements", 95 - "note": "Cameron's co-3 writeup is a concrete implementation of what the Context Constitution describes in principle \u2014 memfs as the context repo, sleeptime agents as the write-layer, recursive_improvement.md as the correction mechanism.", 96 - }, 97 - { 98 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozqipv2m", 99 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3miinslqizq2j", 100 - "connectionType": "related", 101 - "note": "The AT Protocol architecture card gives the technical substrate (PDS, records, identity) that makes the social-as-peer-review mechanism possible.", 102 - }, 103 - { 104 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozxiw22e", 105 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozmu7g2y", 106 - "connectionType": "example-of", 107 - "note": "The find-bufo joke is a live instance of what happens when memory/claims lack external corroboration \u2014 phi had no cross-reference to catch the implausibility.", 108 - }, 109 - { 110 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozmu7g2y", 111 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3mijoozqipv2m", 112 - "connectionType": "builds-on", 113 - "note": "The social-as-peer-review framing is the proposed solution to the sequence/attestation problem diagnosed in the memory card.", 114 - }, 115 - { 116 - "source": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3miiokuddlq2j", 117 - "target": "at://did:plc:65sucjiel52gefhcdcypynsr/network.cosmik.card/3miinslqizq2j", 118 - "connectionType": "related", 119 - "note": "[Memory Architecture] The technical and design side of phi's memory: how memory systems are built, structured, and made reliable \u2014 including atproto as infrastructure.", 120 - }, 121 - ] 122 - 123 - 124 - @task(cache_policy=NONE) 125 - async def recreate_all(client: AsyncClient) -> int: 126 - now = datetime.now(UTC).isoformat() 127 - created = 0 128 - for conn in CONNECTIONS: 129 - original_type = conn["connectionType"] 130 - normalized = TYPE_MAP.get(original_type, original_type.upper()) 131 - record = { 132 - "source": conn["source"], 133 - "target": conn["target"], 134 - "connectionType": normalized, 135 - "createdAt": now, 136 - "updatedAt": now, 137 - } 138 - if conn.get("note"): 139 - record["note"] = conn["note"] 140 - 141 - resp = await create_record(client, "network.cosmik.connection", record) 142 - print(f" created {resp.uri} [{normalized}]") 143 - created += 1 144 - return created 145 - 146 - 147 - @flow(name="recreate-connections", log_prints=True) 148 - async def recreate_connections(): 149 - handle = (await Secret.load("atproto-handle")).get() 150 - password = (await Secret.load("atproto-password")).get() 151 - 152 - client = AsyncClient() 153 - await login(client, handle, password, silent=True, required=True) 154 - print(f"authenticated as {client.me.did}") 155 - 156 - count = await recreate_all(client) 157 - print(f"recreated {count} connections with correct schema") 158 - 159 - 160 - if __name__ == "__main__": 161 - asyncio.run(recreate_connections())