Skip to content

Make the Reach operator's display name configurable and fix Podman hosts - #149

Draft
NavSrijan wants to merge 2 commits into
devfrom
reach-operator-configurable-name
Draft

NavSrijan wants to merge 2 commits into
devfrom
reach-operator-configurable-name

Conversation

@NavSrijan

@NavSrijan NavSrijan commented Nov 10, 2026 •

Copy link
Copy Markdown

Change and scope

The Discord operator edge hardcodes the bot name "Nadir" and the model name "Qwen" in its fixed operational notices (refusals, timeouts, permission errors). Running the profile with a differently named bot, or a different model behind the conversation binding, shows users the wrong names.

  • Adds agent_display_name to the Discord policy, defaulting to Nadir, so existing policies behave the same. It is presentation only: it is excluded from the compiled Reach policy and its digest and grants no identity or authority. Single-line printable text, at most 80 characters.
  • Renders every fixed notice through it, and refers to "the model" instead of naming one.
  • Admits an allowlisted DM whose DMChannel has no recipient. Without a member cache discord.py builds the DM channel from the message alone and leaves recipient unset, so every DM from an allowlisted user was silently dropped. A non-bot author of a one-to-one DMChannel is the recipient by construction; a conflicting recipient is still refused, and the reply path still verifies the channel's recipients before sending.
  • reach_operator.py on Podman hosts:
    • Podman prints {{.Id}} as bare hex while Docker prints sha256:…, so build refused every Podman build with operator_image_identity. Both forms are now accepted.
    • Podman copies the image's own /tmp into a --tmpfs mount by default. The Core check image keeps its uv cache in /tmp (~690 MB), which overflows the bounded 256 MB tmpfs, so the worker failed to start. The mount now uses notmpcopyup under Podman; Docker is unchanged.
    • The edge build context is copied under the caller's umask and COPY keeps those modes, while the edge runs as the operator's UID rather than the image's owner. Under a private umask (077) the edge's source was unreadable and the import check failed (No module named 'lychd.interface'). The copied context now gets fixed 0644/0755 modes.

Not changed here: the conversation profile's model binding. #150 makes that configurable; the two are independent and merge cleanly in either order.

Verification

  • New tests: display-name default, validation and digest invariance (test_discord_policy.py); every notice renders the configured name and names no model (test_discord_live.py); uncached DM admission (test_nadir_dialogue.py); Podman tmpfs option, bare/prefixed image IDs and umask-independent build context (test_reach_operator.py).
  • pytest tests/unit/interface tests/unit/cli tests/unit/compositions against this branch and against unmodified dev, both with --basetemp outside any Git checkout: identical failure set (15 failed in both, all in test_reach_portability.py and test_reach_research_image.py, which need the research container setup), 12 more passing here. ruff check and ruff format --check clean on changed files.
  • Not run in the OCI test image. Live: the patched edge has been running against a real Discord server on a rootless Podman 6.1.4 host (openSUSE Tumbleweed) with a custom display name and an allowlisted DM user; images built and the headless reach_probe.py turn passed only after the three harness fixes.

Documentation and delivery claims

  • docs/compositions/reach/operator.md: documents agent_display_name.
  • examples/reach/policy.toml: shows the setting with its default.

Author review

  • I reviewed the full diff, including any AI-assisted changes, and can explain the submitted code and its verification.
  • I identified any reused upstream material and checked its provenance, changes, license obligations and shipped notices under the reuse procedure, or confirmed that this change incorporates none.

Fixed operational notices in the Discord edge hardcoded the bot name
"Nadir" and the model name "Qwen". A deployment with a differently named
bot, or a different model behind the conversation binding, showed users
the wrong names.

- Add `agent_display_name` to the Discord policy (default "Nadir"). It is
  presentation only: excluded from the compiled Reach policy and its digest.
- Render every fixed notice through it, and say "the model" instead of
  naming one.
- Admit an allowlisted DM whose uncached DMChannel has no recipient set.
  Without a member cache discord.py leaves `recipient` empty, so every DM
  was silently dropped; a non-bot author of a one-to-one DM is the
  recipient by construction. A conflicting recipient is still refused.
- reach_operator: accept Podman's bare-hex `{{.Id}}` output alongside
  Docker's `sha256:` form, and mount the bounded /tmp with `notmpcopyup`
  under Podman so the Core image's own /tmp is not copied into it.
- reach_operator: give the edge build context fixed 0644/0755 modes. COPY
  keeps them and the edge runs as the operator's UID, so under a private
  umask (077) the image's source was unreadable and the import check failed.

Copy link
Copy Markdown
Contributor

Keeping Nadir as the temporary default for Discord notices works for this PR. Follow-up in #153: once Reach is explicitly bound to a specific Altar operator, default those notices to that operator’s saved Primus name from Naming Ceremony. Use Primus until they save a name, and keep agent_display_name available for deployments that need a Discord-specific name.

@zenithruneblade
zenithruneblade marked this pull request as ready for review November 12, 2026 00:19
@zenithruneblade
zenithruneblade requested a review from a team as a code owner November 12, 2026 00:19

@zenithruneblade zenithruneblade left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recording the maintainer’s approval to integrate this revision. The Primus naming follow-up is tracked in #153.

@zenithruneblade
zenithruneblade marked this pull request as draft November 12, 2026 01:10
@zenithruneblade
zenithruneblade dismissed their stale review November 12, 2026 01:10

Returning this PR to draft so the author can mark it ready when they want it reviewed for merge. The follow-up remains in the conversation.

This branch has not been deployed

No deployments
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