Skip to content

Configure alice custom inference - #176

Draft
sauagarwa wants to merge 24 commits into
validatedpatterns-sandbox:mainfrom
sauagarwa:configure-alice-custom-inference
Draft

sauagarwa wants to merge 24 commits into
validatedpatterns-sandbox:mainfrom
sauagarwa:configure-alice-custom-inference

Conversation

@sauagarwa

Copy link
Copy Markdown
Collaborator

No description provided.

@sauagarwa
sauagarwa marked this pull request as draft November 30, 2026 16:05
A container user now needs only name, ownerSubject, profiles, vaultPrefix
and values.deployment.mode, like a VM entry.

saw-users:
- Derive registration (sha256 of name:generation), installationID (the
  portal's uuid5), the owner-scoped vaultPrefix, pruneOnRemove and
  intentGeneration; explicit values still win.
- Build each container site from a cluster-wide containerDefaults, overlaid
  by containerSites.<name>; subject defaults to the user's ownerSubject.
- Default every component revision to global.targetRevision so container
  workspaces follow the pattern branch like VM users.

saw-portal-container / projector:
- Accept a Git branch as well as a full SHA for stack, relay and enrollment
  revisions.
- Add automaticEnrollment.autoApprove for dev/demo clusters: enrollment
  still runs its health, admission and network checks, then publishes the
  observed boundary instead of comparing it with a reviewed reference.

Pattern and tooling:
- overrides/saw-container-defaults.yaml holds projection and
  containerDefaults; Alice's entry is reduced to the essentials.
- values-prod installs the Agent Sandbox controller.
- make container-topology also discovers the ApplicationSet controller
  labels, storage classes and containerDefaults egress.
- make keycloak-user-info KC_USER=<name> prints a user's subject.

Tests cover the derived fields, minimal entries, mixed VM and container
users, autoApprove and the topology discovery.

Assisted-By: Claude
Keep main's wording and add the create alias from the automation
commands change.

Assisted-By: Claude
make saw-init (scripts/saw-init.sh) prepares a cluster before
./pattern.sh make install or make saw-create. pattern-install and
saw-create for container/kata run it first. With container or kata users
it checks OVN-Kubernetes, AdminNetworkPolicy, ValidatingAdmissionPolicy and
an anonymous pull of the runtime image from inside the cluster, and
ensures a ReadWriteMany StorageClass for the audit exchange volume
(scripts/shared-storage.sh): without one it creates a small in-cluster NFS
server and provisioner (StorageClass saw-nfs, dev/demo) and verifies a
read/write mount; SAW_SHARED_STORAGE=efs offers EFS on AWS, none reports.

saw-users: a container user without ownerSubject on an installation
configured for containers waits (ConfigMap saw-users-awaiting-owner)
instead of failing the whole render. make saw-create accepts the minimal
entry with the chart's defaults and resolves an omitted subject from
Keycloak.

make container-topology finds the ApplicationSet controller by its
app.kubernetes.io/name label, fills missing storage classes and writes
plain YAML. Add the generated overrides/container-network.yaml for this
cluster to the saw-users value files.

README (both install options) and docs/container-installation.md describe
the flow.

Assisted-By: Claude
The runtime compiles a sandbox's model from public model inputs, never
from the credential Secret. Without one, alice's enrollment looped on
ContractError (invalid sandbox inference inputs). Set
modelInputs.inference.model on alice, and have the projector refuse a
static entry whose profile requires a model it does not name, instead of
an enrollment that never finishes.

Assisted-By: Claude
Its enrollment recorded the alice-gateway Service while it still carried
the VM workspace's selector, so the reconciler rejects the boundary
(BoundaryRejected) and cannot be repaired in place. Remove the
registration; alice comes back as generation 2.

Assisted-By: Claude
A fresh container registration (d2565216ccf6a6c0) on the fixed defaults:
rebuilt OpenClaw image, approved custom inference endpoint, model input,
no web search, restored audit identity.

Assisted-By: Claude
The published interceptor image predates mTLS operator access (118b4cf),
so it denies the container reconciler's CreateSandbox driver config.

Assisted-By: Claude
The portal layers containerDefaults under each user's site, looks up the
owner's Keycloak subject, follows the branch revision and honours
autoApprove, so the create form offers container mode without per-user
containerSites. Preflight accepts branch revisions as well as commit SHAs.

Assisted-By: Claude
…oning

Profiles can now set inference.reasoning, maxTokens and contextWindow
(like NemoClaw's MODEL_REASONING, MODEL_MAX_TOKENS and
MODEL_CONTEXT_WINDOW). The installer writes them to the custom model's
OpenClaw entry. An explicit reasoning: false keeps the thinking level as
the model's default but sends no reasoning_effort.

Assisted-By: Claude
@sauagarwa
sauagarwa force-pushed the configure-alice-custom-inference branch from 837c48f to 68764a3 Compare November 30, 2026 17:10
Upstream main derives the container network in saw-portal-container
(gateway egress, issuer URL) and ships the v0.1.10 governance
interceptor with mTLS operator access, so neither overlay is needed.
values-prod.yaml now matches upstream main.

Assisted-By: Claude
saw-restart-pending only looked for RestartRequired, which KubeVirt 1.8
does not set when just the template's openshell.pattern/*-checksum
annotations change, so a BOM update left VMs on their old inputs with
nothing listed. Also compare those checksums with the running instance.

saw-restart ran a blocking poweroff; the tunnel dropped before it
returned and virtctl reported exit status 1, which the script treats as
a failed command. Queue the poweroff with --no-block so the command
returns before sshd stops.

Assisted-By: Claude
The upstream merge kept an older copy of the saw-init and ownerSubject
paragraphs, which contradicted the current text: saw-init no longer
creates NFS unless SAW_SHARED_STORAGE=nfs, and shared storage is only
needed for audit receipts. OpenShell 0.1.10 relays agent traces; OpenClaw
does not send them yet.

Assisted-By: Claude
Move the Kata pointer to the installation-owner section and the portal
Task recovery note into Interrupted creates and updates, name the e2e
check behind W6, and describe the driver's bootstrap window by its 0.1.10
setting instead of a 0.1.6 source line.

Assisted-By: Claude
thinking, reasoning, maxTokens and contextWindow were literals in the
custom-inference sandbox profile. They are now optional inputs from the
inference Secret (thinking, reasoning, max_tokens, context_window): a
key that is absent or empty is not applied, so OpenClaw keeps its own
default. Literals still work for other profiles. The catalog and RHDH
forms list them as optional fields, and values-secret.yaml.template
shows them under the custom-inference entry.

Assisted-By: Claude

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.

1 participant