Commit 3c85bdf
authored
Add per-fetch prompt cache control cache_ttl_seconds (0072) (#172)
* Pin spec v0.63.1 for proposal 0072
Advance the spec submodule pin v0.62.0 -> v0.63.1 to absorb accepted
proposal 0072 (per-fetch cache_ttl_seconds prompt-cache control) at
v0.63.0 plus the v0.63.1 patch (pipeline-utilities coverage fixtures
070/071). Updates __spec_version__, the pyproject spec_version, the
smoke-test assertion, and regenerates the bundled AGENTS.md.
conformance.toml records 0072 as implemented; the v0.63.1 fixtures add
no proposal entry (coverage for the already-implemented 0069 / 0070).
* Add cache_ttl_seconds prompt cache control (0072)
PromptBackend.fetch, PromptManager.fetch, and PromptManager.get gain an
optional cache_ttl_seconds read-side control: None preserves current
behavior, 0 forces a fresh read past any client-side cache, and N > 0
bounds a served entry's staleness to N seconds; a negative value is
rejected at the manager. It governs only which cached entry may be
served, not whether or how results are cached.
The bundled filesystem backend is cacheless and ignores it; the langfuse
backend forwards it to the SDK's get_prompt cache. Every backend
implementation (mocks + example backends) accepts the new param.
Conformance: a caching prompt-backend harness primitive (source_read_count
plus a controllable advance_clock) drives fixtures 033/034; unit tests
cover the negative-value rejection and the langfuse forwarding.
* Wire pipeline-utilities patch fixtures 070/071
Wire the v0.63.1 coverage fixtures into the conformance runners: 071
(fan-out degrade strict-reducer-raise) joins the failure-isolation set
in the pipeline-utilities runner, and 070 (crash-injection after_node
resume) joins the checkpoint runner alongside 067. python's behavior is
already conformant (unit-tested in v0.14.0); this is harness selection.
* Document 0072 prompt cache control and changelog
Document the cache_ttl_seconds read-side control in the prompt-management
concepts page, and add the 0.15.0 changelog entry plus advance the
cycle's spec-pin bullet to v0.63.1 (proposal 0072 + the 070/071 patch).
* Forward cache_ttl_seconds on manager-target fixture calls
PR #172 review: _run_call's manager-target fetch/get dropped
call.cache_ttl_seconds, so target: manager fixtures couldn't exercise
the manager's threading (033/034 use direct-backend targets, so they
were unaffected). Forward the control on both, matching the
direct-backend path.1 parent 44cf643 commit 3c85bdf
21 files changed
Lines changed: 230 additions & 40 deletions
File tree
- docs/concepts
- examples
- chat-with-multimodal
- langfuse-observability
- src/openarmature
- prompts
- backends
- tests
- conformance
- harness
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
50 | 76 | | |
51 | 77 | | |
52 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
Submodule openarmature-spec updated 14 files
- CHANGELOG.md+22
- README.md+3-4
- docs/proposals.md+3-3
- proposals/0072-prompt-management-fetch-cache-ttl.md+2-1
- spec/conformance-adapter/spec.md+34
- spec/pipeline-utilities/conformance/070-crash-injection-after-node-resume.md+35
- spec/pipeline-utilities/conformance/070-crash-injection-after-node-resume.yaml+57
- spec/pipeline-utilities/conformance/071-fan-out-degrade-strict-reducer-raise.md+37
- spec/pipeline-utilities/conformance/071-fan-out-degrade-strict-reducer-raise.yaml+77
- spec/prompt-management/conformance/033-prompt-backend-cache-ttl-force-fresh.md+36
- spec/prompt-management/conformance/033-prompt-backend-cache-ttl-force-fresh.yaml+59
- spec/prompt-management/conformance/034-prompt-backend-cache-ttl-max-age.md+34
- spec/prompt-management/conformance/034-prompt-backend-cache-ttl-max-age.yaml+51
- spec/prompt-management/spec.md+43-12
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
44 | 52 | | |
45 | 53 | | |
0 commit comments