This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Development hosts

Shared deployment for development and runner hosts

infra/dev owns the existing workstation at dev1.dev.alwaldend.com (192.168.1.210) and the secure runner at secure1.dev.alwaldend.com (192.168.10.102). One Ansible deployment configures both host groups while preserving their current roles, users, package backends and storage settings. The secure runner uses the shared host and Forgejo runner roles, with one self-hosted host-executor slot scoped to alwaldend/src. Jobs run as the unprivileged forgejo-runner account and share its persistent filesystem; only trusted code belongs on this worker. Ansible installs Node.js, Bazelisk, AL and the repository Android prerequisites. Its provisioning root owns the XO VM through the shared development identity and its own resource set.

The NAS AppRole project owns its namespace and cache in independent state using the NAS operator identity; VM provisioning only attaches the 800-GiB disk from the dedicated XO repository. The module owns encrypted storage and private ACLs. Terraform publishes disk metadata to Vault for automatic Ansible injection and UUID mounting. The worker requires the mount; action-cache GC is 700 GiB and Bazel working state remains local. The rollout record records the live mount, worker and repeated-action cache verification.

The runner reuses the API-issued identity owned by infra/forgejo, delivered through an exact-path Vault read grant for the development deployment. Jobs receive no deployment credentials. The repository’s CI workflow runs only on pushes to master: it checks out the event revision and invokes the local action backed by tools/ci. The command builds and tests all normal targets in the root and declared nested Bazel workspaces.

Secure1 jobs use the existing Vault-owned T3 Code HTTP proxy for external downloads. Ansible injects the selected password into the restricted runner configuration, without logging it. A loopback socket on port 18080 forwards HTTP proxy traffic over certificate-verified TLS to yc1.nodes.threexui.alwaldend.com:40201, supporting Bazel’s Java downloader. Both cases of NO_PROXY bypass localhost, alwaldend.com and its subdomains; private CIDR entries also apply to clients that support them. The proxy is scoped to jobs; the runner daemon continues contacting the local forge directly. Ansible installs zip for Android test archive creation. The 2026-11-17 rollout records the authorized deployment, a no-change rerun, successful upstream requests and checksum-verified Bazel download, and direct local-forge access.

Dev1 runs Traefik in front of T3 Code and ComfyUI, with mTLS enforced by public ingress. The host firewall blocks direct external access to the application ports and accepts new connections only on SSH, HTTP, and HTTPS ports.

ComfyUI uses comfyui.dev1.dev.alwaldend.com. Site-local DNS points to dev1; public DNS points to ingress, which forwards HTTPS through dc1.comfyui.dev1.dev.alwaldend.com with the service hostname as TLS SNI. Local Traefik uses the Vault certificate resolver and forwards to 127.0.0.1:8188. Ansible declares the route; the server must be started separately using the ComfyUI launcher.

The canonical package updater keeps automatic OSTree staging enabled without automatic reboot. The automatic_updates tag reconciles this policy. The shared infra/security playbook performs on-demand audits and stages immediate system updates; activating a staged deployment requires a separately authorized reboot.

Ansible declares Tuned’s balanced power profile through dev1_tuned_profile, enables the existing Tuned service, and reconciles the selected profile in manual mode. The power_profile tag scopes those tasks. The live setting was applied directly at the user’s explicit request; no Ansible deployment was run for that initial change.

Ansible and DNS use the dedicated src_infra_dev AppRole. SSH signing is scoped to these hosts and TLS issuance to dev1’s services. OpenHands has been removed and disabled; deployment neither installs it nor reads its Vault key. The completed one-time removal tasks are no longer in the playbook. DNS credential reads cover dc1 and public records. Provision this identity through Vault Terraform before deploying.

One DNS root consumes the complete dnsconfig.json and uses the src_infra_dev/tf_backend/dns backend. The authorized handoff adopted all 12 existing records without recreation; the rollout record records the state boundaries and rollout results. DNS, Vault and host deployment remain separately authorized operations.

T3 Code controls permissions per thread. Its Auto mode maps to Codex Auto-review. The managed Codex requirements allow read-only and host-bot permissions with on-request approvals, so threads cannot select Full access or disable approvals. The requirements file only allowlists the host-bot profile; it must not define the profile because T3 Code supplies a per-thread config layer with the same name, and Codex rejects profiles defined by both requirements and config. The normal and isolated provider configs define host-bot with workspace writes, public command-network access, and write access to the Bazel cache and Bazelisk directories while keeping local network binding and loopback connections available for Bazel servers. Other private network targets remain blocked. T3 Code must select that profile for the thread. Hosted web search is not restricted by this role.

The deployment installs pinned Bazelisk as ~/.local/bin/bazel and AL as ~/.local/bin/al. Run builds and tests with ordinary bazel commands. The managed user bazelrc supplies bounded, non-interactive output and failure-focused test reporting directly, so these defaults also apply in workspaces without a named agent profile. Explicit command-line options can override them. AL supplies repository lifecycle commands and the workspace status used by release builds.

Two SATA SSDs, selected by their stable ATA IDs, back the sata_ssd volume group. Its striped bazel_cache logical volume is mounted persistently at /var/cache/bazel. Every Bazel workspace uses its disk_cache directory and the managed user bazelrc points its output-user root at the same filesystem. The managed user bazelrc also sets repo_contents_cache to /var/cache/bazel/repo_contents_cache. This requires the live bazelrc to match that file and the cache directory to exist with its Ansible-defined ownership and permissions. Eligible materialized external repositories are then shared across output bases: the first cache miss extracts an archive, and later worktrees reuse the cached contents instead of repeating extraction. The repository cache still avoids the network archive download. Automatic garbage collection caps the action disk cache at 700 GiB, leaving room within the 1-TiB filesystem for output bases, repository contents, and install state; the volume group retains about 900 GiB for later growth or another logical volume. Because the volume is striped, either SSD failing invalidates the disposable cache.

The managed bazelrc sets GO_REPOSITORY_EPHEMERAL_MODCACHE=1. Gazelle 0.53.0 uses a temporary Go module cache for each module fetch and deletes it after materializing the repository. Pinned, reproducible Go repositories can then be reused through the shared Bazel repository-contents cache across worktrees. The variable saves duplicate download-cache space; it does not enable Bazel cache reuse. A repository-contents cache miss downloads the module again, including after changes to Gazelle or generation inputs. Gazelle’s default instead retains module ZIPs within each output base while pruning extracted module trees. Explicit host module-cache settings take precedence over ephemeral mode.

The managed user bazelrc limits each Bazel invocation to four concurrent jobs and budgets one quarter of the host CPUs for local actions. These scheduling limits apply to builds and tests; they do not impose a combined CPU cap across independent Bazel processes or Codex sessions.

Executable repository tools use /var/cache/bazel/tool_cache. Unlike the disposable action and output caches, this directory is private to the host-bot account. Cache entries are keyed by declared source, build configuration, platform, and dependency pins, and are installed atomically after a Bazel build on the first miss.

The arXiv MCP server is pinned to version 0.7.2 and runs locally over stdio. Its downloaded papers and search data live under /srv/misc/arxiv-mcp-server/papers on a reusable 100-GiB misc logical volume in the existing sata_ssd volume group. The volume is mounted for reconstructible non-executable application data. Data with durability or different reliability requirements belongs on a separate volume.

The managed Codex configuration allows up to 20 concurrent subagents per session. The root agent is accounted for separately.

Ansible installs Codex and Grok CLI as the managed user through the official https://chatgpt.com/codex/install.sh and https://x.ai/cli/install.sh installers. Both commands are placed in ~/.local/bin. The codex_install and grok_install tags select only their respective installation tasks; codex and grok also include them. An existing command skips its installer, so deployment provisions missing CLIs without upgrading installed versions. First installation follows the upstream installer’s current release, and Grok’s installer also provisions its shell integration and completions.

Node.js and npm are provisioned through the development VM role’s mutable or OSTree package backend. OpenSpec 1.14.2 (@fission-ai/openspec) is installed without npm lifecycle scripts under the managed user’s ~/.local prefix, providing ~/.local/bin/openspec. Its exact version is controlled by openspec_version; the openspec tag selects its prerequisites and installation. Repository workflows continue to use the repository-pinned Bazel CLI wrapper.

Ansible installs the repository-pinned standalone Forgejo CLI as ~/.local/bin/fj. The fj tag selects only its user-local directory and binary tasks; reapplication preserves an unchanged executable. On dev1, bazel run //infra/dev/ansible:fj_install runs those same tasks locally without SSH or Vault authentication. This target changes only the managed user’s CLI installation. Native fj authentication is a separate user-authorized operation; Ansible does not install passwords or API tokens. See the Forgejo CLI guide.

The workstation’s managed Git configuration uses that native login for https://forgejo.alwaldend.com/alwaldend/src.git. Its credential helper asks fj to refresh the login when necessary and reads the matching host entry from the private credential file used by fj 0.7.0. The git tag selects the Git configuration and helper installation. Git obtains its credential from the helper on request. Open Computer Use 0.3.3 is then installed without npm lifecycle scripts under the managed user’s ~/.local prefix. Its skill is then installed for the whole host under /etc/codex/skills from the matching immutable upstream revision. The deployment configures its stdio MCP server in the normal Codex config and the isolated OpenRouter and Abliteration homes. The MCP can inspect and control the logged-in desktop session, so agents must treat its actions as real user input and obtain approval before externally visible or destructive actions.

The API Codex home is ~/.codex-api. It uses the shared managed Codex settings and instructions, requires API-key login, and keeps its credentials and conversation state separate. The codex_api tag selects its configuration. With OPENAI_API_KEY set in your terminal, log in with:

printenv OPENAI_API_KEY | CODEX_HOME="$HOME/.codex-api" codex login --with-api-key

Start it with CODEX_HOME="$HOME/.codex-api" codex. In T3 Code, set CODEX_HOME path to /var/home/simeonwarrenbot/.codex-api and start a new thread. Ansible does not provision or copy API credentials.

OpenRouter is available through its isolated Codex home. Its configuration reads its API key from the desktop keyring entry selected by service=openrouter and application=codex; the key is not stored in the configuration. Repository work uses the repo-owned $codex-migration skill, while the user-level Codex instructions require isolated migration testing and intentional host changes to be mirrored into this role. Existing sessions are not redirected because provider-bound encrypted reasoning history cannot safely migrate in place.

T3 Code can use OpenRouter as a separate Codex provider by setting its CODEX_HOME path to /var/home/simeonwarrenbot/.codex-openrouter. That isolated home defaults to ~deepseek/deepseek-v4-flash-latest and shares no conversation state with the ChatGPT-backed Codex provider. Start a new thread when selecting it.

The OpenRouter no-tools home at ~/.codex-openrouter-no-tools mirrors the OpenRouter provider with every tool surface disabled. It reuses the same keyring lookup and model, sets web_search = "disabled", turns off the shell, unified-exec, image, multi-agent, computer-use, browser, app, plugin, and goal features, and disables the request_user_input tool and the MCP servers. Codex then advertises no tools at all, so the model can only reply with text. This matters beyond tidiness: OpenRouter rejects a request that carries any tools when its routed endpoint supports none, so a single leftover tool fails the turn.

T3 Code launches the Codex app server with -c mcp_servers.t3-code.url=..., so its own MCP server would otherwise reintroduce the MCP resource tools. The no-tools config therefore declares [mcp_servers.t3-code] with enabled = false, which still wins over that launch-time override.

Select it in T3 Code with CODEX_HOME path set to /var/home/simeonwarrenbot/.codex-openrouter-no-tools and start a new thread. The Abliteration and standard OpenRouter homes keep their tools.

