MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / push

Function push

src/utils/xcodebuild-run-state.ts:172–240  ·  view source on GitHub ↗
(fragment: XcodebuildRunStateFragment)

Source from the content-addressed store, hash-verified

170
171 return {
172 push(fragment: XcodebuildRunStateFragment): void {
173 switch (fragment.fragment) {
174 case 'build-stage': {
175 const rank = STAGE_RANK[fragment.stage];
176 if (rank <= highestRank) {
177 return;
178 }
179 highestRank = rank;
180 state.currentStage = fragment.stage;
181 state.milestones.push(fragment);
182 accept(fragment);
183 break;
184 }
185
186 case 'compiler-diagnostic': {
187 if (fragment.severity === 'warning') {
188 acceptDedupedDiagnostic(fragment, state.warnings);
189 } else {
190 acceptDedupedDiagnostic(fragment, state.errors);
191 }
192 break;
193 }
194
195 case 'test-failure': {
196 const key = normalizeTestFailureKey(fragment);
197 if (seenDiagnostics.has(key)) {
198 return;
199 }
200 seenDiagnostics.add(key);
201 state.testFailures.push(fragment);
202 accept(fragment);
203 break;
204 }
205
206 case 'test-discovery': {
207 accept(fragment);
208 break;
209 }
210
211 case 'test-case-result': {
212 state.testCaseResults.push(fragment);
213 accept(fragment);
214 break;
215 }
216
217 case 'test-progress': {
218 state.completedTests = fragment.completed;
219 state.failedTests = fragment.failed;
220 state.skippedTests = fragment.skipped;
221
222 if (highestRank < STAGE_RANK.RUN_TESTS) {
223 const runTestsFragment: BuildStageFragment = {
224 kind: operation === 'TEST' ? 'test-result' : 'build-result',
225 fragment: 'build-stage',
226 operation: 'TEST',
227 stage: 'RUN_TESTS',
228 message: 'Running tests',
229 };

Callers

nothing calls this directly

Calls 4

acceptFunction · 0.85
acceptDedupedDiagnosticFunction · 0.85
normalizeTestFailureKeyFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected