Skip to content

fix: terminal UTF-8, deploy --no-otel, hermes schema drift, opencode model carry#2706

Closed
dgokeeffe wants to merge 1 commit into
omnigent-ai:mainfrom
dgokeeffe:pr/standalone-fixes
Closed

fix: terminal UTF-8, deploy --no-otel, hermes schema drift, opencode model carry#2706
dgokeeffe wants to merge 1 commit into
omnigent-ai:mainfrom
dgokeeffe:pr/standalone-fixes

Conversation

@dgokeeffe

@dgokeeffe dgokeeffe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Related issue

N/A — no tracking issue yet. (Replace with Closes #NNN if one exists.)

Summary

Four small, independent backend fixes bundled for review:

  • Terminal UTF-8 locale (omnigent/inner/terminal.py) — when the inherited environment carries no UTF-8 locale signal, force C.UTF-8 into the terminal env so native TUI harnesses in minimal containers don't fall back to ASCII (glibc/musl ship C.UTF-8 without a locale archive).
  • --no-otel deploy (deploy/databricks/deploy.py, databricks.yml, README.md) — deploy without the OpenTelemetry collector for collector-less workspaces. Also makes the post-start UC USE_CATALOG/USE_SCHEMA grant step warn-and-continue instead of aborting the whole deploy when the grant fails (the SP may already have access via group inheritance, or the deployer may lack MANAGE on a shared catalog).
  • Hermes schema drift (omnigent/hermes_native_forwarder.py) — introspect state.db columns and adapt SELECTs, so a schema change across Hermes builds (e.g. a dropped sessions.cwd) no longer aborts discovery/mirroring with no such column.
  • opencode model carry (omnigent/opencode_native_provider.py) — carry the user config's top-level model default into the synthesized config when no model is pinned, so opencode-native doesn't silently fall back to its own default over the merged models map.

ELI5

  • Terminal fix: some containers start with no UTF-8 locale set, so special characters break in the TUI; we now set a safe UTF-8 locale automatically.
  • --no-otel: you can now skip the telemetry collector if you don't want it.
  • Hermes fix: Hermes changes its internal database layout between versions; we now read the layout at runtime instead of guessing, so mirroring keeps working.
  • opencode fix: when you set a default model in your config, that choice now survives into opencode sessions instead of being overridden.

Test Plan

  • Lint: ruff check + ruff format clean on all changed Python; byte-compile clean.
  • Updated unit tests pass: tests/inner/test_terminal.py (UTF-8 locale fallback), tests/test_hermes_native_forwarder.py (schema introspection), tests/test_opencode_native_provider.py (model carry-over).
  • Full suite left to CI (the complete suite can't be run in this offline environment).

Demo

N/A — non-visual changes. --no-otel is a CLI flag; optionally show omnigent deploy ... --no-otel resulting in a collector-less deployment.

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

Each fix has a corresponding updated unit test (test_terminal.py, test_hermes_native_forwarder.py, test_opencode_native_provider.py). The --no-otel deploy path is covered by the updated deploy option wiring + docs; an integration deploy test would be a nice follow-up but isn't included here. These four changes are independent of each other and of the host-sharing PR — happy to split into separate PRs if reviewers prefer one-fix-per-PR.

Changelog

--no-otel deploys without the OpenTelemetry collector; terminal auto-forces a UTF-8 locale in minimal containers

@github-actions github-actions Bot added the size/XL Pull request size: XL label Jul 16, 2026
@github-actions
github-actions Bot requested a review from PattaraS July 16, 2026 12:17
@github-actions

Copy link
Copy Markdown
Contributor

@dgokeeffe This PR is a Bug fix, Feature, or UI / frontend change but the Demo section is missing or only contains a placeholder.

These change types require a screenshot or screen recording so reviewers can see the new behaviour without checking out the branch. Please update the Demo section with:

  • A screenshot or screen recording of the change, or
  • A link to a hosted video or GIF showing the new behaviour.

Use N/A only when the change has no user-visible effect whatsoever (e.g. a pure refactor or test-only change). If that's the case, uncheck the relevant type box and check Refactor / chore or Test / CI instead.

@github-actions github-actions Bot added the needs-demo PR needs a demo screenshot or recording label Jul 16, 2026
@dgokeeffe
dgokeeffe force-pushed the pr/standalone-fixes branch from 6a9db6b to 40f10b3 Compare July 16, 2026 14:40
…encode model carry

- inner/terminal: force a UTF-8 locale (C.UTF-8) into terminal env when
  the inherited environment has no UTF-8 signal, so native TUI harnesses
  in minimal containers don't fall back to ASCII.
- deploy/databricks: add --no-otel to deploy without the OTel collector.
- hermes_native_forwarder: introspect state.db columns and adapt SELECTs
  so schema drift across Hermes builds doesn't abort discovery/mirroring.
- opencode_native_provider: carry the user config top-level model default
  into the synthesized config when no model is pinned.

Signed-off-by: David O'Keeffe <dgokeeffe@users.noreply.github.com>
@dgokeeffe
dgokeeffe force-pushed the pr/standalone-fixes branch from 40f10b3 to 48a3cee Compare July 17, 2026 00:47
@PattaraS

Copy link
Copy Markdown
Contributor

Thanks for working through these fixes. Could you please split this into separate PRs for:

  1. terminal UTF-8/locale handling
  2. Databricks deploy --no-otel
  3. Hermes schema drift
  4. OpenCode model carry-over

These changes address unrelated problems, touch different subsystems, and have different verification and rollback paths. Keeping them separate will make each fix easier to validate, review, and merge independently.

Please link the resulting PRs here when they are ready.

@dgokeeffe

Copy link
Copy Markdown
Contributor Author

Split into 4 separate PRs as requested:

  • terminal UTF-8 locale
  • deploy --no-otel + UC grant resilience
  • Hermes schema drift
  • opencode model carry

Links to the new PRs above. Closing this one.

@dgokeeffe dgokeeffe closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-demo PR needs a demo screenshot or recording size/XL Pull request size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants