feat(settings): stream model lending across clients #749

Merged
admin merged 2 commits from feat/741-model-lending-stream into dev 2026-10-28 19:25:33 +00:00
Owner

Summary

Fourth slice for #741, stacked on #748/#747/#746. Model lending now has a typed MODEL_LENDING domain on the authenticated shared-state stream. The daemon sends a baseline and publishes committed SetModelLending changes; the settings UI consumes that stream with reconnect backoff and keeps unsaved edits intact when another client changes the saved configuration.

The event reuses the existing masked lending response, including URL credential redaction, and never adds provider/API secrets. If the stream is temporarily unavailable, the UI makes a one-shot GetModelLending fallback while reconnecting; it does not poll.

Verification

  • go test ./apps/sisyphusd/api — passed
  • npm --prefix apps/sisyphus run typecheck — passed
  • Renderer tests — 235 passed
  • Renderer production build — passed
  • make lint — passed
  • git diff --check — passed

The full local coverage command previously could not complete because Kubo/IPFS is unavailable in this environment; CI will run the repository full coverage suite.

/cc @rvnminers-A-and-N

## Summary Fourth slice for #741, stacked on #748/#747/#746. Model lending now has a typed MODEL_LENDING domain on the authenticated shared-state stream. The daemon sends a baseline and publishes committed SetModelLending changes; the settings UI consumes that stream with reconnect backoff and keeps unsaved edits intact when another client changes the saved configuration. The event reuses the existing masked lending response, including URL credential redaction, and never adds provider/API secrets. If the stream is temporarily unavailable, the UI makes a one-shot GetModelLending fallback while reconnecting; it does not poll. ## Verification - go test ./apps/sisyphusd/api — passed - npm --prefix apps/sisyphus run typecheck — passed - Renderer tests — 235 passed - Renderer production build — passed - make lint — passed - git diff --check — passed The full local coverage command previously could not complete because Kubo/IPFS is unavailable in this environment; CI will run the repository full coverage suite. /cc @rvnminers-A-and-N
Author
Owner

The CI coverage failure was a real missing branch: sharedStateSnapshot did not exercise the model-lending store read-error path. I added TestSharedStateSnapshotReportsModelLendingReadFailure in apps/sisyphusd/api/local_lending_test.go; go test ./apps/sisyphusd/api passes, and the change is pushed as 3924384. Full local make cover could not complete here because ipfs is not installed while SISYPHUS_REQUIRE_KUBO is set; CI will verify the full coverage aggregate.\n\n/cc @rvnminers-A-and-N

The CI coverage failure was a real missing branch: `sharedStateSnapshot` did not exercise the model-lending store read-error path. I added `TestSharedStateSnapshotReportsModelLendingReadFailure` in `apps/sisyphusd/api/local_lending_test.go`; `go test ./apps/sisyphusd/api` passes, and the change is pushed as `3924384`. Full local `make cover` could not complete here because `ipfs` is not installed while `SISYPHUS_REQUIRE_KUBO` is set; CI will verify the full coverage aggregate.\n\n/cc @rvnminers-A-and-N
Author
Owner

I also refreshed the PR onto the current dev tree after #748 was squash-merged. The PR now contains only the model-lending stream change plus its focused snapshot-error test; the obsolete model-profile commits are no longer part of the PR diff, so the previous DIRTY merge state is addressed. I kept a local backup of the prior branch tip. CI is rerunning on the refreshed head.\n\n/cc @rvnminers-A-and-N

I also refreshed the PR onto the current `dev` tree after #748 was squash-merged. The PR now contains only the model-lending stream change plus its focused snapshot-error test; the obsolete model-profile commits are no longer part of the PR diff, so the previous `DIRTY` merge state is addressed. I kept a local backup of the prior branch tip. CI is rerunning on the refreshed head.\n\n/cc @rvnminers-A-and-N
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sisyphus/Sisyphus#749