Abliteration uses a separate home with CODEX_HOME="$HOME/.codex-abliteration" codex, using the endpoint and model from its Codex integration guide. It retrieves its API token at runtime with secret-tool, selecting service=abliteration and application=codex. Save the token from an interactive terminal in the same user’s desktop keyring:

secret-tool store --label='Abliteration API token for Codex' service abliteration application codex

Enter the token at the hidden prompt. The configuration contains only the lookup command. Provider response and tool-call validation require a saved token. Both providers keep their configuration and conversation state outside the main Codex home; provider profiles in the main home are removed. For T3 Code, set its CODEX_HOME path to /var/home/simeonwarrenbot/.codex-abliteration and start a new thread.

T3_MCP_BEARER_TOKEN authenticates the Codex app-server’s loopback MCP connection to T3 Code at /mcp. Codex excludes it from model-spawned commands so those subprocesses do not inherit the credential.

Codex can reject write_stdin before it reaches a running command when a provider encodes session_id as a whole floating-point number. For example, {"session_id":96230.0} fails with invalid type: floating point, expected i32, while {"session_id":96230} parses successfully. Use the actual ID returned by exec_command; the number above is only an example. Quoting the ID changes it to a string and is also rejected by the integer parser.

As checked on 2026-11-15, upstream tracks this schema/parser mismatch in Codex issue #33452. The installed CLI reported 0.167.0: its tool schema advertises session_id as number, but its terminal resolver uses strict i32 deserialization. The 0.169.0 resolver and argument parser retain that behavior, so upgrading to that release alone does not fix it. This evidence establishes an argument-parsing defect; it does not establish that an XML parser caused the numeric conversion.

Retry the terminal-continuation call with the original session ID encoded as a bare integer, without a decimal point or quotes. If the client keeps converting it to a float or the session is unavailable, inspect the original process and resource state before repeating its shell command. An argument error does not cancel a process already started by exec_command or establish whether its operation succeeded. For Terraform, confirm that the original operation has exited before any authorized stale-lock recovery, then use the owning component’s Terraform workflow. This note records the upstream limitation; the host does not carry a local parser patch.

bazel clean removes the current workspace’s build outputs and resets its local action cache. Adding --expunge removes that workspace’s entire output base and stops its Bazel server. Neither operation purges the shared action disk cache, repository-contents cache, or archive-download cache, so another worktree can continue reusing them.

With the pinned Bazel 8.7.0, repository-contents garbage collection removes entries unused for 14 days after the server has been idle for five minutes, using the defaults of --repo_contents_cache_gc_max_age and --repo_contents_cache_gc_idle_delay. Routine manual cleanup of that cache is unnecessary. The action disk cache uses the managed 700-GiB cap described above. The archive-download cache at /var/cache/bazel/output_user_root/cache/repos/v1 has no automatic cleanup configured and requires separate maintenance to reclaim its space. Gazelle’s ephemeral module download cache is already deleted after each fetch.

Development workstation and secure runnerDevelopment workstation and secure runner

The Forgejo runner and development machine share deployment configuration under infra/dev while retaining separate roles. This service overview shows the runner enabled.

Download the dark WebP diagram.

Repository CI and NAS-backed runner cacheRepository CI and NAS-backed runner cache

The runner uses a guest cache disk backed by the NAS through XCP-ng. The diagram source uses the same light/dark site render as the development-host diagram. //infra/dev:rendered_ci_svg builds both SVG variants.

Download the dark WebP diagram.

T3 Code architecture diagramT3 Code architecture diagram

The diagram source is t3code-architecture.mmd, and the SVG beside this page is rendered from it at build time by //infra/dev:rendered_svg. Edit the .mmd to update the generated image.

Rendering uses the repository’s pinned Mermaid, headless Chrome, and Liberation font inputs. The site preset renders native light/dark SVG variants with bordered caption labels and rounded containers; it does not post-process the generated SVG. The site selects the variant matching its theme menu. The rendered_historical target retains the original appearance used by the historical blog publication.

ComfyUI architecture diagramComfyUI architecture diagram

The HTTP API and CPU generation thread share one ComfyUI process. The public Z-Image target starts that process inside a transient systemd scope; model weights and generated PNGs remain on Host Bot.

The source is docs/comfyui-architecture.mmd. //infra/dev:rendered_comfyui_svg builds the light and dark documentation assets in the same site style as T3 Code.

Follow the playbook guide. The wrapper automatically loads the provisioned cache metadata from Vault when deploying secure1.

1 - Development DNS

This root manages every record in the canonical declarations: secure1, dev1 and dev1’s services. It uses the shared src_infra_dev AppRole, DNS-only provider credentials and one Vault HTTP backend: alwaldend.com/vault1/approles/src_infra_dev/tf_backend/dns.

Validate offline with //infra/dev/dns:tf_tests.fmt_test. Operational entry points are :tf.plan and interactive :tf.apply.

The authorized deployment adopted seven RouterOS and five Cloudflare records from the previous owners, preserving their provider identities, then renamed them in place. Temporary import inputs and backend access targets have been removed. Both previous states are empty and their access identities have been retired. Secure1 now uses 192.168.10.102; its VM is owned by the separate tf_setup root.

The rollout record contains the sanitized handoff evidence. Rollback requires freezing writers and reconciling state ownership through the shared procedure; reverting source alone does not restore the previous ownership.

2 - Development host deployment

One deployment for both development hosts
bazel run //infra/dev/ansible
bazel run //infra/dev/ansible -- --limit secure1.dev.alwaldend.com

One invocation runs both host-specific plays using the src_infra_dev AppRole. Workstation storage and services apply only to dev1; secure1 runs the Forgejo worker and its build prerequisites.

Enable or reconcile only the secure worker and its build prerequisites with:

bazel run //infra/dev/ansible -- --limit secure1.dev.alwaldend.com --tags forgejo_runner

The deployment identity needs its exact-path read grant for the existing worker record before initial deployment. The runner role preserves existing local credentials. Proxy configuration additionally needs an exact read of secrets/alwaldend.com/vault1/approles/src_infra_threexui/http_proxies by src_infra_dev; the controller injects only the selected t3code password. Apply the checked-in Vault policy through its owning workflow before deploying the worker. Proxy credentials remain in the mode-0640 runner configuration; the systemd transport units contain no credentials. Inspect the service with the packaged SSH target:

bazel run //infra/dev:ssh.secure1 -- 'systemctl is-active forgejo-runner.service'

The workstation’s managed known_hosts trusts secure1 certificates through the canonical repository server CA and pins dev1’s public host key. The dev1 key was verified from its local host filesystem and strict SSH handshake during the deployment; host-key checking remains enabled through hostname cutover.

Build :ansible_bin and run :syntax for offline validation.

Terraform publishes the cache device and capacity to the development AppRole’s runner_cache Vault record. The normal wrapper reads it into DEV_RUNNER_CACHE_METADATA; secure1 group variables decode its device and size fields. Apply VM provisioning before deployment so this record exists. No output command or caller-supplied cache arguments are needed. The cache tasks reject missing/invalid metadata, boot positions, capacity mismatches, partitions, incompatible filesystems and mounts used elsewhere before creating ext4 without forcing an overwrite. The filesystem is mounted by UUID at /var/cache/bazel; the worker requires it before startup. Ansible has no XO lookup executable, API request or authentication.

The action cache uses its private disk_cache directory with 700-GiB garbage collection. Bazel output bases remain local. The guest receives no SMB credential or network-filesystem client. Apply storage and the VM disk in the order in the provisioning guide. Verify live encryption, mount identity, write access and a repeated Bazel action only after separately authorized deployment.

