Skip to content

Implement proposal 0042 (reserved keys)#98

Merged
chris-colinsky merged 1 commit into
mainfrom
feature/0042-reserved-keys-extension
May 30, 2026
Merged

Implement proposal 0042 (reserved keys)#98
chris-colinsky merged 1 commit into
mainfrom
feature/0042-reserved-keys-extension

Conversation

@chris-colinsky

Copy link
Copy Markdown
Member

Summary

  • Extends the observability §3.4 reserved exact-key-name set from 21 to 24 entries with branch_name, detached, and detached_from_invocation_id. Without reservation, a caller key matching one of these would silently shadow the OA-emitted Langfuse top-level metadata field — same hazard 0041 closed for its 20 names.
  • Relocates observation.metadata.detached: true from the detached-side dispatch observation onto the parent-side dispatching observation in the main trace, matching the §8.4.2 row 0042 added (link observation for detached subgraphs; parent fan-out node observation for detached fan-outs).
  • Bumps spec pin v0.31.0 → v0.34.0 (absorbs 0038 Gemini wire-format and 0020 sessions as not-yet-implemented). Defers the 10 new Gemini conformance fixtures.
  • conformance.toml updates: 0040 not-yet → implemented (shipped in Implement 0040 open-span metadata update #96); 0042 added; 0020 / 0038 added as not-yet.

First of three PRs landing on main for the v0.11.0 release. Follow-on PRs cover proposal 0043 (Langfuse trace.input / trace.output) and proposal 0044 (parallel-branches dispatch span, pending spec acceptance).

Test plan

  • uv run pytest tests/ -q — 987 passed, 200 skipped, 0 failed
  • uv run pyright src/openarmature — 0 errors
  • uv run ruff check src/ tests/ — clean
  • uv run python scripts/check_conformance_manifest.py — 39 entries, all consistent
  • Conformance fixture 033 (detached-trace mode) passes against the relocated detached: true placement
  • Nine new unit tests in test_observability_metadata.py covering boundary + set_invocation_metadata + invoke() paths for each of the three new reserved names

Extends the observability spec.4 reserved exact-key-name set from 21
to 24 entries with `branch_name`, `detached`, and
`detached_from_invocation_id`. These three are top-level Langfuse
metadata keys the observer mapping already writes; without
reservation a caller key matching one would silently shadow the
OA-emitted field at the boundary, the same hazard 0041 closed for
its 20 names.

Also relocates `observation.metadata.detached: true` from the
detached-side dispatch observation onto the parent-side dispatching
observation in the main trace (link observation for detached
subgraphs; parent fan-out node observation for detached fan-outs),
matching the .4.2 row 0042 added and the corresponding fixture 033
assertions.

Bumps the spec pin from v0.31.0 to v0.34.0, absorbing 0042 plus the
two textual additions in v0.32.0 (Gemini wire-format mapping, 0038,
not yet implemented) and v0.33.0 (sessions capability, 0020, not
yet implemented). Updates `conformance.toml` accordingly: 0040
flipped not-yet to implemented (shipped in PR #96); 0042 added as
implemented; 0020 and 0038 added as not-yet. Defers the 10 new
Gemini conformance fixtures in both the cross-capability parser
and the LLM-provider harness to match the not-yet status.
Copilot AI review requested due to automatic review settings May 30, 2026 01:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements spec proposal 0042 by extending the reserved invocation-metadata key set with branch_name, detached, and detached_from_invocation_id, and relocating Langfuse's detached: true flag onto the parent-side dispatching observation. Also bumps the pinned spec version from v0.31.0 to v0.34.0 (absorbing not-yet-implemented 0038 Gemini and 0020 sessions) and marks 0040 as implemented in the conformance manifest.

Changes:

  • Add three reserved exact key names to _RESERVED_KEY_NAMES with matching boundary, set_invocation_metadata, and invoke() rejection tests.
  • Move detached: True from the detached-side dispatch observations to the parent-side link / fan-out node observations in the Langfuse observer.
  • Bump spec pin to v0.34.0 across pyproject.toml, __init__.py, AGENTS.md, conformance.toml, smoke test, and CHANGELOG, and update conformance manifest entries (0040 implemented; 0042 added; 0020/0038 not-yet) plus Gemini fixture deferrals.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/openarmature/observability/metadata.py Add 3 new reserved exact names; update comment to reference 0041+0042.
src/openarmature/observability/langfuse/observer.py Move detached: True from detached-side dispatch metadata to parent-side link/fan-out node metadata.
tests/unit/test_observability_metadata.py Nine new tests covering all three rejection paths for each new reserved name.
tests/conformance/test_llm_provider.py Defer 044–053 Gemini provider fixtures (0038 not-yet).
tests/conformance/test_fixture_parsing.py Defer 044–053 Gemini fixture parse tests (0038 not-yet).
conformance.toml Bump spec pin to v0.34.0; mark 0040 implemented; add 0042 implemented and 0038/0020 not-yet.
pyproject.toml, src/openarmature/init.py, src/openarmature/AGENTS.md, tests/test_smoke.py Sync spec version to v0.34.0.
CHANGELOG.md Document the reserved-key extension, detached relocation, and spec-pin bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chris-colinsky chris-colinsky merged commit ecf4216 into main May 30, 2026
7 checks passed
@chris-colinsky chris-colinsky deleted the feature/0042-reserved-keys-extension branch May 30, 2026 02:00
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