Skip to content

feat(server): capture admission program generation per request - #323

Merged
SunSi12138 merged 204 commits into
devfrom
issue-322-admission-program-generation
Aug 26, 2026
Merged

SunSi12138 merged 204 commits into
devfrom
issue-322-admission-program-generation

Conversation

@SunSi12138

@SunSi12138 SunSi12138 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Scope

Implements #322 as the stacked follow-up to #319, now restacked directly onto dev after the lower stack landed.

This PR remains limited to immutable Dynamic Admission program publication/capture and per-request generation lifetime. It does not add a runtime mutation API, migrate limiter state, or redesign ResourceGovernor/decode/pre-admission-stream ownership.

Implementation

  • compose enabled Dynamic Admission as one immutable AdmissionProgram generation; disabled remains a no-controller publication;
  • capture the current admission publication once at the accepted Request boundary in RequestLoop;
  • explicitly pass the captured program into one-way/two-way dispatch and queued continuations;
  • remove downstream request-path reads of the server's current admission controller/publication;
  • bind enabled-generation lifetime to one linear refcount ownership chain, transferring the captured generation use to ServerCallCancellationState when admission state is created and releasing it exactly once from terminal cleanup;
  • keep the disabled request path allocation/refcount free;
  • preserve existing admission leases, retained compressed payloads, decode permits, pre-admission stream permits, call permits, cancellation/activation arbitration, and terminal cleanup paths;
  • retain deterministic publication hooks/diagnostics for the [Server][DynamicAdmission] Capture immutable AdmissionProgram generation per request #322 race matrix;
  • adapt the existing request-scope reflection harness to the generation-aware dispatch signatures after restack.

Validation

Final exact head: ada8dde71b58a480b7b843cea638f1e0d43cc1aa

PR Quick: 32993893194, attempt 2 — passed on the exact branch head.

  • Formatting: passed
  • Debug build: passed, 0 warnings / 0 errors
  • Release build: passed, 0 warnings / 0 errors
  • Generated assembly Runtime-reference verification: passed
  • Unit Tests: passed (1227 total)
  • Generator Tests: passed
  • Load Test Tests: passed
  • Integration Tests: passed
  • NativeAOT transport/topology smoke: passed
  • Pack / SDK / metadata / dependency / package smoke gates: passed
  • Oneway demo: passed
  • Load Smoke: passed
  • Chaos Smoke (120s sharedmemory): passed
  • Codec compatibility producer/verify/browser evidence matrix: passed, including Windows ARM64 on attempt 2

CodeQL: 32993806558passed on the same exact head.

The first PR Quick attempt exposed and led to fixes for two restack-only test harness compatibility issues. A subsequent isolated shared-memory control-channel test failure did not reproduce on failed-job rerun; the complete attempt-2 quick job and all rerun codec jobs passed.

Residual risk

No known correctness or CI blocker remains for this slice. Runtime Admission mutation/state migration remains intentionally out of scope for later #264 slices.

Refs #322, #319, #273, #264.

SunSi12138 added a commit that referenced this pull request Aug 25, 2026
Base automatically changed from issue-314-pre-admission-stream-budget to dev August 26, 2026 16:32
@SunSi12138
SunSi12138 merged commit eec8c75 into dev Aug 26, 2026
68 of 71 checks passed
@SunSi12138
SunSi12138 deleted the issue-322-admission-program-generation branch August 26, 2026 17:36
SunSi12138 added a commit that referenced this pull request Aug 26, 2026
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