fix(gateway): bridge docker_volumes config to terminal env vars#430
Closed
manuelschipper wants to merge 1 commit into
Closed
fix(gateway): bridge docker_volumes config to terminal env vars#430manuelschipper wants to merge 1 commit into
manuelschipper wants to merge 1 commit into
Conversation
The gateway config.yaml to env var bridge was missing docker_volumes, so terminal sandboxes from gateway sessions (Telegram, Discord, WhatsApp) never received user-configured volume mounts. CLI sessions worked because cli.py includes this key. Also fix list serialization: gateway used str() which produces Python repr (single quotes) instead of valid JSON. terminal_tool deserializes with json.loads() so this would fail. Now uses json.dumps() for list values, matching cli.py behavior.
This was referenced May 24, 2026
rafe-walker
added a commit
to rafe-walker/kora
that referenced
this pull request
May 24, 2026
…irst-run wizard + mobile sidebar polish (#205) Two deliverables — primary is the operator-onboarding wizard CC#2 flagged in #202 (paired with CC#1 NousResearch#431 per-tenant cost ladder + CC#3 NousResearch#430 Marvin runnable plugin for the pip-installable Kora bundle vision), secondary is the small mobile-sidebar follow-on from #202. A) KR-FE-OPERATOR-FIRST-RUN-WIZARD * 5-step wizard: Welcome+tenant / Anthropic / IsoKron+Slack / Tutorial probe / Promotion intro. First-run detection combines marker-file absence + audit-log emptiness → swaps "/" to render WizardPage instead of DashboardPage. * 6 BE endpoints, each ≤30 LoC of substantive logic: - GET /api/wizard/state (resume + first-run signal) - POST /api/wizard/validate-anthropic (1-token test inference) - POST /api/wizard/validate-substrate (PostgREST ping) - POST /api/wizard/validate-slack (auth.test) - POST /api/wizard/trigger-tutorial-probe (synthetic wake) - POST /api/wizard/complete (marker write + tenant_id persist) * Marker file at $KORA_HOME/wizard_config.json. Operator can re-open the wizard anytime at /wizard URL. * tenant_id wired through every step + the .env download + the tutorial probe — NOT hardcoded "default" — feeds CC#1 NousResearch#431's per-tenant cost-ladder foundation. * .env download flow: wizard NEVER mutates operator shell; surfaces downloadable .env operator copies to $KORA_HOME/.env then restarts Kora. Per the security posture: never modify operator env without explicit consent. * Validation badges (success / auth_failure / network_failure / timeout) render inline so operator knows immediately why a credential failed. * Drift-guards: _WIZARD_STEPS + _WIZARD_VALIDATION_RESULTS allowlists pinned across BE/FE/page. B) KR-FE-SIDEBAR-MOBILE-COLLAPSE-UX (small follow-on to #202) * Collapse-all / Expand-all shortcut at the top of the sidebar (mobile + desktop). Label flips with state (allCollapsed → "Expand all"; otherwise "Collapse all"). Tappable on the 375px mobile overlay. * useSidebarGroupCollapse hook extended with allCollapsed + setAll public surface methods backing the shortcut. * Badge overflow: formatBadgeCount caps display at "99+" so a long backlog can't break the narrow mobile chip. Numeric aria-label keeps the exact count for screen readers. Tests: 52 new tests covering wizard endpoints (5 state behaviours, 4 validation paths, tutorial-probe audit emission, complete-flow, 2 drift-guards + 5 FE source-pins) + sidebar overflow + collapse-all (5 pins). Full kora_cli regression: 0 new failures (76 vs 76 on base via stash — pre-existing PTY / cron / panel-view / engine failures unchanged). Screenshots: web/docs/operator-first-run-wizard-and-sidebar-mobile-ux/ (5 wizard steps + before/after mobile sidebar). Co-authored-by: CC#2 Kora Web <kora-pm@stormhavenenterprises.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The gateway's
config.yaml→ environment variable bridge (gateway/run.py) is missingdocker_volumesfrom its_terminal_env_map, so terminal sandboxes created from gateway sessions (Telegram, Discord, WhatsApp) never receive user-configured volume mounts. CLI sessions work correctly becausecli.pyincludes this key in its bridge map.This also fixes list serialization: the gateway uses
str()for all config values, which produces Python repr (single quotes) for lists instead of valid JSON. Sinceterminal_tool.pydeserializes withjson.loads(), this would fail even if the key were present. Now usesjson.dumps()for list values, matchingcli.pybehavior.Changes
"docker_volumes": "TERMINAL_DOCKER_VOLUMES"to_terminal_env_mapingateway/run.pyjson.dumps()instead ofstr()for list-type config valuesHow to reproduce
docker_volumesinconfig.yaml:hermes chat(CLI) → sandbox container has user volumes mountedReference
cli.py,terminal_tool.py,docker.pywere updated butgateway/run.pywas missedcli.pylines 296, 310-312 — correct reference implementation