Conformance Kit checks harness behavior
link-harness-conformance checks that a harness adapter answers the
contract,
by running it as lnk-agent would, without Link. Every harness's tests
run it: Link Harness's, each adapter's, and the core's on its mini
harness.
What it runs
check runs the adapter's contract, install, configure,
command and health with its home as HOME, and needs outside its
proxy and behind it (proxied), then checks its endpoint against a
bare chat completions model of the kit's own. try_check gives the
failure back instead of failing the test.
One provider only
Check::new(adapter).provider(...) checks a harness that takes a local
model only one way with that provider, as an adapter that runs local
models only through Ollama is checked with ollama.
A stand-in harness
Check::new(adapter).stand_in(program, files) checks an adapter
without downloading its harness: the mini harness's ACP agent, lnk-mini acp built beside the adapter, is written at program in its home and
run whenever it's given acp among its arguments, and each of files
is written there first, so the adapter's install finds its harness
installed. It asks the kit's model. What the adapter does around its
harness, its hub, its key and its threads, is checked as it runs.
Its downloads
The adapter's install and configure get this machine's proxy
settings, as a real harness's downloads need.
What it checks of the endpoint
For an adapter with an endpoint, one whose harness speaks no connection, it checks each part of the endpoint the contract says.
Its key
The endpoint refuses a request without the key, or with another. When
the contract says proof, it proves it holds the key before it's sent
one, and sets TCP_NODELAY on the connection it accepted, read from the
harness's own socket where the system says.
Who a message is from
When the contract says from, it answers a message from someone who
isn't the owner (Link-From: a schedule, a background command, someone
in a shared chat and their name), telling the model who. It refuses one
from no sender a message may be from, or a name that isn't a person's.
Which agent
It answers requests naming its agent in Link-Agent, as Link's bridges
send them. When the contract says agent, it refuses one naming
another agent before the model sees it, and answers one naming none as
its own agent's.
Answers and threads
It answers, streamed and whole, with what the model said, keeps each thread and keeps threads apart. A turn cut short, its caller gone before the answer, runs to its end, and the answer is kept in the thread.
Its tools
It calls a tool through the bridge: the kit's own MCP server, given as
Link gives a tool, in the settings' tools, which the hub gives each
session as its mcpServers, and at $LNK_TOOL_KIT, called when the
model asks, its answer sent back to the model. A stand-in for a harness
that keeps Link's tools in its own settings (Check::tools_in_settings)
finds them at $LNK_TOOL_KIT, as such a harness's settings give them.
Narrowed tools
When the contract says tools, a thread narrowed to some tools
(Link-Tools) is offered only those from then on. A later list narrows
it again and never widens it, a message without one keeps it, a call
says the thread's tools in its _meta (link.local/tools), and a list
that isn't one is refused.
What it checks of the sandbox's side
The sandbox points the harness at its proxy in HTTPS_PROXY, the run's
secret in the address, and hands it the machine's CAs as they were set.
The Launch that command prints sets no proxy variable of its own
(HTTPS_PROXY, NO_PROXY or another casing), empties no CA variable
(SSL_CERT_FILE, NODE_EXTRA_CA_CERTS) and, when it sets
NODE_USE_ENV_PROXY, sets it to 1, so Node reads the proxy.
What it checks of agent state
When its initialize advertises agent state that gives and takes
sessions, its export holds a thread it answered, by what was said, and
a conversation it imports keeps its thread's name and goes on: the
model's next request holds what came in.
Beside the kit
The kit carries what a connection's tests and an adapter's maintainers need to run a harness without Link.
An agent on the mini harness
agent is an agent on the mini harness, lnk-mini, a harness that
speaks no connection, started in the foreground against a bare model,
for the tests of a connection's plugin against its fake: ports of its
own, servers on 127.0.0.1, the agent's binding, and whether
bubblewrap runs.
The mini connection's service
minichat is the mini connection's service, faked: what lnk-minichat
talks to, for a test whose agent needs a connection but whose subject
isn't one. Its bots are its tokens', each with the messages people sent
it, which a poll confirms as Telegram's offset does, and what it sent.
Controlled runtime comparisons
The Rust runtime comparisons use the same local services for Mini, full Link and two agents. They retain Measure's typed phase records, separate traced counts from timings, and report confinement gaps explicitly.