@ours.network/install 1.2.1-nightly.15 → 1.2.1-nightly.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,178 @@
1
+ # Set up Ours with one client connection
2
+
3
+ Fleet, the `ours` CLI and MCP clients share `~/.ours-client/profile.json`.
4
+ Set the server address once. The address is the HTTP gateway: clients append
5
+ `/daemon`, `/cowork`, `/messenger` or `/tg-connector` as needed. They do not
6
+ connect to server Unix sockets, discover server state directories, or try port
7
+ 3050 after a connection failure. Fleet's local supervisor/harness sockets still
8
+ control local processes; they do not carry server management requests.
9
+
10
+ ## Release availability
11
+
12
+ The nightly manifest selects one published dependency graph: SDK
13
+ `3.8.1-nightly.14`, CLI `2.8.1-nightly.12`, daemon `3.8.1-nightly.6`,
14
+ Fleet `1.2.0-nightly.17`, MCP/Codex/Claude Code `1.2.0-nightly.9`,
15
+ Telegram `1.0.1-nightly.8`, Messenger `1.0.31-nightly.8`, and Cowork
16
+ `1.3.3-nightly.20260926.ceab465`. Exact archive checksums are retained in
17
+ `releases/nightly.json`; the host CLI uses the same SDK/CLI pair.
18
+
19
+ The coordinated installer release must include these pins before using the
20
+ commands below. Its release gate verifies the actual registry and vendored
21
+ package graphs, client acquisition/retry, and rejection of dependency drift.
22
+ These checks do not deploy or certify an existing server installation.
23
+
24
+ The daemon includes ADAPT SDK/native `0.12.1` and the shutdown socket-reset
25
+ correction from [SDK PR70](https://github.com/adapt-toolkit/ours-sdk/pull/70).
26
+ Client profile commands do not control server processes.
27
+
28
+ ## Fresh full-stack setup on localhost:4050
29
+
30
+ For an agent asked to “put the daemon on localhost port 4050”, use **4050 as the
31
+ public gateway port**. The daemon's internal container port stays 3050. Docker
32
+ publishes only the gateway. Run as the user who will run Fleet and the harnesses.
33
+ Use Node.js 22+ and a working Docker Compose installation.
34
+
35
+ ```sh
36
+ npm install -g @ours.network/install@nightly
37
+ ours-install all install --mode docker \
38
+ --state-dir "$HOME/ours-server" --identity-name "Your Name" \
39
+ --port 4050 --integrations codex,claude-code
40
+ ```
41
+
42
+ The installer starts the server, retains or creates its Human identity, issues a
43
+ separate client credential, and imports the connection into `~/.ours-client`.
44
+ For Fleet, add `fleet` to `--integrations` and provide
45
+ `--fleet-settings /absolute/path/fleet-settings.json`; see the Fleet settings
46
+ example in [assets/fleet-settings.example.json](assets/fleet-settings.example.json).
47
+ The example selects Codex for all three jobs; review its model and subscription
48
+ against the installed Fleet catalog before use. The installer prepares Fleet but leaves it
49
+ stopped for review. Use `--dry-run` first to inspect a complete preset.
50
+
51
+ Do not set `OURS_PORT=4050` in a client shell, Fleet role, or user service. The
52
+ single profile contains `serverUrl: "http://127.0.0.1:4050"`, with daemon requests
53
+ at `http://127.0.0.1:4050/daemon` and Cowork management at
54
+ `http://127.0.0.1:4050/cowork/management/rpc`.
55
+
56
+ ## Existing or remote server
57
+
58
+ An older Docker installation needs its gateway enabled on the **server host**:
59
+
60
+ ```sh
61
+ ours-install server gateway-enable --state-dir "$HOME/ours-server"
62
+ ```
63
+
64
+ This is a server migration that may restart its services; perform it in an
65
+ approved maintenance window. Do not change identities or reinstall a populated
66
+ server to change a client address. `--port` on an existing installation cannot
67
+ silently move the retained public port.
68
+
69
+ For a remote host, expose the gateway through an authenticated HTTPS entrypoint
70
+ and select that URL when installing the server, for example
71
+ `--server-url https://ours.example.net/base`. The reverse proxy must preserve the
72
+ base prefix, streaming responses and WebSocket upgrades. Do not expose the
73
+ individual service ports.
74
+
75
+ Obtain an issued credential using `ours-install server access-issue --state-dir
76
+ /absolute/server/root --output /private/credential` on the server. Transfer it
77
+ privately to the client user. Never print the credential or put it into command
78
+ arguments, source control, chat, or a service unit. Use a private directory
79
+ (mode 0700) and credential/profile files (mode 0600).
80
+
81
+ Prepare a client profile (the UUID must be the selected server's actual instance):
82
+
83
+ ```json
84
+ {
85
+ "serverUrl": "https://ours.example.net/base",
86
+ "endpoint": "https://ours.example.net/base/daemon",
87
+ "expectedInstanceId": "11111111-2222-3333-4444-555555555555",
88
+ "credentialPath": "/absolute/private/credential"
89
+ }
90
+ ```
91
+
92
+ `endpoint` is optional for the client resolver; when present it must exactly match
93
+ `serverUrl + "/daemon"` after trailing-slash normalization. Older endpoint-only
94
+ profiles must be migrated explicitly: supply the actual gateway URL, not a
95
+ guessed address derived from a direct daemon port.
96
+
97
+ ```sh
98
+ ours-install client --config /absolute/private/profile.json \
99
+ --integrations codex,claude-code
100
+ ```
101
+
102
+ This imports the profile and issued credential into `~/.ours-client`. All new
103
+ clients use that default without an environment export. A conflicting existing
104
+ server instance is refused and retained; do not delete it to bypass that check.
105
+ To change only the gateway address of the same server, prepare a private profile
106
+ with the new `serverUrl` and matching `/daemon` endpoint, keep its actual
107
+ `expectedInstanceId`, and run the same `ours-install client --config ...` command.
108
+ The installer validates authenticated access before importing the new address;
109
+ it preserves imported Fleet settings. New processes use the new address. A
110
+ failed verification leaves the old selection intact. A different server UUID
111
+ requires a separately planned migration, not an address edit.
112
+
113
+ Changing the retained Docker public listening port in place is not currently
114
+ supported. `--port 4050` above is for a fresh server. For an existing server,
115
+ configure an administered reverse proxy to its gateway at the desired address,
116
+ then use the same-instance client address procedure. Do not edit installation
117
+ state or recreate containers with new identities to work around this limitation.
118
+ Native server installations currently need a separately administered gateway;
119
+ the integrated gateway setup above uses Docker (or supported Podman Compose).
120
+
121
+ ## Fleet and systemd
122
+
123
+ For a new Fleet setup, save the linked JSON example as an absolute private file
124
+ and run as the same user after importing the client profile:
125
+
126
+ ```sh
127
+ ours-fleet init --settings /absolute/path/fleet-settings.json
128
+ ```
129
+
130
+ If the installer already imported Fleet settings, reuse them explicitly:
131
+
132
+ ```sh
133
+ ours-fleet init --settings "$HOME/.ours-client/fleet-settings.json"
134
+ ```
135
+
136
+ These commands work without a terminal. A bare `ours-fleet init` is interactive.
137
+ The installer also accepts `--fleet-settings /absolute/path/fleet-settings.json`
138
+ and passes it to this same noninteractive path. Generated systemd and launchd services persist only the common
139
+ profile path, not a service URL, port, or token. Lingering user services therefore
140
+ use the same selection as CLI and MCP after logout/reboot. Detached Fleet task
141
+ workers inherit the common profile and do not inherit legacy service selectors.
142
+
143
+ `OURS_CONFIG` is an explicit override for the **whole client profile**. Use it only
144
+ when all relevant clients intentionally share that same alternate file. It is
145
+ not a per-service address override. For the normal setup, leave it unset.
146
+
147
+ When migrating existing units, inspect `systemctl --user cat 'ours-fleet-agent@.service'`
148
+ and any per-role drop-ins. Remove stale `OURS_PORT`, `OURS_STATE_DIR`,
149
+ `OURS_API_TOKEN`, `OURS_DAEMON_ID` and Cowork-local overrides from their owning
150
+ configuration. Regenerate Fleet units with `ours-fleet init --settings /absolute/path/fleet-settings.json`
151
+ in the intended profile environment, then restart affected client roles only after approval.
152
+ Already-running clients retain their current connection until restarted; editing
153
+ a profile does not rebind running identities. Do not restart the server for a
154
+ client-only profile correction.
155
+
156
+ ## Verify and diagnose
157
+
158
+ ```sh
159
+ curl --fail http://127.0.0.1:4050/.well-known/ours
160
+ ours config show --json
161
+ ours identity list --json
162
+ ours-fleet doctor
163
+ ours-fleet room list
164
+ ```
165
+
166
+ Discovery must advertise the gateway and expected instance. `ours config show`
167
+ shows only connection metadata and a credential path, never the token. For a
168
+ remote server use its exact prefix in the discovery URL. Test both daemon
169
+ identity access and Cowork room listing: one succeeding does not prove the other.
170
+ Check `command -v ours-mcp` and `ours-mcp version` as well as the MCP binary launched
171
+ by the harness; Fleet can bundle a different MCP version than the global binary.
172
+
173
+ Missing/unsafe profiles, mismatched instances, rejected credentials, HTTP errors
174
+ and timeouts fail on the selected gateway. Fix that selection or service; do not
175
+ add localhost/socket fallbacks. If a task reports `room_probe_unavailable`, check
176
+ Cowork through the gateway. `control_unavailable` means Fleet could not query its
177
+ local role supervisor after its room checks; inspect the role's supervisor and
178
+ control channel separately. An active room alone does not establish agent readiness.
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ See [one-connection setup, localhost:4050 and systemd migration](GATEWAY_SETUP.md) for the gateway-only client workflow.
2
+
1
3
  # @ours.network/install — one installer for the whole stack
2
4
 
3
5
  Requires Node.js 22+ and npm. Install the selected release channel:
@@ -10,8 +12,8 @@ ours-install
10
12
  With no arguments, the wizard explains each step and offers keyboard choices.
11
13
  Use arrow keys and Enter to choose, and Space to select integrations. Recommended
12
14
  settings keep advanced ports and package overrides out of the usual flow. Text
13
- input is used for your name and explicitly customized paths or ports. Linux x64
14
- recommends native mode; macOS and Windows recommend Docker. On Windows run the
15
+ input is used for your name and explicitly customized paths or ports. Docker is recommended for the integrated full-stack gateway on every platform;
16
+ native packages remain available for server-only setup. On Windows run the
15
17
  installer inside WSL with Docker Desktop integration. This recommendation concerns
16
18
  packaging and isolation, not a guarantee that emulated x64 is faster on ARM Macs.
17
19
 
@@ -68,12 +70,15 @@ it. They exclude the daemon and its native database/ADAPT dependencies. Fleet
68
70
  runs beside the harnesses on the client machine and calls the daemon HTTP API.
69
71
  Client commands report an unavailable server and never start one automatically.
70
72
 
71
- The checked-in source policy and packed installer select the same exact published
72
- nightly release set, including SDK `3.8.1-nightly.10`, CLI `2.8.1-nightly.8`, and
73
- daemon `3.8.1-nightly.2`. The isolated host CLI pair uses these released client
74
- artifacts. `releases/nightly.json` binds the gateway-capable consumers and daemon
75
- to verified SHA512 integrities. Mixed or unselected nested ours versions remain
76
- rejected. An explicit `--sources` override remains available for development.
73
+ The checked-in source policy and packed installer retain the existing server
74
+ release set (SDK `3.8.1-nightly.11`, CLI `2.8.1-nightly.9`, daemon
75
+ `3.8.1-nightly.3`). The isolated host CLI uses published SDK
76
+ `3.8.1-nightly.13` and CLI `2.8.1-nightly.11`, including the shared gateway
77
+ profile resolver. `releases/nightly.json` binds both selections to verified
78
+ SHA512 integrities. Gateway-only Fleet/MCP release adoption is still pending;
79
+ see [GATEWAY_SETUP.md](GATEWAY_SETUP.md). Mixed or unselected nested ours
80
+ versions remain rejected within each selected graph. An explicit `--sources`
81
+ override remains available for development.
77
82
 
78
83
  ## Migrate an existing global installation
79
84
 
@@ -232,7 +237,8 @@ an existing override and does not edit shell configuration or running sessions.
232
237
  Repeat with `ours-install client install` to reuse imported inputs and installed
233
238
  package records. Existing settings and Fleet-generated files are preserved. A
234
239
  prepared profile for the same endpoint/instance may supply a valid replacement
235
- issued token; another server is refused without changing the default. Invalid
240
+ issued token; a different server instance is refused without changing the default. A verified
241
+ new gateway address for the same instance updates the shared profile for new clients. Invalid
236
242
  server access is rejected before import. An acquisition or component failure
237
243
  reports incomplete setup and keeps the saved configuration for retry. Selected
238
244
  native integrations whose executable is unavailable are incomplete, not installed.
@@ -243,7 +249,7 @@ Interactive no-argument installation asks for package/Docker server mode, a
243
249
  prepared client profile, or `client`. Client setup offers the saved server when
244
250
  present. On first setup it asks for the server HTTP endpoint, issued-token file,
245
251
  source manifest and integration choices, obtains the instance UUID from
246
- `/selection`, displays it, then checks authenticated daemon API access before
252
+ `/.well-known/ours` at the gateway, displays it, then checks authenticated daemon API access before
247
253
  saving anything. No UUID must be entered manually. The 2.0 HTTP flow assumes the
248
254
  approved trusted same-host deployment; selection metadata is not cryptographic
249
255
  server authentication. Fleet collects missing setup answers through its own wizard.
@@ -443,3 +449,74 @@ separately for Compose port isolation with a client container. That routing test
443
449
  uses echo upstreams; the real-service test covers Fleet room operations, browser
444
450
  paths, external authentication and Messenger WebSocket access. Neither test is
445
451
  cross-platform Docker Desktop qualification or a live deployment test.
452
+
453
+ ### Rootless Podman (qualification in progress)
454
+
455
+ Container installations can select a local Linux rootless backend explicitly:
456
+
457
+ ```sh
458
+ export PODMAN_COMPOSE_PROVIDER=/absolute/path/to/docker-compose
459
+ ours-install server install --mode docker --container-engine podman \
460
+ --state-dir "$HOME/.ours-server-podman" --identity-name "Your Name"
461
+ ```
462
+
463
+ `mode: docker` remains the legacy container-layout name. `containerEngine` and
464
+ `containerBinding` retain Podman, the invoking UID, native storage paths, socket
465
+ and standalone Compose provider, plus the UID/GID mapping fingerprint. Records without `containerEngine` continue to
466
+ use Docker. Package/client installs reject the engine option. Existing records
467
+ cannot change engines through a flag or ambient connection change; automatic
468
+ Docker-to-Podman data migration is not provided. Legacy local-daemon migration
469
+ (`--migrate-from`) to Podman is also unsupported and is refused before source
470
+ shutdown or managed CLI publication, including migration retries. Use a fresh
471
+ Podman installation, or migrate the legacy daemon with Docker/packages.
472
+
473
+ Podman uses its native build command, with the same resolved Compose build
474
+ context, target, architecture, arguments and secret references, followed by
475
+ Compose `--no-build` startup. It does not require the Docker CLI or daemon.
476
+ The selected standalone Docker Compose provider must be version 2.35 or newer;
477
+ version checks do not replace the behavioral capability probe. `podman-compose`
478
+ is not an interchangeable provider for this implementation. Secrets sourced
479
+ from environment variables use Podman's native build-secret mechanism, never
480
+ build arguments or temporary copies.
481
+
482
+ Prerequisites include a working rootless API socket, sufficient subordinate
483
+ UID/GID mappings, and native volume-subpath isolation. Before setup/start, an
484
+ isolated disposable project tests Compose `!reset`, health waiting, JSON status,
485
+ service DNS, private UID-1000 storage and subpath isolation. A failed check stops
486
+ installation rather than substituting the whole volume. Existing volumes must
487
+ have this installation's project and volume labels. Docker contexts, unrelated
488
+ containers and host directory ownership are not changed.
489
+
490
+ Server boot recovery requires an enabled user `podman.socket`, an enabled
491
+ `podman-restart.service` using `--filter should-start-on-boot=true`, and user
492
+ linger. The standard user-service environment/default socket must select the
493
+ same storage; custom XDG paths and sockets are rejected for server startup.
494
+ The installer diagnoses missing prerequisites and never runs hidden sudo or
495
+ rewrites the vendor unit. Long-running Podman services get `unless-stopped`;
496
+ administration jobs do not. Stop/status remain available when boot prerequisites
497
+ are missing, provided the retained backend is accessible. Runtime-only test
498
+ harnesses may select a separate local socket with `OURS_PODMAN_SOCKET`; its
499
+ storage must match native Podman and the selection cannot change afterward.
500
+
501
+ Gateway images read and validate IPv4/IPv6 nameservers from their container at
502
+ startup. Only the resolver placeholder is replaced; nginx variables and existing
503
+ authentication/routes remain intact. UID 101, read-only rootfs, dropped
504
+ capabilities and tmpfs are retained. Setup and start verify authenticated
505
+ upstream requests in addition to liveness.
506
+
507
+ This change is **not yet a fully qualified server-support release**. Debian's
508
+ Podman 5.4.2 with Compose 5.5.1 failed subpath isolation and has incompatible boot
509
+ recovery semantics. Podman 6.1.2 passed the isolated capability probe on native
510
+ Linux amd64; production and prerelease-source builds, service lifecycle, rebuild and scoped maintenance also passed. See [validation evidence](ROOTLESS_PODMAN_VALIDATION.md). The full public installer/maintenance matrix,
511
+ SELinux Enforcing, logout/reboot, explicit-stop recovery, and Docker regression
512
+ matrix must all be recorded before declaring a supported engine/provider pair.
513
+ The supplied ARM VM results are historical feasibility evidence, not this
514
+ release's qualification.
515
+
516
+ Opt-in gateway fixture (isolated project, only owned resources removed):
517
+
518
+ ```sh
519
+ OURS_TEST_DOCKER=1 node --test test/gateway-docker.test.mjs
520
+ PODMAN_COMPOSE_PROVIDER=/absolute/path/to/docker-compose \
521
+ OURS_TEST_PODMAN=1 node --test test/gateway-docker.test.mjs
522
+ ```
@@ -0,0 +1,210 @@
1
+ # Rootless Podman integration validation
2
+
3
+ Status: implementation under review; **not a qualified server-support release**.
4
+ Validation date: 2026-09-25. No production deployment, migration, restart or merge.
5
+
6
+ ## Scope and source baseline
7
+
8
+ The supplied `rootless-podman-support.zip` was inspected as design/evidence,
9
+ not executable authority. SHA-256:
10
+ `0eafc865566be71bcb87d432a98384da47e6d153e4395d9cfe721b4def168e96`.
11
+ It contains six substantive Markdown documents and no implementation patches.
12
+ Its historical ARM VM observations do not establish current Linux amd64 support.
13
+
14
+ All referenced repositories were fetched into isolated checkouts at these
15
+ `prerelease` commits. SDK, CLI and daemon share the SDK repository; the MCP
16
+ repository also supplies Codex and Claude Code integrations.
17
+
18
+ | Repository | Commit |
19
+ | --- | --- |
20
+ | ours-network | a9ae420d2878a304911e94d53d0cdd2cff06f299 |
21
+ | ours-sdk | 737e1028cabadcbb8837548923c7a92b49e9e575 |
22
+ | ours-cowork | 2d2ff8979756678068b8f6b85c619f6d811010ff |
23
+ | ours-messenger-server | 5e2ca2be5789a5300fcbed08a0dd26b9b59780ef |
24
+ | ours-tg-connector | 21f4bf92b52e1d61261987f298bcc76248cddb78 |
25
+ | ours-fleet | 717f6d8a09e6173b9b8a017fc5efb08d71927524 |
26
+ | ours-mcp | ce6e3e0298b83aec0257c4ae3773d785d8b38889 |
27
+
28
+ Runtime launch/build/maintenance and gateway packaging belong to ours-network;
29
+ no source changes were required in the other repositories. Host Fleet and harness
30
+ integrations continue using their existing client paths. Their unrelated feature
31
+ suites are not implied by the installer results below.
32
+
33
+ ## Corrections established by testing
34
+
35
+ - This prerelease already checks authenticated gateway readiness during install.
36
+ The added lifecycle check covers full starts and preserves intentionally stopped
37
+ applications during partial runtime restoration.
38
+ - Podman 5.4.2 with Compose 5.5.1 exposes the whole named volume instead of the
39
+ requested subpath. Its vendor restart unit also lacks `should-start-on-boot`.
40
+ The new preflight rejects this combination rather than weakening isolation.
41
+ - Local and API Podman must select the same rootless store. Compose is passed an
42
+ explicit Unix socket; native builds use the retained root/runroot/driver.
43
+ Both report the same retained UID/GID mapping fingerprint.
44
+ - Podman image IDs need Docker-compatible `sha256:` normalization at the adapter
45
+ boundary. Missing-object detection must not reinterpret inspect error 125 as
46
+ permission to create or replace an object.
47
+ - Compose excludes maintenance profiles from ordinary configuration output and
48
+ implicitly builds absent administration images. Native build resolution enables
49
+ all profiles and builds the selected missing administration image first.
50
+ - Fresh schema-2 installations omit embedded `networkMcp`; the shared rebuild
51
+ validator previously required it. Validation now accepts absence and still
52
+ rejects malformed or conflicting embedded configuration, while retaining
53
+ standalone-profile, credential, provenance and strict legacy conversion checks.
54
+ - Gateway COPY destinations must remain accessible to UID 101 on both engines.
55
+ Runtime DNS comes from validated container nameservers, retaining nginx variables.
56
+
57
+ ## Observed environment and results
58
+
59
+ Native Debian 13 Linux amd64, unprivileged UID 1000, subordinate UID/GID ranges,
60
+ SELinux disabled, standalone Docker Compose 5.5.1. Podman 6.1.2 was built from
61
+ upstream tag commit `04f3aa430e6df81bea059978bc5bafbc846ba3e7` with systemd and
62
+ seccomp support, using netavark/aardvark-dns 2.1.0. A separate task store and API
63
+ socket isolated all Podman tests from the installed 5.4.2 default backend.
64
+
65
+ - Behavioral preflight: PASS on 6.1.2, including UID-1000 private storage,
66
+ volume subpath isolation, DNS, Compose reset/wait/JSON status.
67
+ - Native synthetic secret/cache build: PASS; secret absent from command arguments,
68
+ build output, image inspect/history and final filesystem.
69
+ - Production runtime: native build of the shipped exact package/integrity policy,
70
+ runtime metadata and gateway artifact capability qualification PASS.
71
+ - Development runtime: native build from all exact prerelease commits above,
72
+ including private SDK/submodule acquisition through an environment build secret,
73
+ native compilation and gateway capability qualification PASS. The source-built
74
+ five-service lifecycle and authenticated gateway also PASS.
75
+ - Real runtime: prepare, access-init/access-issue, test Human identity, all five
76
+ services, authenticated gateway readiness, stop/status/start PASS.
77
+ - Maintenance: server backup/restore and Cowork backup/reset/restore PASS; all
78
+ services subsequently restarted with authenticated gateway readiness.
79
+ - Rebuild: the initial fresh-layout validator defect was reproduced and fixed;
80
+ retained transition recovery PASS after rebuilding the maintenance helper. A
81
+ second complete rebuild using final code and the real installation lock PASS,
82
+ including offline state validation and authenticated gateway readiness.
83
+ - Gateway runtime: Docker 2/2 and Podman 2/2 PASS for root/nested paths,
84
+ authentication, WebSockets and changed backend IPs. Combined Podman native
85
+ capability/build-secret and gateway tests: 4/4 PASS.
86
+ - Installer suite: 756 passed, 0 failed, 11 opt-in tests skipped; subsequent
87
+ adapter-only addition separately passed (13 adapter tests).
88
+ - Independent Critic reruns confirmed the behavioral/native-secret tests and
89
+ adapter regressions. Final review is recorded separately from these observations.
90
+
91
+ The runtime harness called actual installer effects against owned resources.
92
+ It deliberately did not claim a complete public install: the isolated custom
93
+ store/socket cannot satisfy standard vendor boot-unit selection, and the public
94
+ preflight rejects that configuration. A harness backup label collision was
95
+ correctly rejected; separate per-domain labels were used afterward.
96
+
97
+ ## Reproduction and remaining release gates
98
+
99
+ From `packages/installer`, with installed package dependencies:
100
+
101
+ ```sh
102
+ umask 022
103
+ node --test
104
+ OURS_TEST_DOCKER=1 node --test test/gateway-docker.test.mjs
105
+ PODMAN_COMPOSE_PROVIDER=/absolute/path/to/docker-compose \
106
+ OURS_TEST_PODMAN=1 node --test test/podman-integration.test.mjs test/gateway-docker.test.mjs
107
+ ```
108
+
109
+ The gateway fixture covers root and nested base paths, discovery, service routing,
110
+ forged-host denial, Telegram authentication, WebSocket upgrade and backend IP
111
+ replacement without restarting nginx. Test projects and their resources are
112
+ uniquely named and cleaned up. The Podman tests require a functional matching API
113
+ socket; `OURS_PODMAN_SOCKET` can select an isolated harness socket.
114
+
115
+ Before advertising a supported engine/provider pair, run the full public installer
116
+ and update/rebuild/legacy-conversion matrix on a disposable native Linux amd64
117
+ host with SELinux Enforcing, standard vendor user units, logout/linger, reboot,
118
+ unexpected exit and explicit-stop behavior. Include Docker parity for the full
119
+ maintenance matrix. This shared host is not a safe reboot/SELinux test target.
120
+ No fallback to privileged containers, whole-volume service mounts, host chown,
121
+ keep-id, or globally disabled SELinux is permitted.
122
+
123
+ ### Disposable VM handoff
124
+
125
+ Provision a dedicated x86_64 VM (at least 4 vCPU, 8 GiB RAM, 40 GiB free disk)
126
+ whose distribution supplies Podman 6.1.2, compatible netavark/aardvark, subordinate
127
+ UID/GID support and vendor `podman-restart.service` with
128
+ `--filter should-start-on-boot=true`. Use an unprivileged test account, cgroup v2,
129
+ standard HOME/XDG paths, SELinux **Enforcing**, Node.js 22+, npm, Python 3.9+
130
+ with `os.pidfd_open`/`signal.pidfd_send_signal` support, and standalone
131
+ Docker Compose 5.5.1. The Podman pass must have no Docker CLI/daemon dependency.
132
+ The VM owner must explicitly authorize reboots and terminate all sessions for the
133
+ logout test. These commands are for that disposable VM, not the shared host.
134
+
135
+ After checking out this PR and preparing installer assets/dependencies, run as the
136
+ test user (administrator provisions subordinate ranges and linger beforehand):
137
+
138
+ ```sh
139
+ uname -m # x86_64
140
+ getenforce # Enforcing
141
+ podman version # native client 6.1.2
142
+ export PODMAN_COMPOSE_PROVIDER=/absolute/path/to/docker-compose
143
+ unset OURS_PODMAN_SOCKET DOCKER_HOST DOCKER_CONTEXT CONTAINER_HOST CONTAINER_CONNECTION
144
+ unset CONTAINERS_CONF CONTAINERS_STORAGE_CONF PODMAN_USERNS
145
+ systemctl --user enable --now podman.socket
146
+ systemctl --user enable podman-restart.service
147
+ systemctl --user show podman-restart.service --property=ExecStart
148
+ loginctl show-user "$(id -u)" --property=Linger # yes
149
+ export PODMAN_TEST_ROOT="$HOME/ours-podman-qualification"
150
+ node install.mjs server install --mode docker --container-engine podman \
151
+ --state-dir "$PODMAN_TEST_ROOT" --identity-name RootlessQualification
152
+ node install.mjs server status --state-dir "$PODMAN_TEST_ROOT"
153
+ node install.mjs server backup server before-rebuild --state-dir "$PODMAN_TEST_ROOT"
154
+ node install.mjs server rebuild --state-dir "$PODMAN_TEST_ROOT"
155
+ node install.mjs server restore server before-rebuild --state-dir "$PODMAN_TEST_ROOT"
156
+ ```
157
+
158
+ Record all five healthy services and authenticated gateway requests. From an
159
+ external controller, end **all** test-user sessions, wait, reconnect, and repeat
160
+ status/authenticated checks. Then reboot the VM and repeat the same checks before
161
+ running any explicit start command. Capture relevant user-unit journal and
162
+ SELinux AVC evidence; no denial should be bypassed by changing enforcement.
163
+
164
+ Next explicitly stop the installation, verify empty running status, reboot, and
165
+ verify it remains stopped. Only then start explicitly and verify all services.
166
+ For unexpected-exit recovery, select the exact project from its retained record
167
+ and terminate only its verified container-init host process through a PID handle,
168
+ then verify automatic recovery and retained identity/credentials. Do not use
169
+ `podman kill` for this case: an explicit engine stop suppresses restart policy.
170
+ The following refuses a PID whose cgroup does not identify the selected container:
171
+
172
+ ```sh
173
+ node install.mjs server stop --state-dir "$PODMAN_TEST_ROOT"
174
+ node install.mjs server status --state-dir "$PODMAN_TEST_ROOT" # no running services
175
+ # Disposable-VM controller reboots here; reconnect and repeat status before start.
176
+ node install.mjs server start --state-dir "$PODMAN_TEST_ROOT"
177
+ PODMAN_TEST_PROJECT=$(node -e 'console.log(require(process.argv[1]).project)' "$PODMAN_TEST_ROOT/installation.json")
178
+ podman inspect --format '{{.State.StartedAt}} {{.RestartCount}}' "${PODMAN_TEST_PROJECT}-daemon-1"
179
+ python3 - "$PODMAN_TEST_PROJECT" <<'PYTHON'
180
+ import json, subprocess, sys
181
+ project = sys.argv[1]
182
+ container = json.loads(subprocess.check_output(['podman', 'inspect', project+'-daemon-1']))[0]
183
+ assert container['Config']['Labels']['com.docker.compose.project'] == project
184
+ assert container['State']['Running'] and container['State']['Pid'] > 1
185
+ script = """
186
+ import os, signal, sys
187
+ pid, cid = int(sys.argv[1]), sys.argv[2]
188
+ fd = os.pidfd_open(pid)
189
+ try:
190
+ assert cid in open('/proc/'+str(pid)+'/cgroup').read(), 'Container identity mismatch'
191
+ assert os.stat('/proc/'+str(pid)).st_uid == 1000, 'Unexpected runtime owner'
192
+ signal.pidfd_send_signal(fd, signal.SIGKILL)
193
+ finally:
194
+ os.close(fd)
195
+ """
196
+ subprocess.run(['podman','unshare','python3','-c',script,str(container['State']['Pid']),container['Id']],check=True)
197
+ PYTHON
198
+ # Wait for recovery; assert changed StartedAt, increased RestartCount and health.
199
+ podman inspect --format '{{.State.StartedAt}} {{.RestartCount}} {{.State.Health.Status}}' "${PODMAN_TEST_PROJECT}-daemon-1"
200
+ # Verify retained identities and authenticated gateway as well.
201
+ node install.mjs server status --state-dir "$PODMAN_TEST_ROOT"
202
+ ```
203
+
204
+ Still required: repeat component backup/reset/restore for daemon, Telegram,
205
+ Cowork and messenger; source update and interrupted retry; fresh schema-1 legacy
206
+ conversion fixtures; foreign/malformed volume refusal; and the equivalent full
207
+ Docker maintenance matrix. These require owned fixture data and before/after
208
+ identity, credential, provenance and mount-boundary assertions; a command exit
209
+ code alone is insufficient. The existing unit conversion tests are not a claim
210
+ that this real-engine legacy fixture matrix has run.
@@ -1,4 +1,5 @@
1
1
  FROM nginx:1.28-alpine@sha256:a8b39bd9cf0f83869a2162827a0caf6137ddf759d50a171451b335cecc87d236
2
- COPY --chmod=644 nginx.conf /etc/nginx/nginx.conf
2
+ COPY --chmod=644 nginx.conf /etc/nginx/ours.conf.template
3
+ COPY --chmod=644 gateway-entrypoint.sh /gateway-entrypoint.sh
3
4
  USER 101:101
4
- ENTRYPOINT ["nginx", "-g", "daemon off;"]
5
+ ENTRYPOINT ["/bin/sh", "/gateway-entrypoint.sh"]
@@ -0,0 +1,48 @@
1
+ {
2
+ "subscriptions": [
3
+ "codex"
4
+ ],
5
+ "assignmentStrategy": "one-model",
6
+ "models": {
7
+ "development": {
8
+ "harness": "codex",
9
+ "session": "acp",
10
+ "model": "gpt-6-astra",
11
+ "efforts": [
12
+ "low",
13
+ "medium",
14
+ "high",
15
+ "xhigh",
16
+ "max",
17
+ "ultra"
18
+ ]
19
+ },
20
+ "review": {
21
+ "harness": "codex",
22
+ "session": "acp",
23
+ "model": "gpt-6-astra",
24
+ "efforts": [
25
+ "low",
26
+ "medium",
27
+ "high",
28
+ "xhigh",
29
+ "max",
30
+ "ultra"
31
+ ]
32
+ },
33
+ "coordination": {
34
+ "harness": "codex",
35
+ "session": "acp",
36
+ "model": "gpt-6-astra",
37
+ "efforts": [
38
+ "low",
39
+ "medium",
40
+ "high",
41
+ "xhigh",
42
+ "max",
43
+ "ultra"
44
+ ]
45
+ }
46
+ },
47
+ "reasoning": "balanced"
48
+ }
@@ -0,0 +1,37 @@
1
+ #!/bin/sh
2
+ set -eu
3
+ # Replace only our resolver marker. Never expand nginx's $variables.
4
+ resolvers=$(awk '
5
+ function ipv4(s, a,n,i) {
6
+ n=split(s,a,"."); if(n!=4)return 0;
7
+ for(i=1;i<=n;i++) if(a[i]!~/^[0-9]+$/ || length(a[i])>3 || a[i]+0>255 || (length(a[i])>1 && substr(a[i],1,1)=="0"))return 0;
8
+ return 1
9
+ }
10
+ function ipv6(s, a,n,i,count,copy,compressed) {
11
+ if(s!~/:/ || s~/[^0-9a-fA-F:.]/ || s~/:::/)return 0;
12
+ copy=s; compressed=gsub(/::/,"X",copy); if(compressed>1)return 0;
13
+ if(!compressed && (s~/^:/ || s~/:$/))return 0;
14
+ n=split(s,a,":"); count=0;
15
+ for(i=1;i<=n;i++) {
16
+ if(a[i]=="")continue;
17
+ if(a[i]~/\./) {if(i!=n || !ipv4(a[i]))return 0; count+=2}
18
+ else {if(a[i]!~/^[0-9a-fA-F]+$/ || length(a[i])>4)return 0; count++}
19
+ }
20
+ return compressed ? count<8 : count==8
21
+ }
22
+ $1=="nameserver" {
23
+ if(ipv4($2))address=$2;
24
+ else if(ipv6($2))address="[" $2 "]";
25
+ else next;
26
+ if(!seen[address]++) {printf "%s%s",sep,address; sep=" "}
27
+ }
28
+ ' "${OURS_RESOLV_CONF:-/etc/resolv.conf}")
29
+ if [ -z "$resolvers" ]; then echo 'Gateway: no valid runtime DNS nameserver' >&2; exit 1; fi
30
+ umask 077
31
+ config=$(mktemp /tmp/ours-nginx.XXXXXX)
32
+ trap 'rm -f "$config"' EXIT HUP INT TERM
33
+ sed "s/@@OURS_RESOLVERS@@/$resolvers/g" "${OURS_NGINX_TEMPLATE:-/etc/nginx/ours.conf.template}" > "$config"
34
+ nginx -t -c "$config"
35
+ # nginx opens the config before the shell exits; exec leaves this file in tmpfs.
36
+ trap - EXIT HUP INT TERM
37
+ exec nginx -c "$config" -g 'daemon off;'