Skip to content

Implement the E001 Stage A observation chamber#6

Merged
AUo959 merged 1 commit into
mainfrom
agent/e001-stage-a-runtime
Jul 14, 2026
Merged

Implement the E001 Stage A observation chamber#6
AUo959 merged 1 commit into
mainfrom
agent/e001-stage-a-runtime

Conversation

@AUo959

@AUo959 AUo959 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

What changed

  • implement the dependency-free E001 Stage A discrete-event observation chamber
  • compare central scheduling, a global barrier, and local CBF interlocks across the frozen 72-run matrix
  • add canonical workload configuration, deterministic JSONL traces, summaries, manifests, and a CLI
  • enforce the ten hard-invariant families with focused regression tests
  • run the E001 test suite in the required integrity workflow
  • document local single-run and matrix reproduction commands

Why

E001 now has a frozen experimental contract but needs an inspectable instrument before any result can be interpreted. This change implements that instrument without promoting generated runs or making Python a permanent substrate claim.

Validation

  • PYTHONPATH=src python3 -m unittest discover -s tests -p 'test_*.py' -v — 12 passed
  • PYTHONPATH=src python3 -m superloop_e001.cli matrix --output /tmp/superloop-e001-smoke-20260713-r4 — 72 runs, zero invalid run IDs, zero workload-equivalence mismatches
  • python3 tools/check_repository.py — passed
  • PYTHONPATH=src python3 -m py_compile src/superloop_e001/*.py tests/test_e001_simulator.py — passed
  • git diff --check — passed

Evidence boundary

The matrix run above is a smoke validation of the implementation. Generated traces and summaries were kept outside the repository. Canonical E001 evidence and interpretation will be promoted separately after the runtime source commit is reviewed.

Copilot AI review requested due to automatic review settings July 14, 2026 03:53
@AUo959
AUo959 marked this pull request as ready for review July 14, 2026 03:54
@AUo959
AUo959 merged commit 8ddafbc into main Jul 14, 2026
3 checks passed
@AUo959
AUo959 deleted the agent/e001-stage-a-runtime branch July 14, 2026 03:55

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.

Pull request overview

Implements the E001 Stage A “observation chamber”: a deterministic, dependency-free discrete-event simulator with a frozen 72-run canonical matrix, plus supporting workloads, CLI, manifests, and regression tests to validate determinism and hard invariants.

Changes:

  • Added deterministic E001 Stage A simulator with trace/summary generation, matrix execution, and manifest generation.
  • Introduced frozen canonical workloads/matrix configuration and a CLI to run single simulations or the full matrix to an explicit output directory.
  • Added invariant/determinism regression tests and wired them into the repository integrity GitHub Actions workflow.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_e001_simulator.py Adds determinism + invariant regression coverage across single runs and the full 72-run matrix.
tests/README.md Documents how to run the Stage A unit test suite locally.
src/superloop_e001/workloads.py Defines frozen scenario/config/seed matrix and canonical offered streams + workload digests.
src/superloop_e001/simulator.py Implements the discrete-event simulator, canonical JSONL trace, summaries, manifest, and evidence writer.
src/superloop_e001/cli.py Adds CLI entrypoints for single-run and matrix execution, plus result/manifest output.
src/superloop_e001/__main__.py Enables python -m superloop_e001 execution.
src/superloop_e001/__init__.py Exposes primary public API (run_simulation, run_matrix, RunResult).
src/README.md Documents how to run E001 Stage A locally and where evidence is written.
experiments/E001/config/CANONICAL_MATRIX__E001__v0.1__2026-07-13.json Adds canonical frozen matrix configuration used by tests and tooling.
.github/workflows/repository-integrity.yml Runs the new E001 invariant test suite in the integrity workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +844 to +851
coordination_types = {
"propose",
"credit_grant",
"credit_deny",
"validate",
"receipt",
"wait",
}
Comment on lines +906 to +908
"stale_rejection_count": self.stale_rejection_count,
"stale_authorization_count": self.stale_authorization_count,
"duplicate_promotion_count": self.duplicate_promotion_count,

@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: 7d69f06cef

ℹ️ 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 on lines +462 to +464
commit_event = self._emit(
tick=tick,
event_type="transfer_commit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Attach leases to batch transfer commits

For central and global-barrier runs that use this batch path, the emitted transfer_commit records leave lease_fresh_until as null, even though the E001 hard invariant requires every transfer commit to have current validation and an unexpired lease (experiments/E001/EXPERIMENT__E001__THREE_RING_BOUNDED_FLOW__v0.1__2026-07-13.md:270). Those canonical runs are still summarized with zero invariant violations because _check_invariants does not validate leases, so the generated evidence can pass the validity gate while violating the frozen trace contract.

Useful? React with 👍 / 👎.

"p95": self._nearest_rank(latencies, 0.95),
"maximum": max(latencies) if latencies else None,
},
"maximum_wait": self._maximum_wait(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Report starvation duration in summaries

The summary serializes maximum_wait but never includes a separate starvation-duration metric, while the E001 metrics contract requires both maximum wait and starvation duration (experiments/E001/EXPERIMENT__E001__THREE_RING_BOUNDED_FLOW__v0.1__2026-07-13.md:252). Any consumer of the run or matrix JSON summaries therefore cannot evaluate the declared starvation metric for canonical runs, even though the run is reported as valid.

Useful? React with 👍 / 👎.

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