Data-flow disclosure
Every flow of data that leaves the local tier, with what it carries and why (the constitution's Principle I; spec 000, FR-040). The local tier is the Author's own machine: the stacks run there in containers, on an internal Docker network with no route out, behind one proxy, edge, that publishes their ports on 127.0.0.1 only.
This is spec 000's disclosure, and it grows with the spec. Every service in deploy/compose.yaml has a row, whether or not it sends anything out: make policy (tools/gates/compose_policy.py) refuses a service whose name no row's From gives in backticks. So each task that adds a service, or a flow, adds its row in the same commit. Every flow plan §17 lists now has its row (tasks.md T110), the development-time ones (D1–D3) included; a flow a later change adds gets its row in the same commit.
Columns: From → To names the sender and the destination. Trigger is what makes the flow happen. Carries and Never carries are its content. Default is whether it happens without anyone choosing it. How to switch it off is the operator's control.
| ID | From → To | Trigger | Carries | Never carries | Why | Default | How to switch it off | FR |
|---|---|---|---|---|---|---|---|---|
| S1 | edge → nothing beyond the host. It publishes the stack's six ports on the host's 127.0.0.1 (the sixth, x005, is the room's site: spec 002's S14 and V1, below) and opens no connection out. | requests from the Author's own terminal or browser, on the same host | nothing leaves the local tier | client addresses, headers, or bodies, even in its access log, which records the time, the listener, the request ID, the method, the path without its query, the status, and the duration | the stack's one published door, and its one audit point for ports; spec 001's tunnel attaches here, on the laptop (S16). On EC2, edge also takes the cloud edge's requests (spec 001, FR-032), without loosening the laptop's 127.0.0.1 binding. | on, with every stack | make down ENV=<stack> | FR-020, FR-040 |
| S2 | gateway → the internet, through the egress network, the only route out any service has On EC2 (spec 001), the same, through the instance's egress allowlist (spec 001, FR-051), which admits only the destinations listed in their own rows: every TLS connection the gateway opens goes to EC2's gateway proxy, which admits only the names row C18 lists. | only the destinations listed in their own rows: the alert channels, A1 (Telegram) and A2 (email), and on prod, Bedrock, F1, and the AWS SSO credential exchange, F2; and on prod, while its route names it, the Anthropic API, F3 (spec 010) On EC2: F3 first, then F1. On prod, on either host: the shared state, C2. | what A1, A2, C2, F1, F2, and F3 say (F2 on the laptop only) | payloads in telemetry (outside dev's opt-in sampling, FR-029), client identifiers, and secrets | the fallback model call, its credentials, and the alerts need the internet; nothing else in the stack does. From spec 001, prod's gateway also reaches the shared state, C2, never through egress: on the laptop over internal to the tunnel's forward, and on EC2 inside the VPC | on, with every stack; a flow only where its row says | make down ENV=<stack>. The egress network has no destination allowlist in spec 000: the Author decides whether to accept that or ask for one (plan, Complexity Tracking) On EC2, stop EC2. The laptop's egress network still has no destination allowlist, the Author's open decision. | FR-013, FR-022, FR-032, FR-040 |
| S3 | gateway-state → nothing. It sits on internal alone, which has no route out. | – | nothing leaves the local tier | – | the meter, the kill switch, and the audit log stay on the host (FR-031) | – | – | FR-031, FR-040 |
| S4 | model-server-gpu and model-server-cpu → nothing. The model server sits on internal alone, which has no route out, and never downloads: it reads the model from the read-only cache (H4_MODEL_DIR) that P3 fills. One of the two runs, as the env file's profile picks: gpu on prod and dev, cpu on dev-cpu. | the gateway's local calls and health checks, from inside the stack | nothing leaves the local tier | prompts and completions in its logs or on an endpoint: it runs without -v, whose logs carry prompts, and with --no-slots, so no endpoint shows the prompts in flight | the local model answers hello on the host (FR-019, FR-022) | on, with every stack | make down ENV=<stack> | FR-019, FR-040 |
| S5 | otel-collector → nothing beyond the stack. It sits on internal alone, and sends to langfuse-web, prometheus, and loki, inside the stack. | the gateway's spans, metrics, and logs; dev-time metrics posted to edge's x004 (POST /v1/metrics only) | nothing leaves the local tier | payload attributes, unless a dev span opts in and the collector's own TELEMETRY_PAYLOAD_SAMPLING is on (never on prod); client addresses, ports, and user agents; query strings; the secret shapes of contracts/telemetry.md §6.3, masked with **** in every attribute value and text field; Claude Code's account, email, and organization identifiers | the traces, metrics, and logs behind Langfuse and the dashboard, redacted a second time outside the gateway (FR-026, FR-029) | on, with every stack | make down ENV=<stack> | FR-026, FR-029, FR-037, FR-040 |
| S6 | prometheus → nothing. It sits on internal alone, scrapes only the stack's own targets, and keeps 30 days or 2 GB on its volume. | the collector's OTLP pushes; its scrapes, every 15 s (the model server's every 5 s) | nothing leaves the local tier | – | the metrics behind the dashboard and the breach test's M assertions (FR-028) | on, with every stack | make down ENV=<stack> | FR-028, FR-040 |
| S7 | loki → nothing. It sits on internal alone and keeps 30 days of the gateway's logs on its volume; its usage reporting is off (H1). | the collector's OTLP log pushes | nothing leaves the local tier | the logs of the third-party services, which stay in Docker's local driver on the host (make logs) | the gateway's logs, searchable beside its metrics and traces (FR-026) | on, with every stack | make down ENV=<stack> | FR-026, FR-040 |
| S8 | grafana → nothing. It sits on internal alone; edge publishes it on x002 (127.0.0.1), and it reads prometheus, loki, and gateway-state, the last as grafana_ro. Its update checks, news feed, Gravatar, plugin downloads, and external snapshots are off (H1). | the Author's browser, on x002 | nothing leaves the local tier from Grafana itself; what the browser fetches is B1 | – | the dashboard (FR-028, FR-034) | on, with every stack | make down ENV=<stack> | FR-028, FR-034, FR-040 |
| S9 | langfuse-web and langfuse-worker → nothing beyond the stack. They sit on internal alone, and talk to langfuse-db, clickhouse, valkey, and seaweedfs, inside the stack; edge publishes the web app on x001 (127.0.0.1). Their usage reporting, in-app agent, AI features, own email, and batch exports are off (H1). | the collector's traces, sent to the web app's OTLP endpoint; the Author's browser on x001 | nothing leaves the local tier | an LLM connection to any host, and any cloud credential: no AWS_* key is set in either container | the traces of FR-027, each a complete tree from hello to the model call | on, with every stack | make down ENV=<stack> | FR-027, FR-040 |
| S10 | langfuse-db, clickhouse, valkey, and seaweedfs → nothing. Langfuse's four stores sit on internal alone, each with its own volume; none is published. ClickHouse's crash reports and SeaweedFS's usage reporting are off (H1). | Langfuse's reads and writes | nothing leaves the local tier | – | Langfuse's Postgres, its trace store, its queue, and its S3 bucket stay on the host (ADRs 0004, 0022) | on, with every stack | make down ENV=<stack> | FR-027, FR-040 |
| S11 | breach-probe → nothing beyond the stack. A one-off container in the breach profile, on internal alone, which has no route out. It calls only its own stack's services: gateway (its api on 8080, /health and /hello, and its admin listener on 8081), and, for the breach test's assertions, prometheus (/api/v1/query), loki (/loki/api/v1/query_range), langfuse-web (its public API's traces and observations), telegram-standin (/messages), and mailpit (its API's messages, on 8025); and, for spec 001's measurement, edge (its api on 8080, /hello, and its site listener on 8087, /api/room/turn); and, for spec 001's relay, dev-relay (its edge listener on 8080, /api/hello, with a viewer address from the documentation range, which the relay holds for its cap alone; row S20), with fixed text, never a visitor's (deploy/scripts/measure_load.py). It publishes no port and mounts nothing; from the env file it receives only Langfuse's two API keys, LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY, for the trace assertions. | an agent session's make operator-* ENV=dev-cpu and make hello ENV=dev-cpu, whose hops run the operator CLI and hello's client in it through the engine's relay (contracts/operator-admin.md §6, contracts/gateway-http.md §9); make breach-test ENV=dev or ENV=dev-cpu, whose every call and assertion runs in it, one container a step (plan §8, evals/breach_probe.py); and spec 001's make measure-stack ENV=dev-cpu, whose load runs in one container for the run's length (research.md R-33). make up never starts it | nothing leaves the local tier. Into it, on its standard input: the stack's operator token (dev-cpu's public dummy, or dev's from the Author's token file) and the step's operations. Out of it, on its standard output: each operation's result, as identifiers, figures, times, and booleans; the measurement's load prints one line, its requests counted by status and code | payloads: a hello's answer, a trace's input and output, and an alert's or an incident draft's text are read and checked inside it, never printed; client identifiers; the token, and Langfuse's keys, which stay in its memory | an agent session can't reach the engine's published ports, and Prometheus, Loki, and the stand-ins aren't published on any stack, so the calls and the breach test's assertions run inside the stack's network (FR-036, FR-039) | off: one container per call, removed when its command exits (docker compose run --rm) | nothing runs it but those targets | FR-008, FR-036, FR-039, FR-040 |
| S12 | telegram-standin → nothing. dev's and dev-cpu's Telegram receiver in stand-in mode: a standard-library server mimicking the Bot API's sendMessage (evals/standins/telegram_standin.py), in the dev-receivers profile, on internal alone, which has no route out. It opens no connection of its own and forwards nothing. | the gateway's alerts in stand-in mode (ALERT_DELIVERY=standin: dev's default, dev-cpu's only mode); the breach test's reads of what arrived, GET /messages, from the probe (S11); and dev's and dev-cpu's samples (spec 011) | nothing leaves the local tier: it keeps the newest 1,000 messages in memory until it stops; and (spec 011): it keeps each message's entities with its text, in memory, until it stops, and checks them as the Bot API does | the real bot token: stand-in mode sends the dummy standin, and the stand-in answers any other token with 401 and keeps and logs none; the alerts' text in its log, which names only each request's route and status; payloads, client identifiers, and secrets, which no alert carries (contracts/alerts.md §5) | dev and dev-cpu prove alert delivery without a real chat; the engine has no route to Telegram (FR-032, FR-036, FR-039) | on, with dev and dev-cpu, whose COMPOSE_PROFILES name dev-receivers; never on prod | make down ENV=<stack> | FR-032, FR-036, FR-040; spec 011 FR-051 |
| S13 | mailpit → nothing. dev's and dev-cpu's SMTP receiver in stand-in mode, Mailpit, in the dev-receivers profile, on internal alone, which has no route out. No relay, forwarding, webhook, or POP3 is configured, so it releases nothing, and its version check is off (H1). | the gateway's alert emails in stand-in mode, over SMTP on 1025; the breach test's reads of its API on 8025, from the probe (S11); and dev's and dev-cpu's samples (spec 011) | nothing leaves the local tier: the messages stay in a temporary database under its tmpfs /tmp, gone when it stops; and (spec 011): the messages are now multipart, with their HTML parts, still in the temporary database under its tmpfs /tmp | the real mailbox's credentials: in stand-in mode the gateway ignores the real channel keys (contracts/config-files.md §4.4); payloads, client identifiers, and secrets, which no alert carries | as S12, for the email channel (FR-032, FR-036) | on, with dev and dev-cpu; never on prod | make down ENV=<stack> | FR-032, FR-036, FR-040; spec 011 FR-051 |
| A1 | gateway → api.telegram.org, Telegram's Bot API (sendMessage), over HTTPS through egress (spec 001) and EC2's gateway, while EC2 serves, through EC2's gateway proxy (C18). | each alert in real mode (contracts/alerts.md §2): every alert on prod, which runs only in real mode; on dev, only during the Author's recorded run, make breach-test ENV=dev DELIVERY=real (contracts/env-files.md §7.2). dev's other runs and dev-cpu send to the stand-in instead (S12); and (spec 011): each sample the Author sends with make operator-alert-samples while the stack is in real mode: on prod, and on dev during its recorded real-delivery run (spec 011) | the alert's plain text: which threshold, the meter values, the runtime state, the time, and the alert's id (contracts/alerts.md §3); in an operator action's alert, the action and the operator's fingerprint, operator #<8 hex>, the first 8 hex digits of the operator token's SHA-256 ("The headline names the action and the actor's fingerprint, never the reason", contracts/alerts.md §3); the bot token, in the request's path; the chat ID; the host's IP address; and (spec 011): the text laid out in short labelled lines, with an emoji for the alert's severity and one for its kind; beside the text, its message entities, each a type (bold, italic, code, or pre), an offset, and a length over that same text; if Telegram refuses the entities, the same alert's plain text, as before, in a second request; a sample's text, from fixed sample facts, marked as a sample, with the requester's fingerprint | payloads, client identifiers, and the operator's reason text (contracts/alerts.md §5); the operator token, or more of its hash than the fingerprint (contracts/alerts.md §5); the bot token anywhere but the request: the dispatcher never logs, stores, or traces the URL, and keeps only an error class (contracts/alerts.md §4.1; contracts/telemetry.md §3.1); and (spec 011): parse_mode; an entity that links, mentions, or hides text; anything the text doesn't hold; a link preview, which every message disables | Telegram is the primary alert channel, within 5 minutes of a crossing; degradation never waits on it (FR-032; ADR 0005); and (spec 011): the same facts, laid out so that the severity, the headline, and the next step read at a glance (spec 011); a sample lets the Author see a design before a real alert needs it | on, on prod: prod refuses to start unless ALERT_DELIVERY=real, with the Bot API's own base (alert_delivery_not_real, telegram_base_not_bot_api); off on dev and dev-cpu but for the recorded run | make down ENV=prod stops the stack, and with it every alert; prod has no other switch, by design (FR-032). dev goes back to the stand-ins when the recorded run ends: when it passes, fails, or is stopped by Ctrl-C, SIGTERM, or SIGHUP (a closed terminal), all of which run its cleanup, which ignores any further interrupt until it has finished. A run killed outright, by SIGKILL or the host stopping, can't: dev's gateway stays on real delivery until the next make up ENV=dev, which recreates it from dev's own files, or make down ENV=dev; and (spec 011): formats: {telegram: plain} in config/alerts.yaml, the Author's file, sends today's plain text (spec 011, FR-031) | FR-032, FR-040; spec 011 FR-051 |
| A2 | gateway → the alerts mailbox's SMTP host (SMTP_HOST), on 465 with implicit TLS or 587 with STARTTLS, certificates verified, through egress (spec 001) and EC2's gateway, while EC2 serves, on 465 with implicit TLS alone, through EC2's gateway proxy, which admits the env file's SMTP_HOST there and nothing else (C18). | as A1: each alert in real mode; and (spec 011): each sample the Author sends with make operator-alert-samples while the stack is in real mode: on prod, and on dev during its recorded real-delivery run (spec 011) | the same text, its first line as the subject, from ALERT_EMAIL_FROM to ALERT_EMAIL_TO, with the headers Auto-Submitted: auto-generated and X-H4-Alert-Id; the mailbox's SMTP_USER and SMTP_PASSWORD, inside TLS; the host's IP address; and (spec 011): the message as multipart/alternative, with the plain text part, as before, and an HTML part that lays out the same facts in tables with inline styles, each meter drawn as a bar, under a subject that leads with the severity's and the kind's emoji; today's message, if the server refuses the multipart one; a sample's, marked as A1's are | as A1; and never in plain text: prod refuses SMTP_TLS other than implicit on 465 or starttls on 587 (smtp_without_tls); and (spec 011): anything fetched when the message is opened: no remote image, font, stylesheet, script, or tracking pixel, and no link, so that opening an alert sends nothing anywhere and nothing learns when or where it was read | email is the secondary channel, tried on its own, so one channel's failure never stops the other (FR-032; ADR 0005); and (spec 011): the same facts, laid out so that the severity, the headline, and the next step read at a glance (spec 011); a sample lets the Author see a design before a real alert needs it | as A1 | as A1; and (spec 011): formats: {email: plain} sends today's message | FR-032, FR-040; spec 011 FR-051 |
| F1 | gateway, on prod only → bedrock-runtime.us-east-1.amazonaws.com, Amazon Bedrock's Converse API, over HTTPS through egress. That is the destination plan §17 gives, and the gateway connects to no other Bedrock endpoint: config/routing.yaml accepts us-east-1 alone (contracts/config-files.md §1.1, rule R7). The model the Author confirmed (tasks.md T105, 2026-10-12) is Claude Haiku 5.5's US inference profile, us.anthropic.claude-haiku-5-5, so Bedrock may serve the call in us-east-1, us-east-2, or us-west-2, the US Regions the profile includes, and in no Region outside the US. | prod only, when local is unhealthy and admission passes; the live contract test (plan §17). That is: a POST /hello the local model can't answer, admitted inside the fallback sub-budget and the ceilings (contracts/gateway-http.md §2.4); and POST /admin/adapters/bedrock/complete, attributed test and admitted inside the ceilings, which the Author's live contract test (make contract-live ENV=prod ADAPTER=bedrock, tasks.md T103) and Bedrock evals (make evals ADAPTER=bedrock, plan §14) send (contracts/operator-admin.md §5). The health check never calls Bedrock (contracts/provider-adapter.md §3.2). Spec 007 (FR-048): also a room turn the local model can't answer, admitted inside the fallback sub-budget and the ceilings; and the Author's POST /admin/twin/turn evaluation calls, attributed test inside the ceilings On EC2 (spec 001), as its second route, when the Anthropic API can't answer, inside the $5 daily and $20 monthly ceilings, with no sub-budget, attributed metered. EC2's credentials come from its instance role, not F2's session: its credential timer assumes h4-prod-gateway, the one role EC2's gateway calls Bedrock as, which EC2's model action can revoke (spec 001, FR-023), and the call leaves through EC2's gateway proxy (C18). | the hello prompt and completion, the model ID, the runtime role's signature (plan §17). For hello: the fixed system prompt (contracts/gateway-http.md §2.2); the message, at most 500 characters, which in spec 000 only the host's own terminal or tools can send, on 127.0.0.1 (S1); and an output cap of 128 tokens. For the contract test and the evals: their committed cases, at most 2,000 characters, with a cap of at most 512. Back come the completion, its token counts and stop reason, and Bedrock's request ID. The signed request carries the role credentials' short-lived access key ID and session token, never their secret key. And the host's IP address, and the AWS SDK's user agent. Spec 007 (FR-048): for a room turn, the twin's instructions (config/twin/prompt.md), the turn's corpus excerpts, the conversation so far with the visitor's words, the path as a depth instruction, and an output cap of 300 tokens. The Author's twin evaluation calls through POST /admin/twin/turn carry the same, an evaluation case's words in place of a visitor's, so they aren't held to the 2,000 characters above: a twin call's input is at most 32,000 characters (limits.twin.max_input_chars) | anything that names who asked: the edge-supplied address and any X-H4-Client label stay in the gateway; the operator token, the alert channels' credentials, and the store's contents; trace context: no traceparent, tracestate, or baggage header leaves the stack (contracts/telemetry.md §3.1). Spec 007 (FR-048): Bedrock's model-invocation logging, off unless an account turns it on, stays off, as the Author confirms in the account | the paid fallback keeps hello answering while the local model is down, inside a capped sub-budget: "the initial policy is local-first with Bedrock as fallback inside a capped sub-budget" (the constitution's Model access standard; FR-022, FR-030). Spec 007: and the twin keeps answering while the local model is down, inside the capped sub-budget | on, on prod, once the Author adds fallback: bedrock to prod's route (tasks.md T105); never on dev or dev-cpu, whose routes can name no paid adapter (paid_route_outside_prod) and whose gateways mount the empty deploy/aws-none | plan §17's control: the meter, the sub-budget, egress only on the gateway. That is $2 of fallback a day, and $2 more for each renewal the Author grants, inside the $5 daily and $20 monthly ceilings (plan §18; ADR 0001). To stop it, take fallback: bedrock out of envs.prod in config/routing.yaml, commit, and run make up ENV=prod: a local outage then answers no_fallback_in_stack. Or make down ENV=prod. The contract test and the evals run only when the Author starts them. Spec 007: and marking every topic and free talk not ready stops the room's share of it | FR-021, FR-022, FR-023, FR-030, FR-031, FR-040, spec 007 FR-048 |
| F2 | gateway, on prod only, and make aws-login in the Author's terminal → portal.sso.us-east-1.amazonaws.com (and oidc.us-east-1.amazonaws.com at login, and while running with an sso_session profile, the Author's choice at T105; see §5.2's correction), as plan §17 gives it; §5.2 is the plan's. Over HTTPS, the gateway's through egress. Prod's gateway exchanges the runtime user's SSO token at the portal for the runtime role's short-lived credentials (GetRoleCredentials). With the SDK's default, which T102 keeps, it also asks oidc.us-east-1.amazonaws.com for a fresh token (SSO-OIDC's CreateToken) when the cached token holds a refresh token, as an sso_session profile's does: from the token's last 5 minutes on, and, since the fresh token can't be written back to the read-only cache, again at each renewal of the role credentials after that. Each fresh token serves one exchange for role credentials and isn't kept. Once the session has ended, each failed credential resolution asks again, at most every 30 s, with the dead refresh token, until the next login (token-providers 3.1147.0). So that host is contacted at login, and while running; a legacy profile, which holds no refresh token and is the Author's choice at T105, narrows it to login only. make aws-login runs the AWS CLI, which signs the runtime user in through oidc.us-east-1.amazonaws.com and opens IAM Identity Center's sign-in page in the Author's browser, which talks to AWS on its own. From spec 001's group 4 on, once the Author points the profile at h4-laptop-bedrock (its tasks.md T040), in that spec's words: The permission set now allows only sts:AssumeRole on h4-laptop-bedrock, an ordinary role that holds the Bedrock permission, so the gateway also calls STS's AssumeRole (sts.amazonaws.com) with its SSO credentials, and gets that role's short-lived credentials back. The budget action's deny attaches to that role (spec 001, FR-023). The host, as confirmed at spec 001's T040b (2026-11-12, the chained profile's opened connection): sts.us-east-1.amazonaws.com, STS's regional endpoint; the quoted sts.amazonaws.com stays as the spec's words. | prod's gateway, refreshing role credentials; make aws-login (plan §17). The gateway resolves credentials once a session is in its mount: at its first health check, and again whenever the credentials it holds near their expiry; between those, its 10 s health check reads the SDK's cached ones (contracts/provider-adapter.md §3.2). make aws-login is the Author's, by hand, when a session nears its end or has ended: with a legacy profile, the credentials_expiring alert 2 h before; with an sso_session profile, whose end the gateway can't know, fallback_unavailable once it has ended (docs/runbooks/bedrock-credentials-expiring.md). The one-time aws configure sso before the first login signs the runtime user in the same way (quickstart.md §0.6) | the runtime user's SSO token (plan §17). To the portal: the access token, with the account ID and role name the profile names; back come the role's short-lived credentials, which stay in the gateway's memory. For a refresh, to oidc: the cached refresh token and the client registration's ID and secret; back comes a new access token, used for that one exchange and not kept. At login, the AWS CLI registers a client and receives the session's tokens, which it writes to ~/.config/h4reet-ai/aws-home/.aws/sso/cache. Each request carries the host's IP address and the SDK's or the CLI's user agent. From spec 001's group 4 on, as its From → To says: The permission set now allows only sts:AssumeRole on h4-laptop-bedrock, an ordinary role that holds the Bedrock permission, so the gateway also calls STS's AssumeRole (sts.amazonaws.com) with its SSO credentials, and gets that role's short-lived credentials back. The budget action's deny attaches to that role (spec 001, FR-023). To STS: the role credentials' signature, the role's name, and a session name; back come that role's credentials, which stay in the gateway's memory | the Author's own AWS session: only the dedicated runtime user's is in the mounted ~/.config/h4reet-ai/aws-home/.aws, never the Author's ~/.aws, and make aws-login drops the shell's AWS_* settings (research.md R-17); a long-term key: no IAM user access key exists (FR-013); trace context (contracts/telemetry.md §3.1); prompts, completions, and anything else from the stack | Bedrock needs the runtime role's credentials, and an SSO session provides short-lived ones without any long-term key: "Cloud access is short-lived and identity-based (OIDC for CI, SSO for humans)" (the constitution's Principle IV; FR-013) | on, on prod, from the Author's first make aws-login (tasks.md T105): with no session in its mount, the gateway has nothing to exchange. Never on dev or dev-cpu, whose gateways get the profile none and the empty deploy/aws-none as their ~/.aws | plan §17's control: the dedicated runtime identity, whose permission set allows only bedrock:InvokeModel on the one inference profile and the foundation models it routes to (plan §5.2). To stop it, end the session with HOME="$HOME/.config/h4reet-ai/aws-home" aws sso logout in the Author's terminal, or make down ENV=prod. With an sso_session profile the refresh while running is the SDK's default; a legacy profile, the Author's choice at T105, has none | FR-013, FR-022, FR-040; spec 001 FR-013, FR-023 |
| B1 | the Author's browser, on Grafana's pages (x002) and Langfuse's (x001) → whatever those pages fetch from a host other than localhost | viewing the dashboard or a trace | the browser's IP address and user agent, to each such host | anything from the stack: the pages' data comes from localhost | the pages may load fonts, images, or scripts from the internet. quickstart.md §1.10 checked once, in the browser's developer tools, in T065 (2026-10-09), on Grafana's pages and Langfuse's. In the Author's words: "no non-localhost hosts in network tab". So no host is listed. The row stays, for a version that might | on, while viewing | close the page; the stack itself never makes these requests | FR-040 |
| P1 | the host's Docker engine → ghcr.io (its blobs from pkg-containers.githubusercontent.com), quay.io, public.ecr.aws, and Docker Hub (registry-1.docker.io, auth.docker.io, and its CDN) | make pull; a cold make up; make pin-images, which resolves tags to digests and lists a repository's tags when a pin is open; deploy/agents-engine/engine.sh seed | image names, tags, and digests; the host's IP address; Docker's user agent | credentials: every pull is anonymous (research.md R-29); anything from a running stack | every service is a container image, built from pinned bases (FR-014, FR-016); deploy/images.lock pins every digest | on, whenever an image isn't in the local cache | pull once and keep the cache: nothing pulls an image that's already present | FR-014, FR-016, FR-040 |
| P2 | the gateway's image build (services/gateway/Dockerfile: npm ci --ignore-scripts) → registry.npmjs.org | make up on a host stack, which builds the gateway's image once per commit, outside compose, and reuses it for every stack at that commit (deploy/scripts/gateway_image.py; tasks.md T184); make up ENV=dev-cpu, make build, and make image, which build it on the agents' engine, through E1 | the names and versions of the packages in package-lock.json; the host's IP address; npm's user agent | credentials: the build copies no .npmrc and passes no token; audit reports, funding notices, and update checks (NPM_CONFIG_AUDIT, NPM_CONFIG_FUND, and NPM_CONFIG_UPDATE_NOTIFIER are false); anything from a running stack | the gateway is built from its lockfile, with no install scripts (FR-014, FR-016) | on, whenever the build cache has no layer for the current package.json and package-lock.json | build once and keep the build cache: npm ci runs again only when those files change, and a commit whose image is already on the host's engine isn't built again | FR-014, FR-016, FR-040 |
| P3 | deploy/scripts/pull-models.sh, in the Author's terminal → huggingface.co, and the download host it redirects each file to | make pull (with MODELS=all, every model in deploy/models.lock); a make up on a host stack whose model isn't in H4_MODEL_DIR yet | the repository, the file, and the revision, in the URL https://huggingface.co/<repo>/resolve/<revision>/<file>; the host's IP address; curl's user agent | a token or any other credential: curl runs with -q, so it reads no .curlrc, with no .netrc and no header; anything from a running stack; anything from the agents' engine, which never downloads a model (the Author seeds the stand-in, and the engine verifies it) | the models are files from Hugging Face, pinned by revision and sha256 in deploy/models.lock; a download that doesn't match its sha256 is removed (FR-014, FR-019) | on, whenever the stack's model isn't in the cache | keep the cache: a model already there with the lock's size and mode 0444 is never fetched again | FR-014, FR-019, FR-040 |
| E1 | the agents' engine (its daemon's pulls, and the npm ci of builds on it) → its egress proxy on 198.18.0.1:3128 → only the hosts in the sandbox's allowedDomains, which the proxy reads from .claude/settings.json when it starts: today registry.npmjs.org, pypi.org, files.pythonhosted.org, and ghcr.io | an image build on the engine (make build, make image), or a pull of an image the engine lacks. engine.sh seed copies the pinned images from the host instead (P1) | TLS to those hosts: package and image names and versions; the host's IP address. The proxy records each decision (the time, allowed or refused and why, the host, the port, the bytes, the duration) in ~/.local/state/h4reet/agents-engine/egress.jsonl, on the host only | anything from the Author's stacks, which the engine can't reach (FR-039); credentials: the engine holds none; any other destination: the firewall drops everything from h4agents but the proxy, and the proxy refuses unlisted hosts, IP literals, and names that resolve to non-global addresses | the agents build and test the stack's images with no route of their own (FR-039) | on, whenever the engine builds or pulls | deploy/agents-engine/engine.sh down (the Author's). With the proxy stopped, every request fails closed | FR-039, FR-040 |
| H1 | Langfuse, Grafana, Loki, ClickHouse, SeaweedFS, and Mailpit (their default usage reporting and update checks) → their vendors | never: each runs with its switch off, and the internal network, which has no route out, would block it anyway | would carry usage data and version numbers | – | listed because each sends by default (FR-040) | off | off by configuration (plan §6), in deploy/compose.yaml, deploy/loki/loki.yaml, deploy/clickhouse/no-crash-reports.xml, and deploy/seaweedfs/entrypoint.sh: Langfuse TELEMETRY_ENABLED=false; Grafana GF_ANALYTICS_REPORTING_ENABLED=false, GF_ANALYTICS_CHECK_FOR_UPDATES=false, GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES=false, GF_NEWS_NEWS_FEED_ENABLED=false, GF_SECURITY_DISABLE_GRAVATAR=true, GF_PLUGINS_PUBLIC_KEY_RETRIEVAL_DISABLED=true, GF_PLUGINS_PREINSTALL_DISABLED=true, and GF_SNAPSHOTS_EXTERNAL_ENABLED=false; Loki analytics.reporting_enabled: false; ClickHouse send_crash_reports.enabled=false; SeaweedFS's telemetry switch set to false wherever the pinned version has one (the entrypoint reads weed server -h and names any other telemetry flag in its log); Mailpit MP_DISABLE_VERSION_CHECK=true, on dev and dev-cpu, the only stacks that run it | FR-040 |
| D1 | Claude Code, the agents' harness, in the Author's sessions → Anthropic; for its default reporting, the hosts its documentation names, as plan §17 gives it. Anthropic is the model API that serves the Team plan's sessions. Claude Code's own process makes the calls, outside the sandbox, which holds the commands it runs, not Claude Code itself (research.md R-28). Its auto-updater is off: the early patch sets DISABLE_AUTOUPDATER (plan §9, §15). Its default reporting is Claude Code's own operational metrics and error reports, which its documentation says it sends unless DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING are set (to confirm for the pinned version, with the hosts they go to); the closing patch (tasks.md T117) sets both in .claude/settings.json's env. | agent sessions, on the Team plan (FR-037) (plan §17). That is every turn of a session: the Author's prompts, and each tool result an agent reads. The behavioral agent-config evals (make evals-agent-config, plan §14) and the canary (make matrix-canary, plan §13) start headless sessions of their own, in the Author's terminal. The default reporting comes from the same sessions, until the closing patch | repository content an agent reads, prompts, completions; Claude Code's own operational metrics and error reports (plan §17). That is: the files and command output a session reads, sent as tool results; the Author's prompts, and the agents' messages to each other; and the model's answers. Anything a session can read can reach Anthropic, which is what the deny lists are for. Spec 003's committed assets and published images, under assets/ and docs/research/images/, are among what a session can read: the Author's AI-made likeness among them reaches Anthropic whenever a session reads one, a reviewer checking a record against its file, for example, and before publication too (spec 003 FR-040d). From spec 020, the AI-made likeness of the Author's dog, under assets/visitors/dog/ once he takes it in, reaches Anthropic the same way. And the host's IP address, and the token the Team seat signs in with. What the default reporting holds is as Claude Code's documentation describes it, to confirm with the pinned version | what the sandbox and the deny lists keep out of a session: the files and variables of FR-007's deny list (contracts/env-files.md §8), among them deploy/env, ~/.config/h4reet-ai (the env files, the operator tokens, and the runtime AWS session), ~/.aws, ~/.ssh, and corpus/intake/private, which matrix stage S proves unreadable (plan §13); the studio's folders, its photos, unstripped outputs, workflows, and the evaluation's blinding key, once the Author applies spec 003's guard patch, which denies them, with stage S's rows (spec 003 FR-003); visitor data, of which spec 000 has none | the agents write and review the code, under the project's own rules: the constitution names "Claude Code as the agent harness, run under the project's committed permissions, hooks, and sandbox settings" (its Development standard), and FR-037 has development-time model use run "on a Claude Team plan, outside the production budget". The default reporting serves nothing here: it is listed because Claude Code sends it by default (FR-040) | on, whenever the Author opens a session; never from the stack as a session: the stack's only calls to Anthropic are F3's, prod's gateway with its own key: on EC2 always, and on the laptop while its route names the Anthropic API (spec 010; spec 001), and otherwise it reaches Bedrock's models through AWS (F1). The default reporting is on too, until the closing patch sets DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING | plan §17's control: the sandbox, the deny lists; for its default reporting, DISABLE_TELEMETRY and DISABLE_ERROR_REPORTING, which the closing patch sets. The sandbox and the deny lists are .claude/settings.json's: the sandbox's filesystem denies and network allowlist, which bind every command a session runs, and permissions.deny and credentials.envVars, which keep FR-007's files and variables out of what it reads (plan §15). The two variables go in its env (tasks.md T117). Close the session to stop the flow. From the closing patch, Claude Code's OpenTelemetry usage metrics go to prod's collector on x004 (S5) for the dashboard's FR-037 panel, not out (plan §6) | FR-007, FR-037, FR-040; spec 003 FR-003, FR-040 |
| D2 | the devcontainer's image build (.devcontainer/Dockerfile), on the Docker engine of whoever opens the devcontainer, and in the Author's gate (tools/gates/gate, plan §11) → Ubuntu's archive mirrors (apt), pypi.org and files.pythonhosted.org (the pinned tools), registry.npmjs.org (the lint toolchain), ECR Public and ghcr.io (the bases, Node's among them), as plan §17 gives them. The bases are Ubuntu 24.04 and Node's official image from public.ecr.aws, and uv, ruff, and gitleaks from ghcr.io, which serves their blobs from pkg-containers.githubusercontent.com (P1). apt asks the hosts the Ubuntu image's own sources name. When the devcontainer opens, postCreateCommand runs make setup, whose npm ci --ignore-scripts fetches the workspace's packages from the same registry.npmjs.org. The gate's own container phase does too, on every run but --host's: npm ci --ignore-scripts --no-audit --no-fund, in that image, with the network, in a copy of the export, fetches the workspace's packages from registry.npmjs.org afresh each time, because its npm cache lives in the container and goes with it (tools/gates/gate) | opening the devcontainer; the Author's gate (plan §17). That is: a build in VS Code or with npx @devcontainers/cli@0.89.0 up (quickstart.md §6.2), with make setup at each container's creation; and the gate's container phase, which builds the image tagged by .devcontainer/'s hash (tasks.md T092), and runs npm ci in it on every run but --host's. The agent sandbox never builds it (plan §9) | package and image names; the IP address (plan §17). That is: apt's package lists, and the packages the Dockerfile installs with their dependencies; pytest's and PyYAML's pinned files; the lint toolchain's and the workspace's packages, by the names and versions in their lockfiles; the bases' names and digests; and each tool's user agent. make setup's npm ci keeps npm's defaults, so it also posts an audit report of the workspace's package names and versions to the registry, and may ask it for npm's newest version | anything from the repository or the stacks: the build sends its context to the local Docker engine, and the hosts see only the requests above; credentials: the build copies no .npmrc and takes no build secret; an audit report for the lint toolchain, or from the gate's npm ci, both of which run with --no-audit --no-fund; Claude Code and Terraform, which WITH_CLAUDE=0 and WITH_TERRAFORM=0 leave out | one toolchain for everyone: the constitution has "a devcontainer defines the single toolchain used by humans, agents, and CI" (its Development standard; FR-005), and SC-007 reads: "A newcomer reaches a running devcontainer with passing tests in under 30 minutes." | off: only when someone opens the devcontainer, or the Author's gate runs: every run but --host's builds it and runs npm ci in it | plan §17's control: digests, checksums, and hashes. That is: every base pinned by digest; apt's signed package lists, which carry each package's checksum; pip's --require-hashes over .devcontainer/requirements-tools.txt; and the lockfiles' integrity hashes for npm. Nothing else builds it: don't open the devcontainer. The gate's build and npm ci stop only under tools/gates/gate --host, which skips the whole container phase and marks every summary DEGRADED (plan §19) | FR-005, FR-014, FR-040 |
| D3 | make tools (tools/gates/install-tools.sh), in the Author's terminal → nodejs.org (through nvm), pypi.org and files.pythonhosted.org (uv), ghcr.io (the gitleaks image), registry.npmjs.org (the lint toolchain), as plan §17 gives them. The gitleaks image comes through the host's Docker, whose pull from ghcr.io fetches the blobs from pkg-containers.githubusercontent.com (P1) | the Author, once per pin change (plan §17): on a new host, or when .devcontainer/toolchain.vars changes. nvm fetches nothing when that Node is already installed; the other steps may ask their hosts again on each run. Agents can't run it: the script refuses the sandbox | package and image names; the IP address (plan §17). That is: Node's version, in nodejs.org's download path; pytest's and PyYAML's names and versions, and their dependencies', to PyPI; the gitleaks image's name and digest, to ghcr.io; the lint toolchain's packages, by the names and versions in its lockfile, to npm; and each tool's user agent | an audit report or funding notice: the lint toolchain's npm ci runs with --no-audit --no-fund; any configuration of the repository's own: uv runs with --no-config and the system interpreter, so no uv.toml or .venv steers it; anything from the stacks. No step passes a token, but npm reads the Author's own ~/.npmrc, and Docker its own login, if either holds one | the Author's terminal runs the devcontainer's versions, so agents' sessions on the host, the gate, and the devcontainer agree: research.md R-20 reads the constitution's toolchain line as "The devcontainer defines it; agents use that toolchain on the host, enforced by the check." (ADR 0018; plan §9) | off: only when the Author runs make tools | plan §17's control: the same pins as the devcontainer. That is .devcontainer/toolchain.vars's versions, the gitleaks image's digest, and the lint toolchain's lockfile. uv takes pytest's dependencies' versions from the devcontainer's requirements file, without checking its hashes, which only the devcontainer's pip install does (tools/gates/install-tools.sh). Nothing runs it but the Author: don't run make tools | FR-005, FR-014, FR-040 |
| D4 | the studio's Claude Code session, on the Author's machine → Anthropic | the Author's studio sessions, since 2026-10-22 | typed dimension sheets and descriptions; the Author's own designs; what the local models made from the photos after the Author reviewed it ("a style frame with no brand, text, screen content, or view beyond the fence, or a mesh stripped to geometry"), and a sign's lettering outlines traced from its photo with a local tool, after the Author reviewed them (vector paths, no pixels); scrubbed textures; renders of its own models; read-only snapshots of this repository's public documents (the intent, intent 000's art direction, ADR 0010, and spec 003's arrival-check, asset-record, and data-model contracts), and the work orders the Author hands it; the session's prompts and replies | a photo, or a crop, mask, or cutout made from one, whether as a file or from a tool's listener (ComfyUI's /view or its previews); an image-to-3D output before it is stripped to geometry; a lettering outline the Author hasn't reviewed; anything that locates the Author | the studio models the room's pieces, by the Author's choice (FR-024, FR-027) | off: only while the Author runs a studio session | off: only while the Author runs a studio session | spec 003 FR-040(c); spec 004 FR-024, FR-027 |
No visitor data flows in this spec.
Spec 002: the room
The room's rows (specs/002-the-room/, FR-057 and FR-058; plan §8), in the columns above. The room is the first flow that starts in a visitor's browser. Until spec 001's edge exists, every stack serves it on its own 127.0.0.1 only, so the only visitor is the Author. Carries, Never carries, and Why in rows V1 and V4 are the spec's words (its Data-Flow Disclosure Entries), and in row V2 spec 007's (its Data-Flow Disclosure Entries, which keep spec 002's words and add spec 004's Amendment B6's and its own FR-048's), written with the change that serves the turn (spec 007, FR-047). Rows V3 and V5 come with the work that creates each flow.
| ID | From → To | Trigger | Carries | Never carries | Why | Default | How to switch it off | FR |
|---|---|---|---|---|---|---|---|---|
| S14 | web → nothing. It sits on internal alone, which has no route out, and answers only what edge's x005 listener forwards to it. | a request to the stack's x005 | nothing leaves the local tier | client addresses, headers, or bodies, even in its access log, which records the time, the method, the path without its query, the status, and the duration; a cookie, ever | the room's static site, built into its image per commit (deploy/scripts/web_image.py; contracts/web-serving.md §1) | on, with every stack | make down ENV=<stack> | FR-057, FR-059 |
| V1 | the visitor's browser → the site's own origin: on the local tier, the stack's edge at 127.0.0.1 on x005 (H4_SITE_PORT), which forwards to web. After spec 001, hareet.ai's edge, which serves the built site from the account's storage: CloudFront's origin site, the site's bucket under site/, reached through origin access control, with no access log (spec 001 contracts/edge.md §3) | opening the room, which loads its page, scripts, styles, and fonts, and following the PDF link (a link in the downloaded PDF, such as a claim's link to its film's page in the repository on github.com, isn't this row's flow: only when the visitor clicks it does the visitor's own PDF viewer, or the browser it opens, send the request, from the visitor's device to that host; the site's origin isn't involved), and following "Credits" | requests for the room's static assets, the narration's audio, and the PDF: the paths requested (which show which items a visitor plays), the IP address, the user agent, and the avatar files now: the twin's model and clips in every 3D visit above the floor, the same for every visitor; the room's dog's model and clips only in a 3D visit whose visitor chose the dinosaur, so, like the chosen avatar's files, their paths show that choice; the twin's still in a visit that shows the 2D room; the stand-in's files only where the twin's model failed or the visitor chose them; and the chosen avatar's where it has files, whose paths show which avatar the visitor chose | anything to a third-party host (FR-057) | the room, the resume, and the PDF are static assets; the twin and the credits are among them | on, with every stack; on the local tier, loopback only; after spec 001, on, at the edge | make down ENV=<stack>; at the edge, the Author's Terraform | FR-057, FR-058, FR-059 |
| V2 | the visitor's browser → the site's own origin, POST /api/room/turn, which the stack's edge forwards to gateway's POST /room/turn; on the local tier, x005 on 127.0.0.1; after spec 001, through hareet.ai's edge to the one relay, on the tunnel end (C1), which sends it to the serving host's relay block: EC2's by default, inside the account, or the laptop's through its tunnel while the Author runs it (C14) | selecting a piece whose topic is ready (the opening), and each turn the visitor sends while its topic or free talk is ready | the visitor's typed words; the conversation so far, as the page holds it (the visitor's and the twin's turns, the newest 8 and 4,000 characters at most); the path; the piece that started the conversation, or free talk; the IP address and the user agent, as every request carries them. Back, in the reply: the twin's words and the piece; and the reply carries the turn's estimated cost and its route (spec 004's Amendment B6) | audio, the avatar, any identifier of the visit or the visitor, a cookie, anything stored on the device; on prod, no turn's words in any log, trace, store, or volume of the stack; the path in no telemetry | the twin's conversation runs on the local tier, or on prod on its capped fallback, because "the twin's brain" can't run in a visitor's browser at its quality bar (intent 000: "Visitor text and audio leave the browser only when the twin's brain or speech cannot run in the browser"). On prod, that fallback is the paid adapter prod's route names: Bedrock (F1) or the Anthropic API (F3) (spec 010) On EC2, prod's default host, there is no local model: every turn goes to the Anthropic API first (F3), and to Bedrock (F1) when it can't answer. In the Author's words: "On the ec2 server, anthropic api will answer first." (2026-11-09; spec 001) | on, once the Author marks a topic or free talk ready; before that, the room sends nothing On EC2, every turn the meter admits is a paid call. | the Author: mark every topic and free talk not ready in config/twin-readiness.yaml and make up, or make down; the visitor: send nothing, since the room sends only what the visitor selects or types Stop EC2 and set its autostart switch off (spec 001, FR-065). | spec 007 FR-001, FR-043, FR-046, FR-047; spec 002 FR-057, FR-058; spec 004 FR-075 |
| V4 | the visitor's browser → the stack's telemetry: a beacon (navigator.sendBeacon) to the site's own origin, POST /api/room/events on x005, which edge forwards to gateway's POST /room/events; the gateway adds one to a counter that the stack's own Prometheus keeps. After spec 001, through hareet.ai's edge to the relay on the tunnel end (C1), and on to the serving host's relay block (C14), whose gateway adds one to its own counter. From spec 001's switch-on (W2), the same beacon reaches the serving host through hareet.ai's edge and the relay on the tunnel end, which carry the visitor's address as V2 and C14 do: CloudFront's CloudFront-Viewer-Address, and the relay's X-H4-Viewer to the host, held in memory only (group 8's review B, nit 4). | selecting an object or a resume item, opening the resume or keeping it for later, following the PDF link, sending a turn, pressing the talk button, the room turning to its 2D mode, and the visitor first entering the walking view in a visit, the visitor first entering full screen in a visit, the loader giving way at its ceiling while the room's files are still loading, once a visit, and a figure's avatar failing to load, once a visit | usage events: kind, identifier, time | text, audio, path, avatar, client address, visit identifier (FR-054) | the dashboard's use panels (FR-056) | on, with every stack; loopback only until spec 001 | make down ENV=<stack>. Nothing switches the events off alone: without config/room-events.yaml the gateway refuses every one, but the browser still sends them | FR-054, FR-056, FR-058 |
On the local tier, edge's and web's access logs keep neither the address nor the user agent that V1 names (S1, S14): the request carries them, and nothing records them. The site's pages set a content security policy of 'self', so the browser itself refuses any other host (contracts/web-serving.md §3).
In V4, the body the browser sends is {kind} or {kind, id} and nothing else: the identifier is an object's or a resume item's, and the time is the gateway's clock when the event arrives, not a field the browser sends (contracts/room-events.md §1). The beacon's request carries the address and the user agent, as V1's requests do: edge's access log keeps neither (S1), the gateway reads neither for the event, and its spans drop both (spec 000's telemetry.md §1 and §6.3). The gateway keeps no event, and writes no log record or span attribute from one (the request's server span, which goes to Langfuse as every request's does, holds its route, status, and outcome): each becomes one increment of h4_room_events_total, labelled with its kind and identifier alone, or, when it is refused, of h4_room_events_refused_total by the reason. The browser stores nothing, and a beacon it refuses is never retried.
Spec 010: the Anthropic API
The row of spec 010 (specs/010-anthropic-provider/, FR-038 and FR-039): the gateway's calls to Anthropic's own API, prod's paid fallback when the Author's route names it in Bedrock's place. Its cells are the spec's words (its Data-Flow Disclosure Entries), and its words about what Anthropic keeps are the Author's.
| ID | From → To | Trigger | Carries | Never carries | Why | Default | How to switch it off | FR |
|---|---|---|---|---|---|---|---|---|
| F3 | gateway, on prod only → api.anthropic.com, the Anthropic API, over HTTPS through egress: POST /v1/messages for a call, and GET /v1/models/claude-haiku-5-5 for the health check. The gateway connects to no other Anthropic host: the endpoint is fixed in the adapter's code, never configuration or an environment variable (spec 010, FR-005 and FR-007). The model is Claude Haiku 5.5, claude-haiku-5-5, the model F1's inference profile names. What Anthropic keeps of a request, where, for how long, and whether it trains on it, in the Author's words from Anthropic's published commercial terms: Adopted on 2026-11-09 from summaries of Anthropic's pages. Anthropic doesn't train its models on API requests or replies unless the customer opts in or sends feedback, and this site does neither. Anthropic deletes API inputs and outputs within 30 days. Its newer docs say content isn't kept at all outside its "Covered Models", and Claude Haiku 5.5 isn't one, so I disclose the longer period. A request its safety systems flag for breaking its Usage Policy can be kept up to 2 years, and the flag's scores up to 7, or longer where the law requires. The site doesn't set a US-only option, so Anthropic may process a request anywhere it runs. For the API, Anthropic acts as this site's processor. Against my promise that a visitor's conversation isn't saved: this site saves none of it, and Anthropic may keep a turn it answered for up to 30 days, never for training. The room asks no one who they are; a visitor picks a path and an avatar, and Anthropic gets no visitor's address or identifier. What a visitor types is sent as typed. | prod only, and only while config/routing.yaml names anthropic as prod's fallback, which it doesn't at spec 010's merge: a POST /hello or a room turn the local model can't answer, admitted inside the fallback sub-budget, the ceilings, and the adapter's monthly cap; the Author's live runs on it, attributed test inside the ceilings and the cap (make contract-live ENV=prod ADAPTER=anthropic, make evals ADAPTER=anthropic, make redteam-live ADAPTER=anthropic ENV=prod); and the health check, once a minute while the route names it On EC2 (spec 001): every POST /hello and room turn that the kill switch and admission let through, inside the ceilings and the adapter's monthly cap, with no local model before it and no sub-budget; and the health check, once a minute while EC2 runs. | for hello, the fixed system prompt, the message, and an output cap of 128 tokens; for a room turn, the twin's instructions (config/twin/prompt.md), the turn's corpus excerpts, the conversation so far with the visitor's words, the path as a depth instruction, and an output cap of 300 tokens; for the Author's runs, their committed cases. And the model ID; thinking switched off; the API key, as a bearer token in the authorization header; the API version header; the SDK's user agent, which names the SDK and its version; the host's IP address. Back come the completion, its token counts, its stop reason, and the message's ID. For the health check: the key and the model ID; back comes the model's description | anything that names who asked: the edge-supplied address and any X-H4-Client label stay in the gateway, and no metadata user ID is sent; a temperature; the operator token, the AWS session, the alert channels' credentials, and the store's contents; trace context: no traceparent, tracestate, or baggage header; the SDK's platform headers, since the transport sends an allowlist (spec 010, FR-016) | the paid fallback keeps hello and the twin answering while the local model is down, inside the capped sub-budget and the adapter's own monthly cap, as F1 does; the Author chooses which of the two serves it, in his words "an option of using the anthropic api directly" (2026-11-08), and "Routing policy is configuration" (the constitution's Model access standard) | off: on only once the Author changes prod's route to fallback: anthropic, after his price, his cap, his key, and his words in this row (spec 010, FR-002 and FR-039); never on dev or dev-cpu, whose routes can name no paid adapter (paid_route_outside_prod) and whose env files hold no Anthropic key On EC2 (spec 001): on, once its route names the Anthropic API first, the Author's line in config/routing.yaml, which waits on his price, his cap, his key, and his words in this row (spec 010, FR-002 and FR-039; spec 001, FR-068). | put fallback: bedrock back in envs.prod in config/routing.yaml, or take the fallback out, commit, and run make up ENV=prod; or make down ENV=prod. Until then the meter bounds it: $2 of fallback a day for each grant, the $5 daily and $20 monthly ceilings, and the adapter's monthly cap. Marking every topic and free talk not ready stops the room's share of it, and the Author's live runs happen only when he starts them On EC2, change its route, or stop EC2. On EC2 the meter's bound is the $5 daily and $20 monthly ceilings and the adapter's cap; $2 of fallback a day stays the laptop's. | spec 010 FR-038, FR-039; spec 000 FR-021, FR-022, FR-023, FR-030, FR-031, FR-040 |
F3's words about what Anthropic keeps are the Author's, of 2026-11-09, in place of the marked placeholder spec 010's entry holds. F3's flow happens only while config/routing.yaml names the Anthropic API as prod's fallback (spec 010, FR-002), and evals/test_disclosure.py fails make test whenever the route names it while F3 holds that placeholder, so no visitor's turn can reach Anthropic without his words (spec 010, FR-039).
Spec 001: the cloud
The rows of spec 001 (specs/001-cloud-elevation/, FR-040; its plan §8.3), each in the commit that creates its flow, in the columns above. Their cells are the spec's words (its Data-Flow Disclosure Entries); what this section adds beside them is in the sentences under the table. Group 3, the bootstrap, adds C8's email half and C9. Group 4, the safety net, adds C8's Telegram half, through the alert bridge, C10, and C11, and changes row F2 in spec 000's part, above. Each other row comes with the group that creates its flow.
| ID | From → To | Trigger | Carries | Never carries | Why | Default | How to switch it off | FR |
|---|---|---|---|---|---|---|---|---|
| C8 | AWS's budgets and anomaly monitor → Telegram and the alerts mailbox: the mailbox through Amazon SNS's email subscription on h4-alerts (infra/bootstrap/alerts.tf); Telegram through h4-alert-bridge (infra/lambdas/alert_bridge/), a function in the account that h4-alerts invokes and that sends each to the Telegram Bot API, api.telegram.org, over HTTPS | a threshold crossed | the budget or monitor, the threshold, the amounts, the time | payloads, client identifiers | the safety net (FR-022) | on | the Author's Terraform | spec 001 FR-022, FR-040 |
| C9 | the Author's terminal → AWS's APIs: Terraform plans and applies, and the state | the Author's plan or apply | resource configuration, the state, the Author's short-lived session | secret values (FR-009) | infrastructure as code (FR-001, FR-007) | off; only the Author | — | spec 001 FR-001, FR-007, FR-040 |
| C10 | the Author's terminal → the release source, before publication: the account's registry, one ECR repository for each function and for each service the cloud hosts run, and its release bucket (infra/account/registry.tf) | the Author's release | release images and their digests | — | releases (Clarifications, 2026-10-12) | off; only the Author | — | spec 001 FR-040, FR-046, FR-048 |
| C11 | the uptime probe → the site and the status request: h4-probe (infra/lambdas/probe/), a function in the account, from AWS's side, outside every host: GET https://hareet.ai/ and GET https://hareet.ai/api/status, each with X-H4-Probe: 1 | at its interval | probe requests, marked as probes | — | detection (FR-061) | on | the Author's Terraform | spec 001 FR-040, FR-061 |
| C5 | Route 53's health checkers → the laptop's health path, at the tunnel end's Elastic IP on 8087, /health (infra/prod/failover.tf), carried through the tunnel's reverse forward 2203 to the laptop's edge (S17) | every 30 s, from each of Route 53's checking regions | probe requests; the health answer, 200 or 503 with no body | anything else from the stack: the health block answers nothing but its status | to wake EC2 when the laptop goes: the check's alarm, h4-laptop-away, invokes the start function (FR-054, FR-065) | on, with the laptop's prod | the Author's Terraform; make down ENV=prod ends the laptop's half | spec 001 FR-040, FR-054, FR-065 |
| C6 | the laptop's h4-handover loop (deploy/scripts/handover.py), which make up ENV=prod starts in the Author's session → hareet.ai's edge, for the status request (V6's path), marked as a probe (X-H4-Probe: 1); and → AWS's EC2 API, through his h4-ec2-stop profile's short-lived session (its SSO portal's sign-in is row F2's) | the status request every 5 s while it waits for the relay to serve the laptop; EC2's describe call every 5 s until EC2 is stopped after a takeover, then every 60 s while the laptop serves; a stop at each takeover, and each time it finds EC2 running while the laptop serves | the status request and its answer; the describe and stop requests for the instances tagged h4-prod-ec2; the session's signature; the laptop's network address, to the edge and to AWS's API. The Author's own EC2 targets (scripts/infra/ec2_ops.py) make the same describe, stop, and status calls, and invoke h4-ec2-start, from his terminal | a long-lived key (FR-008); any visitor's data | one host at a time (FR-064) | on, with the laptop's prod | make down ENV=prod; the Author's IAM (FR-070; question 16, provisional) | spec 001 FR-040, FR-063, FR-064 |
| S16 | tunnel, on the laptop's prod only → the tunnel end (C3) | make up ENV=prod on the laptop | as C3 | as C3 | the laptop serves without an inbound port (FR-052) | on, with the laptop's prod | make down ENV=prod; the Author revokes its credential in one action (FR-055) | spec 001 FR-040, FR-052, FR-055 |
| S17 | tunnel-end, the tunnel's far end, on the tunnel end only. It accepts the laptop's one connection and only the forwards this row lists, and refuses any other. Three reverse forwards lead back to the laptop's edge: 2201 for the relay's requests (C14), 2202 for telemetry (C15), and 2203 for Route 53's health checks (C5). Two local forwards lead from the laptop: shared-state:5432 to the shared state (C2) and snapshot-sink:8080 (C4) | the relay's requests for the laptop, the collector's export, the health checks, the laptop's store connection, and its panels | those flows' requests and answers, passed through inside the tunnel | anything to or from Langfuse, the admin listener, or Grafana; a shell or a command; the message, the answer, or the address in any log or store | the laptop's tunnel ends in the account, with no third party (FR-052; question 13) | on, around the clock, on spot, whether or not either host serves, except while AWS has the tunnel end back (FR-076) | the Author's Terraform; revoking the laptop's credential closes the tunnel (FR-055) | spec 001 FR-040, FR-052, FR-053, FR-055, FR-076 |
| C2 | each host's gateway, each host's Grafana (as grafana_ro), and the relay on the tunnel end (as relay_ro and relay_rw) → the shared state, Postgres in a container on the tunnel end (shared-state, spec 001): from EC2 to its private address, 10.42.1.10:5432; from the relay over its compose network; and from the laptop through the tunnel's forward, tunnel:5432 (C3, S17), with TLS inside it, verified by the shared state's own CA and the name shared-state | each admission, commit, and kill-switch read; each handover event; operator actions; from the laptop only once the Author's move sets its GATEWAY_DB_URL (spec 001 tasks.md T080) | meter amounts, reservations, call records (provider, model, tokens, cost, attribution, host, times, request IDs), the kill-switch state, the renewal and cap flags, handover events, and audit rows (the action, the host, the operator's fingerprint, and the reason the Author types); each role's SCRAM proof, never its password | payloads; client identifiers; addresses; secrets; a statement or a value in the store's log (log_statement = none) | one meter for both hosts (FR-017, FR-019) | on, with prod on either host once the move is done, and the relay always | make down ENV=prod; without it, prod and the relay answer degraded | spec 001 FR-017, FR-019, FR-040 |
| C13 | the Author's terminal → the shared state, through the laptop prod's admin listener while it runs, else an admin-only stack whose tunnel holds -L 5432 alone (the operator's targets with ENV=shared, scripts/operator.py) | the Author's reset, renewal, initialization, or restore | the operator credential's proof, the action, the reason, the values he states | — | operator actions whichever host serves (FR-074) | off; only the Author | — | spec 001 FR-040, FR-074 |
| S18 | shared-state, on the tunnel end only (spec 001) → nothing. Postgres 17, prod's shared meter and kill switch: it takes C2's connections, TLS only, on internal, and on the tunnel end's private address, 10.42.1.10:5432, which the security group holds to EC2's group; it opens none, and its backups leave by the host's timer, C16 | C2's connections | what C2 lists | payloads, client identifiers, addresses, secrets; a statement or a value in its log (log_statement = none) | one meter for both hosts (FR-017, FR-019) | on, with the tunnel end | the Author's Terraform; stopping the tunnel end, after which every host answers degraded | spec 001 FR-017, FR-019, FR-040 |
| C16 | the tunnel end's backup timer, h4-shared-state-backup.timer (deploy/hosts/tunnel-end/shared_state.py) → the backups' bucket, in the account, through the tunnel end's egress proxy, on 443, to h4reet-ai-shared-state-*.s3.us-east-1.amazonaws.com (the name holds the account's ID); and a restore's one presigned GET of a dump, the same way (spec 001 contracts/shared-state.md §8) | every hour; the Author's restore | the dump of the shared state: meter amounts, call records, the kill switch, handover events, and audit rows; the instance role's signed request; for a restore, the dump back | payloads, client identifiers, addresses, or secrets: the store holds none of them, and the roles' verifiers aren't in a database dump | a restore after the store's loss, or a move to another zone (FR-019) | on, with the tunnel end | the Author's Terraform; each dump expires after 7 days, its old versions too | spec 001 FR-019, FR-040 |
| C3 | the laptop's tunnel → tunnel-end on the tunnel end (question 13), over OpenSSH, to its Elastic IP on 2222 | while the laptop's prod runs | the tunnel's credential; keep-alives; the laptop's network address, to the tunnel end only; and, inside the tunnel, the flows S17 lists: C14, C15, C5, C2, and C4 | any route to Langfuse, the admin listener, or Grafana (FR-052) | the laptop serves without an inbound port, and its address stays out of public DNS (FR-052) | on, with the laptop's prod | make down ENV=prod; revoke the credential | spec 001 FR-040, FR-052, FR-055 |
| C7 | each deployer, on EC2, the tunnel end, and the laptop → the release source; EC2 and the tunnel end → the account's registry (ECR) and the account's endpoints they use (the secrets store, Systems Manager, and SNS, to publish to h4-alerts) On EC2 (group 7): its deployer reads the release bucket at each boot, before its stack starts, and each minute; pulls its images from ECR by digest, each upstream one as the account's copy; reads its secrets from Parameter Store at boot (write_env.py); assumes h4-prod-gateway through STS for its gateway; and is reached by the Author through Systems Manager alone; each through its egress proxy (C18). The laptop's release record stays in the Author's own release directory, ~/.local/state/h4reet/releases/, and nothing leaves it. | polls, EC2's start, deployments; each host alert (a deploy rolled back or refused) | release IDs, image names and digests, the host's address; EC2's requests for its secrets; each alert's one line of kind and facts On EC2, the instance role's signed requests, and the gateway role's short-lived credentials back. | credentials beyond pull access; secret values outside EC2; in an alert, any payload, address, client identifier, or secret | pull-based deployment (FR-046); the Anthropic key on EC2 (FR-068); AWS-side alerts (FR-022) | on | stop the deployer; stop EC2; stop the tunnel end | spec 001 FR-022, FR-040, FR-046, FR-068 |
| C17 | the tunnel end's host services (deploy/scripts/deployer.py, deploy/scripts/write_env.py, Docker's pulls, and the Systems Manager agent) → AWS's endpoints in us-east-1, through its egress proxy (deploy/scripts/egress_proxy.py), on 443 alone, to the names in deploy/hosts/tunnel-end/egress-allowlist.txt: the account's registry, api.ecr.us-east-1.amazonaws.com, *.dkr.ecr.us-east-1.amazonaws.com, and its layers' store, prod-us-east-1-starport-layer-bucket.s3.us-east-1.amazonaws.com; the release bucket, h4reet-ai-releases-*.s3.us-east-1.amazonaws.com; Parameter Store and Session Manager, ssm.us-east-1.amazonaws.com, ssmmessages.us-east-1.amazonaws.com, and ec2messages.us-east-1.amazonaws.com; SNS, sns.us-east-1.amazonaws.com; and, from group 10, the public view's write (h4-snapshot-sink.service, C4): its cloud reads, EC2's ec2.us-east-1.amazonaws.com, CloudWatch's monitoring.us-east-1.amazonaws.com, Route 53's route53.amazonaws.com, AWS Budgets' budgets.amazonaws.com, and, from T170, EventBridge Scheduler's scheduler.us-east-1.amazonaws.com for EC2's hours (the two schedules, by name), and its one key in the site's bucket, h4reet-ai-site-*.s3.us-east-1.amazonaws.com (the name holds the account's ID) | the boot's env file, each minute's deployer run, a deployment's pulls, an alert, the Author's Systems Manager session; the public view's write every 2 minutes | the instance role's signed requests: parameter names and, back, their values; release IDs, image digests, and the tree; an alert's one line of kind and facts; the session's own traffic; the public view's reads by name and tag, and its document (C4) | anything to a name the allowlist doesn't hold, or to an address that isn't public; a visitor's byte (the relay's requests stay inside the VPC and the tunnel) | the tunnel end's own deployment, secrets, alerts, and operator access (FR-046, FR-050, FR-051) | on, around the clock | stop the tunnel end; the Author's Terraform | spec 001 FR-040, FR-046, FR-050, FR-051 |
| C15 | the tunnel end's tunnel-end-collector → the serving host's collector: EC2's inside the VPC; the laptop's edge telemetry block, 8086, through the tunnel's reverse forward 2202 (S17) | as the relay and the tunnel end's services emit, from a file-backed queue | the relay's and the tunnel end's spans, metrics, and logs, labelled with the host they concern | payloads, addresses, client identifiers, secrets (spec 000's redaction, again in this collector) | the relay's traces join the host's, and the dashboard counts what was delayed or lost (FR-060) | on | stop the tunnel end; the queue holds up to its bound, and the drop is counted | spec 001 FR-040, FR-060 |
| C18 | EC2's host services (deploy/scripts/deployer.py, deploy/scripts/write_env.py, deploy/hosts/ec2/ec2_host.py, Docker's pulls, and the Systems Manager agent) → AWS's endpoints in us-east-1, through its egress proxy (deploy/scripts/egress_proxy.py), on 443 alone, to the names in deploy/hosts/ec2/egress-allowlist.txt: the account's registry, api.ecr.us-east-1.amazonaws.com, *.dkr.ecr.us-east-1.amazonaws.com, and its layers' store, prod-us-east-1-starport-layer-bucket.s3.us-east-1.amazonaws.com; the release bucket, h4reet-ai-releases-*.s3.us-east-1.amazonaws.com; Parameter Store and Session Manager, ssm.us-east-1.amazonaws.com, ssmmessages.us-east-1.amazonaws.com, and ec2messages.us-east-1.amazonaws.com; STS, sts.us-east-1.amazonaws.com, for the gateway's role; and SNS, sns.us-east-1.amazonaws.com. And EC2's gateway → its providers and its alert channels, through EC2's gateway proxy (deploy/scripts/sni_proxy.py), which reads the name each TLS hello asks for and nothing after it: on 443, the names in deploy/hosts/ec2/release/gateway-allowlist.txt, api.anthropic.com (F3), bedrock-runtime.us-east-1.amazonaws.com (F1), and api.telegram.org (A1); on 465, the env file's SMTP_HOST alone (A2) | the boot's env file, each minute's deployer run, a deployment's pulls, the gateway's credentials every 15 minutes, an alert, the Author's Systems Manager session; each of the gateway's calls (S2) | the instance role's signed requests: parameter names and, back, their values; release IDs, image digests, and the tree; the gateway role's credentials back; an alert's one line of kind and facts; the session's own traffic; for the gateway, the TLS stream its rows describe, which the proxy splices unread | anything to a name these lists don't hold, or to an address that isn't public; anything a container sends but the gateway's TLS; SMTP's STARTTLS, whose name comes only after a plain greeting | EC2's own deployment, secrets, Bedrock role, alerts, and operator access, and its gateway's providers (FR-046, FR-050, FR-051, FR-068) | on, while EC2 runs: 12 hours a day from W2, and in W1 only when the Author starts it | stop EC2; the Author's Terraform | spec 001 FR-040, FR-046, FR-050, FR-051 |
| S19 | ec2-relay-block, on EC2 only → edge's relay block (8085) and otel-collector's OTLP/HTTP (4318), inside EC2's stack. It publishes both on EC2's private address alone, 10.42.0.20, which EC2's security group opens to the tunnel end's two addresses alone | the relay's forwarded requests and its health checks (C14); the tunnel end's collector's export (C15); the host's deployer's metrics | the bytes it forwards, unread; in its log, each connection's time, port, status, and duration | anything it doesn't forward: no address, header, or body in its log; nothing from outside the VPC | EC2's relay block and its collector, reachable from the tunnel end without loosening edge's 127.0.0.1 binding (spec 001 FR-032, FR-054, FR-060) | on, with EC2's stack | stop EC2 | spec 001 FR-040, FR-054 |
| S15 | relay, on the tunnel end → the serving host's relay block (C14) and the shared state (C2). It takes the edge's requests (C1) | each dynamic request | the gateway's request fields and the client address, in memory | the message, the answer, or the address in any log or store (FR-031, FR-042) | the public request cap, the kill-switch read, and the choice of host, before any gateway (FR-030, FR-033, FR-054) | on, always, unless AWS has the tunnel end back (FR-076) | the Author's Terraform; stopping the tunnel end | spec 001 FR-029 to FR-033, FR-040, FR-042, FR-054 |
| S20 | dev-relay, on dev and dev-cpu, only while the kill-switch rehearsal runs → nothing beyond the stack. The relay's own code, in the dev-relay profile, which no env file selects, on internal alone, which has no route out: it reads its stack's kill switch from gateway-state as grafana_ro, checks and forwards to its stack's gateway, and takes the breach probe's calls (S11) | the rehearsal's hello calls, with fixed text | as S15, inside the stack | as S15 | the rehearsal proves the relay's kill-switch read (spec 001 FR-025) | off; only the rehearsal starts it, and removes it after | — | spec 001 FR-025, FR-040 |
| V6 | the visitor's browser → hareet.ai's edge → the relay on the tunnel end (C1): hello and the status request. The relay answers the status itself, and sends hello on to the serving host's relay block (C14) | a visitor calls hello or opens the status | hello's message (at most 500 characters) and its answer; the IP address, held in memory for the caps; the user agent | the message or the answer in any log, trace, or store; the address in any log, trace, metric, alert, ledger, the shared state, or any store (FR-031, FR-042) | to test the model gateway, and to show which host serves (FR-030 to FR-037) | on, once hello is public (FR-039) | the Author takes hello off the site; with both hosts stopped, hello gets no_host_serving and the status still answers | spec 001 FR-030 to FR-037, FR-040 |
| V7 | the visitor's resolver → Route 53, for hareet.ai | opening the site | the lookup, as the resolver sends it | — | to find the site | on | — | spec 001 FR-027, FR-040 |
| V8 | the visitor's browser → the public view, /status/, at the edge, and the page's two reads on the same origin: /status/latest.json beside it, which the edge caches for 60 s, and GET /api/status, V6's status request, which the relay answers; each on opening the page, then every 60 s while it is visible | opening the dashboard | the IP address, the user agent | anything typed: the page has no form, no write action, no cookie, and no storage | to watch the system run (FR-057 to FR-059) | on | — | spec 001 FR-040, FR-057 to FR-059 |
| C4 | the serving host's publisher, the laptop's snapshot-publisher (in the tunnel profile) or EC2's ec2-snapshot-publisher → snapshot-sink on the tunnel end: the laptop's through the tunnel's forward, tunnel:2301 (C3, S17), EC2's to the tunnel end's private address, 10.42.1.10:2301, inside the VPC; and the tunnel end's write, h4-snapshot-sink.service (deploy/scripts/snapshot_sink.py write), as root with the instance role → the public view's one key, site/status/latest.json, in the site's bucket, through its egress proxy (C17) | each publisher every minute while the relay serves its host, by the relay's status, which the sink answers it; the write every 2 minutes, whether or not a host serves | from a publisher: spec 000's FR-028 panels as numbers and states (requests, the error rate, latency p50 and p95, the model server's health, the degraded causes from their closed set), the spend ceilings and warnings, the host's release, the tunnel's state, the time they were taken, and the host's name, with the sink's token. The document adds the serving host and since when, EC2's state, spend today and this month, the fallback's remainder, the kill switch, the adapters' months, the last 10 handovers with their gaps, the server's month against its budget, and EC2's hours in their zone, from the two schedules (T170), each part with its time | payloads, client identifiers, operator reasons (a handover's reason too), and secrets: the sink refuses any field it doesn't know, by its name, and any value outside its kind | so the public view never goes dark (FR-057 to FR-059) | on | stop both hosts and the view keeps its last values; stop the tunnel end and it keeps them too | spec 001 FR-040, FR-057 to FR-059 |
| S21 | snapshot-sink, on the tunnel end only → the relay's internal listener, relay:8081, on internal: its status, for which host serves. It takes C4's posts on internal, where the tunnel's forward lands, and on the private address's 2301, which the security group holds to EC2's group. It holds the sink's token alone, nothing of AWS's or the store's, and keeps the last part in memory for the host's write | each publisher's post and its question of who serves; the write's read of the last part | the relay's serving; the last host part, to the tunnel end's own host | any AWS credential or store password; a part from a host the relay doesn't serve; a payload, client identifier, operator reason, or secret, which it refuses unread past the field's name | the publishers' one way in, with no route to the relay or AWS of their own (contracts/public-view.md §2) | on, around the clock, on spot, except while AWS has the tunnel end back | stop the tunnel end; the Author's Terraform | spec 001 FR-040, FR-057 to FR-059 |
| V9 | the visitor's browser's own checks, such as a certificate's status | the browser's choice | what the browser sends | — | listed because the site can't switch them off | the browser's | the browser's settings | spec 001 FR-040 |
| C1 | hareet.ai's edge → the relay on the tunnel end, through CloudFront's private origin, inside AWS's network: the origin relay, a VPC origin to the tunnel end's private interface, port 8080 (spec 001 contracts/edge.md §3). The private interface is the tunnel end's primary, so the VPC origin reaches it (plan.md §16, "B-6: option C, and the VPC origin from W1"). W1 makes the VPC origin, and W2's distribution is the first to send through it: until then no request takes this path. | each dynamic request (V2, V4, V6) | the request's fields and the answer back; the headers the edge forwards, Content-Type, Accept, traceparent (a visitor's trace context, if the browser sends one: the relay's edge listener starts a trace of its own and never parents it to that one), and X-H4-Probe (the probe's mark, C11); the client address the edge saw (CloudFront-Viewer-Address), held in memory only | cookies; the message, the answer, or the address in any log, trace, or store | to answer visitors (FR-029, FR-032) | on | stop the tunnel end; the edge then answers itself (FR-066) | spec 001 FR-029, FR-032, FR-040, FR-066 |
| C14 | the relay → the serving host's relay block: EC2's at its private address, inside the VPC; the laptop's through the tunnel (S17, C3) | each forwarded request, and the relay's health checks every second | the request's fields and the answer back; the client address, as X-H4-Viewer, held in memory only; the relay's bearer token for that host; traceparent | cookies; the operator token; any other viewer header; the message, the answer, or the address in any log, trace, or store | to send each request to the serving host (FR-054) | on | stop both hosts; the relay then answers no_host_serving (FR-066) | spec 001 FR-040, FR-054, FR-066 |
C8: when the subscription is made, SNS also mails the address once, asking it to confirm, and delivers nothing to it until the Author does (tasks.md T030). The address reaches AWS in C9's resource configuration, from his terminal, and stays out of the repository and the plan block (FR-010).
C9: the Author's other terminal targets of group 3 read AWS's APIs too, and change nothing there. make infra-audit, which make infra-verify also runs before every apply, reads IAM's users, keys' metadata, roles, policies, and OIDC providers, and Identity Center's permission sets, and prints names, never a key's ID or the account's ID. make infra-verify reads whether the state's lock object exists, once the state is in the bucket. make secrets-check lists the parameter names under /h4reet/ and their types, never a value. Each carries his short-lived session, as C9 does.
C8's Telegram half (group 4): the bridge reads the bot's token and the chat ID from Parameter Store, /h4reet/alerts/TELEGRAM_BOT_TOKEN and /h4reet/alerts/TELEGRAM_CHAT_ID, the Author's own values, at each run, and logs neither. Each message is one line of kind and facts, then the facts it picks and the kind's runbook, as contracts/aws-alerts.md §2 gives them, never the notice whole; what has a secret's, an account ID's, a key ID's, an email address's, or a network address's shape is taken out first. A notice it doesn't know sends only that one came. It also forwards the other notices on h4-alerts that §2 lists, each the same way: the credential audit's findings from this group, which name a user, a role, or a permission set, and the start function's, the guard's, the spot warnings', and the deployers' from the groups that publish them. A message Telegram doesn't take after three attempts waits in the account's failure queue, h4-alert-bridge-failed, for 14 days; the mailbox still has SNS's copy.
C10: the Author also pushes the three functions' images to their repositories from his terminal (tasks.md T040), and the credential audit stores each weekly result in the release bucket, under audits/credential/, inside the account. Nothing reads the registry or the bucket from outside the account.
Group 5, the tunnel end and the tunnel, adds S16, S17, and C3, with S1's change in spec 000's part, above, the tunnel end's own rows, and C7's and C15's tunnel-end parts, each in the commit that creates its flow.
S16 and C3: the laptop's prod runs tunnel only once the Author adds the tunnel profile to its COMPOSE_PROFILES, after his tunnel-keys target has made the keys (tasks.md T058); until then neither flow happens. The address tunnel dials is the tunnel end's Elastic IP, which prod's Terraform writes to /h4reet/prod/tunnel-end-address and the tunnel-keys target copies into the laptop's prod env file.
S17: it names the forwards by the targets the tunnel end's sshd permits (deploy/tunnel/sshd_config): the store is the tunnel end's own shared-state, from W1 (plan.md §16, "The shared state on the tunnel end"), and 2203 leads to the laptop edge's health block, which listens on edge's 8088, since its 8087 is spec 002's site (contracts/tunnel.md §4). Its logs pass through a filter that replaces every network address, so the laptop's address, which C3 carries to the tunnel end, reaches no log there.
C7: group 5 builds its tunnel-end part, the tunnel end's deployer, which reads the release bucket and pulls from the account's registry with the instance role, reads its own parameters at boot, and alerts h4-alerts when it refuses or rolls back a release (deploy/scripts/deployer.py). EC2's part and the laptop's come with group 7.
C15: the spec's row names the tunnel end's collector otel-collector; one compose file can't hold two services of a name, so the tunnel end's is tunnel-end-collector, spec 000's image copied to the account's registry by its own digest (deploy/otel/collector-tunnel-end.yaml). It sends what concerns the laptop to the laptop, what concerns EC2 or no host to EC2, and the tunnel end's own telemetry, its queue's and its exporters' counters among it, to both, each queued to a file of 32 MiB, behind the telemetry block's token. Until the relay exists (group 8), the tunnel end's own telemetry is all it carries.
C17: the tunnel end's packet filter (deploy/hosts/tunnel-end/nftables.nft) lets only the proxy's own user reach beyond the VPC, and no container at all, so every flow out of the tunnel end is one of these names. The account's ID is in the registry's name, and AWS's suffix in the bucket's, so each is held to its pattern; the instance role's grants, not the names, keep it to the account's own repositories and bucket (infra/prod/iam.tf). Once, at the first boot, before the filter loads, dnf installs Docker and nftables from Amazon Linux's own package repository in the Region, which the security group's 443 admits; nothing else runs then. Groups 6 to 9 add the names their reads need, each with its row.
C11: its schedule is written disabled until group 8 (contracts/aws-alerts.md §5), whose patch enables it once the site and the status request exist; until then the probe sends nothing. It sends no cookie and no credential, and follows no redirect.
F2's change (group 4) takes effect when the Author points the laptop's Bedrock profile at h4-laptop-bedrock (tasks.md T040; docs/runbooks/laptop.md). Until then the gateway exchanges its SSO token as before. Afterwards the permission set holds only that sts:AssumeRole, and the control F2's last cell describes moves to h4-laptop-bedrock, which holds bedrock:InvokeModel* on the one inference profile (infra/account/iam.tf). The host the spec names, sts.amazonaws.com, is STS's global endpoint; the SDK's default for a profile in us-east-1 is likely the regional sts.us-east-1.amazonaws.com instead. Confirmed at spec 001's T040b, on 2026-11-12, when the profile first chained: the chained profile opened sts.us-east-1.amazonaws.com, the regional endpoint, and the row names it beside the spec's words. That the gateway's SDK, the AWS SDK for JavaScript v3, calls the same regional endpoint by default is the session's reading, not yet observed from the gateway itself.