To install or reconcile only the pinned standalone fj binary on the current dev1 host, run bazel run //infra/dev/ansible:fj_install. It uses the same packaged playbook’s fj tasks with a local connection and privilege escalation disabled, independently of the Vault/SSH deployment wrapper. -- --list-tasks and -- --syntax-check inspect this selection without installing it.

3 - OpenSpec

3.1 - Specifications

3.1.1 - Architecture diagram

3.1.1.1 - architecture-diagram Specification

Describe the maintained architecture diagram owned by infra/dev. The diagram replaced the T3code page of the former central Drawio document. Infrastructure diagrams now live with their owning projects, with ownerless archived diagrams under infra/archive. The diagram describes checked-in configuration; it is not a live inventory or health check.

The project SHALL keep its architecture diagram as Mermaid source at t3code-architecture.mmd and SHALL render it through the repository’s mermaid_svg rule at //infra/dev:rendered. The project SHALL NOT commit a rendered SVG: //infra/dev:docs_assets SHALL take its srcs from :rendered so the documentation site publishes the build output, and the README SHALL reference that published path. The diagram SHALL use the shared //tools/mermaid:theme.json appearance rather than a package-local copy.

  • WHEN the documentation site is built
  • THEN :docs_assets packages the SVG produced by :rendered
  • AND the README image reference resolves to that packaged file
  • AND no rendered SVG is tracked in the source tree
  • WHEN the render action produces the SVG
  • THEN it uses the repository’s pinned Mermaid, headless Chrome, and font inputs
  • AND it loads no stylesheet, script, or font from a CDN
  • AND the document embeds the pinned handwriting face, so a viewer that loads no webfont still lays the labels out at their measured widths

The diagram SHALL group the remote actor and the shared Ingress in an Internet cluster, and SHALL show the remote actor reaching Ingress over HTTPS with mTLS. It SHALL nest the host-bot cluster inside the local infrastructure cluster, so the local actor, Vault, and the host’s services sit inside dc1.alwaldend.com rather than beside it, and the two nested cluster titles SHALL carry the dc1.alwaldend.com and dev1.dev.alwaldend.com names respectively. It SHALL group Traefik, T3 Code, and Codex in the host-bot cluster, SHALL show the local actor reaching Traefik directly over HTTPS, Ingress forwarding to Traefik over Wireguard, and Traefik obtaining ACME certificates from Vault. It SHALL show T3 Code reaching GitHub for source and Codex reaching OpenAI and OpenRouter for inference, with those providers in a second Internet cluster because they are off-host. Both actors SHALL be labelled Actor. External service nodes SHALL carry their own hostnames.

Sources: diagram source and project documentation.

  • WHEN a reader opens the architecture section of the project README
  • THEN it displays the maintained diagram showing the ingress path, the in-host services, and the two external service dependencies

The diagram SHALL keep node labels short by naming each host once, in the cluster title that owns it, and SHALL NOT restate a hostname in both a cluster title and the nodes it contains. Node labels SHALL NOT wrap mid-token. The diagram SHALL keep subgraph titles clear of node outlines and edges: Mermaid centers a cluster title on the cluster’s top border, so a title that wraps extends into the cluster’s node area. The diagram source SHALL describe topology only and SHALL let the shared theme own appearance and spacing; a per-diagram directive is warranted only for a specific geometry need the theme cannot express.

Actors SHALL render as an ordinary rounded node carrying the shared theme’s hand-drawn stick figure beside the label, rather than as a bare glyph, a pill outline, or a Mermaid person shape. Mermaid’s person shape draws the head over the body box, so it is not used.

Sources: diagram source and theme.

  • WHEN the renderer draws the diagram
  • THEN every node outline is clear of headings, edges, and other nodes
  • AND no label is truncated or broken inside a hostname

Diagram appearance SHALL come from //tools/mermaid:theme.json rather than package-local copies or per-diagram appearance overrides, so node rounding and edge-label plates are consistent across every rendered diagram. The theme SHALL keep shapes semantic, so a rounded bracket node renders rounded while a square bracket node stays square; rounding SHALL NOT be forced on every node. The theme SHALL box edge labels by styling the label text, because Mermaid emits an empty label plate for unlabelled edges and styling that plate directly would draw a stray box.

