fep

Actor Object Migration and Deactivation Syntax

Background

This proposal extends and combines prior FEPs to define syntax and parsing rules for Actor objects which unambiguously express exactly one of the three following states:

  1. deactivation, OR
  2. migration to another URI, OR
  3. duplication at another URI.

About this Test

This is a Test Case testing conformance with the two properties of an Actor object specified in FEP-e965.

Test Subject

The subject of this test is any data claiming to conform to the specification of an ActivityPub Actor Object and to the FEP-e965 extension thereof.

This test is not directly applicable to an ActivityPub Server. An ActivityPub Server serves 0 or more Actor Objects. An ActivityPub Server for a big community might serve hundreds of ActivityPub Actor Objects. An ActivityPub Server for a single human may serve only that person’s ActivityPub Actor Object.

This test applies to Actor Objects, but not all Actor Objects are addressable by an HTTPS URL. The URI that addresses an Actor Object is not the same as the Actor Object. A given URL may resolve to different Actor Objects in different contexts, and a given Actor Object may not be universally addressable across context by any one URL.

Inputs

This test requires the following inputs:

Applicability

This test applies directly to the actor input.

Test Targets

Expectations

  1. movedTo - MUST be a URI OR an empty string, if present
  2. copiedTo - MUST be a URI, if present
  3. movedTo and copiedTo MUST NOT both be present
  4. actor JSON’s @context array SHOULD include "https://w3id.org/fep/7628" to signal conformance

Assumptions

1. How to Determine Whether an Actor object supports FEP-7628 Semantics

For the purposes of determining whether the active status and migration history of a given Actor can be tested by this test case:

A warning should be returned if this value is not present.

2. Property value expectations

For the purposes of determining the in/active status and migration history of a the target Actor:

Property Value evaluation logic (Pseudocode)

Test Cases

These are test cases for this test case, and can be used to verify that an implementation of this test case specification will be consistent with other implementations.

Missing @context values

input

actor:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Person",
  "inbox": "https://example.com/inbox",
  "outbox": "https://example.com/outbox"
}

test result

both movedTo and copiedTo present

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": "https://otherexample.com/newname",
    "copiedTo": "https://otherexample.com/thirdname"
}

test return

movedTo set to array

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": [
      "https://example2.com/id",
      "https://example3.com/id"
    ],
}

test return

copiedTo contains invalid URI

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "copiedTo": [
      "https://example2.com/id",
      "Tombstone"
    ],
}

test return

movedTo set to invalid URI #1

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": "Tombstone"
}

test return

movedTo set to invalid URI #2

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": ""
}

test return

Valid Deactivated Actor

input

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": ["Person","Tombstone"],
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox"
}

test return

Valid Migrated Actor

input

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": ["Person","Tombstone"],
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": "https://actorname.otherexample.com"
}

test return

Valid Migrated Actor (Missing Tombstone)

This test vector does NOT conform to [FEP0-f2a] but DOES conform to the older FEP-7628. It is included to assist in testing the consumption of legacy migrated actors.

input

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": ["Person"],
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "movedTo": "https://actorname.otherexample.com"
}

test return

Valid Multi-homed Actor

input

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "copiedTo": "https://personalarchive.otherexample.com"
}

test return

Valid Multi-homed Actor (copiedTo set to array)

input

actor:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/fep/7628"
    ],
    "type": "Person",
    "inbox": "https://example.com/inbox",
    "outbox": "https://example.com/outbox",
    "copiedTo": [
      "https://example2.com/id",
      "https://example3.com/id"
    ],
}

test return

Glossary

outcome

An outcome is a conclusion that comes from evaluating a test on a test subject. An outcome can be one of the three following types:

Requirements Mapping

References

Change Log

Issues List