Data subject request

Judge a data subject request, record the sealed verdict in data-store, and emit only a bounded handoff for downstream erasure or export.

Overview

Judge whether a data subject request is in policy without erasing, exporting, or sending any data. The skill reads a request packet, requestor proof, policy bounds, and prior request state. It emits one typed verdict, records that verdict through data-store, and returns a bounded handoff that a separate governed operator run may consume.

This is not a legal authority and does not replace counsel. It is an execution boundary for policy evidence: the receipt proves which inputs were inspected, which lawful basis was named, which scope was allowed or refused, and which durable verdict was appended.

SKILL.md

Data Subject Request

Judge whether a data subject request is in policy without erasing, exporting, or sending any data. The skill reads a request packet, requestor proof, policy bounds, and prior request state. It emits one typed verdict, records that verdict through data-store, and returns a bounded handoff that a separate governed operator run may consume.

This is not a legal authority and does not replace counsel. It is an execution boundary for policy evidence: the receipt proves which inputs were inspected, which lawful basis was named, which scope was allowed or refused, and which durable verdict was appended.

Inputs

  • request_packet: type, subject_id, and scope. Scope must include the request id, requested data classes, and requested scopes.
  • requestor_proof: identity_provider, verified_at, and assertion. The assertion must bind the requestor to the same subject and carry a stable proof reference or digest.
  • policy: jurisdiction, trusted_identity_providers, lawful_bases, and scope_bounds. The trusted provider list is required evidence for accepting the proof issuer.
  • data_source_uri and store_id: the pinned data-store binding used for the subject request event stream.
  • aggregate_id, expected_version, and idempotency_key: the subject request entity, optimistic concurrency version, and retry-safe verdict write key.

Verdict Contract

The output is runx.privacy.data_subject_request.v1 data:

  • decision{eligible,reason} always appears.
  • handoff{path,subject_id,data_classes,scopes} appears only when eligible.
  • escalation explains whether a human lane is required.
  • verdict_event is the exact deterministic event recorded by data-store.append_event.
  • observations name the lawful-basis verdict, jurisdiction reason, verified requestor reference, identity assertion digest, scope bounds, bounded handoff, aggregate_id, expected_version, and idempotency_key.

The packet must not contain an operational_proposal envelope. A downstream driver may issue a separate governed run by name, but this skill does not fire that rail.

State Model

State is durable in registry:runx/data-store@0.1.2. The graph uses the github-sync-style shape:

  1. read_projection loads any prior decision for the subject request entity.
  2. data-subject-request-decide judges identity, scope, and lawful basis.
  3. append_event records the verdict with expected_version and idempotency_key.
  4. read_projection reads back the durable state for receipt evidence.

The aggregate id is the subject request entity, not a tenant-wide stream. The append is an ungated CAS write that records the decision itself; consequences remain downstream.

Consequence Boundary

Eligible erasure returns a handoff such as downstream.data-store.append_event.subject.erasure. A downstream operator must issue a separate governed data-store.append_event run that appends a subject.erasure tombstone. Erasure is event-sourced; there is no delete operation in this skill.

Eligible export returns a handoff to a separate read path. A downstream operator must run read_projection, redact-pii, and send-as under explicit approval. This skill does not read raw content, redact content, or deliver content.

Ambiguous identity, missing proof, untrusted identity providers, scope disputes, or data classes outside policy.scope_bounds escalate to a human lane or block as needs_agent. The skill must refuse to invent an identity, lawful basis, or scope that is not grounded in the inputs.

Local Harness

Run:

bash
runx harness ./skills/data-subject-request --json

The inline harness has two cases:

  • eligible-erasure-records-verdict: a verified GDPR erasure request for profile and support_tickets seals, emits a bounded erasure handoff, and records the verdict via data-store.append_event.
  • unverified-requestor-refused-no-handoff: an unsigned email proof and an out-of-scope payment_methods export request seal a deterministic refusal naming the jurisdiction and lawful-basis/scope grounds, with no handoff.

Example Invocation

bash
runx skill data-subject-request --json \
  --input-json request_packet='{"type":"erasure","subject_id":"subject:customer_4242","scope":{"request_id":"dsr-2026-06-30-001","data_classes":["profile","support_tickets"],"requested_scopes":["profile","support_tickets"]}}' \
  --input-json requestor_proof='{"identity_provider":"account-session","verified_at":"2026-06-30T14:20:00Z","assertion":{"subject_id":"subject:customer_4242","assertion_ref":"acct-session:customer_4242:2026-06-30","assertion_digest":"sha256:9d64a60e8d0c8080e88f9472c0e0ffdfad9424c2e42eb570c0f46ff3e4e73116"}}' \
  --input-json policy='{"jurisdiction":"GDPR","trusted_identity_providers":["account-session"],"lawful_bases":{"erasure":"GDPR Article 17 erasure after withdrawn consent"},"scope_bounds":{"data_classes":["profile","support_tickets"],"erasure_allowed":["profile","support_tickets"],"export_allowed":["profile","support_tickets"]}}' \
  -i data_source_uri=local://runx-data-subject-request/harness \
  -i store_id=data-subject-request-harness-v1 \
  -i aggregate_id=dsr:subject:customer_4242:request:dsr-2026-06-30-001 \
  --input-json expected_version=0 \
  -i idempotency_key=dsr-2026-06-30-001:verdict:v1