Source: theme.

  • WHEN any diagram renders through mermaid_svg or the mmdc target
  • THEN a rounded node renders rounded and a square node stays square
  • AND its edge labels use bordered plates
  • WHEN the renderer draws an edge that carries a label
  • THEN the label renders on a bordered plate rather than directly on the edge line
  • AND an edge without a label draws no plate

3.1.2 - Bazel resource scheduling

3.1.2.1 - bazel-resource-scheduling Specification

Reduce resource contention from independent Bazel builds on host-bot through conservative per-invocation scheduling defaults.

The managed user Bazel configuration SHALL set four concurrent jobs and a local CPU scheduling budget of HOST_CPUS*0.25 for builds and tests. These defaults SHALL NOT be described as an aggregate host-wide resource cap.

  • WHEN a new Bazel build or test invocation loads the managed user configuration without overriding its resource settings
  • THEN it receives --jobs=4 and --local_resources=cpu=HOST_CPUS*0.25
  • WHEN separate Bazel servers build in multiple workspaces
  • THEN each receives its own scheduling budget, without sharing an aggregate limit

3.1.3 - Infra forgejo runner

3.1.3.1 - Secure runner infrastructure specification

Describe the host-only secure1 baseline under infra/dev. The checked-in source does not install or register an Actions worker and does not establish live state.

The owner SHALL NOT declare runner1/VM 1200, its old DNS entry or its inventory entry. Secure1 SHALL retain its host-only configuration. Its DNS SHALL belong to the common dns root without a Proxmox provider or login.

  • WHEN the current source is inspected
  • THEN no legacy Proxmox allocation or separate tf_setup root remains
  • AND secure1 DNS and host configuration remain available

The secure1 play SHALL apply only the shared host role to the secure1 inventory group. It SHALL NOT require runner registration credentials, an Actions instance URL or a runner disk setting.

  • WHEN the current playbook is inspected
  • THEN only the shared host role is enabled
  • AND runner installation and registration remain outside this baseline

3.1.4 - Openspec cli

3.1.4.1 - openspec-cli Specification

Keep Host Bot’s user-facing OpenSpec CLI installation reproducible through its checked-in Ansible deployment.

Host Bot’s Ansible deployment SHALL install @fission-ai/openspec at an exact inventory-configured version under the managed user’s ~/.local prefix, with Node.js and npm provisioned through the existing host package backend. Repeated deployment with the same version SHALL preserve the installed version.

  • WHEN the Host Bot deployment runs with OpenSpec absent
  • THEN it installs the configured version and exposes ~/.local/bin/openspec to the managed user
  • WHEN the configured OpenSpec version is already installed
  • THEN the npm task leaves the package unchanged

3.1.5 - Owned dns

3.1.5.1 - Development DNS specification

Define one DNS deployment for both development hosts and dev1’s services.

The dns root SHALL consume the complete canonical dnsconfig.json through the shared DNS module, preserving all declared views. It SHALL use src_infra_dev and the alwaldend.com/vault1/approles/src_infra_dev/tf_backend/dns backend. There SHALL be no separate runner DNS root or record filter.

  • WHEN the DNS root is evaluated
  • THEN secure1, dev1 and dev1’s service records belong to the same root
  • AND provider credentials are injected through the shared owner identity

The owner SHALL document the pending transfer from both legacy states and preserve legacy access until separately authorized reconciliation is complete. Adoption SHALL bind existing DNS records without destructive recreation or concurrent ownership. Unrelated legacy resources SHALL NOT be transferred or destroyed by implication. After adoption, unchanged declarations SHALL produce a no-change plan, and temporary import configuration SHALL be removed.

  • WHEN a maintainer inspects the merged root
  • THEN the legacy backend locations and logical-key changes are documented
  • AND source validation makes no claim of live ownership or deployment

