{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "task": {
    "task_id": "WT-0176",
    "kind": "work",
    "objective": "Lane 1 of the connections layer: ship the connections table with identity_kind (owner|service|bot|none) and mechanism as first-class columns, directory.connection_id, a backfill of every existing credentialed row, MCP label, iMessage/Blooio/2Chat/X/Google row, messaging bridge and device into it, a public projection at /api/connections carrying no identity values, and a live test endpoint that alone decides state. Delete the 105 invented services.txt blocks.",
    "detail": "Design is fixed in bridge/client-bridge/HANDOFF.md (section 'The model every lane must use'). Root of lanes 2-6; lanes 2, 3, 5 may run concurrently against the same schema. Migration adds connections + directory.connection_id + provider_connections.connection_id. Backfill rows carry source. Public schema string miscsubjects/connections/1. State is never written by a page.",
    "state": "completed",
    "priority": 1,
    "revision": 7,
    "depends_on": [],
    "permitted_capabilities": [
      "CODE_LEASE_START",
      "CODE_LEASE_COMMIT",
      "DEPLOY_LEASE",
      "D1_QUERY",
      "DIR_PATCH",
      "LOCAL_EXEC"
    ],
    "acceptance_tests": [
      {
        "id": "projection_live",
        "type": "http_ok",
        "url": "/api/connections"
      },
      {
        "id": "projection_schema",
        "type": "contains",
        "url": "/api/connections",
        "needle": "miscsubjects/connections/1",
        "scope": "raw"
      },
      {
        "id": "projection_ages",
        "type": "contains",
        "url": "/api/connections",
        "needle": "last_checked_at",
        "scope": "raw"
      },
      {
        "id": "backfilled",
        "type": "sql_count_at_least",
        "sql": "SELECT COUNT(*) FROM connections",
        "min": 25
      },
      {
        "id": "identity_kinds",
        "type": "sql_count_at_least",
        "sql": "SELECT COUNT(DISTINCT identity_kind) FROM connections",
        "min": 3
      },
      {
        "id": "mechanisms",
        "type": "sql_count_at_least",
        "sql": "SELECT COUNT(DISTINCT mechanism) FROM connections",
        "min": 4
      },
      {
        "id": "directory_linked",
        "type": "sql_count_at_least",
        "sql": "SELECT COUNT(*) FROM directory WHERE connection_id IS NOT NULL AND connection_id<>''",
        "min": 40
      },
      {
        "id": "evidence",
        "type": "evidence_present",
        "field": "live_test_trace"
      }
    ],
    "required_evidence": [
      "migration_number",
      "live_test_trace",
      "services_txt_block_count_after"
    ],
    "parent_task": null,
    "supersedes": null,
    "failure": null,
    "failure_count": 0,
    "last_result": {
      "accepted": true,
      "tests_declared": 8,
      "tests_passed": 8,
      "tests_inherited_from": null,
      "results": [
        {
          "id": "projection_live",
          "ok": true,
          "detail": "HTTP 200 https://miscsubjects.com/api/connections"
        },
        {
          "id": "projection_schema",
          "ok": true,
          "detail": "contains \"miscsubjects/connections/1\" in https://miscsubjects.com/api/connections (scope=raw) → true"
        },
        {
          "id": "projection_ages",
          "ok": true,
          "detail": "contains \"last_checked_at\" in https://miscsubjects.com/api/connections (scope=raw) → true"
        },
        {
          "id": "backfilled",
          "ok": true,
          "detail": "count=50 (need 25)"
        },
        {
          "id": "identity_kinds",
          "ok": true,
          "detail": "count=3 (need 3)"
        },
        {
          "id": "mechanisms",
          "ok": true,
          "detail": "count=6 (need 4)"
        },
        {
          "id": "directory_linked",
          "ok": true,
          "detail": "count=526 (need 40)"
        },
        {
          "id": "evidence",
          "ok": true,
          "detail": "checked against required_evidence",
          "evidence_field": "live_test_trace"
        }
      ],
      "missing_evidence": []
    },
    "completed_at": "2026-09-10T23:53:04-07:00",
    "created_at": "2026-09-10T22:11:18-07:00",
    "updated_at": "2026-09-10T23:53:04-07:00",
    "audit": "/api/work/task/WT-0176/audit",
    "submit_to": "/api/work/task/WT-0176/submit"
  }
}