Skip to content

BARC-01.1f: admit coordinator batches atomically with provenance - #1

Merged
EHotwagner merged 1 commit into
masterfrom
routine/barc-01-1f-native-admission
Sep 28, 2026
Merged

EHotwagner merged 1 commit into
masterfrom
routine/barc-01-1f-native-admission

Conversation

@EHotwagner

Copy link
Copy Markdown
Owner

The coordinator previously discarded batch, client, index, and full-width sequence provenance while enqueueing children individually, and queue overflow could leave a partially admitted parent.

This change validates each 1–64 command batch before queue mutation, preserves session, batch sequence, client correlation, command index, and authoritative target on every queued child, and admits the complete batch through one atomic TryPushBatch call. Typed accepted, invalid, and queue-full outcomes feed coordinator counters and trace/error logging. Focused coverage exercises exact three-child provenance, values above UInt32, atomic overflow, invalid and oversized batches, and concurrent non-interleaving.

Validation:

  • standalone native CMake configure and compilation passed with CMake 4.4.3, GCC 16.2.1, protobuf 36.1, gRPC 1.84.0, and GTest 1.18.0
  • command_queue_test passed
  • coordinator_command_admission_test passed, including 100 consecutive executions
  • CoordinatorClient.cpp passed a standalone C++20 syntax compile against generated protobuf/gRPC headers
  • reviewed source tree is clean

This focused source evidence does not claim a full Recoil engine build, live game session, end-to-end broker acknowledgement, or deployed native qualification.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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-28T16:07:49.279704Z 48acc6f PR opened
ℹ️ 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.

@EHotwagner
EHotwagner merged commit 14b5ce7 into master Sep 28, 2026
10 checks passed

@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: 48acc6f4b7

ℹ️ 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 +96 to +97
if (!batch.has_client_command_id() || batch.client_command_id() == 0) {
return {CommandBatchAdmissionStatus::kInvalidCorrelation, 0};

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 Accept batches without optional correlation IDs

When clients omit the proto-optional client_command_id, this now drops the batch after the coordinator has already acknowledged it as forwarded. The checked coordinator validates only batch_seq, commands, and finite values (specs/002-live-headless-e2e/examples/coordinator.py:151-162), while bundled callers such as _make_move_batch omit the correlation field entirely (command_channel_repro.py:42-53); the normal gateway validator also requires it only when strict validation is configured. Consequently, otherwise-valid coordinator-mode commands report success to the caller but never reach the engine queue. Either preserve compatibility here or make the coordinator populate/reject the field before acknowledging submission.

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.

1 participant