The package SHALL expose a format check and package both DNS provider binaries, the canonical declaration and shared module without live authentication.

  • WHEN offline checks run
  • THEN they validate packaged source without contacting Vault or DNS providers

3.1.6 - Power profile

3.1.6.1 - power-profile Specification

Keep the host’s selected power profile reproducible through its owning Ansible configuration while retaining an explicit desired profile.

The host’s Ansible configuration SHALL declare balanced as its desired Tuned profile. Deployment SHALL enable and start the existing Tuned service and persist the declared profile with manual selection. Deployment SHALL avoid reselecting an already-correct profile in manual mode and SHALL report unexpected profile-query failures.

  • WHEN the active profile differs from the declared profile
  • THEN deployment selects and persists the declared profile
  • WHEN the active profile matches but selection is automatic
  • THEN deployment persists the declared profile with manual selection
  • WHEN Tuned reports that no profile is active
  • THEN deployment selects the declared profile instead of failing on that expected query result
  • WHEN the active profile matches and selection is manual
  • THEN deployment does not repeat the profile-selection command
  • WHEN querying the active profile or selection mode fails unexpectedly
  • THEN deployment reports the failure instead of concealing it

4 - Secure1 provisioning

This root owns secure1’s Xen Orchestra VM and uses the development AppRole’s own resource set and Vault backend at src_infra_dev/tf_backend/tf_setup. Its 500 GiB boot disk, 8 CPUs and 16 GiB RAM match the prior allocation. A separate 800-GiB cache disk uses the Runner cache NAS-backed storage repository. The NAS AppRole project owns the namespace and cache in separate state using NAS operator authentication. This VM root has no TrueNAS provider or NAS credentials; it consumes the provisioned XO repository and owns the disk attachment. Appending the disk uses the pinned provider’s in-place update support. Hostname, address and deterministic MAC derive from the canonical development DNS declaration. Shared cloud-init installs the Ansible user and guest tools; Ansible then configures the runner and its UUID-mounted cache filesystem.

Bootstrap the development OIDC identity and apply its resource-set assignment through infra/xcp_ng before running :tf.apply. The XO session is scoped to this owner and revoked at exit; no shared administrator token is injected. For an explicitly authorized recreation, use :tf.apply -- -replace=xenorchestra_vm.secure1 and review its interactive replacement plan before confirming.

The existing private-key injector seeds the initial Ed25519 host key. Cloud-init is treated as creation-only input, so subsequent invocations do not rotate the VM key. Its private material stays in the Vault-protected Terraform state and VM bootstrap configuration; temporary injector files are removed at shutdown. The public ssh_host_public_key output establishes strict controller trust before Ansible signs the permanent host certificate. No SSH checks are disabled.

After separate authorization, apply Vault groups/grants, then the complete //infra/nas/truenas:tf.apply root for accounts and shared settings. Apply //infra/nas/approles/src_infra_dev:tf.apply for its namespace and runner cache dataset/share/ACLs. Then apply //infra/xcp_ng/tf:tf.apply to create and delegate the storage repository, and //infra/dev/tf_setup:tf.apply to attach the cache disk. Each stage uses its own state.

For the initial disk attachment, Xen Orchestra provider 0.41.0 leaves the new disk’s position null during planning. Initialize the VM disk first, then apply the complete root to publish its observed device:

bazel run //infra/dev/tf_setup:tf.apply -- -target=xenorchestra_vm.secure1
bazel run //infra/dev/tf_setup:tf.apply

Review both interactive plans. Subsequent complete applies use the existing attachment position and need no target selection.

The complete VM apply publishes the attached cache device and capacity to secrets/alwaldend.com/vault1/approles/src_infra_dev/runner_cache, using the existing development AppRole permissions. Terraform owns this generated record; do not edit its values manually. The normal Ansible wrapper loads it from Vault, so deployment requires no Terraform output command or extra-vars handoff. See the playbook guide. The rollout record records the attached disk, saved metadata and no-change full plan.