AINA Data Engine Room checkpoint · 2026-06-13 · local runtime

Role Context Query Source-Authority Handoff

The promoted runtime contract signal is now queryable by title.

Ali Mehdi Mukadam · co-authored with Codex · 4 minute read

The Single Idea

A local caller can ask for a role title and get a conservative route action: serve, fallback, fallback_with_caveat, abstain, confirm_more_context, or not_found.

01 · What Changed

A read-only query surface sits on top of runtime contracts.

The new module role_context_query.py reads production_runtime_contracts_v1.jsonl, joins role-resolution decisions to role-context evidence and runtime payload contracts, and returns a local routing decision. The CLI command is role-context-query --title.

InputRole title, normalized without inventing new labels.
DecisionExisting role_resolution_decision_v1 rows.
ContextJD/source context from promoted contract rows.
RouteServe, fallback, abstain, confirm, or not found.
02 · Why It Matters

This fixes the title-only overconfidence path.

In the live contract rows, case manager and web designer both had generic deterministic decisions and repair-aware decisions. A naive selector picked the higher-confidence deterministic row and over-served. The new query surface ranks repair-aware decisions first, so ambiguity and source conflicts actually affect runtime behavior.

03 · Route Rules

The routing logic is explicit.

Source-authority statusRoute
deterministic_payloadserve
runtime_payload_source_backstopserve
jd_context_authoritative_backstopserve
runtime_payload_backstop_with_source_conflictsfallback_with_caveat
source_authority_incompletefallback
jd_context_confirmation_blockedconfirm_more_context unless the decision abstains
decision status abstainabstain
04 · Receipts

The live examples cover serve, abstain, and fallback.

TitleRouteStatusJD status
seasonal sales associateservedeterministic_payloadsource_ref_keys_available
data analyst-nyservejd_context_authoritative_backstopfixture_ready_authoritative
case managerabstainjd_context_confirmation_blockedconfirmation_or_ambiguity_blocked
web designerfallback_with_caveatruntime_payload_backstop_with_source_conflictsconfirmation_or_ambiguity_blocked
The case manager result is the meaningful one: it now abstains even when a higher-confidence generic deterministic row exists for the same title.
05 · Validation

The focused checks pass.

CheckResult
Role context query tests3 passed
Combined focused tests11 passed
RuffAll checks passed
Live query smokeserve / serve / abstain / fallback_with_caveat

Build the 25-50 real-row runtime fixture set.

Use this query surface to assemble a fixture set across ambiguous, frontline, regulated, healthcare, HR, legal, general business, and generic-neighbor cases. That becomes the bridge from source-authority contracts to AI Fluency loop fixtures.

Where to start

Run role-context-query on the top-band JD-aware rows and keep the abstain/fallback cases as first-class training signals.