Repository navigation
Freeze legacy MDM eligibility and require App Attest for base rewards - #1344
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Follow-up: legacy-MDM-only machines are now excluded from new base rewards. A current qualified App Attest authorization is required at candidate selection and again before settlement credit; completed inference earnings and existing reward balances are unchanged. The full integrated coordinator suite passed against isolated PostgreSQL, and reward race regressions cover expiry or loss of qualification during settlement. The initial CI lint findings were corrected in 2b0e6ee; |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Threat model review — advisoryReviewed head Review not completed for this head. Previous findings are superseded, not confirmed resolved. Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging. Coverage: 0/0 source units; cross-file integration pending. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned. Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens. Saved findings and earlier report · Historical findings are not confirmed resolved. |
|
@codex review The historical-backfill ordering finding is fixed in 1ef14bd; 80598e8 only clarifies the provenance comment. The 124-record PostgreSQL regression covers multiple batches and immutable restarts, while error/cancellation regressions preserve retryability before freezing. Existing historical backfill rules are unchanged, and their evidence limits are documented. All known findings are resolved on the remote branch; please check the latest head. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Ready for review at 80598e8. Latest main CI and E2E integration workflows passed; signatures, docs, static analysis, provider unit/SDK/prompt-parity tests, and release integrity are green. The latest Codex review completed with no major issues, and all four validated findings are fixed and resolved. The only pending workflow is E2E Benchmarks, which is waiting for human approval of the benchmarks environment. Base rewards require proof-bound macOS 27+ and current qualified App Attest for every provider, old and new. Grandfathered legacy serving and earned balances remain unchanged. The SDK cancellation fix PR Layr-Labs/mlx-swift-lm#290 is separately merged. No production deployment was performed by this work. |
Two documentation pages conflicted with the App Attest cutover change (#1344): - docs/reference/configuration.md: master's "Deployment environment" section and this branch's TMPDIR section are both kept. - docs/provider/cli-reference.md: only the "Last updated" stamp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in master through #1328 (goose migrations, store in store/postgres/), #1344, #1351, #1352 and others. Conflicts: - ci.yml (Report coverage): master inlined the empty-profile, coordinator-row and statement-format checks (#1252). This PR moved the same checks into scripts/coordinator-statement-coverage.sh, which ci.yml and integration.yml both call. Keep the script call. - docs/developer/test.md (coverage command): keep the script call. - docs/developer/test.md (CI workflow map): keep master's ci.yml row (adds the provider coverage table) and this PR's integration.yml row (adds the e2e coverage row and artifact). The #1284 store contract tests and coverage tests build and vet against master's store layout with no change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Freeze legacy MDM eligibility at the first upgraded coordinator startup. Only authenticated account/machine-key associations with retained successful MDM evidence may continue on that path. New providers require macOS 27 or later and current qualified App Attest, including owner self/prefer routing. OS version alone is not approval; consumers of inference do not need macOS 27.
darkbloom enrollchecks coordinator eligibility even when a Darkbloom profile is already installed; success skips reinstallation, denial writes no profile.Before
flowchart TD setup["EnrollmentService.enroll"] --> local{"Local Darkbloom profile?"} local -->|Yes| success["Already enrolled without eligibility check"] local -->|No| profile["Anonymous generic profile"] profile --> mdm["MicroMDM enrollment"] register["Provider registration"] --> restore["Legacy serial recovery"] restore --> verify["SecurityInfo / cached trust reuse"] mdm --> verify verify --> route["Legacy hardware trust or relaxed owner route"] route --> serve["Serving and possible base rewards without App Attest"] classDef flow fill:#dbeafe,stroke:#2563eb,color:#172554; classDef legacy fill:#fef3c7,stroke:#b45309,color:#451a03; classDef outcome fill:#dcfce7,stroke:#15803d,color:#14532d; class setup,register flow; class local,profile,mdm,restore,verify,route legacy; class success,serve outcome;After
flowchart TD boot["Production startup: replay revocations and validate App Attest config"] --> backfill["Drain eligible historical inventory backlog"] backfill --> freeze["Policy.Initialize / FreezeLegacyMDMCohort"] freeze --> cohort[("Immutable old account/key/serial cohort")] enroll["Legacy enroll, including existing profiles"] --> proof["Bearer token and signed existing-key proof"] proof --> eligible{"Policy.AuthorizeEnrollment passes?"} cohort -.-> eligible eligible -->|No| deny["401/403; no installation; 503 on unavailable storage"] eligible -->|Yes| local{"Profile already installed?"} local -->|Yes| keep["Confirm eligibility; keep existing profile"] local -->|No| profile["Download profile and offer installation"] register["Authenticated provider registration"] --> legacy{"Frozen account/key/serial?"} cohort -.-> legacy legacy -->|Yes| mdm["Existing MDM verification safeguards"] legacy -->|No| required["RequireAppAttestServingAuthorization"] required --> lease{"Current qualified App Attest lease?"} lease -->|No| pending["Unroutable, including self/prefer"] lease -->|Yes| route["Shared routing and final handoff gates"] mdm --> route route --> serve["Authorized serving"] lease -->|Yes| rewards["rewardSnapshotEligible: proof-bound macOS 27+ and settlement recheck"] mdm --> noRewards["MDM alone: no base rewards"] classDef flow fill:#dbeafe,stroke:#2563eb,color:#172554; classDef policy fill:#ede9fe,stroke:#7c3aed,color:#3b0764; classDef legacy fill:#fef3c7,stroke:#b45309,color:#451a03; classDef denied fill:#fee2e2,stroke:#dc2626,color:#450a0a; classDef outcome fill:#dcfce7,stroke:#15803d,color:#14532d; class boot,backfill,enroll,proof,register,route flow; class freeze,cohort,eligible,local,legacy,required,lease policy; class profile,mdm legacy; class deny,pending,noRewards denied; class keep,serve,rewards outcome;Blue: request/code flow. Purple: eligibility policy. Amber: legacy verification. Red: denied/pending. Green: permitted outcomes. Frozen eligibility is not a current trust grant.
CI Failures Fixed
The failing provider job had two legitimate causes, not just a need for longer timeouts:
mlx-swift-lmtoe407e899c4e3f9ee4d95f8974ed4f01e7e60e702, containing only the fix and required formatting on top of the previous pin. Dependency PR: Fix cancelled native requests losing retirement during queue removal mlx-swift-lm#290.A subsequently merged
masterchange also caused Release Integrity to fail on Linux by using macOS-onlycp -c. The staging script now uses ordinary copy on non-Darwin hosts and attempts cloning with an ordinary-copy fallback on Darwin. Byte comparison, temporary-file cleanup, and atomic replacement remain intact. Twelve script regressions pass, including unsupported cloning and failed/corrupt copies preserving the old destination.Validated review fixes are included: production-only cutoff classification uses
EIGENINFERENCE_DEPLOYMENT_ENVIRONMENT(closed production/development values, default production), never telemetry; the installer defers legacy reenrollment to login plus the signed CLI; transient token-store failures close registration with retryable WebSocket 1013 before cohort selection, and enrollment returns 503 instead of misreporting invalid credentials. All three review threads have concrete regression evidence and were resolved after the fixes were pushed.The additional inventory-ordering finding is fixed too: startup synchronously drains existing eligible historical backfill in 100-row batches before freezing, under the same 30-second budget. Errors/cancellation leave no new freeze marker. A real PostgreSQL regression covers 124 records and verifies that late aliases cannot widen an existing cohort. Historical backfill preserves its existing stored-account/endpoint-bound-key rules and recent/open-session filters; it is not independent evidence of a historical token login, and zero rows is not a claim that every possible history gap was recovered.
flowchart LR subgraph BeforeNative["Before: native cancellation"] A["First scan sees not cancelled"] --> B["Cancellation races"] --> C["Second scan removes without finishWaiting"] --> D["Reservation remains held"] end subgraph AfterNative["After: native cancellation"] E["One cancellation observation"] --> F["finishWaiting before removing control"] --> G["Terminal, retirement, capacity released"] end classDef bad fill:#fee2e2,stroke:#dc2626,color:#450a0a; classDef good fill:#dcfce7,stroke:#15803d,color:#14532d; class A,B,C,D bad; class E,F,G good;The 2,048-request SDK stress regression failed before the fix with six orphaned reservations (600 bytes). It passed 20 independent runs afterward. This is scheduling-dependent stress, not a deterministic injected interleaving; no assertion or timeout was weakened.
Validation
make provider-testpassed with CI fixture environment: 3,697 Swift tests in 487 suites; XCTest reported 553 tests, 125 existing skips, zero failures; all runner-isolated groups also passed. Missing MiMo fixture environment caused the first local attempt to fail; rerunning with the exact CI metadata/payload fixtures passed.go vet ./coordinator/...passed.make coordinator-testpassed after merging currentmasterand adding the explicit proof-bound macOS gate; targeted base-reward and authorization race suites passed.make docs-check,make docs-impact-check BASE=origin/master, andgit diff --checkpassed.Rollout And Limitations
POST /v1/enrollrequires a provider Bearer token and{se_public_key,timestamp,signature}. The signature binds token hash/key/timestamp/enrollment domain; freshness is five minutes in either direction.