Skip to content

Commit e191500

Browse files
Rephrase residual spec-authority citations in docstrings
The first sweep stripped structured spec references (section markers, proposal numbers, versions) but left prose that still cited the spec as the authority for a rule ("The spec defines/permits/mandates", "spec-mandated", "spec-normative", "per spec"). State the behavior directly, or move the basis to a nearby comment where load-bearing. Structural mentions are kept: the spec/ conformance directories, the spec parameter in the harness, spec-version reads, and descriptions of what the conformance suite covers.
1 parent 3ac562e commit e191500

21 files changed

Lines changed: 50 additions & 52 deletions

src/openarmature/graph/compiled.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,18 +372,17 @@ def _restore_fan_out_progress_state(
372372
into the mutable per-fan-out tracking dict that ``FanOutNode``
373373
consults to decide which instances to skip vs re-run.
374374
375-
Extra-output state isn't preserved across resume — the spec models
376-
``result`` as a single accumulator entry and is silent on
375+
Extra-output state isn't preserved across resume: ``result`` is
376+
modeled as a single accumulator entry, with nothing recorded for
377377
``extra_outputs``. Reconstructing them would require either
378-
serializing them on the record (a spec change) or recomputing them
378+
serializing them on the record (a record-format change) or recomputing them
379379
(defeating the point of skip-on-resume). Fixtures don't exercise
380380
``extra_outputs`` on the resume path; if a future workload needs
381381
them, surface as a follow-on.
382382
383383
``result_is_error`` is read verbatim from the saved record's
384-
explicit field. The earlier structural-pattern heuristic is gone
385-
— the spec mandates the
386-
explicit field as the authoritative discriminator because the
384+
explicit field. The earlier structural-pattern heuristic is gone:
385+
the explicit field is the authoritative discriminator because the
387386
user's state schema can legitimately contain values that match
388387
the engine's canonical error-record shape, and a heuristic would
389388
misclassify them.
@@ -1412,7 +1411,7 @@ async def _step_function_node(
14121411
(``node_exception`` / ``reducer_error`` /
14131412
``state_validation_error``) stay inline in ``innermost`` —
14141413
those errors short-circuit before edge eval can run, so the
1415-
spec's "before the failure propagates" MUST is preserved by
1414+
"before the failure propagates" requirement is preserved by
14161415
the inline dispatch.
14171416
14181417
Returns a :class:`_StepResult` carrying the merged state +
@@ -2375,7 +2374,7 @@ async def _maybe_save_checkpoint(
23752374
23762375
Atomicity contract: the save-call site below
23772376
completes the "produce contribution + record into accumulator
2378-
+ save" sequence the spec mandates. ``FanOutNode.run_with_context``
2377+
+ save" sequence. ``FanOutNode.run_with_context``
23792378
flips an instance's state to ``completed`` and stashes its
23802379
``result`` BEFORE invoking the save that durably records the
23812380
transition. A crash between that state mutation and the save

src/openarmature/graph/events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,8 @@ class LlmCompletionEvent:
536536
lifetime, unique within the run. Distinct from
537537
``response_id``.
538538
- ``caller_invocation_metadata``: optional snapshot of caller-
539-
supplied invocation metadata at LLM-call time. Spec-defined as
540-
OPTIONAL; the python OpenAIProvider populates it by default so
539+
supplied invocation metadata at LLM-call time. OPTIONAL; the
540+
python OpenAIProvider populates it by default so
541541
the bundled OTel/Langfuse observers can emit the
542542
``openarmature.user.<key>`` span-attribute family without an
543543
extra opt-in. Pass ``populate_caller_metadata=False`` to suppress
@@ -625,7 +625,7 @@ class LlmFailedEvent:
625625
``provider_unsupported_content_block``,
626626
``structured_output_invalid``). Always present.
627627
- ``error_type``: OPTIONAL impl-level / vendor-specific error
628-
type or code. Two acceptable styles per spec:
628+
type or code. Two acceptable styles:
629629
vendor error code (e.g. ``"rate_limit_exceeded"``) OR
630630
upstream exception class name (e.g. ``"RateLimitError"``).
631631
``None`` when no impl-side type is available.

src/openarmature/graph/observer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- `_dispatch`: enqueues an event for the worker to deliver.
2323
- `deliver_loop`: the worker coroutine. Reads items from the queue and
2424
calls each observer in order, filtering by subscribed phase and
25-
isolating exceptions via `warnings.warn` per spec.
25+
isolating exceptions via `warnings.warn`.
2626
"""
2727

2828
from __future__ import annotations
@@ -344,7 +344,7 @@ class DrainSummary:
344344
delivered to every subscribed observer before cancellation, and
345345
`timeout_reached is True`.
346346
347-
The spec-mandated minimum is these two fields. Implementations MAY
347+
These two fields are the required minimum. Implementations MAY
348348
extend the shape with diagnostic detail (per-observer counts,
349349
sampled event metadata) in subsequent versions; this version ships
350350
the minimum.
@@ -376,17 +376,17 @@ class _FanOutInstanceState:
376376
- ``result_is_error`` distinguishes success contributions
377377
(``False``) from collect-mode error contributions (``True``).
378378
Internal flag — not exposed on the public
379-
``FanOutInstanceProgress`` shape because the spec presents
380-
``result`` as a single typed entry per the parent state schema.
379+
``FanOutInstanceProgress`` shape because ``result`` is exposed
380+
as a single typed entry per the parent state schema.
381381
``FanOutNode.run_with_context`` consults this on resume to
382382
route the rolled-forward contribution through the
383383
``errors_field`` bucket rather than ``target_field``.
384384
- ``extra_outputs`` holds the per-instance values for the fan-out's
385385
``extra_outputs`` mapping (parent-field -> sub-field) so that
386386
per-instance resume preserves the FULL per-instance contribution
387387
(not just the ``target_field`` slice). Internal — not exposed on
388-
the public ``FanOutInstanceProgress`` shape because the spec
389-
describes ``result`` as a single accumulator entry.
388+
the public ``FanOutInstanceProgress`` shape because ``result``
389+
is a single accumulator entry.
390390
- ``completed_inner_positions`` accumulates ``NodePosition`` entries
391391
from inner nodes that complete inside this instance's subgraph
392392
execution. Captures the instance's progress for observational

src/openarmature/graph/parallel_branches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
class BranchSpec[ChildT: State]:
6363
"""One entry in a :class:`ParallelBranchesNode`'s branch mapping.
6464
65-
Branches are heterogeneous: each spec MAY reference a different
65+
Branches are heterogeneous: each branch may reference a different
6666
compiled subgraph with a different state schema. ``inputs`` /
6767
``outputs`` follow the same shape as subgraph projection
6868
mappings.

src/openarmature/llm/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ForceTool(BaseModel):
7979
8080
Use the record form of the `tool_choice` discriminated union when
8181
you need the model to call a specific tool by name. ``type`` is the
82-
spec-level discriminator (``"tool"``); the wire mapping renames it
82+
discriminator (``"tool"``); the wire mapping renames it
8383
to ``"function"`` for the OpenAI body. The
8484
``name`` MUST match a ``Tool.name`` in the supplied ``tools``
8585
list; ``validate_tool_choice`` enforces this at pre-send time and

src/openarmature/observability/langfuse/observer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ def _subgraph_identity_at(event: NodeEvent, depth: int) -> str:
164164
given 1-based namespace depth, or the empty string when no
165165
identity is tracked at that depth.
166166
167-
The empty-string fallback matches the spec's "if the
168-
implementation tracks one" clause for implementations / direct
169-
``SubgraphNode(...)`` callers that don't wire an identity through.
167+
The empty-string fallback is the "no identity tracked" case, for
168+
implementations / direct ``SubgraphNode(...)`` callers that don't
169+
wire an identity through.
170170
Conformance fixtures 031/032/033 lock identity as the required
171171
value; the empty-string path keeps direct callers conformant but
172172
failing those fixtures.

src/openarmature/observability/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
2828
- Keys MUST be strings.
2929
- Keys MUST NOT start with ``openarmature.`` or ``gen_ai.`` (reserved
30-
for spec-normative attribute namespaces; collisions would silently
30+
attribute namespaces; collisions would silently
3131
overwrite OA-emitted state at the observer layer).
3232
- Keys MUST NOT exactly match a reserved OA-emitted top-level metadata
3333
key name (the Langfuse set plus ``invocation_id``) for the same

src/openarmature/observability/otel/observer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,9 @@ def _subgraph_identity_at(event: NodeEvent, depth: int) -> str:
186186
given 1-based namespace depth, or the empty string when no
187187
identity is tracked at that depth.
188188
189-
The empty-string fallback matches the spec's "if the implementation
190-
tracks one" clause for callers using
191-
``SubgraphNode(name=..., compiled=...)`` without supplying
192-
``subgraph_identity``.
189+
The empty-string fallback is the "no identity tracked" case, for
190+
callers using ``SubgraphNode(name=..., compiled=...)`` without
191+
supplying ``subgraph_identity``.
193192
"""
194193
# Spec observability §5.3 (coord thread
195194
# clarify-subgraph-name-semantics).

src/openarmature/prompts/backends/filesystem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class FilesystemPromptBackend:
2121
- ``layout="per-label"`` (default): ``<root>/<label>/<name>.j2``.
2222
The ``label`` subdirectory keeps name-collisions across labels
2323
distinct (e.g., ``prompts/production/greeting.j2`` and
24-
``prompts/staging/greeting.j2``). The spec permits filesystem
25-
backends to interpret label as "a subdirectory or filename
26-
suffix"; this is the subdirectory variant.
24+
``prompts/staging/greeting.j2``). A filesystem backend may
25+
interpret label as a subdirectory or filename suffix; this is
26+
the subdirectory variant.
2727
- ``layout="flat"``: ``<root>/<name>.j2``. The same template
2828
is returned regardless of which label was requested; the
2929
Prompt's ``label`` field is the requested label verbatim.

src/openarmature/prompts/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PromptGroup(BaseModel):
2121
group_name: Stable identifier for this group pattern.
2222
members: Ordered sequence of at least two PromptResult
2323
instances. Order matches the application's intended call
24-
sequence; the spec does not require sequential execution.
24+
sequence; sequential execution is not required.
2525
"""
2626

2727
model_config = ConfigDict(extra="forbid")

0 commit comments

Comments
 (0)