Summary
Three additive data-model gaps plus one logic rule, backported from an internal operations portal being consolidated into OPAL:
ProcedureStep.caution (TEXT, nullable) — safety warning rendered prominently (red callout) in the step editor and during execution.
ProcedureStep.required_role (VARCHAR(50), nullable) — informational role badge on a step (e.g. QE, MFG-LEAD). Does not gate execution.
ProcedureInstance.target_entity (JSON, nullable) — pins an execution to a specific entity being worked on, e.g. {"entity_type": "part", "entity_id": 42, "entity_label": "SN-00042"}. Rendered as a badge on the execution Meta tab and settable from the new-execution form.
- Tier-2 → tooling auto-sync — creating a Part with
tier=2 forces is_tooling=true regardless of submitted value (API create, bulk import, and MCP create_part).
Scope
- Alembic migration (3 nullable columns, no defaults)
- ORM models, API schemas/handlers, version-snapshot inclusion of the new step fields in
publish_version
- Web: step editor inputs, execution runner caution callout + role badge, Meta tab entity badge, new-execution target entity section
- MCP:
add_procedure_step gains required_role/caution
- Tests for all of the above
All changes additive; no existing behavior altered. Published-version immutability is preserved — new fields ride along in the snapshot content blob.
Summary
Three additive data-model gaps plus one logic rule, backported from an internal operations portal being consolidated into OPAL:
ProcedureStep.caution(TEXT, nullable) — safety warning rendered prominently (red callout) in the step editor and during execution.ProcedureStep.required_role(VARCHAR(50), nullable) — informational role badge on a step (e.g.QE,MFG-LEAD). Does not gate execution.ProcedureInstance.target_entity(JSON, nullable) — pins an execution to a specific entity being worked on, e.g.{"entity_type": "part", "entity_id": 42, "entity_label": "SN-00042"}. Rendered as a badge on the execution Meta tab and settable from the new-execution form.tier=2forcesis_tooling=trueregardless of submitted value (API create, bulk import, and MCPcreate_part).Scope
publish_versionadd_procedure_stepgainsrequired_role/cautionAll changes additive; no existing behavior altered. Published-version immutability is preserved — new fields ride along in the snapshot content blob.