Skip to content

DO-arm producer: HIRO Automation → ActionDef (MARS/Hiro parity, schema half)#119

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z
Jun 24, 2026
Merged

DO-arm producer: HIRO Automation → ActionDef (MARS/Hiro parity, schema half)#119
AdaWorldAPI merged 2 commits into
mainfrom
claude/medcare-bridge-lance-graph-wmx76z

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Closes the schema-shape half of PROBE-OGAR-DO-ARM-LIFT. The MARS import lifted the structural arm (A→R→S→M Classes, XSD-oracle calibrated); this lifts the behavioral arm the import left on the table — the OGIT Automation domain (HIRO's actuator vocabulary) into OGAR ActionDefs, per docs/HIRO-DO-ARM-LIFT.md §4–§5.

How

New do_arm module in ogar-from-schema (reuses the existing TTL parser — no new deps):

  • into_action_def(&EntityDecl) -> Option<ActionDef>KnowledgeItemActionDef:
    • object_classrelates MARSNodeTemplate (ogit-automation/mars_node_template)
    • kausalcontains TriggerLifecycleTrigger
    • predicate = execute (from the entity's own dcterms:description, not invented)
    • decorators = the §4 actuator verbs present (extraction provenance)
  • ActionHandler / ActionApplicability / Trigger are recognized as contract parts (return None); ActionApplicability's environmentFilter lifts to a StateGuard via kausal_from_entity.
  • Lossless-DO is test-enforced: payload_attribute records the knowledgeItemFormalRepresentation body slot by name; body_source stays None. The test knowledge_item_payload_is_pointed_to_never_inlined fails if any bytes get inlined — the §1 "points to the body, never flattens into DDL" rule, made executable.
  • canonical_object_class + acronym-correct snake (MARSNodeTemplatemars_node_template).

Calibration

Parity tests run against the real vendored OGIT Automation TTL bytes (no fixtures — same frozen-source discipline as the MARS structural arm). 24 tests green (5 new), do_arm.rs clippy-clean.

Scope honesty

The behavioral half (ActionDef → adapter → execute → reproduce a KnowledgeItem's recorded behavior bit-for-bit) stays CONJECTURE — it needs KI instances with bodies, which the vendored vocab does not carry. This PR certifies the shape, not executable equivalence.

Docs / ledger

  • D-HIRO-DO row added (DISCOVERY-MAP.md §2.8, CODED schema-half)
  • HIRO-DO-ARM-LIFT.md §6 promoted CONJECTURE → schema half SHIPPED [G]
  • MARS-TRANSCODING.md cross-ref

Note: this branch's env runs Rust 1.95; the -D warnings clippy noise in ogar-vocab (derivable_impls etc.) is pre-existing and from the toolchain skew vs the repo's pinned 1.94 — not introduced here. do_arm.rs itself is warning-clean.

🤖 Generated with Claude Code


Generated by Claude Code

…ty, schema half)

Closes the schema-shape half of PROBE-OGAR-DO-ARM-LIFT: the MARS import lifted
the STRUCTURAL arm (A→R→S→M Classes); this lifts the BEHAVIORAL arm the import
left on the table — the OGIT Automation domain (HIRO's actuator vocabulary)
into OGAR ActionDefs, per docs/HIRO-DO-ARM-LIFT.md §4-§5.

New `do_arm` module in ogar-from-schema (reuses the TTL parser):
- into_action_def(&EntityDecl) -> Option<ActionDef>: KnowledgeItem → ActionDef
  (object_class ← `relates MARSNodeTemplate`, kausal ← `contains Trigger`
  → LifecycleTrigger, predicate = `execute` from the entity's own
  dcterms:description, decorators = the §4 actuator verbs present).
- ActionHandler / ActionApplicability / Trigger recognized as contract PARTS
  (return None); ActionApplicability's environmentFilter → StateGuard via
  kausal_from_entity.
- payload_attribute() records the knowledgeItemFormalRepresentation slot BY
  NAME; body_source stays None — the lossless-DO rule (the ActionDef points to
  the body, never inlines/flattens it into DDL), test-enforced.
- canonical_object_class() + acronym-correct snake() (MARSNodeTemplate →
  mars_node_template).

Calibration parity tests run against the real vendored OGIT Automation TTL
bytes (no fixtures — same frozen-source discipline as the MARS structural arm).
24 tests green (5 new), clippy-clean.

The behavioral half (ActionDef → adapter → execute → reproduce KI behavior
bit-for-bit) stays CONJECTURE — it needs KI instances with bodies, which the
vendored vocab does not carry.

Docs: D-HIRO-DO ledger row (DISCOVERY-MAP §2.8); HIRO-DO-ARM-LIFT §6 promoted
CONJECTURE → schema half SHIPPED [G]; MARS-TRANSCODING cross-ref.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Closes the lift→triples seam for the behavioral arm: the DO-arm
ActionDef (D-HIRO-DO) flows through the canonical ogar-emitter to
SPO triples — the surface the RBAC / query layers consume.

tests/do_arm_emit.rs (new integration test, ogar-emitter as dev-dep):
- KnowledgeItem TTL → into_action_def → emit_action_def: asserts the
  §4 field mapping survives as ogar:ActionDef / ogar:actionPredicate
  (execute) / ogar:actionObjectClass (ogit-automation/mars_node_template)
  / LifecycleTrigger kausal / actuator-verb decorators.
- lossless-DO holds END-TO-END: body_source is None, so the emitter
  produces NO ogar:actionBody triple — a body triple would mean bytes
  leaked into the IR. Test fails if any do.

ogar-emitter is an acyclic dev-dep (it depends on ogar-vocab/-ontology,
never on ogar-from-schema). 24 lib + 2 integration tests green, clippy-clean.

Docs: D-HIRO-DO ledger row notes the proven emit path (+ D-EMIT dep).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants