Skip to content

Add isolated gateway workload observation and aggregate capture - #934

Open
ttupper92618 wants to merge 1 commit into
initiative/operator-workload-fixturefrom
initiative/operator-workload-observer
Open

Add isolated gateway workload observation and aggregate capture#934
ttupper92618 wants to merge 1 commit into
initiative/operator-workload-fixturefrom
initiative/operator-workload-observer

Conversation

@ttupper92618

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #933, targeting initiative/operator-workload-fixture. This is isolated qualification tooling, not a production change or a capacity claim.

  • Observe real gateway TCP accept/close lifetimes through a bounded opaque inner-TLS bridge, and fixed-category ASGI request/response body counters.
  • Feed the digest-pinned relay aggregate recorder over bounded memory/stdio only. Queue overflow, incomplete flows, invalid commands and recorder failures reject capture; no raw trace or content is retained.
  • Add an explicit local capture command with seven fixed flow labels. Output remains unattested aggregate; gateway completion is not device-side delivery.
  • Bind relay execution to a protected copy of the verified executable and verify gateway TLS readiness, including delayed-listener and source-replacement regressions.

Validation

  • Full Python suite: 4,100 passed, 1 skipped, 240 deselected.
  • Strict type check: 0 errors, 0 warnings.
  • Ruff lint and Nix formatting passed.
  • 28 focused observation/fixture tests passed, including real signed relay + inner TLS, compiled recorder interoperability, bounded queue failure, privacy and cleanup.
  • Real capture CLI startup succeeded; intentionally incomplete finish exited nonzero without aggregate output and removed its generated local listener and temporary state.

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.

Copilot AI lite review requested due to automatic review settings September 5, 2026 08:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T08:22:05.370239Z e681a07 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ttupper92618

Copy link
Copy Markdown
Collaborator Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread bench/operator_fixture_recorder.py
Comment thread bench/operator_workload_fixture.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread bench/operator_workload_fixture.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants