APPLE-003 — Apple Provider Conformance Gate¶
Level 3a — Provider Conformance Gate
document:
id: APPLE-003
title: Apple Provider Conformance Gate
version: "1.0"
track: platforms/apple
updated: 2026-07
next_review: 2027-WWDC
Separation of Duties¶
| Owns | Must NOT Own |
|---|---|
| Provider Conformance Score (PCS), PCS evidence table, PCS-specific CI gate, PCS receipts | Local Ownership Score (APPLE-004). Modernization policy (APPLE-002). Provider capability catalog (APPLE-001). |
Two independent gates — never conflated:
| Gate | Question | Score |
|---|---|---|
| Provider Conformance | Are we using Apple correctly? | Provider Conformance Score (PCS) |
| Local Ownership | Did we unnecessarily replace Apple? | Local Ownership Score (LOS) |
Dependencies: - Gate checklist enforces ratchet rule IDs from APPLE-002 (does not redeclare the rules). - PCS computed from capability registry in APPLE-001 §2. - LOS computed from local capability inventory in APPLE-004.
1. Provider Conformance Score (PCS)¶
The Provider Conformance Score measures how closely this repository conforms to the provider's current published capabilities. It is generated, never manually maintained.
Why "Conformance" not "Modernity": Modernity is subjective. Conformance is measurable: does the repository use what the provider currently offers? This framing scales to every provider standard family (Apple, GitLab, Gas City, Drupal, Docker).
Formula¶
PCS = (PASS + 0.5 × PARTIAL) / Total Audited Capabilities
Capabilities rated N/A or PENDING are excluded from the denominator.
Capability Conformance Table — BLU Studio (v1.0 baseline)¶
Each row is evidence-backed. Status is derived from evidence, not asserted.
| Capability | Requirement | Evidence Command | Status |
|---|---|---|---|
| SwiftUI | All UI MUST use SwiftUI. No UIKit or AppKit roots. | grep -rn "NSApplicationDelegate\|UIApplicationDelegate" --include="*.swift" |
PASS — none found |
| Scene Model | App MUST use WindowGroup / Settings scene. |
grep -rn "WindowGroup\|Settings {" --include="*.swift" |
PASS — present in AgentBluApp.swift |
| Navigation | New navigation MUST use NavigationSplitView or NavigationStack. No NavigationView. |
grep -rn "NavigationView\b" --include="*.swift" |
PASS — none found |
| State Observation | New state types MUST use @Observable. |
grep -rn "@Observable" --include="*.swift" \| wc -l vs grep -rn "ObservableObject" --include="*.swift" \| wc -l |
FAIL — 0 @Observable; 14 ObservableObject |
| Test Authorship | New tests MUST use Swift Testing (@Test, #expect). |
grep -rn "import Testing" --include="*.swift" |
FAIL — none found |
| Concurrency Isolation | New concurrent types MUST use actor. No @unchecked Sendable. |
grep -rn "@unchecked Sendable" --include="*.swift" |
PARTIAL — 2 suppressions found (CacheManager, MetricsStreamManager) |
| Structured Logging | Logging MUST use OSLog (Logger). No print, NSLog, or third-party loggers. |
grep -rn "print(\|NSLog\b" --include="*.swift" |
PASS — OSLog wrapper (AppLogger) in use |
| Local Persistence | If persistence is required, MUST use SwiftData. |
N/A — network-driven app; no local persistence required | N/A |
| AppIntents | System actions MUST use AppIntents. |
grep -rn "import AppIntents" --include="*.swift" |
PENDING — not yet audited |
| Accessibility | New UI surface MUST declare accessibility identifiers and labels. | Manual inspection or grep -rn "accessibilityLabel\|accessibilityIdentifier" --include="*.swift" |
PENDING — not yet verified |
Provider Conformance Score: 4.5 / 8 = 56% (PASS=4, PARTIAL=1 → 4.5; N/A and PENDING excluded from denominator of 8)
Recompute this table by running the evidence commands against the current branch. The score follows from the evidence — do not edit the score directly.
2. MR Verification Template¶
Every Apple platform MR must include this block in its MR description or review artifact.
## MR Verification — APPLE-003
### Build & Launch
Compile: [ PASS | FAIL | NOT VERIFIED ]
Evidence: grep "BUILD SUCCEEDED" build.log
Process launch: [ PASS | FAIL | NOT VERIFIED ]
Evidence: pgrep -la "Agent Studio"
Main window rendered: [ PASS | FAIL | NOT VERIFIED ]
Evidence: screenshot or screencapture observation
Functional UI: [ PASS | FAIL | NOT VERIFIED ]
Evidence: manual exercise of each navigation item
Secret scan: [ PASS | FAIL | NOT VERIFIED ]
Evidence: gitleaks detect --log-opts HEAD~1..HEAD
### Automated Tests
Test execution: [ PASS | FAIL | NOT VERIFIED ]
Evidence: xcodebuild test exit code and output
Root cause (if FAIL): [ identified | unresolved ]
Evidence: first compiler/runtime diagnostic
### Track 1 — Apple Modernization Gate (rule IDs from APPLE-002)
R-OBS New ObservableObject introduced: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*ObservableObject"
R-TEST New XCTest introduced: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*import XCTest"
R-CONC New @unchecked Sendable introduced: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*@unchecked Sendable"
R-DEP New deprecated API introduced: [ YES → FAIL | NO → PASS ]
Evidence: xcodebuild warning output grep for "deprecated"
R-NAV New NavigationView introduced: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*NavigationView\b"
### Track 2 — Bluefly Architecture Gate (rule IDs from APPLE-002)
R-SVC New singleton manager: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*\.shared"
R-ENV New .environmentObject() injection: [ YES → FAIL | NO → PASS ]
Evidence: git diff HEAD~1 | grep "+.*\.environmentObject("
R-DUP New duplicate capability: [ YES → FAIL | NO → PASS ]
Evidence: capability cross-reference against APPLE-001 §5
R-UNC New unclassified type: [ YES → FAIL | NO → PASS ]
Evidence: new types documented with product/pack/adapter classification
### Existing Debt (pre-existing, not introduced by this MR)
[ list migration IDs from APPLE-002 §3 that exist but were not introduced here ]
### Introduced By This MR
[ list any new violations introduced, or state NONE ]
### Net-Negative Ownership Delta (formula from APPLE-002 §4)
Deletions (custom code removed): +[ N ]
Adoptions (Apple API replaces Blu): +[ N ]
New custom abstractions: −[ N ]
New rule violations: −[ N ]
Delta: [ NET POSITIVE | NEUTRAL | NET NEGATIVE ]
### Provider Conformance Score
[ NO CHANGE | improved from X% to Y% ]
[ list which capability ratings changed and why ]
3. MR Gate Checklist¶
Manual checklist enforcing APPLE-002 ratchet rules. CI gate (§3) automates these.
Track 1 — Apple Modernization¶
□ R-OBS: No new ObservableObject, @StateObject, or @EnvironmentObject in diff
□ R-TEST: No new XCTest, XCTestCase, or XCTAssert* in diff
□ R-CONC: No new @unchecked Sendable in diff
□ R-DEP: No new deprecated Apple API in diff (check xcodebuild warnings)
□ R-NAV: No new NavigationView in diff
□ Latest Apple API used for all new surface area at v1.0 baseline
□ Accessibility identifiers declared for any new UI surface
□ Dark/light mode verified for any new UI surface
Track 2 — Bluefly Architecture¶
□ R-SVC: No new singleton manager (.shared pattern) in diff
□ R-ENV: No new .environmentObject() injection in diff
□ R-DUP: No capability duplicated from APPLE-001 §5 in diff
□ R-UNC: Every new type classified (product / pack / adapter / configuration)
□ Net-Negative Ownership Delta computed (neutral or positive preferred)
□ No new third-party dependency without documented justification in APPLE-001
Build & Launch¶
□ xcodebuild succeeds (BUILD SUCCEEDED in output) — application target
□ Application process launches (pgrep confirms PID)
□ Process remains alive 30s after launch (no immediate crash)
□ Secret scan clean: gitleaks detect --log-opts HEAD~1..HEAD
□ Functional UI verified, OR explicitly deferred with documented justification
4. CI Gate Specification¶
Status: Future milestone — target before contract v2.0.
The manual gate above becomes automated CI enforcement via the apple-conformance Pack executed by Gas City. The Pack enforces rule IDs from APPLE-002 against the diff — not the full codebase.
# .bluefly/apple-conformance.yml
contract: APPLE-003
version: "1.0"
# Rule IDs reference APPLE-002 §2
track1_apple_modernization:
R-OBS:
detect: "ObservableObject|@StateObject|@EnvironmentObject"
scope: diff_added_lines_only
action: fail
R-TEST:
detect: "import XCTest|XCTestCase|XCTAssert"
scope: diff_added_lines_only
action: fail
R-CONC:
detect: "@unchecked Sendable"
scope: diff_added_lines_only
action: fail
R-DEP:
source: xcode_build_warnings
filter: "deprecated"
scope: diff_added_lines_only
action: fail
R-NAV:
detect: "NavigationView\\b"
scope: diff_added_lines_only
action: fail
track2_bluefly_architecture:
R-SVC:
detect: "class \\w+(Manager|Service)[^{]*\\.shared"
scope: diff_added_lines_only
action: fail
R-ENV:
detect: "\\.environmentObject\\("
scope: diff_added_lines_only
action: fail
R-DUP:
source: capability_registry # cross-references APPLE-001 §2
action: fail
R-UNC:
source: type_classifier
require_classification: true
action: warn
reporting:
provider_conformance_score:
compute: true
formula: "(PASS + 0.5 * PARTIAL) / total_audited"
source: capability_registry # APPLE-001 §2
ownership_delta:
compute: true
formula: APPLE-002-section-4
debt_delta:
compute: true
pack:
name: apple-conformance
executor: gas_city
triggers:
- pre_merge
- scheduled_weekly
outputs:
- provider_conformance_score
- ownership_delta
- gate_result
- debt_delta_report
notes: >
The Pack receives the diff, the capability registry (APPLE-001),
and the rule definitions (APPLE-002). It produces a receipt.
BLU Studio consumes the receipt. It does not own the enforcement logic.
5. Recorded Receipts¶
Receipt — MR 72 (fix/gitleaks-official-image)¶
MR: fix/gitleaks-official-image (MR 72)
Date: 2026-07
Contract: APPLE-003 v1.0
Build & Launch
Compile: PASS
Evidence: BUILD SUCCEEDED confirmed in xcodebuild output (AgentPlatform target)
Process launch: PASS
Evidence: pgrep confirmed Agent Studio PID alive post-launch
Main window rendered: NOT VERIFIED
Evidence: TCC Accessibility/Screen Recording permissions blocked automation
Functional UI: NOT VERIFIED
Evidence: same TCC blocker; no manual exercise recorded
Secret Scan
Result: PASS
Evidence: gitleaks detect --log-opts HEAD~1..HEAD — no leaks found
Automated Tests
Result: FAIL
Evidence: xcodebuild test exits with "No test bundle product for testingSpecifier"
before test compilation begins
Root cause: UNRESOLVED
Candidates: project configuration, scheme configuration, TEST_HOST hosted-test
configuration, Xcode 27 beta behavior
Correction applied: BlueprintIdentifier corrected D4→D6 in AgentPlatform.xcscheme
Failure persisted after correction
Track 1 — Apple Modernization Gate
R-OBS New ObservableObject: PASS — none in diff
R-TEST New XCTest: PASS — none in diff
R-CONC New @unchecked Sendable: PASS — none in diff
R-DEP New deprecated API: PASS — none in diff
R-NAV New NavigationView: PASS — none in diff
Track 1: PASS
Track 2 — Bluefly Architecture Gate
R-SVC New singleton manager: PASS
R-ENV New .environmentObject(): PASS
R-DUP New duplicate capability: PASS
R-UNC New unclassified type: PASS
Track 2: PASS
Existing Debt (pre-existing, not introduced by MR 72)
OBS-001, OBS-002 State Observation — ObservableObject (7 classes)
CONC-001 Concurrency — @unchecked Sendable (2 files)
TEST-001 Test Authorship — XCTest throughout
NAV-001 Navigation — redundant NavigationStack nesting
Introduced By MR 72: NONE
Net-Negative Ownership Delta
Deletions: +0 | Adoptions: +0 | New custom: −0 | Violations: −0
Delta: NEUTRAL (acceptable for a functional feature MR)
Provider Conformance Score (PCS): NO CHANGE (56%)
Gate result: PASS
Status: Build-verified. Functionally not yet verified. Automated test root
cause open. No new debt introduced.
Local Ownership Gate: see APPLE-004