Add isolated gateway workload observation and aggregate capture - #934
Add isolated gateway workload observation and aggregate capture#934ttupper92618 wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
🟡 Changes recommended
There are a couple of confirmed fail-closed robustness issues (recorder input validation can throw unexpected exceptions; relay copy step has a small TOCTOU window) that should be addressed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the isolated operator workload fixture tooling with an optional, strictly bounded gateway-side observation path (TCP accept/close lifetimes + ASGI body byte counters) and a digest-pinned aggregate recorder subprocess, plus accompanying docs and tests. It remains explicitly positioned as qualification tooling with an “unattested aggregate” evidence boundary and no production behavior changes.
Changes:
- Add an in-process observer (
FixtureObserver) and loopback TCP bridge to measure gateway-boundary socket lifetimes and ASGI body sizes without retaining payloads. - Add a lossless, bounded pipe (
FixtureRecorder) to a digest-pinned local Node-based aggregate reducer, and a CLI (observe_operator_workload.py) with fixed flow controls. - Update fixture startup to execute a protected verified relay binary copy and to gate readiness on an actual certificate-verified TLS handshake, plus update docs (fixture contract, architecture docs, contributing notes) and add focused tests.
File summaries
| File | Description |
|---|---|
| website/docs/operator-workload-fixture.md | Documents the new optional observation workflow, bounds, fixed flow vocabulary, and evidence boundary. |
| website/docs/architecture.md | Adds a short narrative entry describing the optional observer and aggregate reducer boundary. |
| website/docs/architecture-reference.md | Adds a fact-sheet bullet for the new aggregate observation tooling. |
| CONTRIBUTING.md | Notes the observer tooling and points to the fixture contract for pins/bounds/prereqs. |
| CLAUDE.md | Updates the repo “shape” description to include the observer and its evidence boundary. |
| bench/operator_workload_fixture.py | Executes a protected verified relay binary copy, adds TLS readiness probing, and supports optional observation (TCP bridge + ASGI wrapper). |
| bench/operator_fixture_observer.py | Implements fixed-vocabulary observation events with strict bounds and an ASGI wrapper that exports only lengths/categories. |
| bench/operator_fixture_proxy.py | Adds the bounded loopback TCP observation bridge that forwards opaque inner-TLS bytes while recording accept/close lifetimes. |
| bench/operator_fixture_recorder.py | Adds a bounded, lossless event queue feeding a local digest-pinned Node reducer and validates the aggregate JSON output contract. |
| bench/observe_operator_workload.py | Adds a local CLI to run fixture + recorder and accept only fixed flow control commands over stdin. |
| bench/tests/test_operator_workload_fixture.py | Extends fixture integration test to cover observer wiring and verified-copy execution behavior. |
| bench/tests/test_operator_fixture_recorder.py | Adds tests for verified module copying, queue overflow fail-closed behavior, and opt-in real reducer interoperability. |
| bench/tests/test_operator_fixture_observer.py | Adds tests for privacy, fixed categories, bounds, and real socket lifetime behavior. |
| bench/tests/test_observe_operator_workload.py | Adds tests ensuring control channel rejects unknown/oversized input and enforces idle-before-finish. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e681a07e1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Stacked on #933, targeting initiative/operator-workload-fixture. This is isolated qualification tooling, not a production change or a capacity claim.
Validation
Evidence boundary
No app changes, production traffic, deployment, provider resources or spending. No physical-device profile or capacity is qualified. Installed app provenance, device reachability, observation overhead and replay/profile binding remain separate gates. Private campaign evidence is maintained outside this repository.