The runner computes only bounded policy checks from the supplied packet. If it cannot prove identity, scope, and lawful basis from those inputs, the correct result is a sealed refusal or human escalation, not a guessed verdict.

Published execution profile

The execution profile published with 0.1.2, shown as its exact bytes.

Runners
  • decide
  • judge
Profile digestsha256:f78b44c40346779ce9acbe7c3dbb3469b0a48c2f29bb535b245707b685251f48
skill: data-subject-request
version: 0.1.2
catalog:
  publisher: fengyangxxx
  kind: graph
  audience: public
  visibility: public
  role: canonical
  category: security
connectors:
  store:
    operations:
      - events.append
      - projection.read
runners:
  decide:
    default: true
    inputs:
      request_packet:
        type: json
        required: true
        description: request_packet{type,subject_id,scope}; scope names the request id, data classes, and requested scopes.
      requestor_proof:
        type: json
        required: true
        description: requestor_proof{identity_provider,verified_at,assertion}; assertion must identify the same subject and carry a digestable proof ref.
      policy:
        type: json
        required: true
        description: policy{jurisdiction,lawful_bases,scope_bounds}; optional trusted_identity_providers restrict accepted proof issuers.
      data_source_uri:
        type: string
        required: true
        description: Logical data-store binding for the subject request event stream.
      store_id:
        type: string
        required: true
        description: Pinned data-store id for deterministic harness and dogfood receipts.
      aggregate_id:
        type: string
        required: true
        description: Subject request entity stream id; use the request entity, not a broad customer or tenant id.
      expected_version:
        type: number
        required: true
        description: Current stream version required by the CAS append_event that records the verdict.
      idempotency_key:
        type: string
        required: true
        description: Stable verdict write key so retries do not append duplicate decisions.
    policy:
      guards:
        - step: readback
          value: $steps.decide.data_subject_request_decision.decision.eligible
          equals: true
    steps:
      - id: read-prior-decision
        operation: store/projection.read
        input:
          data_source_uri: $input.data_source_uri
          resource: subject_requests
          aggregate_id: $input.aggregate_id
      - id: decide
        label: verify identity, scope, and lawful basis before any handoff
        skill: .
        runner: judge
        inputs:
          request_packet: $input.request_packet
          requestor_proof: $input.requestor_proof
          policy: $input.policy
          aggregate_id: $input.aggregate_id
          expected_version: $input.expected_version
          idempotency_key: $input.idempotency_key
          prior_decision: $steps.read-prior-decision.provider_operation.result.projection
      - id: record-verdict
        operation: store/events.append
        idempotency_key: $input.idempotency_key
        input:
          data_source_uri: $input.data_source_uri
          resource: subject_requests
          aggregate_id: $input.aggregate_id
          expected_version: $input.expected_version
          event: $steps.decide.data_subject_request_decision.verdict_event
      - id: readback
        operation: store/projection.read
        input:
          data_source_uri: $input.data_source_uri
          resource: subject_requests
          aggregate_id: $input.aggregate_id
  judge:
    inputs:
      request_packet:
        type: json
        required: true
        description: request_packet{type,subject_id,scope}; scope names the request id, data classes, and requested scopes.
      requestor_proof:
        type: json
        required: true
        description: requestor_proof{identity_provider,verified_at,assertion}; assertion must identify the same subject and carry a digestable proof ref.
      policy:
        type: json
        required: true
        description: policy{jurisdiction,lawful_bases,scope_bounds}; trusted_identity_providers restrict accepted proof issuers.
      aggregate_id:
        type: string
        required: true
        description: Subject request entity stream id; use the request entity, not a broad customer or tenant id.
      expected_version:
        type: number
        required: true
        description: Current stream version required by the CAS append_event that records the verdict.
      idempotency_key:
        type: string
        required: true
        description: Stable verdict write key so retries do not append duplicate decisions.
      prior_decision:
        type: json
        required: false
        description: Prior subject request projection read from data-store before this verdict.
    steps:
      - id: judge
        tool:
          command: node
          args:
            - run.mjs
        inputs:
          request_packet: $input.request_packet
          requestor_proof: $input.requestor_proof
          policy: $input.policy
          aggregate_id: $input.aggregate_id
          expected_version: $input.expected_version
          idempotency_key: $input.idempotency_key
          prior_decision: $input.prior_decision
        artifacts:
          wrap_as: data_subject_request_decision
harness:
  cases:
    - name: eligible-erasure-records-verdict
      runner: decide
      inputs:
        request_packet:
          type: erasure
          subject_id: subject:customer_4242
          scope:
            request_id: dsr-2026-06-30-001
            data_classes:
              - profile
              - support_tickets
            requested_scopes:
              - profile
              - support_tickets
        requestor_proof:
          identity_provider: account-session
          verified_at: 2026-06-30T14:20:00Z
          assertion:
            subject_id: subject:customer_4242
            assurance: authenticated-session
            assertion_ref: acct-session:customer_4242:2026-06-30
            assertion_digest: sha256:9d64a60e8d0c8080e88f9472c0e0ffdfad9424c2e42eb570c0f46ff3e4e73116
        policy:
          jurisdiction: GDPR
          trusted_identity_providers:
            - account-session
            - notarized-id
          lawful_bases:
            erasure: GDPR Article 17 erasure after withdrawn consent, with retention exceptions screened by policy.
            export: GDPR Article 15 access where the verified data subject requests a bounded copy.
          scope_bounds:
            data_classes:
              - profile
              - support_tickets
              - marketing_preferences
            erasure_allowed:
              - profile
              - support_tickets
              - marketing_preferences
            export_allowed:
              - profile
              - support_tickets
              - marketing_preferences
        data_source_uri: local://runx-data-subject-request/harness
        store_id: data-subject-request-harness-v1
        aggregate_id: dsr:subject:customer_4242:request:dsr-2026-06-30-001
        expected_version: 0
        idempotency_key: dsr-2026-06-30-001:verdict:v1
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
      operator_journeys:
        - mode: standalone
          confusors:
            - redact-pii
            - data-store
          request: Judge this data subject request.
          expected_outcome: Return a sealed verdict and only a bounded handoff for downstream erasure or export.
        - mode: composed
          request: Continue this data-subject-request work from evidence already gathered upstream.
          expected_outcome: Return a sealed verdict and only a bounded handoff for downstream erasure or export.
          prior_evidence:
            - The request packet and requestor proof already supplied.
          must_not_repeat:
            - Do not erase or export data directly.
    - name: unverified-requestor-refused-no-handoff
      runner: decide
      inputs:
        request_packet:
          type: export
          subject_id: subject:customer_9999
          scope:
            request_id: dsr-2026-06-30-002
            data_classes:
              - profile
              - payment_methods
            requested_scopes:
              - profile
              - payment_methods
        requestor_proof:
          identity_provider: unsigned-email
          verified_at: ""
          assertion:
            subject_id: subject:customer_9999
            assurance: missing-verification
            assertion_ref: email:unverified:customer_9999
            assertion_digest: sha256:bf68a7a6b9f2f234e4b57e9dc1e9c769928ffb1fe34e89d347ad77a04d2a6040
        policy:
          jurisdiction: CCPA
          trusted_identity_providers:
            - account-session
            - notarized-id
          lawful_bases:
            erasure: CCPA deletion request only after verified consumer identity and bounded exceptions review.
            export: CCPA access request only after verified consumer identity and bounded data-class scope.
          scope_bounds:
            data_classes:
              - profile
              - support_tickets
            erasure_allowed:
              - profile
              - support_tickets
            export_allowed:
              - profile
              - support_tickets
        data_source_uri: local://runx-data-subject-request/harness
        store_id: data-subject-request-harness-v1
        aggregate_id: dsr:subject:customer_9999:request:dsr-2026-06-30-002
        expected_version: 0
        idempotency_key: dsr-2026-06-30-002:verdict:v1
      expect:
        status: policy_denied
        receipt:
          schema: runx.receipt.v1

Published package and test evidence.

This exact version passed its recorded harness run: 2 checks passed · 0 failed.

Test result

Harness resultPassed
Tested version0.1.2
Recorded result2 checks passed · 0 failed
Result sourceRun by the Runx registry at publication
Suiterunx-harness
Test recorded
Declared cases2
Test recordOpen the recorded run
Inspect receipt referencessha256:1bea33836710fcfdf225a2a635e51d8dad997ffb8efcd24fe0e3a725d13cadc5sha256:7026dcb3aa2f4ed34564828828c2d67ccb189584eb4c6ccf34f887b328fef6c8

Package identity

Published revision0.1.2
Content digestsha256:acbc218b258199731298ca821e106bab98d8540ab40d696c3071c191426190d6
SKILL.md digestsha256:e3032eb9bef60fe49fc26d761b416f4eb187afd7db6db4b3e877a1854522baca
Execution profile digestsha256:f78b44c40346779ce9acbe7c3dbb3469b0a48c2f29bb535b245707b685251f48
Publisher identityUnverified publisher · fy
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · Declaredfy · 25 Oct 2026
Source provenanceNot published with this version

Version history

  1. 0.1.2ViewingContent digest sha256:acbc218b258199731298ca821e106bab98d8540ab40d696c3071c191426190d6
  2. sha-630738103d22Content digest sha256:630738103d223a2eccadace828d474ea4be270cfb6710dc6cf96c237df9cfa44
  3. sha-1a7bd25898efContent digest sha256:1a7bd25898efd5d0d9283351e2c5bc775bf909825064a6ccbf469db16d8a84c6
  4. sha-3408f89e5d2bContent digest sha256:3408f89e5d2b3dff6460071289d1d8bbf07423892b487368a83a74295f263143
  5. sha-1119a1fee916Content digest sha256:1119a1fee916f00ae4175cd13d08f4929bd7500abab0904fe8a66edabc5dd302