Smoke note: the connector is claude-connector v4 with a systemd-credential key; the sidecar no longer owns claude-prefixed models by default
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
569794fda9
commit
3fc3110edb
1 changed files with 38 additions and 57 deletions
|
|
@ -1,69 +1,50 @@
|
|||
# Connector And Claude SDK Sidecar Bring-Up
|
||||
|
||||
No live smoke exists in this tree. The ignored test this file once documented,
|
||||
`runtime::tests::live_smoke_seeds_then_ticks_a_world_against_the_connector`,
|
||||
ran the production tick driver and the Active elaboration sweep against a real
|
||||
CodexConnector; the play agent's Cut 1 (`d69e9d4`) deleted both, and the test
|
||||
with them. A command that names it now matches nothing and exits 0. No
|
||||
replacement exists. The recipe that once gated a deploy on a real model is
|
||||
gone from main, and so is its `accept-real-persona-membrane` step. The one real-model test
|
||||
left is the ignored `controllers::tests::real_local_model_cognition_modes_commit_speech`
|
||||
(`crates/ghostlight/src/controllers.rs`). It has no automated run: it needs a model server
|
||||
on `GHOSTLIGHT_LOCAL_ENDPOINT` plus the `GHOSTLIGHT_CONTROLLER_*_MODEL`,
|
||||
No automated live smoke exists in this tree. The one real-model test left is the
|
||||
ignored `controllers::tests::real_local_model_cognition_modes_commit_speech`
|
||||
(`crates/ghostlight/src/controllers.rs`), and a person runs it by hand with
|
||||
`cargo test -p ghostlight -- --ignored real_local_model_cognition_modes_commit_speech`.
|
||||
It needs either a local model server (`GHOSTLIGHT_LOCAL_ENDPOINT`) or the
|
||||
connector (`GHOSTLIGHT_ACCEPTANCE_CONNECTOR=<host:port>` plus the systemd
|
||||
credential below), and the `GHOSTLIGHT_CONTROLLER_*_MODEL`,
|
||||
`GHOSTLIGHT_ACCEPTANCE_RUNTIME_ID` and `GHOSTLIGHT_ACCEPTANCE_PERSONA_PROSE_LOG`
|
||||
variables, and a person runs it by hand with `cargo test -p ghostlight -- --ignored
|
||||
real_local_model_cognition_modes_commit_speech`.
|
||||
variables. The release gate passes if one of three attempts commits; every
|
||||
failed attempt's prose is kept.
|
||||
|
||||
What remains true and stays here: bringing up a real CodexConnector and a
|
||||
built Claude SDK sidecar. The seed lane (`world.seed`) still runs real
|
||||
inference through `ControllerRunner`, and both transports below are how a
|
||||
session gets real model responses instead of a fixture inference port.
|
||||
## The connector
|
||||
|
||||
## Substrate
|
||||
Ghostlight's connector lane speaks model-connector v4 to claude-connector, which
|
||||
Eureka owns and runs on Yggdrasil at `127.0.0.1:4110`. Ghostlight is one of its
|
||||
callers, identified as `ghostlight`. Connector models are `claude-haiku-5-5`,
|
||||
`claude-sonnet-5-5` and `claude-opus-5-5`; any other name is refused
|
||||
`ModelNotAllowed`. A required tool choice on `claude-sonnet-5-5` is refused as
|
||||
an invalid request, and Ghostlight sends only `Auto`.
|
||||
|
||||
Machine-local, outside the repo: `F:\Projects\Ghostlight-smoke\`.
|
||||
The connection key is never copied, printed or put in an environment variable.
|
||||
`ConnectorBinding::key_path` names a file, read once when the port opens. Under
|
||||
systemd that file is the credential the unit mounts:
|
||||
|
||||
- `codex-home\auth.json`: a copy of `~/.codex/auth.json`. The connector spawns
|
||||
the official `codex app-server` child against this home and may refresh it.
|
||||
- `connector\ghostlight.key`: 64 hex characters, no trailing newline; the
|
||||
shared connection secret. Both sides read the same file.
|
||||
- `connector\connector.cc`: the daemon's single-caller config.
|
||||
- `logs\`: connector stdout/stderr and pid.
|
||||
|
||||
The connector binary is `F:\Projects\CodexConnector\target\debug\codex-connector.exe`
|
||||
built from the repo head with the `daemon` feature. Ghostlight's `Cargo.lock`
|
||||
pins the connector library at an older revision whose daemon does not build
|
||||
against its own lockfile; the head daemon speaks the same wire law.
|
||||
|
||||
## Bring-up
|
||||
|
||||
Initialize the config once (the codex executable path and SHA-256 are the
|
||||
newest `codex.exe` under `%LOCALAPPDATA%\OpenAI\Codex\bin\`):
|
||||
|
||||
```powershell
|
||||
F:\Projects\CodexConnector\target\debug\codex-connector.exe --initialize-single-caller-config F:\Projects\Ghostlight-smoke\connector\connector.cc 127.0.0.1:4103 <codex.exe> <sha256> F:\Projects\Ghostlight-smoke\codex-home F:\Projects\Ghostlight-smoke\connector\replay.cc ghostlight-smoke F:\Projects\Ghostlight-smoke\connector\ghostlight.key 1 gpt-5.6-luna,gpt-5.6-sol,gpt-5.6-terra 4 1052672 16000
|
||||
```bash
|
||||
sudo systemd-run --wait --pipe \
|
||||
-p LoadCredential=connector-key:/etc/gamecult/claude-connector/connection-ghostlight.key \
|
||||
-E GHOSTLIGHT_ACCEPTANCE_CONNECTOR=127.0.0.1:4110 ... <test binary> --ignored
|
||||
```
|
||||
|
||||
Start the daemon detached; it prints one ready line to stderr:
|
||||
The ignored `live_connector_v4_completes_plain_tool_and_schema_requests` runs the
|
||||
same way (it needs only `CREDENTIALS_DIRECTORY`) and checks a plain, a tool and
|
||||
an output-schema request on haiku and a plain request on sonnet.
|
||||
|
||||
```powershell
|
||||
$R='F:\Projects\Ghostlight-smoke'; $p = Start-Process -FilePath 'F:\Projects\CodexConnector\target\debug\codex-connector.exe' -ArgumentList @('--config', "$R\connector\connector.cc") -RedirectStandardOutput "$R\logs\connector.stdout.log" -RedirectStandardError "$R\logs\connector.stderr.log" -PassThru -WindowStyle Hidden; $p.Id | Out-File "$R\logs\connector.pid"
|
||||
```
|
||||
|
||||
Stop it with `Stop-Process -Id (Get-Content F:\Projects\Ghostlight-smoke\logs\connector.pid)`.
|
||||
|
||||
A session that wants the connector reads
|
||||
`GHOSTLIGHT_CONTROLLER_CONNECTOR=127.0.0.1:4103` and
|
||||
`GHOSTLIGHT_CONTROLLER_CREDENTIAL='F:\Projects\Ghostlight-smoke\connector\ghostlight.key'`,
|
||||
the same variables the deleted harness read.
|
||||
Ghostlight's port is one shot
|
||||
and returns a typed fault (`InferenceFaultClass`) whose disposition says whether
|
||||
the owning flow may try again.
|
||||
|
||||
## Claude SDK route
|
||||
|
||||
`crates/ghostlight/src/sdk_inference.rs`'s `SdkInferencePort` gives any lane whose configured
|
||||
model is `claude`-prefixed (matching `GHOSTLIGHT_SDK_MODEL_PREFIX`, default
|
||||
`claude`) a second transport: a Node sidecar on the Claude Agent SDK instead of
|
||||
the CodexConnector, so a session can run on the Claude subscription with no
|
||||
Codex budget.
|
||||
the connector, so a session can run on the Claude subscription with no
|
||||
connector budget.
|
||||
|
||||
**Operator prerequisites, none of which Ghostlight performs:**
|
||||
|
||||
|
|
@ -92,10 +73,10 @@ GHOSTLIGHT_SDK_SIDECAR='F:\Projects\Ghostlight\sidecar\claude-sdk\dist\main.js'
|
|||
GHOSTLIGHT_SDK_MODEL_PREFIX=claude # optional; this is already the default
|
||||
```
|
||||
|
||||
`GHOSTLIGHT_SDK_SIDECAR`'s absence means no SDK binding at all — a
|
||||
`claude`-prefixed lane model then fails at open with `UnroutableModel` rather
|
||||
than silently reaching the connector. Any of the five
|
||||
`GHOSTLIGHT_CONTROLLER_*_MODEL` variables can be set to a `claude`-prefixed
|
||||
model (for example `claude-opus-5`) to route that lane through the sidecar;
|
||||
the connector variables are only required for lanes that still route to the
|
||||
connector, and an all-`claude` configuration needs neither.
|
||||
|
||||
`GHOSTLIGHT_SDK_SIDECAR`'s absence means no SDK binding at all: a
|
||||
`claude`-prefixed lane model then routes to the connector, which serves the
|
||||
`claude-*-5-5` models itself. With both bound, a model the connector serves
|
||||
(`claude-<tier>-5-5`) under the sidecar's prefix is refused at open
|
||||
(`SidecarClaimsConnectorModel`) rather than stolen by the sidecar; a model
|
||||
such as `claude-opus-5` still reaches the sidecar.
|
||||
|
|
|
|||
Loading…
Reference in a new issue