You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement 0080 PromptGroup arity enforcement
PromptGroup already rejected fewer than two members, but with a bare
ValueError that pydantic folds into a ValidationError carrying no error
category, so the conformance harness had nothing to assert against.
Add a categorized PromptGroupInvalid (new prompt_group_invalid category)
and raise it from the arity validator. Because PromptGroupInvalid is a
PromptError and not a ValueError, pydantic propagates it unwrapped from
the model validator, so the caller sees .category. It is non-transient
and exported from openarmature.prompts.
Wire the rejection fixture 035: make PromptManagementFixture.backends
optional (035 is cases-only with per-case backends, one case needing
none) and rework the cases-runner to build per-case backends when a
case declares its own backends key (else share the top-level, so 016 is
unchanged) and to run a manager-less case's direct-target calls instead
of skipping them (the empty-group construct needs no manager).
Update the two arity unit tests, the concepts/prompts doc, and the
0.17.0 changelog entry.
* Assert PROMPT_GROUP_INVALID constant in category test
Address CoPilot review on #228: test_error_categories_match_spec pinned
PromptGroupInvalid.category but not the exported PROMPT_GROUP_INVALID
constant, so a regression in the constant value or export could slip
through. Add the constant assertion (and its import) alongside the
other three categories.
Test-only; no behavior change.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). The
9
9
### Added
10
10
11
11
-**PromptManager service-wide default cache TTL** (proposal 0086, prompt-management §6, spec v0.79.0). `PromptManager` construction accepts an optional `default_cache_ttl_seconds`, applied to any `fetch` or `get` that omits a per-call `cache_ttl_seconds`. Resolution follows a precedence chain: an explicit per-call value (including `0` force-fresh) wins; otherwise the manager default applies; otherwise nothing is forwarded and the backend's own caching governs. An omitted or explicit-`None` per-call value both select the default, so resolution does not depend on argument presence. A negative default is rejected at construction, and the per-call negative rejection is unchanged. `get` delegates to `fetch` and inherits the chain, and the bundled caching backends need no change (they already honor a resolved `cache_ttl_seconds`). Conformance fixture 036 is un-deferred.
12
+
-**PromptGroup arity enforcement** (proposal 0080, prompt-management §10 / §11, spec v0.75.0). Constructing a `PromptGroup` with fewer than two members (an empty or single-member group) now raises a categorized `PromptGroupInvalid` at construction, before any render or LLM call. This replaces the previous bare `ValueError` (which pydantic folded into a `ValidationError` carrying no error category) and adds a `prompt_group_invalid` category to the prompt-management error set. `PromptGroupInvalid` is non-transient and is exported from `openarmature.prompts`. Conformance fixture 035 is un-deferred.
# prompt_group_invalid error category). Implemented since 0.17.0;
799
+
#prompt-management fixture 035 pins it.
800
800
[proposals."0080"]
801
-
status = "not-yet"
801
+
status = "implemented"
802
+
since = "0.17.0"
803
+
note = "PromptGroup already rejected fewer than two members, but as a bare ValueError (pydantic folds it into a ValidationError, which has no category). Now raises a categorized PromptGroupInvalid (new category prompt_group_invalid, prompt-management §11) at construction: PromptGroupInvalid is a PromptError (not a ValueError), so pydantic propagates it unwrapped from the model validator and the caller sees .category. Non-transient, not in PROMPT_TRANSIENT_CATEGORIES; exported from openarmature.prompts. Fixture 035 (single-member + empty group, each asserting raises.category = prompt_group_invalid) is un-deferred. Harness: PromptManagementFixture.backends is now optional (035 is cases-only with per-case backends, one case needing none) and the cases-runner builds per-case backends when a case declares its own backends key (else shares the top-level, preserving 016) and runs a manager-less case's direct-target calls instead of skipping them (035's empty-group construct_prompt_group needs no manager)."
0 commit comments