Skip to content

[ADR-016/045] Request execution modes + presentation envelope (cluster-13)#384

Merged
ohdearquant merged 1 commit into
integration/v1-adr-alignmentfrom
show/adr-001-015-alignment/impl-c13
May 25, 2026
Merged

[ADR-016/045] Request execution modes + presentation envelope (cluster-13)#384
ohdearquant merged 1 commit into
integration/v1-adr-alignmentfrom
show/adr-001-015-alignment/impl-c13

Conversation

@ohdearquant
Copy link
Copy Markdown
Owner

Summary

Implements cluster-13 (8 ADR-alignment findings: 4 CRIT + 4 MAJ) against ADR-016 and ADR-045:

  • ExecutionMode (Single/Parallel/Chain) in khive-request — pipe-syntax chain parsing (op1 | op2), ArgValue::PrevRef for $prev substitution, MixedSeparators and PrevRefOutsideChain DSL error variants
  • Presentation module in khive-runtime — full ADR-045 Agent/Verbose/Human modes: UUID 36→8-char prefix, ISO-8601 timestamp compaction (relative < 24h / minute-truncated), empty-field dropping, lifecycle-null preservation, 3-sig-fig score truncation; 14 unit tests
  • AmbiguousPrefix { prefix, matches: Vec<Uuid> } in RuntimeError for UUID prefix resolution (CRIT-4)
  • MCP server chain dispatch: sequential execution, $prev resolved against canonical pre-presentation result, abort-on-failure with aborted count in summary envelope; presentation / presentation_per_op fields in RequestParams
  • Test harness fixes: integration.rs ok_one and contract_test.py _request_raw pass presentation: "verbose" so scripted callers get full canonical UUIDs per ADR-045 migration policy

Test plan

  • cargo check --workspace — passes
  • cargo clippy --workspace --all-targets -- -D warnings — passes
  • cargo fmt --all -- --check — passes
  • cargo test --workspace — 342 unit/integration tests pass
  • deno test (docs/) — 397 tests pass
  • python3 tests/smoke_test.py — all verb smoke tests pass (KG + GTD + memory)
  • python3 tests/contract_test.py — all contract tests pass
  • RUSTC_WRAPPER= make ci — CI Passed

🤖 Generated with Claude Code

…luster-13)

Implements 8 ADR-alignment findings from cluster-13:

- khive-request: add ExecutionMode (Single/Parallel/Chain), ArgValue enum
  with PrevRef variant, chain pipe-syntax parsing with $prev substitution,
  MixedSeparators and PrevRefOutsideChain error variants
- khive-runtime: new presentation module (ADR-045) with Agent/Verbose/Human
  modes — UUID shortening, timestamp compaction, empty-field dropping,
  lifecycle-null preservation, score truncation (3 sig figs)
- khive-runtime: AmbiguousPrefix { prefix, matches: Vec<Uuid> } error variant
  in resolve_prefix path (ADR-016 CRIT-4)
- khive-mcp: server handles Chain mode with sequential dispatch, $prev
  substitution against canonical pre-presentation result, abort-on-failure
  with aborted count in summary envelope; presentation/presentation_per_op
  fields in RequestParams; apply_presentation_to_result skips error envelopes
- Tests: integration.rs and contract_test.py use presentation=verbose so
  scripted callers receive full canonical UUIDs (ADR-045 migration policy)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant