Skip to content

extract_context_metadata rejects string-encoded numeric msgpack keys #14

@mattleaverton

Description

@mattleaverton

Problem

extract_context_metadata and extract_provenance in server/src/store.rs only match Value::Integer msgpack keys. CLIENT_SPEC.md §3.1 mandates that implementations "MUST also accept digit-strings" as keys, and the projection layer already handles this via key_to_tag().

Go's vmihailenco/msgpack encoder produces string keys by default, so any Go client (e.g., Kilroy) sending context_metadata in the first turn gets silently dropped — the provenance endpoint returns null.

Impact

The Provenance panel in the CXDB UI shows nothing for contexts written by Go clients, even when they correctly populate context_metadata at tag 30.

Fix

Add a key_to_tag helper to store.rs (same logic as projection/mod.rs) and replace the three Value::Integer match sites in extract_context_metadata and extract_provenance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions