Status: Draft v2.1
Date: 2026-03-04
Source: SPEC-v2.md
This guide covers repository migration into OutcomeGraph artifact schema v2 and adapter policy requirements.
OutcomeGraph v2 requires:
- canonical artifacts at schema version
2 - explicit
artifact_typeand required core fields - adapter manifests with
schema_version: 2 - strict mixed-version rejection
- Record current repository
.outcomegraphinventory. - Identify files with missing/unsupported schema version.
- Record
og --versionand adapter manifest versions. - Capture baseline with:
og status- last successful sync summary
- last successful verification event
OutcomeGraph does not perform silent auto-upgrade for canonical artifacts. Recommended approach:
- Back up repository branch.
- Export or snapshot legacy artifacts as-is.
- Recreate each canonical artifact with v2 keys:
schema_version: 2artifact_type- required identifiers and timestamps
- Validate canonical fields against section 7 of SPEC-v2.md.
- Update policy manifest(s) and adapter manifests where required.
After migration, run:
og syncog verify --changed
and confirm no mixed-version or schema violations remain.
- Missing
schema_versionorschema_version < 2: fail fast and block writes. - Mixed
.outcomegraphschema versions: fail fast with hard error. schema_version > 2: refuse until runtime supports higher interface.
In all cases, migration must be explicit and rerun schema checks after fix.
For each adapter:
- verify manifest has
schema_version: 2 - verify
interface_versionforworker,oracle,sandbox,store,exporterequals1 - replace incompatible adapters before first post-migration runtime run
If an adapter is optional, keep degraded feature mode and unblock when safe.
This repository surfaced a rollout-blocking schema mismatch:
.outcomegraph/materials.lockhadschema_version: 2but lackedartifact_type.- Validation failed with
expected 'materials_lock' for this path and schema_version 2.
Expected canonical shape:
{
"schema_version": 2,
"artifact_type": "materials_lock",
"material_paths": [],
"notes": "bootstrap-generated materials lock",
"created_at": "..."
}Repair command:
python - <<'PY'
import json
from pathlib import Path
path = Path('.outcomegraph/materials.lock')
data = json.loads(path.read_text(encoding='utf-8'))
data['artifact_type'] = 'materials_lock'
path.write_text(json.dumps(data, indent=2) + '\n', encoding='utf-8')
PYExpected clean state:
og statushealthy and fresh- no
POLICY_DENIEDfor canonical safe writes - no adapter mismatch errors
og synccan complete end-to-end with generated exports updatedog verify --changedandog replay --changedcomplete on scoped candidates
For this rollout, archive evidence by ensuring:
RUNBOOKS-captureddogfood-*.jsonfiles are statusok- migration failure events are gone from current run IDs