Skip to content

fix(gossamer): wire groove server + llm_coding command surface#19

Merged
hyperpolymath merged 1 commit intomainfrom
fix/issues-17-18-wire-groove-llm-coding
Apr 27, 2026
Merged

fix(gossamer): wire groove server + llm_coding command surface#19
hyperpolymath merged 1 commit intomainfrom
fix/issues-17-18-wire-groove-llm-coding

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Closes #17 and closes #18 — both p1 issues asking to finish wiring the modules into the gossamer-rs main.rs. Both modules already had substantial implementations (~509 LOC groove.rs, ~518 LOC llm_coding/); what was missing was the wiring, and the pre-existing commented-out blocks were stale (from before the Tauri→gossamer-rs migration).

What changed

src-gossamer/src/main.rs:

Groove (#17) — launched once at startup in main() via groove::spawn(), which also starts the mesh-monitor thread. Groove is an external discovery surface (peers probe GET /.well-known/groove on 127.0.0.1:8000), not something the local webview should expose as Tauri-style commands. The misnamed groove_discover/groove_status shims were architecturally wrong and have been removed; replaced with a comment explaining where groove actually lives.

LLM coding (#18) — nine fresh app.command(...) registrations matching the real llm_coding_* API in src-gossamer/src/llm_coding/commands.rs:

Command Wraps
llm_coding_init llm_coding_init()
llm_coding_spawn llm_coding_spawn(SpawnRequest)
llm_coding_freeze llm_coding_freeze(session_id)
llm_coding_thaw llm_coding_thaw(session_id)
llm_coding_terminate llm_coding_terminate(session_id)
llm_coding_list_sessions llm_coding_list_sessions()
llm_coding_session_status llm_coding_session_status(session_id)
llm_coding_append_message llm_coding_append_message(session_id, content)
llm_coding_get_messages llm_coding_get_messages(session_id)

llm_coding_spawn deserialises a SpawnRequest struct via serde_json::from_value so typed payloads keep their shape.

New helperresult_str_to_json next to result_to_json. The llm_coding_* functions return Result<String, String> where the String is itself JSON; the helper parses the inner JSON before wrapping in {"ok": true, "result": <object>} so clients don't have to double-parse.

Test plan

  • cargo check clean (15 pre-existing unused-function warnings in settings.rs, out of scope)
  • cargo test --no-run clean
  • cargo test — 0 tests in this binary (no test suite for main.rs); the modules' own tests are unaffected

Closes #17 — groove discovery server is launched once at startup via
groove::spawn() before the webview opens. spawn() also starts the
mesh-monitor thread internally, so peers in the mesh (Burble, Vext,
Hypatia, VeriSimDB) can probe `/.well-known/groove` on 127.0.0.1:8000
for the entire app lifetime. The previous commented-out
groove_discover/groove_status command shims were architecturally wrong:
groove is an *external* discovery surface, not something the local
webview needs to call into itself. Replaced with a comment explaining
where groove actually lives.

Closes #18 — llm_coding gets nine real app.command registrations
matching the actual `llm_coding_*` API in src-gossamer/src/llm_coding/
commands.rs:

  llm_coding_init / llm_coding_spawn / llm_coding_freeze /
  llm_coding_thaw / llm_coding_terminate / llm_coding_list_sessions /
  llm_coding_session_status / llm_coding_append_message /
  llm_coding_get_messages

The pre-Tauri→gossamer-rs commented-out block called start_session,
stop_session, session_status, list_sessions — none of which exist.
llm_coding_spawn deserialises a SpawnRequest struct via
serde_json::from_value so payloads keep their typed shape.

Adds result_str_to_json helper next to result_to_json to avoid
double-encoding: the llm_coding_* functions return Result<String, String>
where the String is itself JSON, so the helper parses it before
wrapping in `{"ok": true, "result": <object>}`.

cargo check + cargo test --no-run clean. The 15 unused-function warnings
in settings.rs are pre-existing and out of scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@hyperpolymath hyperpolymath merged commit 19666aa into main Apr 27, 2026
13 of 24 checks passed
@hyperpolymath hyperpolymath deleted the fix/issues-17-18-wire-groove-llm-coding branch April 27, 2026 08:24
@sonarqubecloud
Copy link
Copy Markdown

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.

P1: Complete llm_coding implementation P1: Implement groove module

1 participant