The peer follow stream had no byte cap and kept a whole unterminated
frame in memory, and the MCP surface carried its own peer status table
that already disagreed with REST for peer 400.
- mcp::peers::fetch now returns proxy::PreparedResponse, so the status
comes from proxy::classify_status and the body from
proxy::prepare_response (peer byte cap, deadline, shutdown), the same
two steps REST uses. status_error, body_bytes and the local 2xx check
are gone.
- tail_journal consumes that prepared stream; a Frames cursor keeps a
partial frame from being rescanned from byte 0 on every chunk, the
entry cap truncates the result, and the end of the stream maps to the
note (entry cap, shutdown, byte cap, deadline or close).
- Prompts resolve the peer argument against the registry (unknown or
disabled peer is refused); list_peers returns the error registry()
produced; one wording for an unknown peer name.
- Tests: byte cap on an unterminated frame, entry cap, buffered body,
follow 404/500, deadline with an open stream, shutdown, frame cursor,
REST/MCP parity for peer 400/404/401/5xx, and a full golden snapshot of
the peers-off tool table. Peer scripts use the stripped path form C2
forwards.
Server instructions and the eight tool descriptions mention peers and the
untrusted-data rule only while a registry is configured. peers://status
returns the list_peers JSON and is advertised only then. diagnose_unit and
container_health_report take an optional validated peer argument.
The two status tools and the optional peer argument exist only when a
registry is configured. rmcp's disable_route hides the tools; the eight
shared schemas lose the optional peer property, and the two list tools also
lose the derived $schema key, so the peers-off list and schemas match a
build without the feature byte for byte. Both snapshot variants and the
wire-level tool list are asserted.
Peers resolve through PeerRegistry::get, the same entry point REST uses,
so the hop marker, allowlist and error mapping stay in one place. Log
tools keep the local {entries, truncated, note} shape; tail_journal
consumes the peer SSE stream. Tests cover every tool, path encoding,
error mapping and the integration path through the assembled router.
AGENTS.md said the same command works in an interactive shell, which only
holds inside devenv shell or direnv (the script is on PATH there).
docs/consolidator.md now says the filter cache sits at the repo root and that
a failing check raises a catchable error instead of closing the session.
source-mtime-key globbed src/**/*.rs from the cwd and the cache path was
relative, so completion started in a subdirectory (src/) failed the globs,
keyed the entry "unknown" and wrote <subdir>/target/... under a key that
never goes stale.
The globs (via glob, since ls only expands literal patterns) and the cache
path are anchored on the script's repo root, and an unusable key (unknown or
none) is neither read nor written. check-filter-cache now proves the key and
path are the same from src/ as from the root, and that an unknown key leaves
no file behind.
run-steps and self-check ended with exit 1. With use dev/dev-test.nu * in a
Nushell config, exit ends the caller's session and cannot be caught, so any
red dev-test unit|all|ci closed the terminal right after the summary.
run-steps and self-check now raise a catchable error; only the script-mode
entry point (main) exits, after printing the reason. check-module-mode guards
that: it rejects exit outside main, rejects (exit ...) interpolated into a
message (a subexpression that ends the process; the cargo-tree message had
one), catches a real failing step in module mode and requires script mode to
still exit non-zero.
Proxied journal/unit values now use the local unit-name helper instead of a
second, stricter check, so escaped units pass through as text, %5C or %5c.
The peer status table is one function shared with the transport, and the
segment/encoding cases left untested get allowlist and rejection cases.
Unit names go through the local route's validation, so escaped and
dash-rooted units work through the proxy; backslashes stay legal only
there. Response preparation (status classification, content-type check,
size/stream bounds) moves into proxy.rs for REST and MCP to share.
x-slinuxm-peer is only set for configured peers, proxied SSE is no-cache,
and the unreachable handler fallbacks are gone.
B1/B2 are merged, so `real_transport` builds the `ReqwestTransport` with the
configured limits and deny list instead of bailing. Binary tests now probe a
real loopback server: ok with latency, rejected credential, unreachable peer
and an unknown name, none of which may print the token.
The peer-less `--print-config` output is now compared against the committed
pre-peers text plus the default `[peers]` block, and a config with a peer
must leave everything before that block byte-identical. New binary tests
cover `--print-config`, `peer list`, `token create|list` with an unreadable
token file, and `serve` refusing to start while naming the peer.
`Config::load` now runs structural checks only (names, URLs, CIDRs, paths,
timeouts) and never touches the host, so `token create|list`, `peer list`,
`peer check` and `--print-config` work where the credential is absent, e.g.
outside the unit. `Config::validate_token_readiness` opens the enabled peers'
files and runs at the top of `serve`; `peer check` checks the probed peer.
Also canonicalise IPv4-mapped IPv6 literals against the deny list and stop
putting the host in the plain-http error while the warning omits it.
Count DNS, token/CA reads and headers inside the timeout, treat SSE as
long-lived with an idle bound, take targets from url::Host so IPv6
literals work, exempt health probes from the concurrency limits and
tighten error classification. Reuse validate_target in request_url and
mark the Authorization value sensitive.