From e82dba7b013a830e848113241ebb357ecf692194 Mon Sep 17 00:00:00 2001 From: chris-colinsky Date: Mon, 20 Jul 2026 18:31:50 -0700 Subject: [PATCH 1/2] Clarify 0087 directive-order harness comments Address CoPilot review on #225 (both threads resolved there but the edits landed after the squash-merge). - test_observability.py: reword the 135 support-comment from "key order" to "document (dict insertion) order", matching the loader guard-comment and removing the sorted-by-key ambiguity. - test_fixture_parsing.py: correct the 135 parse-deferral reason. It read "not implemented", but 0087 is implemented -- only the parse shape is deferred, because 135 reuses the augment/capture directive shapes the cross-cap parser does not model (as siblings 043-046), runtime-driven in test_observability. Comment-only; no behavior change. --- tests/conformance/test_fixture_parsing.py | 7 ++++++- tests/conformance/test_observability.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/conformance/test_fixture_parsing.py b/tests/conformance/test_fixture_parsing.py index c360a2e9..afc13006 100644 --- a/tests/conformance/test_fixture_parsing.py +++ b/tests/conformance/test_fixture_parsing.py @@ -628,8 +628,13 @@ def _id(case: tuple[str, Path]) -> str: "Proposal 0084 nested-fan-out span lineage; not implemented" ), # Proposal 0087 (within-node directive execution order, v0.82.0). + # 135 reuses the augment_metadata / capture_invocation_metadata_into + # directive shapes (as 043-046 above) the cross-cap parser does not + # model; runtime-driven via test_observability, so parse stays deferred. "observability/135-within-node-directive-execution-order": ( - "Proposal 0087 within-node directive execution order; not implemented" + "Proposal 0087 implemented; reuses the 043-046 augment/capture " + "directive shapes the cross-cap parser does not model, " + "runtime-driven in test_observability" ), # Proposal 0086 (PromptManager default cache_ttl_seconds, v0.79.0) -- the # manager default-cache-ttl directive shape. diff --git a/tests/conformance/test_observability.py b/tests/conformance/test_observability.py index fbd27e07..a4de80b3 100644 --- a/tests/conformance/test_observability.py +++ b/tests/conformance/test_observability.py @@ -105,8 +105,8 @@ def _reset_otel_global_tracer_provider(restore_to: object) -> None: # metadata_into in opposite document order across two cases; the # captured snapshot diverges only if a node's sibling directives # run in fixture order. Reuses the 043/045 metadata driver, which - # iterates node directives in key order -- see - # _apply_metadata_directives. + # iterates node directives in document (dict insertion) order -- + # see _apply_metadata_directives. "135-within-node-directive-execution-order", "001-otel-basic-trace", "002-otel-subgraph-hierarchy", From 9808a90c165d87e73147c5ad48ea7fffeff46c97 Mon Sep 17 00:00:00 2001 From: chris-colinsky Date: Mon, 20 Jul 2026 18:37:21 -0700 Subject: [PATCH 2/2] Align directive-order wording in the pointer target Address CoPilot review on #226: the _SUPPORTED_FIXTURES comment points readers at _apply_metadata_directives for the document-order behavior, but that function's own comment still said "IN KEY ORDER" / "YAML key order" -- the sorted-by-key ambiguity this branch removes at the call site. Reword it to "document order" so both spots agree. Comment-only; no behavior change. --- tests/conformance/test_observability.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/conformance/test_observability.py b/tests/conformance/test_observability.py index a4de80b3..7ba7873a 100644 --- a/tests/conformance/test_observability.py +++ b/tests/conformance/test_observability.py @@ -1590,8 +1590,9 @@ def _apply_metadata_directives( ) -> tuple[dict[str, Any], bool]: """Run a node's (or per-attempt's) in-node metadata directives, returning the resulting state update and whether the node should then raise.""" - # Directives run IN KEY ORDER -- 043 augments then captures, 045 attempt 1 - # captures then augments, and the YAML key order encodes that. The capture + # Directives run IN DOCUMENT ORDER -- 043 augments then captures, 045 + # attempt 1 captures then augments, and the YAML document order encodes + # that. The capture # records the read's type so the immutability invariant can verify it was a # MappingProxyType. ``raises`` is terminal (a real node body that raises runs # nothing after), so stop at it rather than processing later directives.