Skip to content

[NO-JIRA] Per-session settings on the state machine: settings/set {cacheTtl, recipe} and maxTurns (R8) - #25

Closed
johnnymo87 wants to merge 0 commit into
patched/v1.60.2from
r8-settings-set
Closed

johnnymo87 wants to merge 0 commit into
patched/v1.60.2from
r8-settings-set

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

Description

Ports the fork's per-session settings onto the v1.60.2 state machine (R8+R9, workstation-6w7i.26.4.1). stall-watch calls settings/set on every coordinator session and fails closed without it; honk sends maxTurns.

  • _goose/unstable/session/settings/set {sessionId, cacheTtl?, recipe?}
    • cacheTtl (5m or 1h) is pinned on the session's model config.
    • recipe is validated, rendered with the session's parameter values (scheduled sessions keep the template), and stored on the session row. On 1.60 the recipe and final_output operations read that row every turn, so nothing is applied in memory. This is simpler than 1.54.
    • retry and sub_recipes are dropped before storing. Unlike 1.54, 1.60 would act on them every turn, and a retry block could truncate a coordinator's history.
    • Errors are unchanged: invalid cacheTtl: and invalid recipe: (invalid_params) leave the row as it was, and an unknown session returns resource_not_found.
  • session/prompt _meta.goose.maxTurns takes a positive integer and bounds the run. Any other value is invalid_params.
  • The fork code is in acp/server/session_settings.rs and custom_requests/session_settings.rs. Upstream files only get registration lines.
  • rollingMemory comes in R12 (.26.4.3). Until then the field is ignored.

Tests: 4 unit tests, and 6 integration tests ported from 1.54 (tests/acp_session_settings_test.rs). All of them are in the patched-ci exact-test list. The tests check for final_output in the provider request, because 1.60's tools/list only lists extension tools.

Consumer note (stall-watch, not this PR): _goose/unstable/tools/list no longer lists recipe__final_output. The tools=False guard at honk_transport.py:1183 expects it. Production callers all pass tools=True, so only tests reach that guard.

References

  • workstation epic workstation-6w7i.26, bead .26.4.1 (1.54 source: fa913cb)

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.

1 participant