Skip to content

Klickwege lowering: KlickwegEdge → ogar-vocab values — a compile-time codegen seam, nothing else #209

Description

@AdaWorldAPI

Frame (the part every prior draft got wrong)

This is a compile-time, type-level seam. The consumer repo (a2ui-rs) is ordinary Rust: ruff+OGAR codegen emits code into it, it depends on ogar-vocab (via lance-graph-ogar) as a plain type dependency, and cargo builds it — on a laptop, in CI, on Railway pulling from GitHub. That is the entire compilation story. No build step and no typed-value construction consults the SoA, temporal.rs, NARS, RBAC, mailbox ownership, or lance-graph-planner — that machinery is the running engine's internal mechanics, not a checkpoint a consumer's code clears. Where drained values get recorded when an engine runs is a storage concern (Lance calcification) and is out of scope here; it does not gate the lowering.

Supersedes #208 (closed as hallucinated — its three drafts each imported a wrong layer: storage-as-ingest, runtime-automation-surface, runtime-ownership-ceremony).

Verified facts (cherry-picked from the existing commits; each with receipt)

  • a2ui-rs DesktopSession emits KlickwegEdge { from_key: [u8;16], class_id, ordinal, predicate } and drains via take_klickwege() — shipped, a2ui-rs Coordination: OGAR cross-session stance + 3 open decisions + Sprint 7 grill-#9 correction #6 (crates/a2ui-server/src/desktop.rs).
  • ogar_vocab::ActionInvocation exists with object_instance + provenance + ActionState (ogar-vocab/src/lib.rs:508).
  • SPO emission for invocations exists: ogar-emitter::emit_action_invocation (ogar-emitter/src/lib.rs:774).
  • A nav-adjacent Klickwege plane exists: nav_witnessed (ogar-emitter/src/do_adapter.rs:38).
  • The authoritative value-dispatch design is docs/ACTIONDEF-VALUE-DISPATCH-PROPOSAL.md.
  • The harvested-Klickwege golden is MedCare-rs/tests/golden/nav/klickwege-digest-v2.txt.

The actual work (small, cargo-testable, no ceremony)

  1. A lowering function — plain Rust, living either next to the frame types the consumer already uses or as a helper beside ogar-vocab/ogar-emitter: KlickwegEdge → ActionInvocation (action-fire) and KlickwegEdge → nav_witnessed-shaped value (screen jump). Open design points are type-level only: how ordinal: u32 resolves to the action_def String identity (via the class's ActionDef list the consumer already holds), and what subject a human click carries (the existing constructor submit_to_invocation sets System; a click is presumably User — decide and document).
  2. A golden test — one harvested Klickweg and one live-emitted KlickwegEdge lower to identical values (cargo test, nothing running).

Acceptance

  • Lowering fn(s) compiled + unit-tested by cargo alone
  • subject semantics for a UI click decided and documented
  • Golden parity test green (harvested ≡ live-lowered)
  • No runtime/storage machinery referenced anywhere in the seam

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions