---
id: WF-PFM-OPS-017
title: Seed development licences for development workspaces
product_area: platform
module: operations
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
trigger: 'A development migration, fixtures caller or workspace provisioning requests licence seeding.'
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
implements:
  - CAP-PFM-OPS-011
moves:
  - STATE-PFM-OPS-004
  - STATE-PFM-OPS-006
crosses:
  - SVC-PFM-OPS-licensing
idempotency: >-
  The seed checks override history and adds a grant only if no contrary or revoked decision exists and no
  active seed grant covers the application. Sequential repetition adds nothing; concurrent selection is not
  deduplicated.
concurrency: >-
  Independent seeds can choose the same missing decision. Operational row uniqueness resolves insertion, but
  grant creation and participant work have no whole-flow serialization.
hops:
  - 'n': 1
    actor_or_service: Development seed
    action: >-
      The per-workspace entry checks development and skips deletion; bulk seeding depends on its caller for
      environment selection.
    anchor: >-
      services-platform:modules/licensing/services/enablement/seed-development-licences.ts:seedDevelopmentLicenceOverridesForTenant
    seam: sync
    on_failure: Return zero for the per-workspace environment or deletion exclusion.
    left_inconsistent: No seeded change follows that exclusion.
    observer: None.
    provenance: observed
    source: >-
      services-platform:modules/licensing/services/enablement/seed-development-licences.ts:seedDevelopmentLicenceOverridesForTenant
  - 'n': 2
    actor_or_service: Development seed
    action: Read override history once per workspace and select licensed applications needing a seed grant.
    anchor: >-
      services-platform:modules/licensing/services/enablement/seed-development-licences.ts:developmentGrantIsNeeded
    seam: sync
    on_failure: Propagate read failure to the seed caller.
    left_inconsistent: Earlier workspaces or applications may already have grants.
    observer: Deploy log is the observation surface.
    provenance: test
    source: >-
      services-platform:modules/licensing/tests/integration/services/enablement/seed-development-licences.revoked.integration.spec.js#writes
      no override on the second pass for the tenant whose grant was revoked
  - 'n': 3
    actor_or_service: Development seed
    action: >-
      Use the ordinary grant path with the seed reason and distant end; bulk migration suppresses per-grant
      cache refresh.
    anchor: 'services-platform:modules/licensing/services/enablement/grant-licence-override.ts:grantLicenceOverride'
    seam: sync
    on_failure: Propagate grant or audit errors unless the invoking caller separately contains them.
    left_inconsistent: A partial run can leave committed grants without completed audit or preparation.
    observer: Security history and the staff licensing view.
    provenance: observed
    source: 'services-platform:modules/licensing/services/enablement/grant-licence-override.ts:grantLicenceOverride'
branches:
  - condition: The trigger is a new workspace’s provisioning
    path: >-
      The workspace-specific entry grants only for that workspace and requests one refresh after adding
      grants.
waits: []
evidence:
  - >-
    services-platform at ad3f6a6: modules/licensing/services/enablement/seed-development-licences.ts and its
    suites; docs/licensing.md §7.
  - >-
    codex examination 2026-10-23: checked the pinned source anchors, planning references and enforcement
    boundaries; unresolved limits are recorded in module findings.
controls: [TC-AVL-001, TC-AVL-004, TC-AVL-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-005, TC-CHG-006, TC-CHG-007, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-DAT-005, TC-DAT-006, TC-IAM-001, TC-IAM-002, TC-IAM-003, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-VEN-001, TC-VEN-002, TC-VEN-003]
---

# Seed development licences for development workspaces

## What It Does

Development seeding supplies missing licensed-application grants through the normal override path. It preserves earlier human decisions and withdrawals. The per-workspace entry enforces development selection; the bulk function relies on caller selection rather than an internal environment guard.

## The Flow

```mermaid
flowchart TD
  H0["The per-workspace entry checks development and skips deletion; bulk seeding depends on its caller for environment selection."]
  H1["Read override history once per workspace and select licensed applications needing a seed grant."]
  H0 --> H1
  H2["Use the ordinary grant path with the seed reason and distant end; bulk migration suppresses per-grant cache refresh."]
  H1 --> H2
```

## When Something Fails

Seed functions propagate database and history failures, so they do not establish universal deploy or provisioning success. Earlier grants can remain committed when a later application fails. Sequential rerun consults that history, which can also prevent repair of follow-up work skipped after a committed grant. The per-workspace path requests one refresh when it writes grants.
