Back to patterns

Federation Readiness

Problem

Something that works in your project isn’t automatically safe to hand to someone else. A workflow may rely on files only you have, skip the labels a stranger needs to trust it, or miss the licensing a partner’s legal team will ask for. The gap between “works locally” and “safe to share across projects” takes deliberate preparation — internal references break, metadata is missing, provenance is undeclared.

Solution

Before federating a lattice, run the 6-point readiness checklist (§11):

#CheckFieldWhy
1Schema validationRun lattice_validate.pyCatches structural errors before they propagate
2Shareable opt-infederation.shareable: trueFederation is never accidental — explicit consent
3Source instancefederation.source_instanceProvenance: where did this come from?
4License declaredfair.licenseLegal: can the recipient use this?
5Keywords presentfair.keywords (≥1)Discovery: can someone find this?
6References resolveAll ref fields are valid paths or lattice:// URIsIntegrity: no broken links in the target

The readiness workflow:

  1. Validate — Run the schema validator against the .lattice.yaml. Fix any errors.
  2. Audit references — Check every ref field. Replace local paths with lattice:// URIs for cross-instance references. Remove or document references that are instance-specific.
  3. Add FAIR metadata — Ensure the fair: block has at least keywords and license. Add provenance and creators for full trust.
  4. Set federation block — Enable shareable: true, set source_instance, choose a version_policy.
  5. Document interfaces — If the lattice will be composed (not just imported whole), declare entry/exit nodes and their expected data types.
  6. Re-validate — Run the validator again. Federation properties have their own consistency checks.

Version policy selection:

PolicyBehaviorBest For
lockedHalt on any version changeProduction dependencies
patchAccept patches, halt on minor/majorStable integrations
minorAccept minor changes, halt on majorActive development
latestAlways use latest, warn on breakingExperimental use

When to Use

  • Before publishing a lattice to a registry
  • Before sharing a lattice with another aDNA instance
  • When extracting a sub-lattice from a larger pipeline for independent use
  • During quality reviews of lattice objects

Example: This Vault

The lattice examples at what/lattices/examples/ demonstrate federation readiness at different stages:

Federated example: The docking_assessment lattice carries a complete federation block:

federation:
  shareable: true
  source_instance: adna
  parent_lattice: protein_binder_design
  version_policy: locked
  extracted_nodes: [structure_prediction, interface_analysis, ranking]

This lattice passes all 6 checks: schema-valid, opted in, provenance set, licensed, keyworded, and its extracted_nodes cross-reference against the parent lattice.

Validation tools: what/lattices/tools/lattice_validate.py implements checks 1-6 programmatically. Running it against a lattice file reports schema compliance, node ID uniqueness, edge reference validity, and federation property consistency.

The readiness checklist in practice: The federation guide at what/context/adna_core/context_adna_core_federation.md includes both pre-federation and post-federation checklists — the full workflow from “private lattice” to “composed into another project.”

Anti-Pattern

Accidental federation: Setting shareable: true on a lattice that contains internal references, proprietary data, or unresolved dependencies. Federation must be deliberate.

Local paths in shared lattices: A ref: what/modules/my_custom_module that only exists in the source project. Shared lattices must use lattice:// URIs or document that the reference is instance-specific.

Missing version policy: Federating without declaring a version_policy. The default is minor, but explicit is always better — the policy determines what happens when the source updates.

Skipping post-federation validation: Importing a lattice into a target project without re-validating. The lattice may be valid in source but incompatible in target (different ontology, missing dependencies).

  • Lattice Composition — the composition patterns that federation-ready lattices enable
  • FAIR Envelope — the metadata pattern that federation readiness depends on
  • Open Standard — the governance model that makes cross-instance federation possible