SPEC-028 PR-B: greedy gate + /v1/status telemetry + AC harnesses#398
Merged
Conversation
…ness Adds FR-5 temperature==0 greedy gate (stochastic requests stay on TokenIterator), FR-8 /v1/status spec_decode_* fields with window reset on target swap, opt-in-only heartbeat forwarding with coordinator forward-compat, the executable macprovider-cli spec028-canary ac10 harness with fail-closed 16 GB Apple Silicon guard, and an AC-11 M1 8 GB harness gated by SPEC028_RUN_SMALL_AIR_CANARY=1. Constraint: SPEC-028 PR-B requires FR-5, FR-8, AC-5, AC-7, AC-8, AC-10, and AC-11 coverage before PR opening. Rejected: opening a PR from this session | AC-11 real M1 8 GB Air evidence is unavailable on the current host. Confidence: high Scope-risk: moderate Directive: Do not open PR until AC-11 M1 8 GB Air evidence is recorded in the PR body; AC-10 real M4 16 GB canary evidence is also still needed. Tested: swift test (890 tests, 8 skipped, 0 failures); focused Swift SPEC-028 test lane (135 tests, 1 skipped, 0 failures); go test ./internal/ws; git diff --check; macprovider-cli spec028-canary host guard failed closed on 32 GB host; three-lane BUILD audit 0/0/0. Not-tested: AC-10 real M4 16 GB Qwen2.5-Coder-7B+1.5B canary; AC-11 real M1 8 GB Air canary.
antfleet-ops
approved these changes
Jul 5, 2026
antfleet-ops
left a comment
Collaborator
There was a problem hiding this comment.
PR-B telemetry + greedy gate: three-lane BUILD audit 0/0/0, swift test 890/0 (8 skipped), go test ./internal/ws pass. Scope matches SPEC-028 §8 PR-B (FR-5, FR-8, FR-9.5). Dual-waiver on AC-10/AC-11 documented in body with explicit PR-C merge-gate; FR-1 disabled-mode byte-identity + FR-4.6 fail-closed capacity shortfall bound blast radius while gates are open. Coordinator heartbeat forward-compat tests present. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements SPEC-028 PR-B "Telemetry + greedy gate" on top of PR-A plumbing (
03522c4):request.temperature == 0.0AND the request has no feature the Swift speculative primitive cannot verify (seeChatCompletionRequestgating). Stochastic and featureful requests stay on the existingTokenIteratorpath — buyer output is unchanged./v1/statustelemetry. Addsspec_decode_enabled,spec_decode_draft_model_id,spec_decode_num_draft_tokens,spec_decode_drafted_tokens_since_last,spec_decode_accepted_tokens_since_last,spec_decode_acceptance_rate. Aggregated over the same window as request/tps; window resets on each metrics roll.spec_decode_drafted/accepted_since_lastreset to zero on target-swap boundary so acceptance rate never blends pre/post-swap draft populations.macprovider-cli spec028-canary ac10harness with fail-closed 16 GB Apple Silicon guard and pinned Qwen2.5-Coder-7B+1.5B fixture (spec028-code-iso8601-v1.json). AC-11 M1 8 GB harness (Spec028PlumbingTests/testSmallAirLlama32CanaryWhenExplicitlyEnabled) gated bySPEC028_RUN_SMALL_AIR_CANARY=1and host-memory ≤ 12 GB.Validation
git diff --checkswift test(all): 890 tests, 8 skipped, 0 failures.go test ./internal/ws(heartbeat forward-compat): pass.BUILD audit
Three-lane Codex BUILD audit loop completed:
Known validation gaps
Both live-hardware acceptance criteria are pinned in code and env-gated, but were not executed on the required hosts. Each becomes a hard merge gate on PR-C (warm-swap), at which point spec decode first becomes operator-visible in the intended enable-in-prod path. FR-1 disabled-mode byte-identity keeps the beta fleet unaffected while PR-B lands: no
beta/config-*.yamlsetsdraft_model, and the flag is undocumented in operator materials until PR-C.AC-10 — 16 GB M4 performance canary (waived → PR-C)
spec028-canary ac10harness fail-closes on non-16 GB hosts by design; diagnostic-mode runs on other hardware do not satisfy AC-10 (harness documents this).## AC-10 evidenceblock with a real 16 GB M4 run, or PR-C is blocked from merge.AC-11 — M1 8 GB Air load canary (waived → PR-C)
mlx-community/Llama-3.2-3B-Instruct-4bit+ draftmlx-community/Llama-3.2-1B-Instruct-4bitcompleteshort_chatandstreaming_checkattemperature=0on real M1 8 GB Air without Metal OOM or process crash. Validates FR-4.6ProviderCapacityheadroom refresh..xctest-bundle metallib-resource resolution failure at test-runtime (metallib compiles but XCTest bundle cannot locate it viaBundle.module; not a repo issue). Diagnostic reproduces every run:MLX error: Failed to load the default metallibatmlx-swift/Source/Cmlx/mlx/c/mlx/c/stream.cpp:115. Requires macOS ≤ 15 host or a workaround for the SwiftPM test-bundle resource lookup on macOS 26.## AC-11 evidenceblock from real M1 8 GB Air hardware, or PR-C is blocked from merge. Options being coordinated for PR-C: beta operator loan, fleet 8 GB M1 host reflashed to macOS 15, or a PR-C-scopedmacprovider-cli spec028-canary ac11executable that sidesteps the.xctestbundle-resource bug (executable targets don't hit the same lookup path).Blast radius while gates are open
beta/config-*.yamlsetsdraft_model. Existing providers are byte-identical (FR-1).--draft-modelvia CLI/env/YAML. That path fail-closes at startup on capacity shortfall (FR-4.6draft_model_capacity_shortfall) and on tokenizer mismatch (FR-4.4draft_model_tokenizer_mismatch) — a misconfigured provider process refuses to start rather than serving corrupt traffic.Closes SPEC-028 §8 PR-B scope. PR-C (warm-swap lifecycle, FR-9.1–9.4, AC-9) is next.