Skip to content

fix: harden tool controls and persisted handoffs - #61

Merged
wolfy-j merged 7 commits into
masterfrom
test/lua-runtime-coverage-20261007
Oct 14, 2026
Merged

wolfy-j merged 7 commits into
masterfrom
test/lua-runtime-coverage-20261007

Conversation

@skhaz

@skhaz skhaz commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Malformed tool controls can crash a Session turn, and a Stop committed while the next agent builds its prompt can still start another provider request. Validate controls before their effects, pass a current-state Stop callback into Agent, and stop continuation when Agent reports it stopped.

  • Return reader refresh failures after durable writes so the command bus closes without replaying committed effects or continuing with stale state.
  • Reuse metadata ownership reads, scope updates to the owning session, and report zero-row updates for missing or moved records.
  • Add real runtime handoffs with deterministic providers and persisted context/config/history checks. Cover pending retirement during tools and prompt construction, cancellation of retirement, stale finish requests, explicit Stop after retirement, malformed peer results, and cleanup after fixture failures.
  • Integrate current master, preserving fix(session): drain accepted work before lifecycle retirement #65's drain-before-retirement behavior. Tests assert Session exit and registry-name cleanup before deleting fixture rows.
  • Add a required PostgreSQL 17 CI job for persistence and handoffs, alongside locked-dependency compatibility, candidate runtime, and lint jobs. Pin Framework to 7a485e9b59fc4d59720104bf55157adb3a01a386.
  • Keep test artifacts outside the checkout; retain opt-in local benchmarks without a CI timing threshold.

Validation on Wippy v0.3.48a:

  • Published dependencies: 640 passed, 4 explicitly skipped (2 benchmarks and 2 Stop-boundary cases requiring newer Framework).
  • Current Framework: 642 passed, 2 benchmark skips; lint passed.
  • Required SQLite runtime target: 11/11 passed, with nonempty-case enforcement.
  • PostgreSQL persistence and runtime target: 43/43 passed, with nonempty-case enforcement. Afterward: zero session/message/context fixture rows, zero test connections, and no leftover trigger functions.

Release and publication remain separate.

skhaz added 4 commits October 7, 2026 12:27
- process: reject a malformed tool _control before any side effect and
  settle it through the existing error path; it crashed the session
  process before
- process: return reader refresh errors after durable writes in control,
  context command, title, checkpoint, agent, and model handlers
- process: pass a per-session stop_check to agent steps and end the
  response when the step stops before generation
- persist: reduce metadata update reads, scope message updates to the
  owning session, and use affected-row checks for session updates
- test: confirm session exit before deleting rows after a fixture failure
- bench: fail on cleanup errors and remove stale benchmark reports
- ci: pin the Framework revision with the matching runtime changes

Adds runtime and real SQLite regression tests for each fix.
@skhaz
skhaz marked this pull request as ready for review October 7, 2026 20:29
@skhaz
skhaz requested a review from wolfy-j October 7, 2026 20:29
@wolfy-j wolfy-j changed the title test: cover persisted handoffs with the Wippy runtime fix: harden tool controls and persisted handoffs Oct 14, 2026
@wolfy-j
wolfy-j merged commit e8cce7c into master Oct 14, 2026
4 checks passed
@wolfy-j
wolfy-j deleted the test/lua-runtime-coverage-20261007 branch October 14, 2026 18:09
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.

2 participants