Skip to content

Fix activity section field alignment for Xcode 27 logs - #262

Open
Ckitakishi wants to merge 1 commit into
MobileNativeFoundation:masterfrom
Ckitakishi:fix/activity-section-flags
Open

Ckitakishi wants to merge 1 commit into
MobileNativeFoundation:masterfrom
Ckitakishi:fix/activity-section-flags

Conversation

@Ckitakishi

Copy link
Copy Markdown

Summary

This fixes activity section field alignment in Xcode 27 (SLF 13) logs. See #261 for details.

Field alignment

Position Raw integer XCLogParser 0.2.49 Expected
1 1 wasCancelled resultCode
2 0 isQuiet wasCancelled
3 0 wasFetchedFromCache isQuiet
4 0 unknown (fallback) wasFetchedFromCache

Changes

For SLF 13 and later, the parser reads resultCode before the Boolean fields and stores the integer after attachments in unknown. Section copies preserve resultCode.

Breaking change

IDEActivityLogSection.init requires resultCode without a default so callers must explicitly handle the new field. Omitted arguments produce a compiler error. Pass nil when no result code is available.

Validation

  • swift test --disable-sandbox: 90 tests passed.
  • All 54 sections from real successful and failed Xcode 27.0 (27A266a) builds matched the native reader's identifiers, timestamps, resultCode, and Boolean fields.

Fixes #261

Read resultCode before the Boolean flags in SLF 13 and later.
Store the SLF 13 integer after attachments in the existing unknown
field. Keep the command-line compatibility path for earlier formats.

Preserve resultCode when replacing section messages. Update internal
callers to pass the new argument explicitly.

BREAKING CHANGE: IDEActivityLogSection.init now requires resultCode.
Pass nil when no result code is available.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Yuhan Chen <chenyuhan43@gmail.com>
@Ckitakishi
Ckitakishi force-pushed the fix/activity-section-flags branch from 688b744 to 0a2ad0d Compare October 27, 2026 11:46
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.

Activity section fields are misaligned when parsing Xcode 27 logs

1 participant