Asterism

Pre-push review: account migration and lint adoption

At a glance

  • New .apps identities and verified team preserve Development/Personal isolation. Owner performed data transfer manually.
  • iOS 27 / Swift 6 language mode with modern and retained legacy model/provider handling.
  • 155 reviewed Swift autocorrections; frozen schemas and live Models unchanged; 1,292 explicit known lint findings, no-new gate verified.
  • Both renamed phone apps were rebuilt, installed and normally launched; no import, reset or uninstall by the agent.
  • Serial Core 4,250 and native 1,893 passing results reused for unchanged code; full phone 263 passed / 2 expected skips and iPad 33 passed audited against source/compiled symbols/structured results.
  • Retained compatibility deprecations and known compiler diagnostics remain documented; no suppression. Owner performed manual transfer; normal deployments do not establish cross-device sync coverage.

Verdict

Ready for merge

Three pre-push reviews and two independent exact-head PR reviews found no actionable issues. Full phone/iPad gates completed with all 298 unique methods accounted for:296 passed, two expected physical-performance skips, zero failures. Fresh main is unchanged; identity/lint ratchet and signed phone/Mac builds verify.

Tests

Pass rate: 100% (296 of 296)

New tests: 4

Diff coverage: n/a

Jump to tests →

Three-level explanation

The apps now use the new developer account and keep their familiar names. The owner transferred their own library with import/export. Automated style checks prevent new debt while existing findings remain recorded.

Configuration-derived app, extension, App Group, CloudKit and background-task identifiers share a scoped .apps namespace. iOS 27 and Swift 6 updates preserve actor boundaries, provider compatibility and model-error classification. A version-pinned lint wrapper applies an explicit baseline in verification.

No store schema or archive generation changes. New security identities select separate stores; signing/install receipts establish deployment, not runtime sync correctness. Modern async background submission initiates off-main; immutable AppIntents metadata retains narrowly scoped nonisolated(unsafe) because SDK metadata extraction requires stored builders. Legacy provider APIs remain where modern replacements fail concrete compatibility tests.

Important changes — detailed

Identity configuration selects the new account

Asterism/Asterism.xcodeproj/project.pbxproj

Why it matters. App/data isolation and supported signing

What to look at. Development/Personal target settings

Rationale. Owner explicitly requested developer-account and .apps migration, then ordinary names after manual transfer.

Lint ratchet preserves reviewed debt

scripts/lint.sh

Why it matters. New violations fail without silently excluding existing source

What to look at. Pinned gate and --full report

Rationale. Owner requested autocorrect and known baseline; debt tracked in T-2498.

Modern SDK errors retain legacy handling

Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift

Why it matters. Context overflow and diagnostics remain correct across supported OS versions

What to look at. Typed modern errors plus compatibility fallback

Rationale. Concrete red/green tests demonstrated lost classification before the fix.

Tests

Source: local run at 2026-10-28T15:32:30.305914+00:00 · snapshot e1c90d37fa164f69e8b0c0a4b1b81e5054dae04f

Baseline: none

Execution: passed · JUnit: 2 files · Coverage: none · Baseline: absent

Coverage scope: as the project configures it

Totals: 296 passed · 0 failed · 2 skipped · 0 errored · 0 flaky

New and removed tests

Derived by declaration name, from the diff (no baseline run).

Blast radius

Files that import a changed file on the left, changed files in the centre, files a changed file imports on the right. Snapshot working-tree against base b63bf4818b14eab770ef7ebd73e5daac31e8ec77.

Dependents none found Changed Dependencies none found . Asterism/Asterism Asterism/Asterism.xcodeproj …/Asterism/CharacterExtraction Asterism/Asterism/Intents Asterism/Asterism/Layout …erism/Asterism/RuleSuggestion Asterism/Asterism/Support Asterism/Asterism/ViewModels Asterism/Asterism/Views Asterism/AsterismTests Asterism/AsterismUITests Packages/AsterismCore …rismCore/Sources/AsterismCore …/Sources/AsterismIntelligence …/Sources/AsterismPresentation …e/Sources/AsterismTestSupport …mCore/Tests/AsterismCoreTests …sts/AsterismIntelligenceTests …e/Tests/ConstellationKitTests scripts .swiftlint-version.swiftlint-version MakefileMakefile Asterism/Asterism/ContentView.swift…sm/Asterism/ContentView.swift Asterism/Asterism/Localizable.xcstrings…sterism/Localizable.xcstrings Asterism/Asterism.xcodeproj/project.pbxproj…ism.xcodeproj/project.pbxproj Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swift…erExtractionCoordinator.swift Asterism/Asterism/Intents/WorkEntity.swift…rism/Intents/WorkEntity.swift Asterism/Asterism/Layout/AppNavigation.swift…sm/Layout/AppNavigation.swift Asterism/Asterism/Layout/AppScreens.swift…erism/Layout/AppScreens.swift Asterism/Asterism/Layout/SettingsScreen.swift…m/Layout/SettingsScreen.swift Asterism/Asterism/RuleSuggestion/RuleSuggester.swift…uggestion/RuleSuggester.swift Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swift…leSuggestionCoordinator.swift Asterism/Asterism/Support/BackgroundExportScheduler.swift…ckgroundExportScheduler.swift Asterism/Asterism/Support/SettingsToolbarActions.swift…/SettingsToolbarActions.swift Asterism/Asterism/ViewModels/AppLibraryModel.swift…wModels/AppLibraryModel.swift Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swift…aracterGroupEditorModel.swift Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swift…mposedTeachingViewModel.swift Asterism/Asterism/ViewModels/EntryDetailModel.swift…Models/EntryDetailModel.swift Asterism/Asterism/ViewModels/MaintenanceViewModels.swift…s/MaintenanceViewModels.swift Asterism/Asterism/ViewModels/ManualEntryFormModel.swift…ls/ManualEntryFormModel.swift Asterism/Asterism/ViewModels/MarkdownExportModel.swift…els/MarkdownExportModel.swift Asterism/Asterism/ViewModels/SetLatestModel.swift…ewModels/SetLatestModel.swift Asterism/Asterism/ViewModels/SettingsBackupImportModel.swift…ttingsBackupImportModel.swift Asterism/Asterism/ViewModels/WorkMergeModel.swift…ewModels/WorkMergeModel.swift Asterism/Asterism/Views/ComposedTeachingPresentation.swift…sedTeachingPresentation.swift Asterism/Asterism/Views/ComposedURLEditorState.swift…/ComposedURLEditorState.swift Asterism/Asterism/Views/EntryDetailView.swift…m/Views/EntryDetailView.swift Asterism/Asterism/Views/RecordCopyOfferView.swift…ews/RecordCopyOfferView.swift Asterism/Asterism/Views/SettingsView.swift…rism/Views/SettingsView.swift Asterism/Asterism/Views/SkippedCharacterLinksView.swift…ippedCharacterLinksView.swift Asterism/Asterism/Views/TodaySections.swift…ism/Views/TodaySections.swift Asterism/Asterism/Views/WorkRecordCopyView.swift…iews/WorkRecordCopyView.swift Asterism/Asterism/Views/WorksGroupView.swift…sm/Views/WorksGroupView.swift Asterism/Asterism/Views/WorksStatusSheet.swift…/Views/WorksStatusSheet.swift Asterism/Asterism/Views/WorksView.swift…sterism/Views/WorksView.swift Asterism/AsterismTests/AddPageToReadFlowTests.swift…/AddPageToReadFlowTests.swift Asterism/AsterismTests/AnnouncementDocumentViewTests.swift…cementDocumentViewTests.swift Asterism/AsterismTests/AppGroupAvailabilityTests.swift…pGroupAvailabilityTests.swift Asterism/AsterismTests/AppLibraryModelTests.swift…ts/AppLibraryModelTests.swift Asterism/AsterismTests/AssociationNoteEditorTests.swift…ociationNoteEditorTests.swift Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swift…ractionCoordinatorTests.swift Asterism/AsterismTests/CharacterGroupEditorTests.swift…aracterGroupEditorTests.swift Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swift…ReviewPresentationTests.swift Asterism/AsterismTests/CharacterReviewModelTests.swift…aracterReviewModelTests.swift Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swift…DetailPresentationTests.swift Asterism/AsterismTests/DuplicateSurfaceTests.swift…s/DuplicateSurfaceTests.swift Asterism/AsterismTests/IntentLibraryBrokerTests.swift…ntentLibraryBrokerTests.swift Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swift…stCharacterRoutingTests.swift Asterism/AsterismTests/OpenTargetFlowTests.swift…sts/OpenTargetFlowTests.swift Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swift…hingWorkURLHandoffTests.swift Asterism/AsterismTests/RecordCopyNavigationTests.swift…cordCopyNavigationTests.swift Asterism/AsterismTests/RuleSuggesterTests.swift…ests/RuleSuggesterTests.swift Asterism/AsterismTests/SettingsBackupModelTests.swift…ettingsBackupModelTests.swift Asterism/AsterismTests/SettingsImportTests.swift…sts/SettingsImportTests.swift Asterism/AsterismTests/WorkDetailCharacterTests.swift…orkDetailCharacterTests.swift Asterism/AsterismTests/WorkDetailModelTests.swift…ts/WorkDetailModelTests.swift Asterism/AsterismTests/WorkMergeModelTests.swift…sts/WorkMergeModelTests.swift Asterism/AsterismUITests/AccessibilityJourneyUITests.swift…ssibilityJourneyUITests.swift Asterism/AsterismUITests/AnnouncementUITests.swift…sts/AnnouncementUITests.swift Asterism/AsterismUITests/AssociationNotesUITests.swift…AssociationNotesUITests.swift Asterism/AsterismUITests/AsterismUITests.swift…UITests/AsterismUITests.swift Asterism/AsterismUITests/AsterismUITestsLaunchTests.swift…erismUITestsLaunchTests.swift Asterism/AsterismUITests/BackgroundExportSettingsUITests.swift…ndExportSettingsUITests.swift Asterism/AsterismUITests/ChapterNotesUITests.swift…sts/ChapterNotesUITests.swift Asterism/AsterismUITests/CharacterExtractionUITests.swift…racterExtractionUITests.swift Asterism/AsterismUITests/CharacterGroupsUITests.swift…/CharacterGroupsUITests.swift Asterism/AsterismUITests/ComposedSurfaceUITests.swift…/ComposedSurfaceUITests.swift Asterism/AsterismUITests/CreatorRolesSettingsUITests.swift…torRolesSettingsUITests.swift Asterism/AsterismUITests/CreatorsUITests.swift…UITests/CreatorsUITests.swift Asterism/AsterismUITests/DuplicateResolutionUITests.swift…licateResolutionUITests.swift Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swift…yLibrarySettingsUITests.swift Asterism/AsterismUITests/EntryToWorkLinkUITests.swift…/EntryToWorkLinkUITests.swift Asterism/AsterismUITests/LibraryDiagnosticsUITests.swift…braryDiagnosticsUITests.swift Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swift…TodayPerformanceUITests.swift Asterism/AsterismUITests/PendingCaptureSettingsUITests.swift…gCaptureSettingsUITests.swift Asterism/AsterismUITests/PublicationReturnDateUITests.swift…cationReturnDateUITests.swift Asterism/AsterismUITests/ReparseSheetUITests.swift…sts/ReparseSheetUITests.swift Asterism/AsterismUITests/SearchUITests.swift…smUITests/SearchUITests.swift Asterism/AsterismUITests/SeriesUITests.swift…smUITests/SeriesUITests.swift Asterism/AsterismUITests/SettingsLayoutUITests.swift…s/SettingsLayoutUITests.swift Asterism/AsterismUITests/SitesSettingsUITests.swift…ts/SitesSettingsUITests.swift Asterism/AsterismUITests/StatsUITests.swift…ismUITests/StatsUITests.swift Asterism/AsterismUITests/TodayUITests.swift…ismUITests/TodayUITests.swift Asterism/AsterismUITests/UIJourneySupport.swift…ITests/UIJourneySupport.swift Asterism/AsterismUITests/WideLayoutUITests.swift…Tests/WideLayoutUITests.swift Asterism/AsterismUITests/WorkCoverUITests.swift…ITests/WorkCoverUITests.swift Asterism/AsterismUITests/WorkDetailActionsUITests.swift…orkDetailActionsUITests.swift Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift…etailConnectionsUITests.swift Asterism/AsterismUITests/WorkDetailCreditsUITests.swift…orkDetailCreditsUITests.swift Asterism/AsterismUITests/WorkDetailStatusUITests.swift…WorkDetailStatusUITests.swift Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swift…kRecordCopyOfferUITests.swift Asterism/AsterismUITests/WorkRecordCopyUITests.swift…s/WorkRecordCopyUITests.swift Asterism/AsterismUITests/WorkTypesSettingsUITests.swift…orkTypesSettingsUITests.swift Asterism/AsterismUITests/WorksAndAssignmentUITests.swift…rksAndAssignmentUITests.swift Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift…ksCreatorOptionsUITests.swift Asterism/AsterismUITests/WorksListOptionsUITests.swift…WorksListOptionsUITests.swift Asterism/AsterismUITests/WorksLoadGateUITests.swift…ts/WorksLoadGateUITests.swift Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift…rksSeriesOptionsUITests.swift Asterism/AsterismUITests/XCUIApplication+TestIsolation.swift…plication+TestIsolation.swift Packages/AsterismCore/Package.swift…es/AsterismCore/Package.swift Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swift…e/ArchiveRecordBuilders.swift Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swift…re/AssociationEndpoints.swift Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swift…iationImportPreparation.swift Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swift…mCore/AssociationLedger.swift Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swift…sociationPendingReviews.swift Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swift…BackupArchiveProjection.swift Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swift…pArchiveReferenceChecks.swift Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swift…re/BackupImportCreators.swift Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swift…e/BackupImportWorkTypes.swift Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swift…rismCore/BackupImporter.swift Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swift…/BackupJSONCodecSupport.swift Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swift…rismCore/BackupV18Codec.swift Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swift…mCore/BackupV18Exporter.swift Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swift…rismCore/BackupV19Codec.swift Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swift…rismCore/BackupV20Codec.swift Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swift…rismCore/BackupV21Codec.swift Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swift…mCore/BackupV21Exporter.swift Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swift…ismCore/CatchUpProgress.swift Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swift…/ChapterCaptureResolver.swift Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swift…posedTeachingProjection.swift Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swift…mCore/CreatorReconciler.swift Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swift…smCore/CreditReconciler.swift Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swift…e/DocumentExportOutcome.swift Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swift…ore/DuplicateReconciler.swift Packages/AsterismCore/Sources/AsterismCore/EntrySources.swift…terismCore/EntrySources.swift Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swift…/GroupReferenceResolver.swift Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swift…sterismCore/GroupRoster.swift Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swift…e/GroupSupportInventory.swift Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swift…e/GroupTransitionRebind.swift Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swift…rismCore/GroupWorkMerge.swift Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swift…ibraryDiagnosticRecords.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swift…sitory+AssociationNotes.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swift…Repository+Associations.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swift…ository+CatchUpProgress.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swift…pository+ChapterCapture.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swift…ository+CharacterGroups.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swift…sitory+ComposedTeaching.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swift…epository+ConfirmImport.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swift…aryRepository+Contracts.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swift…ibraryRepository+Export.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swift…Repository+GroupHistory.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swift…ory+GroupSuggestionSkip.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swift…yRepository+ManualEntry.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swift…aryRepository+NoEpisode.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swift…y+PendingMentionReviews.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swift…ry+RecognisedCharacters.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swift…epository+RecordEditing.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swift…epository+RecordHistory.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swift…pository+ReparseCapture.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swift…tory+SaveTimeKnownLinks.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swift…itory+TodayPresentation.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swift…yRepository+URLIdentity.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swift…Repository+WorkDeletion.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swift…pository+WorkDetailEdit.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swift…aryRepository+WorkMerge.swift Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swift…mCore/LibraryRepository.swift Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swift…smCore/LibraryValidator.swift Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swift…rismCore/MarkdownExport.swift Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swift…der+ItemProviderLoading.swift Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swift…smCore/PageTitleFetcher.swift Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swift…ore/PendingCaptureDrain.swift Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swift…ore/PendingCaptureSpool.swift Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swift…ore/ReSharePresentation.swift Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swift…Core/SeriesPresentation.swift Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swift…rismCore/ShareTransport.swift Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swift…sterismCore/SyncMonitor.swift Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swift…Core/WorkTypeReconciler.swift Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swift…rongHostWorkURLResolver.swift Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swift…cterExtractionAssembler.swift Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swift…ence/CharacterGrounding.swift Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swift…erExtractionModelClient.swift Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift…ndationModelDiagnostics.swift Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swift…leSuggestionModelClient.swift Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swift…ion/AnnouncementCatalog.swift Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swift…sentation/Pluralisation.swift Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swift…ntation/ReleaseDaysText.swift Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swift…ation/RestoreStorageKey.swift Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swift…mPresentation/SiteNames.swift Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swift…ntation/StatsDerivation.swift Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swift…tion/TodayAnnouncements.swift Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swift…tation/TodayDisplayPlan.swift Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swift…mPresentation/TodayText.swift Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swift…/WorkStatusPresentation.swift Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swift…tation/WorksListOptions.swift Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swift…on/WorksRowPresentation.swift Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swift…tation/WorksSearchToken.swift Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swift…estSupport/TestFixtures.swift Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swift…ArchiveIntegrationTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swift…ciationIntegrationTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swift…AssociationNoteAPITests.swift Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swift…AssociationRankingTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swift…ociationResolutionTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swift…ortDegradedRefusalTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swift…Tests/CaptureStateTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swift…CaptureTransactionTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swift…ts/ChapterIdentityTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swift…orRepositoryTestSupport.swift Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swift…Tests/CropGeometryTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swift…braryToleranceScanTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swift…pFirstCaptureStateTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swift…M4ToleratedFixtureTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swift…ProviderTextBridgeTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swift…upRecordOperationsTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swift…SuggestionApprovalTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swift…GroupWorkMergeEditTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swift…portHistorySessionTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swift…s/PageTitleFetcherTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swift…rformanceReadReuseTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swift…ReShareExtensionUITests.swift Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swift…nownLinkRepositoryTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swift…esRepositoryTestSupport.swift Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swift…sts/ShareTransportTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swift…/V21GroupMigrationTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swift…ts/V4RecordedStoreTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swift…orkMergeRepositoryTests.swift Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swift…rkPublicationStateTests.swift Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swift…ractionModelClientTests.swift Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationModelModernErrorTests.swift…onModelModernErrorTests.swift Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swift…gestionModelClientTests.swift Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swift…iveFoundationModelIssue.swift Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swift…amedGroupGroundingTests.swift Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swift…itTests/FlowLayoutTests.swift scripts/lint.shscripts/lint.sh scripts/verify-identity.shscripts/verify-identity.sh
addedmodifieddeletedrenamedunchangedcollapsed package group or +N more⚑N test files with an edge to the node

Per-file diffs

230 files: 226 code · 4 docs. Click to expand.

Code (226)

.swiftlint-baseline.json Modified
diff --git a/.swiftlint-baseline.json b/.swiftlint-baseline.jsonnew file mode 100644index 00000000..5b08e963--- /dev/null+++ b/.swiftlint-baseline.json@@ -0,0 +1 @@+[{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 700 lines or less excluding comments and whitespace: currently spans 769 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":17}},"text":"final class CharacterExtractionCoordinator {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":504}},"text":"                    CompletedSource(ref: source.source, fingerprint: source.fingerprint, mentionEligibilityDigest: source.mentionEligibilityDigest))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":518}},"text":"                    guard let source = current.sources.first(where: { $0.ref == captured.ref && $0.fingerprint == captured.fingerprint }) else { return nil }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 24","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":585}},"text":"    private func beginAttempt("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 124 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":585}},"text":"    private func beginAttempt("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 163 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":637}},"text":"                        throw LibraryRepositoryError.invalidInput(operation: \"routing extracted character links\", reason: \"source changed during pending recovery\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":807}},"text":"            replaceCapturedHeld(held, with: rerouted.filter { $0.proposal.displayedKind != .character || $0.proposal.target == .newRecord }, workID: candidate.workID)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":853}},"text":"                                retainedKey: record.retainedKey, aliasKeys: record.aliases.map(RecordNameKey.normalize), isTorn: record.isTorn)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":962}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"preserving pending mention review\", reason: \"source guard unavailable\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/CharacterExtraction\/CharacterExtractionCoordinator.swift","line":976}},"text":"            throw LibraryRepositoryError.invalidInput(operation: \"preserving pending mention review\", reason: \"pending review was not preserved\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 250 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ContentView.swift","line":158}},"text":"                   [RestoreStorageKey.selectedSidebarItem, RestoreStorageKey.todayPath, RestoreStorageKey.libraryPath, RestoreStorageKey.selectedTab, RestoreStorageKey.selectedTodayEntryID, RestoreStorageKey.selectedWorkID].contains(key) { continue }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 183 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ContentView.swift","line":600}},"text":"        navigation.restoreWideState(sidebar: storedSidebarItem, today: storedTodayPath, library: storedLibraryPath, lastLibrary: WorksDestination(storedValue: storedWorksDestination))"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":9,"file":"Asterism\/Asterism\/Intents\/IntentLibraryBroker.swift","line":70}},"text":"        library, calendar in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":18,"file":"Asterism\/Asterism\/Intents\/IntentLibraryBroker.swift","line":70}},"text":"        library, calendar in"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":17}},"text":"    \/\/\/ `specs\/stats-page\/` Decision 2. The third tab falsifies the two-tab"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":53}},"text":"        switch self { case .today: .today; case .library: .works; case .stats: .stats }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":44,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":53}},"text":"        switch self { case .today: .today; case .library: .works; case .stats: .stats }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":67,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":53}},"text":"        switch self { case .today: .today; case .library: .works; case .stats: .stats }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":56}},"text":"        switch self { case .today: \"Today\"; case .library(let destination): destination.title; case .stats: \"Stats\" }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":45,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":56}},"text":"        switch self { case .today: \"Today\"; case .library(let destination): destination.title; case .stats: \"Stats\" }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":96,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":56}},"text":"        switch self { case .today: \"Today\"; case .library(let destination): destination.title; case .stats: \"Stats\" }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":59}},"text":"        switch self { case .today: \"today\"; case .stats: \"stats\"; case .library(let destination): \"library.\" + destination.storageValue }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":45,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":59}},"text":"        switch self { case .today: \"today\"; case .stats: \"stats\"; case .library(let destination): \"library.\" + destination.storageValue }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":67,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":59}},"text":"        switch self { case .today: \"today\"; case .stats: \"stats\"; case .library(let destination): \"library.\" + destination.storageValue }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 172 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":198}},"text":"            if todayInspectorEntryID != nil { todayInspectorEntryID = nil } else if selectedTodayEntryID != nil { selectedTodayEntryID = nil } else { popRoute(on: .today) }"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":16,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":952}},"text":"        return String(decoding: data, as: UTF8.self)"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":36,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1040}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":75,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1040}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":118,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1040}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":36,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1043}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":75,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1043}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":118,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1043}},"text":"                    switch route { case .work(let id): !workResolves(id); case .chapter(let id): !entryResolves(id); default: false }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1200}},"text":"        switch self { case .destination(let destination): destination; case .seriesList: .seriesIndex; case .creatorList: .creators; default: nil }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1200}},"text":"        switch self { case .destination(let destination): destination; case .seriesList: .seriesIndex; case .creatorList: .creators; default: nil }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":72,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1200}},"text":"        switch self { case .destination(let destination): destination; case .seriesList: .seriesIndex; case .creatorList: .creators; default: nil }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":104,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1200}},"text":"        switch self { case .destination(let destination): destination; case .seriesList: .seriesIndex; case .creatorList: .creators; default: nil }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":134,"file":"Asterism\/Asterism\/Layout\/AppNavigation.swift","line":1200}},"text":"        switch self { case .destination(let destination): destination; case .seriesList: .seriesIndex; case .creatorList: .creators; default: nil }"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":11,"file":"Asterism\/Asterism\/Layout\/AppScreens.swift","line":199}},"text":"        ) {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":35,"file":"Asterism\/Asterism\/Layout\/AppScreens.swift","line":269}},"text":"            onDismissDuplicate: { a, b in"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":11,"file":"Asterism\/Asterism\/Layout\/AppScreens.swift","line":470}},"text":"        ) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 172 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/AsterismCommands.swift","line":55}},"text":"            let destinations: [SidebarItem] = [.today, .library(.group(.catchingUp)), .library(.group(.reading)), .library(.group(.toRead)), .library(.seriesIndex), .stats]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/AsterismCommands.swift","line":71}},"text":"            Button(\"Previous Day\") { actions?.previousDay?() }.keyboardShortcut(.leftArrow, modifiers: []).disabled(actions?.previousDay == nil)"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Asterism\/Asterism\/Layout\/NavigationActions.swift","line":144}},"text":"    static func exportSubject("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":23}},"text":"    private var hubScreens: AppScreens { AppScreens(model: model, navigation: navigation, isWide: false, showSettings: showSettings, paintsOwnSky: false) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":53}},"text":"            .navigationSplitViewColumnWidth(min: WideLayoutPolicy.sidebarWidth, ideal: WideLayoutPolicy.sidebarWidth, max: WideLayoutPolicy.sidebarWidth)"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":88}},"text":"            .seriesIndex: sidebarSeries.count,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":89}},"text":"            .creators: sidebarCreatorCount]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":90}},"text":"        for group in WorksGroup.allCases { values[.group(group)] = group.members(of: model.worksSnapshot.works, on: model.currentDay).count }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":198}},"text":"        .nonMacInspector(isPresented: Binding(get: { navigation.todayInspectorEntryID != nil }, set: { if !$0 { navigation.todayInspectorEntryID = nil } })) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 339 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":276}},"text":"                            TodayEntryPills(row: row, onTeach: { navigation.showingTeachingForEntryID = $0 }, onResolveDuplicate: { navigation.route(toResolve: $0, in: model.todayPresentation.duplicateWorkload) }, resolutionKey: TodayEntryPills.resolutionKey(for: row, workload: model.todayPresentation.duplicateWorkload), usesGlass: true)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 218 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":279}},"text":"                           let previous = model.todayPresentation.groups.lazy.flatMap(\\.rows).filter({ $0.entry.workID == workID && $0.lastSharedAt < row.lastSharedAt }).max(by: { $0.lastSharedAt < $1.lastSharedAt }) {"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":11,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":337}},"text":"        ) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 204 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Layout\/WideRootView.swift","line":382}},"text":"            placeholder: DetailPlaceholder(title: libraryDestination == .seriesIndex ? \"Select a series\" : libraryDestination == .creators ? \"Select a creator\" : \"Select a work\", systemImage: \"sparkles\"))"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 17","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Asterism\/Asterism\/RuleSuggestion\/RuleSuggester.swift","line":106}},"text":"    private func run("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 104 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/RuleSuggestion\/RuleSuggester.swift","line":106}},"text":"    private func run("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'l' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":19,"file":"Asterism\/Asterism\/RuleSuggestion\/RuleSuggestionCoordinator.swift","line":434}},"text":"        case (let l?, let r?) where l != r: return l > r"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":1,"file":"Asterism\/Asterism\/Support\/ConstellationEditorRecipes.swift","line":4}},"text":"\/\/\/ The edit-screen vocabulary the work editor's four collection cards share:"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":1,"file":"Asterism\/Asterism\/Support\/PlatformModifiers.swift","line":10}},"text":"\/\/\/ The one seam for iOS-only SwiftUI modifiers (Req 4.5, Q24)."},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 1000 lines or less excluding comments and whitespace: currently spans 2304 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":14,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":40}},"text":"public final class AppLibraryModel {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":38,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":1746}},"text":"    public func recordDistinctPair(_ a: UUID, _ b: UUID) async {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3300}},"text":"                (RecordKind.character, \"Ada\", [\"Nightjar\"], \"Ada is called Nightjar by the crew.\", \"the crew call her Nightjar\", SourceRef.genericNotes),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3308}},"text":"                guard case .committed = outcome else { throw LibraryRepositoryError.invalidInput(operation: \"seeding legacy facts\", reason: \"synthetic seed refused\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3313}},"text":"            guard case .committed = outcome else { throw LibraryRepositoryError.invalidInput(operation: \"seeding known character\", reason: \"synthetic seed refused\") }"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":21,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3345}},"text":"                    .transition(rootID: rootID, groupID: groupID,"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 10","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3468}},"text":"    private func seedWorksOptionsWork("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":3873}},"text":"                    facts: [.init(statement: \"Keeps the lighthouse\", quote: \"Ada keeps the lighthouse.\", nameKey: \"ada\", source: .genericNotes)])),"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 25","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":4128}},"text":"    private func seedUITestFixture("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 209 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":4128}},"text":"    private func seedUITestFixture("},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 2336","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/AppLibraryModel.swift","line":4405}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/ArrivingLibraryPresentation.swift","line":114}},"text":"        \"Anything that has not reached this device yet is still on its way. Importing a backup now merges it into a library that is still filling.\""},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 1000 lines or less excluding comments and whitespace: currently spans 1057 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":14,"file":"Asterism\/Asterism\/ViewModels\/ComposedTeachingViewModel.swift","line":28}},"text":"public final class ComposedTeachingViewModel {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 182 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/ComposedTeachingViewModel.swift","line":534}},"text":"        \"This rule form has to be taught from a capture whose URL includes the chapter part. Open a chapter of this story whose URL carries its number and teach the site from there.\""},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 221 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/ComposedTeachingViewModel.swift","line":539}},"text":"        \"Captures whose URLs have no chapter part will stop resolving a Work identity and will be separated from their Work. Removing this does not restore the grouping the site had before — it re-derives the site again.\""},{"violation":{"ruleName":"Void Function in Ternary","reason":"Using ternary to call Void functions should be avoided","severity":"error","ruleIdentifier":"void_function_in_ternary","ruleDescription":"Using ternary to call Void functions should be avoided","location":{"character":38,"file":"Asterism\/Asterism\/ViewModels\/ComposedTeachingViewModel.swift","line":720}},"text":"        disclosureState == .expanded ? collapseDisclosure() : expandDisclosure()"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1065","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/ComposedTeachingViewModel.swift","line":1722}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/EntryCorrectionFormModel.swift","line":54}},"text":"            switch try await library.commitEntryCorrection(contract, target: .init(kind: kind, title: title, designation: designation), contentChoice: contentChoice) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 192 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/MaintenanceViewModels.swift","line":225}},"text":"            do { records = try await library.diagnosticRecords(for: diagnostics.diagnoses) } catch { readNotice = \"Record details could not be loaded. Try again to see the affected records.\" }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/MaintenanceViewModels.swift","line":390}},"text":"            \"This work is not on any site. It still opens and can still be deleted, and Asterism puts it back on a site as soon as one of its entries arrives.\""},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":17,"file":"Asterism\/Asterism\/ViewModels\/MaintenanceViewModels.swift","line":399}},"text":"                noun, source, actual in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":23,"file":"Asterism\/Asterism\/ViewModels\/MaintenanceViewModels.swift","line":399}},"text":"                noun, source, actual in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":31,"file":"Asterism\/Asterism\/ViewModels\/MaintenanceViewModels.swift","line":399}},"text":"                noun, source, actual in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 186 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/ManualEntryFormModel.swift","line":40}},"text":"    var canSave: Bool { savedEntryID == nil && projection != nil && !isSaving && !needsContentChoice && (!note.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || rating != nil) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/NewWorkFormModel.swift","line":28}},"text":"    public init(library: any LibraryProviding, initialReadingStatus: ReadingStatus = .toRead, onMutation: @escaping @Sendable () async -> Void) {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":18,"file":"Asterism\/Asterism\/ViewModels\/SettingsBackupModel.swift","line":222}},"text":"        case let e as BackupCodecError:"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":18,"file":"Asterism\/Asterism\/ViewModels\/SettingsBackupModel.swift","line":224}},"text":"        case let e as BackupV18ExportError:"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":18,"file":"Asterism\/Asterism\/ViewModels\/SettingsBackupModel.swift","line":226}},"text":"        case let e as LibraryRepositoryError:"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/SkippedCharacterLinksModel.swift","line":18}},"text":"    init(entryID: UUID, library: any LibraryProviding, chapterTitle: String = \"Saved chapter\", onMutation: @escaping @MainActor () async -> Void = {}) {"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 1000 lines or less excluding comments and whitespace: currently spans 2327 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":14,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":11}},"text":"public final class WorkDetailModel {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":208}},"text":"        let a = Task { await self.refreshRecordHistory(publicationGeneration: generation) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":293}},"text":"            let snapshot = try await selectedLibrary.recordHistory(workID: selection.workID, kind: selection.kind, recordID: selection.recordID)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":1488}},"text":"                  [UTType.jpeg, .png, .heic, .gif, .webP].contains(where: { type.conforms(to: $0) }) else { return Optional<DecodedThumbnail>.none }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 21","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":2574}},"text":"    public func commitEditing() async {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 104 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":2745}},"text":"    private func commitWorkDetailTransaction("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":2745}},"text":"    private func commitWorkDetailTransaction("},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 2381","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/Asterism\/ViewModels\/WorkDetailModel.swift","line":3948}},"text":"}"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":25,"file":"Asterism\/Asterism\/Views\/ComposedTeachingPresentation.swift","line":604}},"text":"    nonisolated private static func edgeTrimRule("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 194 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/ComposedTeachingPresentation.swift","line":744}},"text":"            \"These selections can't be matched exactly — usually the text between the parts also appears inside the Work part. Move the Work start forward so repeated separators fall before it.\""},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 198 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/ComposedTeachingView.swift","line":511}},"text":"            Text(\"This title names the Work but does not identify a chapter, and no chapter comes from the URL. Add URL details to source the chapter, or teach anyway and leave chapters unsettled.\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/ComposedTeachingView.swift","line":599}},"text":"            Image(systemName: \"exclamationmark.triangle.fill\").font(.largeTitle).foregroundStyle(AsterismColors.amberText).accessibilityHidden(true)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/ComposedURLDetailsEditor.swift","line":462}},"text":"                        Text(\"Some sites leave the chapter out of the first chapter's URL. Read that as chapter 1 instead of failing to match.\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 185 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/ComposedURLDetailsEditor.swift","line":469}},"text":"                    Text(\"This rule has no text before or after the split, so anything in this component would be read as a Work. Include the surrounding text in the rule to allow it.\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/EntryCorrectionView.swift","line":19}},"text":"                Picker(\"Use existing chapter\", selection: Binding(get: { model.destinationID }, set: { id in Task { await model.reviewDestination(id) } })) {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 152 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/Views\/EntryDetailView.swift","line":136}},"text":"    private func entryContent(_ entry: EntrySnapshot) -> some View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 239 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/EntryDetailView.swift","line":433}},"text":"                    if (entry.primarySourceURL.map { ExactScalarString(source) != ExactScalarString($0.absoluteString) } ?? true), let url = URL(string: source), [\"http\", \"https\"].contains(url.scheme?.lowercased() ?? \"\"), url.host != nil {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/MaintenanceViews.swift","line":169}},"text":"                        .foregroundStyle(model.suggestsDamage ? AnyShapeStyle(AsterismColors.amberText) : AnyShapeStyle(AsterismColors.primaryText))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/PostTeachingWorkURLView.swift","line":43}},"text":"                Text(\"The new URL rule suggests landing URLs for affected Works. Confirm or skip each one; skipping never changes the saved rule.\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 180 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/RecordCopyOfferView.swift","line":35}},"text":"            \"Review one added work. Closing this review dismisses the offer for the whole batch; the other additions remain available through Copy characters and places on a work.\""},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/SeriesDetailView.swift","line":53}},"text":"        _copyReviewHost = State(initialValue: copyReviewHost ?? RecordCopyReviewHostState(route: .series(id: model.seriesID, originWorkID: model.originWorkID)))"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":12,"file":"Asterism\/Asterism\/Views\/SeriesDetailView.swift","line":193}},"text":"        }) { flow in"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/Views\/SettingsView.swift","line":925}},"text":"    private func debugActionRow("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/Views\/StatsView.swift","line":670}},"text":"    private func rankedSection<Rows: RandomAccessCollection, RowView: View>("},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":11,"file":"Asterism\/Asterism\/Views\/TodayAnnouncementRow.swift","line":50}},"text":"        ) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodaySections.swift","line":39}},"text":"                            .font(titlePointSize.map { .system(size: $0 * titleScale, design: .serif).weight(.medium) } ?? AsterismTypography.serif(.title))"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 795 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":29}},"text":"struct TodayView: View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":362}},"text":"            .onScrollGeometryChange(for: CGFloat.self) { max(0, $0.contentOffset.y + $0.contentInsets.top) } action: { _, offset in scrollOffset = offset }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":442}},"text":"            ? (isWide ? TodayDateText.wideHeader(selectedDay, calendar: calendar) : TodayDateText.header(selectedDay, calendar: calendar)) : nil"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 161 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":607}},"text":"                    coverSize: isWide ? (RuntimePlatform.isMac ? CGSize(width: 104, height: 148) : CGSize(width: 128, height: 182)) : ReleaseShelfItem.coverSize,"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":1003}},"text":"    private func summaryRow("},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1028","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/TodayView.swift","line":1510}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 2083 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":28}},"text":"struct WorkDetailView: View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":211}},"text":"        reviewModel != nil || activeMergeModel != nil || activeRecordCopyFlow != nil || showingManualEntry || reviewingIdentityHostname != nil"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":12,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":322}},"text":"        }) { flow in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":475}},"text":"                ThumbnailSlot(workID: work.id, identity: thumbnail, baseSize: CGSize(width: 132, height: 186), trailingGap: 0, marker: LayoutMarker.workDetailCover)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":480}},"text":"                if let name = work.typeDisplay.name, let kind = WorkTypePresentation.pillKind(for: work.typeDisplay.kind) { Text(name).constellationPill(kind) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":493}},"text":"                Label(ReleaseDaysText.abbreviated(work.releaseDays, calendar: calendar), systemImage: \"calendar\").font(.caption).foregroundStyle(AsterismColors.secondaryText)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":512}},"text":"                Button(progress.lastRead.map { \"Continue at \" + ChapterNumberText.short($0 + 1, type: work.typeDisplay) + \" ↗\" } ?? \"Continue ↗\") {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 143 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":569}},"text":"    private func workList(_ work: WorkSnapshot) -> some View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":608}},"text":"        .frame(maxWidth: WideLayoutPolicy.workDetailLayout(forWidth: detailWidth) == .columns && !model.isEditing ? 1040 : WideLayoutPolicy.workMeasure)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 170 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":806}},"text":"                        baseSize: WideLayoutPolicy.workDetailLayout(forWidth: detailWidth) == .columns ? CGSize(width: 132, height: 186) : AsterismLayout.coverHeaderSize,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":1973}},"text":"                                if let url = model.work?.entries.first(where: { $0.id == row.id })?.rawURLString, let url = URL(string: url) {"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":15,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":3251}},"text":"            ) {"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":21,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":3294}},"text":"                    target in"},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 2433","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkDetailView.swift","line":3572}},"text":"}"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 167 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Asterism\/Asterism\/Views\/WorkMergeView.swift","line":193}},"text":"    private func confirmationPreview(_ outcome: WorkMergeOutcome) -> some View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 187 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkRecordCopyView.swift","line":38}},"text":"            \"Facts, quotes and citations, extraction coverage and suppression decisions are not copied. Entries, work notes, ratings, progress and other work details stay where they are.\""},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 205 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorkRecordCopyView.swift","line":124}},"text":"          \"These matching names may represent different records. Existing records will stay unchanged. Future extracted facts can route to either same-name record according to the existing matching rules.\""},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":7,"file":"Asterism\/Asterism\/Views\/WorkRecordCopyView.swift","line":160}},"text":"      model.destinationID == candidate.id ? \"selected destination\" : \"not selected\"]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksGroupView.swift","line":84}},"text":"            .alert(\"Couldn’t update reading status\", isPresented: Binding(get: { statusError != nil }, set: { if !$0 { statusError = nil } })) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksGroupView.swift","line":148}},"text":"                            Text(group?.title ?? \"All works\").font(AsterismTypography.serifLargeTitle).foregroundStyle(AsterismColors.primaryText)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksGroupView.swift","line":157}},"text":"                    ForEach(rows.filter { CatchUpProgress.build(work: $0, day: currentDay, calendar: calendar).state == .caughtUp }, id: \\.id) { work in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksGroupView.swift","line":163}},"text":"                                        do { _ = try await library.onSetReadingStatus(work.id, .reading) } catch { statusError = error.localizedDescription }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksView.swift","line":179}},"text":"                            stat: tileStat(group, members: members, currentDay: currentDay, calendar: calendar), accent: group == .catchingUp,"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/Asterism\/Views\/WorksView.swift","line":245}},"text":"    private func tile(_ title: String, count: Int, covers: [WorkSnapshot], stat: String,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/Asterism\/Views\/WorksView.swift","line":246}},"text":"        accent: Bool, identifier: String, action: @escaping () -> Void) -> some View {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/Asterism\/Views\/WorksView.swift","line":270}},"text":"        action: @escaping () -> Void) -> some View {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/Asterism\/Views\/WorksView.swift","line":321}},"text":"                    showsNewToday: group == .reading && WorksRowDetail.isNewToday(work, now: currentDay.date(in: calendar), calendar: calendar))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismShareExtension\/ChapterCaptureChoicesView.swift","line":31}},"text":"                ForEach(projection.entries.filter { !$0.requiresReview && (projection.evidence.isEmpty || $0.target?.kind != .note) }, id: \\.id) { entry in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismShareExtension\/ChapterCaptureChoicesView.swift","line":49}},"text":"                Button(\"Save a separate note\") { choseNewChapter = false; selectedExisting = nil; choose(.genericNote); choiceMessage = \"Saving a separate note\" }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismShareExtension\/ChapterCaptureChoicesView.swift","line":52}},"text":"                   projection.entries.contains(where: { $0.target?.kind != .note && $0.sourceURLs.contains(ExactScalarString(projection.rawURL)) }) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismShareExtension\/ChapterCaptureChoicesView.swift","line":53}},"text":"                    Text(\"Saving a second chapter from this page will default this work to multiple chapters per page. You can change that in Edit Work.\")"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":21,"file":"Asterism\/AsterismTests\/AddPageToReadFlowTests.swift","line":236}},"text":"        let cases: [(prompt: String, url: URL?, fetched: String?, choice: AddPageToReadFlow.TitleChoice)] = ["},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Asterism\/AsterismTests\/AnnouncementSeenStateTests.swift","line":203}},"text":"            bundle in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Asterism\/AsterismTests\/AnnouncementSeenStateTests.swift","line":231}},"text":"            bundle in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Asterism\/AsterismTests\/AppLibraryModelTests.swift","line":795}},"text":"        let (a, b) = (UUID(), UUID())"},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 1573","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/AppLibraryModelTests.swift","line":2319}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 765 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/AppNavigationTests.swift","line":18}},"text":"struct AppNavigationTests {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1154","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/AppNavigationTests.swift","line":1701}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationCoverageRaceTests.swift","line":20}},"text":"            try FileManager.default.createDirectory(at: configuration.storeURL.deletingLastPathComponent(), withIntermediateDirectories: true)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationCoverageRaceTests.swift","line":53}},"text":"        let candidate = try #require(try await (repository ?? fixture.repository).extractionCandidates(limit: 1, workIDs: [fixture.workID]).first)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationCoverageRaceTests.swift","line":56}},"text":"    private func review(_ fixture: Fixture, coordinator: CharacterExtractionCoordinator, library: any LibraryProviding) async throws -> CharacterReviewModel {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Asterism\/AsterismTests\/AssociationCoverageRaceTests.swift","line":93}},"text":"        let a = Task { await sheet.accept(row.id) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":9}},"text":"    @MainActor private func fixture(headTexts: [String] = [\"Café\"]) -> (AssociationNoteEditorModel, MockLibraryProvider, AssociationNoteBasis) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":16}},"text":"            heads: headTexts.map { .init(pair: pair, attachmentAcceptanceIDs: [acceptance.id], text: $0, originalContext: \"Chapter • Alice\") },"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 177 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":28}},"text":"        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved == basis) } else { Issue.record(\"Loading\/editing must not mutate configured saved basis\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 182 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":91}},"text":"        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved?.heads == basis.heads) } else { Issue.record(\"A field Clear\/Cancel must preserve saved heads\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":109}},"text":"        if currentIsClear { basis.heads = [.init(pair: basis.pair, attachmentAcceptanceIDs: Array(basis.acceptanceIDs), operation: .clear, text: \"\")] }"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":132}},"text":"            \"originPairData\": malformed, \"attachmentAcceptIDsData\": malformed,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":133}},"text":"            \"parentHeadIDsData\": malformed, \"operationRaw\": \"unrecognized\", \"text\": \"Recoverable exact text\","},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/AsterismTests\/AssociationNoteEditorTests.swift","line":134}},"text":"            \"originalContextData\": contextData.base64EncodedString(), \"authoredAt\": \"0\"]"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":33,"file":"Asterism\/AsterismTests\/BenchmarkPreferencesTests.swift","line":23}},"text":"                                UITestLaunchSupport.runIDKey: UUID().uuidString]] {"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 919 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":20}},"text":"struct CharacterExtractionCoordinatorTests {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":96}},"text":"        note: String = \"Missha joins Team Loser.\","},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":97}},"text":"        knownGroupNames: [String] = [],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":98}},"text":"        characters: [MatchTarget] = [],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":99}},"text":"        characterSuppressions: SuppressionIndex = .empty) -> ExtractionCandidate {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":209}},"text":"    ) -> (CharacterExtractionCoordinator, MockLibraryProvider, MutableAvailabilityClient,"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":48,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":1176}},"text":"        #expect(request?.nameKeySuppressedKinds == [], \"an accept writes no name-key suppression\")"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 928","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/CharacterExtractionCoordinatorTests.swift","line":1216}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/CharacterGroupEditorTests.swift","line":102}},"text":"        #expect(!operations.contains { if case .transition(_, _, characterID, _, _) = $0 { return characterID == addedCharacter }; return false })"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1150 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/CharacterReviewModelTests.swift","line":18}},"text":"struct CharacterReviewModelTests {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1164","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/CharacterReviewModelTests.swift","line":1459}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1125 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/ComposedTeachingViewModelTests.swift","line":14}},"text":"struct ComposedTeachingViewModelTests {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'c' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Asterism\/AsterismTests\/ComposedTeachingViewModelTests.swift","line":69}},"text":"        let c = contract ?? Self.makeContract()"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1135","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/ComposedTeachingViewModelTests.swift","line":1546}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1266 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/ComposedURLEditorStateTests.swift","line":13}},"text":"struct ComposedURLEditorStateTests {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1273","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/ComposedURLEditorStateTests.swift","line":1679}},"text":"}"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Asterism\/AsterismTests\/ConflictRecentEntryDetailPresentationTests.swift","line":104}},"text":"            chapterProvenance: try! FieldProvenance(kind: .urlRule),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":35,"file":"Asterism\/AsterismTests\/ConflictRecentEntryDetailPresentationTests.swift","line":106}},"text":"            assignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Asterism\/AsterismTests\/ConflictRecentEntryDetailPresentationTests.swift","line":118}},"text":"            chapterProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":35,"file":"Asterism\/AsterismTests\/ConflictRecentEntryDetailPresentationTests.swift","line":120}},"text":"            assignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Contains over Filter is Empty","reason":"Prefer `contains` over using `filter(where:).isEmpty`","severity":"error","ruleIdentifier":"contains_over_filter_is_empty","ruleDescription":"Prefer `contains` over using `filter(where:).isEmpty`","location":{"character":17,"file":"Asterism\/AsterismTests\/CreatorRolesModelTests.swift","line":187}},"text":"        #expect(sentences.filter(\\.isEmpty).isEmpty)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":65}},"text":"        let repo = try! await LibraryRepository.openForExtension(config).repository"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":71}},"text":"        _ = try! await repo.capture(draft)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":92}},"text":"        let repo = try! await LibraryRepository.openForExtension(config).repository"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":104}},"text":"        _ = try! await repo.capture(draft1)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":9,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":106}},"text":"        try! await Task.sleep(for: .milliseconds(5))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":107}},"text":"        _ = try! await repo.capture(draft2)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":127}},"text":"        let repo = try! await LibraryRepository.openForExtension(config).repository"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":21,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":134}},"text":"        let entry = try! await repo.capture(draft)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":137}},"text":"        _ = try! await repo.createWork("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":9,"file":"Asterism\/AsterismTests\/CrossViewRefreshTests.swift","line":142}},"text":"        try! await repo.moveEntry(entry.id, to: .newWork(displayTitle: \"Non-Empty Work\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/EntryDetailAssociationPublicationTests.swift","line":89}},"text":"            spellingKeys: [\"alice\"], observedRejectionIDs: [UUID()], noteFingerprint: \"saved\", sourceGuard: \"guard\", targetFingerprint: \"target\")"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 710 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/EntryDetailModelTests.swift","line":10}},"text":"struct EntryDetailModelTests {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":37,"file":"Asterism\/AsterismTests\/EntryDetailModelTests.swift","line":870}},"text":"            chapterTitleProvenance: try! FieldProvenance(kind: .manual),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":39,"file":"Asterism\/AsterismTests\/EntryDetailModelTests.swift","line":877}},"text":"            workAssignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 1000 lines or less excluding comments and whitespace: currently spans 1239 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":6}},"text":"final class MockLibraryProvider: LibraryProviding, @unchecked Sendable {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":15}},"text":"    func updateWorkWithMembershipReceipt(id: UUID, basis: WorkEditBasis, draft: WorkMetadataDraft, calendar: Calendar) async throws -> MembershipWriteReceipt {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":21}},"text":"    func commitSeriesEditsWithMembershipReceipt(seriesID: UUID, name: String, notes: String, members: [SeriesMemberEdit]) async throws -> MembershipWriteReceipt {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":54}},"text":"    func previewRecordCopy(sourceWorkID: UUID, destinationWorkID: UUID, selections: [RecordCopySelection], includeNotes: Bool) async throws -> RecordCopyPreview {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":540}},"text":"        groupName: String, characterName: String) async throws -> Bool {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":544}},"text":"        groupName: String, characterName: String) async throws -> Bool {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":768}},"text":"    struct AssociationNoteRecovery: Equatable, Sendable { var basis: AssociationNoteBasis; var heads: [AssociationNoteValue]; var text: String }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":825}},"text":"    func recoverAssociationNotes(basis: AssociationNoteBasis, selectedHeads: [AssociationNoteValue], text: String) async throws -> AssociationNoteWriteOutcome {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1030}},"text":"    func projectReplacement(hostname: String, patternDefinition: PatternDefinition, boundaryEntryID: UUID, historicalPatternID: UUID?) async throws -> TeachingContract {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 219 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1053}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":5,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1053}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":31,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1202}},"text":"    func recordDistinctPair(_ a: UUID, _ b: UUID) async throws {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1370}},"text":"        [(seriesID: UUID, name: String, notes: String, members: [SeriesMemberEdit])] = []"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":26,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1550}},"text":"    func addLink(between a: UUID, and b: UUID, type: String) async throws -> UUID {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1244","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/Helpers\/MockLibraryProvider.swift","line":1625}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/HiddenLegacyFactsTests.swift","line":18}},"text":"        let fact = RecordFact(statement: \"  Cafe\\u{301}\\nlegacy statement  \", quote: \" Cafe\\u{301} exact quote \", nameKey: \"ada\", source: .entry(UUID()))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/HiddenLegacyFactsTests.swift","line":21}},"text":"            displayedKeys: [\"ada\"], proposedName: \"Ada\", proposedAliases: [\"Nightjar\"], facts: [fact], untickedFacts: [suppressed.identity]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/HiddenLegacyFactsTests.swift","line":42}},"text":"            return try ModelContext(container).fetch(FetchDescriptor<CharacterSuppression>()).filter { $0.evidence == suppressed.quote }.count"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 756 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/IntegrationSafetyNetTests.swift","line":16}},"text":"struct IntegrationSafetyNetTests {"},{"violation":{"ruleName":"Multiple Closures with Trailing Closure","reason":"Trailing closure syntax should not be used when passing more than one closure argument","severity":"error","ruleIdentifier":"multiple_closures_with_trailing_closure","ruleDescription":"Trailing closure syntax should not be used when passing more than one closure argument","location":{"character":84,"file":"Asterism\/AsterismTests\/IntentLibraryBrokerTests.swift","line":153}},"text":"        let answer = try await model.intentBroker.withLibrary(wroteIf: { $0 > 0 }) { _ in 0 }"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":17,"file":"Asterism\/AsterismTests\/IntentLibraryBrokerTests.swift","line":238}},"text":"                _ -> Int in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":17,"file":"Asterism\/AsterismTests\/IntentLibraryBrokerTests.swift","line":267}},"text":"                _ -> Int in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":58,"file":"Asterism\/AsterismTests\/ManualEntryFormModelTests.swift","line":71}},"text":"        let mock = MockLibraryProvider(), work = UUID(), a = UUID(), b = UUID()"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":13,"file":"Asterism\/AsterismTests\/NavigationActionsTests.swift","line":269}},"text":"            Self.actions(tab: .works, subject: .work(Self.workID))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":20}},"text":"            try FileManager.default.createDirectory(at: configuration.storeURL.deletingLastPathComponent(), withIntermediateDirectories: true)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":33}},"text":"                draft: .init(target: sourceKind == 1 ? .init(kind: .note, title: \"Standalone\") : .init(kind: .chapter, title: \"Arrival\", designation: \"1\"),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":34}},"text":"                    note: sourceKind == 2 ? \"\" : note, rating: sourceKind == 2 ? .up : nil, confirmedNewChapter: sourceKind != 1)) else { throw FixtureError.refused }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":39}},"text":"                    draft: .init(displayTitle: snapshot.displayTitle, typeAssignment: snapshot.typeDisplay.assignment, genreTags: snapshot.genreTags,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 178 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":46}},"text":"                guard case .committed = try await repo.commitRecordEdits(workID: work.id, operations: records.map(RecordEditOperation.create)) else { throw FixtureError.refused }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":57}},"text":"        let read = try #require(try await (repository ?? fixture.repository).extractionCandidates(limit: 1, workIDs: [fixture.workID]).first)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":109}},"text":"    @Test(\"Known current names, retained keys and accepted aliases save without review on automatic and manual passes\", arguments: [0, 1, 2], [false, true])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 177 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":111}},"text":"        let fixture = try await Fixture(records: [.init(kind: .character, name: tier == 2 ? \"Renamed\" : \"Ada\", note: \"Authored record note\", aliases: tier == 2 ? [\"Ada\"] : [])])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":117}},"text":"                operations: [.update(basis: record.editBasis, draft: .init(kind: .character, name: \"Renamed\", note: record.note))]) else { throw FixtureError.refused }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":123}},"text":"            model: StubCharacterExtractionModelClient(result: .init(characters: [.init(name: \"Ada\", facts: [.init(statement: \"Must never be saved\", quote: \"Ada\")])])),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":147}},"text":"        let fixture = try await Fixture(records: [.init(kind: .character, name: \"First\", aliases: [\"Ada\"]), .init(kind: .character, name: \"Second\", aliases: [\"Ada\"])])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":168}},"text":"        let owner = coordinator(fixture, result: .init(characters: [.init(name: \"Ada\"), .init(name: \"Bryn\")], places: [.init(name: \"Harbour\")]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":170}},"text":"        #expect(Set(owner.held(for: fixture.workID).map(\\.key)) == [.init(kind: .character, nameKey: \"bryn\"), .init(kind: .place, nameKey: \"harbour\")])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":225}},"text":"        #expect(Set(owner.held(for: fixture.workID).map(\\.key)) == [.init(kind: .character, nameKey: \"bryn\"), .init(kind: .place, nameKey: \"harbour\")])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":294}},"text":"    @Test(\"Derived place recovery stays bound to the folded origin when it is skipped or changed during an awaited write\", arguments: [false, true])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":306}},"text":"        let review = CharacterReviewModel(workID: fixture.workID, proposals: [captured], characters: [], places: [], library: fixture.repository,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":345}},"text":"            #expect(retry.held(for: fixture.workID).map(\\.key) == [.init(kind: .place, nameKey: \"ada\")], \"The independent place decision remains reachable after RAM is lost\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":368}},"text":"            draft: .init(target: .init(kind: .chapter, title: \"Second\", designation: \"2\"), note: \"Ada waits.\", confirmedNewChapter: true)) else { throw FixtureError.refused }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/NoteFirstCharacterRoutingTests.swift","line":393}},"text":"        if change { owner.reclassify(characterKey, for: fixture.workID, to: .place, target: nil) } else { owner.discard(characterKey, for: fixture.workID) }"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":23,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":22}},"text":"                work: try! SegmentRangeSpec(origin: .end, offset: 1, length: 1),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":27,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":23}},"text":"                ignored: [try! SegmentPositionSpec(origin: .end, offset: 0)]"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":46,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":30}},"text":"        chapterProvenance: FieldProvenance = try! FieldProvenance(kind: .pattern, patternID: patternID),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":49,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":31}},"text":"        assignmentProvenance: FieldProvenance = try! FieldProvenance(kind: .pattern, patternID: patternID)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":192}},"text":"            chapterProvenance: try! FieldProvenance(kind: .manual),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":35,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":193}},"text":"            assignmentProvenance: try! FieldProvenance(kind: .manual)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":43,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":201}},"text":"            chapterProvenance: .preserved(try! FieldProvenance(kind: .manual)),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":46,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":202}},"text":"            assignmentProvenance: .preserved(try! FieldProvenance(kind: .manual)),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":28,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":244}},"text":"                .preserved(try! FieldProvenance(kind: .pattern, patternID: Self.patternID)))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":57,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":252}},"text":"            ReparseViewModel.provenanceLabel(.preserved(try! FieldProvenance(kind: .none)))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":57,"file":"Asterism\/AsterismTests\/ReparseViewModelTests.swift","line":255}},"text":"            ReparseViewModel.provenanceLabel(.preserved(try! FieldProvenance(kind: .manual)))"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Asterism\/AsterismTests\/RuleSuggestionCoordinatorTests.swift","line":158}},"text":"    ) -> (RuleSuggestionCoordinator, MockLibraryProvider, StubSuggester, StubEnvironment,"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":8,"file":"Asterism\/AsterismTests\/SeriesRecordCopyOfferTests.swift","line":13}},"text":"  ) -> (SeriesDetailModel, MockLibraryProvider, RecordCopySeriesOffer, [WorkSnapshot]) {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":16,"file":"Asterism\/AsterismTests\/SettingsImportTests.swift","line":91}},"text":"        return try! BackupV18Codec.encode("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/SourceRowPresentationTests.swift","line":27}},"text":"        #expect(ProposalSourceEvidenceView.presentationTitle(source(.entry(UUID()), chapter: true, title: \"Actual chapter\")) == \"Actual chapter\")"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":21,"file":"Asterism\/AsterismTests\/ToReadMatchModelTests.swift","line":299}},"text":"        let basis = try! WorkMergeBasis("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WideLayoutsRethinkTests.swift","line":56}},"text":"        navigation.restoreWideState(sidebar: \"library.series\", today: AppNavigation.encodePath(today), library: AppNavigation.encodePath(library))"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":59,"file":"Asterism\/AsterismTests\/WorkDetailCharacterTests.swift","line":323}},"text":"        #expect(model.combineTargets(for: other).map(\\.id) == [])"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 956","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailCharacterTests.swift","line":1251}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1347 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":22}},"text":"struct WorkDetailModelTests {"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":29,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":284}},"text":"            action: .join), GroupTransitionFact(rootID: rootID, workID: work.id,"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":21,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":1778}},"text":"        let basis = try! WorkURLBasis("},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":54,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":2936}},"text":"        #expect(mock.lastUpdateWorkDraft?.releaseDays == [])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3192}},"text":"        return .init(selection: selection, generation: generation, availability: .available, activeChapterCount: count, rows: rows, details: details)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3238}},"text":"        let a = snapshot(first, count: 1), b = snapshot(second, count: 2), gate = SubmissionGate(), entered = SubmissionGate()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3263}},"text":"            activeChapterCount: first.activeChapterCount, rows: first.rows, details: first.rows.compactMap { first.detail(for: $0.id, expectedGeneration: first.generation) })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3301}},"text":"        #expect(model.recordHistoryDetail(for: pair, expectedGeneration: updated.generation)?.annotationHeads.first?.text == \"Reader history annotation\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3338}},"text":"        #expect(model.recordHistoryDetail(for: pair, expectedGeneration: replacement.generation)?.sourceText == \"Fresh saved source from replacement\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3376}},"text":"        #expect(model.recordHistoryDetail(for: pair, expectedGeneration: fresh.generation)?.sourceText == \"Fresh source after cancelled validation\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3523}},"text":"        #expect(model.recordHistoryDetail(for: pair, expectedGeneration: fresh.generation)?.annotationHeads.first?.text == \"Actual saved annotation\")"},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 2675","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailModelTests.swift","line":3537}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":533}},"text":"            provider.registerFileRepresentation(forTypeIdentifier: UTType.image.identifier, fileOptions: [], visibility: .all) { completion in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":559}},"text":"        let provider = NSItemProvider(item: try #require(jpegBytes(width: 600, height: 900, format: format)) as NSData, typeIdentifier: format.identifier)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":615}},"text":"            provider.registerFileRepresentation(forTypeIdentifier: UTType.jpeg.identifier, fileOptions: [], visibility: .all) { completion in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 195 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":653}},"text":"    @Test(\"Late provider results cannot revive a crop or overwrite guidance after navigation, Cancel, Save or a newer pick\", arguments: [\"navigation\", \"cancel\", \"save\", \"newPick\"], [false, true])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":683}},"text":"        let provider = NSItemProvider(item: try #require(jpegBytes(width: 600, height: 600)) as NSData, typeIdentifier: UTType.jpeg.identifier)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":706}},"text":"        let provider = NSItemProvider(item: try #require(jpegBytes(width: 600, height: 600)) as NSData, typeIdentifier: UTType.jpeg.identifier)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorkDetailThumbnailTests.swift","line":716}},"text":"        let provider = NSItemProvider(item: try #require(jpegBytes(width: 600, height: 600)) as NSData, typeIdentifier: UTType.jpeg.identifier)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":21,"file":"Asterism\/AsterismTests\/WorkMergeModelTests.swift","line":380}},"text":"        let basis = try! WorkMergeBasis("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":40,"file":"Asterism\/AsterismTests\/WorkRecordCopyModelTests.swift","line":10}},"text":"  @MainActor private func fixture() -> ("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":15,"file":"Asterism\/AsterismTests\/WorkRecordCopyModelTests.swift","line":237}},"text":"    let old = try! mock.recordCopyContextResult.get()"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":19,"file":"Asterism\/AsterismTests\/WorkRecordCopyModelTests.swift","line":291}},"text":"    let context = try! mock.recordCopyContextResult.get()"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":15,"file":"Asterism\/AsterismTests\/WorkRecordCopyModelTests.swift","line":336}},"text":"    let old = try! mock.recordCopyContextResult.get()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorksRedesignTests.swift","line":14}},"text":"            #expect(WorksGroup.onHiatus.members(of: [work], on: TestFixtures.publicationDay).isEmpty == ![.reading, .catchingUp].contains(status))"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/AsterismTests\/WorksRedesignTests.swift","line":43}},"text":"            WorksSearchToken(dimension: .site, label: \"example.com\", filter: WorksFilter(hostname: \"example.com\")),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Asterism\/AsterismTests\/WorksRedesignTests.swift","line":44}},"text":"            WorksSearchToken(dimension: .tag, label: \"new\", filter: WorksFilter(tag: \"new\"))]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorksRedesignTests.swift","line":84}},"text":"        #expect(WorksSearchToken.filter(from: filters.map { WorksSearchToken(dimension: $0.0, label: $0.0.title, filter: $0.1) }) == expected)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismTests\/WorksRowPresentationTests.swift","line":81}},"text":"        #expect(WorksRowPresentation.openLabel(for: work, siteNames: .empty, on: TestFixtures.publicationDay) == \"Open Work Zephyr from a.example\")"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 700 lines or less excluding comments and whitespace: currently spans 934 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismUITests\/AccessibilityJourneyUITests.swift","line":5}},"text":"final class AccessibilityJourneyUITests: XCTestCase {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 103 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Asterism\/AsterismUITests\/AccessibilityJourneyUITests.swift","line":299}},"text":"    func testTheStatusControlsAndDialogStayOperableAtLargestDynamicType() {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 127 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Asterism\/AsterismUITests\/AccessibilityJourneyUITests.swift","line":593}},"text":"    func testTheCreatorControlsStayReachableAtLargestDynamicType() {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1117","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AccessibilityJourneyUITests.swift","line":1913}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 1000 lines or less excluding comments and whitespace: currently spans 1191 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":6}},"text":"final class AssociationNotesUITests: XCTestCase {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 160 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":268}},"text":"    func testExpandedHistoryStaysStableThroughRealPublicationsAndReentry() {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":312}},"text":"            XCTAssertTrue(control.exists && viewport().contains(control.frame), \"The actual control is fully clear of navigation and the fixed fixture footer\")"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 259 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":436}},"text":"    func testSavingChapterNoteImmediatelyPublishesKnownCharacterAndPlaceLinks() {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":669}},"text":"        let spine = app.buttons.matching(NSPredicate(format: \"identifier == %@ AND label CONTAINS %@\", \"work-detail-entry\", \"Return\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":914}},"text":"        XCTAssertEqual(Array(staticTextString(source).utf8), Array(exact.utf8), \"History exposes the entire saved source without truncation or normalization\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":925}},"text":"        let chapter = app.buttons.matching(NSPredicate(format: \"identifier == %@ AND label CONTAINS %@\", \"work-detail-entry\", \"28\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":962}},"text":"        XCTAssertEqual(Array((note.value as? String ?? \"\").utf8), Array((draft ?? \"\").utf8), \"Restore preserves the exact unsaved parent draft\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":971}},"text":"        openSavedChapter(app.buttons.matching(NSPredicate(format: \"identifier == %@ AND label CONTAINS %@\", \"work-detail-entry\", \"28\")).firstMatch)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":973}},"text":"        XCTAssertEqual(Array((element(\"entry-detail-note-editor\").value as? String ?? \"\").utf8), Array((original ?? \"\").utf8), \"The parent draft was never saved\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":1260}},"text":"        XCTAssertTrue(app.staticTexts[\"Current destination note\"].waitForExistence(timeout: 15), \"Existing destination text is visible before a consuming Save\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":1279}},"text":"        XCTAssertEqual(app.buttons.matching(identifier: \"detached-association-note-recover\").count, 1, \"Only the coherent same-pair note offers recovery\")"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1195","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismUITests\/AssociationNotesUITests.swift","line":1286}},"text":"}"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Asterism\/AsterismUITests\/AsterismUITestsLaunchTests.swift","line":13}},"text":"    override class var runsForEachTargetApplicationUIConfiguration: Bool {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":13}},"text":"            let seededSpine = UIDevice.current.userInterfaceIdiom == .pad && name.contains(\"testSpineContentStartsAtTopAndShowsOnlyPrefixedNumbers\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":15}},"text":"            app.launchEnvironment[\"ASTERISM_UI_TEST_SCENARIO\"] = manualCast ? \"seeded-manual-note-cast\" : (seededSpine ? \"seeded-chapter-spine\" : \"seeded-composed\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":71}},"text":"        let drawn = app.buttons.matching(NSPredicate(format: \"identifier BEGINSWITH %@\", \"manual-entry.characters.chip.\")).allElementsBoundByIndex"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":108}},"text":"        XCTAssertEqual(app.buttons.matching(identifier: \"work-detail-entry\").count, before, \"Read-only chip actions and Cancel created nothing\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":139}},"text":"        let row = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND NOT label CONTAINS 'Fixture reaction'\")).firstMatch"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":36,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":194}},"text":"                                   (\"Chapter 12: Arrival\", \"Numbered body\"), (\"2024 memories\", \"Year body\")] {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":205}},"text":"        let titled = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label == 'Note on Arrival'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":206}},"text":"        let untitled = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND value == 'Untitled body'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":207}},"text":"        let numbered = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Chapter 12: Arrival'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":208}},"text":"        let year = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS '2024 memories'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":273}},"text":"        let row = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Renamed reaction'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":361}},"text":"        let source = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Source reaction'\")).firstMatch"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":378}},"text":"        let destinations = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Destination reaction'\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":404}},"text":"        XCTAssertEqual(app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Source reaction'\")).count, 0)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":405}},"text":"        let survivors = app.buttons.matching(NSPredicate(format: \"identifier == 'work-detail-entry' AND label CONTAINS 'Destination reaction'\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 171 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/ChapterNotesUITests.swift","line":451}},"text":"        app.buttons.matching(NSPredicate(format: \"label == 'Chapter' AND identifier != 'manual-entry-kind' AND identifier != 'work-detail-sort-chapter'\")).firstMatch.tap()"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 700 lines or less excluding comments and whitespace: currently spans 868 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismUITests\/CharacterExtractionUITests.swift","line":24}},"text":"final class CharacterExtractionUITests: XCTestCase {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 180 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/CharacterExtractionUITests.swift","line":155}},"text":"        XCTAssertEqual(text.label, \"Ada keeps the lighthouse at Kestrel Head, and the crew call her Nightjar. Brede rows the tender out at dusk. Selkie is moored below the light.\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/CharacterExtractionUITests.swift","line":1018}},"text":"        let reference = waitFor(app.anyElement(\"entry-detail-citing-character\"), \"Legacy reference retains the character's name\", timeout: 20)"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 922","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Asterism\/AsterismUITests\/CharacterExtractionUITests.swift","line":1271}},"text":"}"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 108 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Asterism\/AsterismUITests\/CharacterGroupsUITests.swift","line":357}},"text":"    func testManualJoinPublishesReciprocalChapterRangeAndAccessibleActions() {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/LibraryDiagnosticsUITests.swift","line":71}},"text":"        XCTAssertTrue(require(any(\"entry-detail-hostname\"), \"The chosen capture belongs to the orphaned site\").label.contains(\"orphan.test\"))"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/StatsUITests.swift","line":362}},"text":"    \/\/\/ Q49, confirmed on device, then measured here: an All-time graph whose"},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 700 lines or less excluding comments and whitespace: currently spans 859 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismUITests\/TodayUITests.swift","line":37}},"text":"final class TodayUITests: XCTestCase {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":13,"file":"Asterism\/AsterismUITests\/UIJourneySupport.swift","line":316}},"text":"    private func expandDisclosure("},{"violation":{"ruleName":"Type Body Length","reason":"Class body should span 700 lines or less excluding comments and whitespace: currently spans 738 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":7,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":24}},"text":"final class WideLayoutUITests: XCTestCase {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":51}},"text":"        XCTAssertTrue(waitFor(app.anyElement(\"entry-detail-hostname\"), \"The capture retains its site context\").label.contains(\"orphan.test\"))"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":165}},"text":"    \/\/\/ Req 8.1's assertable half rides here rather than in a suite of its own:"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":197}},"text":"    \/\/\/ On the phone a landed update pops entry detail back to the list. Here"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":207}},"text":"    \/\/\/ The review list's kind control and the work page's Places section, at"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":225}},"text":"    \/\/\/ The user's interim ruling of 2026-09-02: selecting a chapter inside a"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":280}},"text":"    \/\/\/ Diagnostics is pushed from Recent's banner onto the **list** stack. On"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":345}},"text":"    \/\/\/ `work-and-reading-status` Req 10.3: the statuses are the wide layout's"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":375}},"text":"    \/\/\/ Hub directories replace any work already open in the detail column."},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":1004}},"text":"        scrollUntilTappableAndTap(recentRows.firstMatch, in: app, \"Another note is reachable\", scroll: { $0.anyElement(\"recent-list\").swipeUp() })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":1055}},"text":"            self.app.buttons[\"sidebar-library-creators\"].label.components(separatedBy: CharacterSet.decimalDigits.inverted).compactMap(Int.init).contains { $0 > 0 }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WideLayoutUITests.swift","line":1180}},"text":"        scrollUntilTappableAndTap(recentRows.firstMatch, in: app, \"The covered note is reachable\", scroll: { $0.anyElement(\"recent-list\").swipeUp() })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 181 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WorkRecordCopyOfferUITests.swift","line":112}},"text":"      \"identifier BEGINSWITH 'record-copy-destination-' AND label CONTAINS 'Offer addition' AND label CONTAINS 'selected' AND NOT label CONTAINS 'not selected'\")).firstMatch.exists)"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":7,"file":"Asterism\/AsterismUITests\/WorkRecordCopyUITests.swift","line":90}},"text":"      _, _ in self.app.buttons[\"record-copy-accept\"].isEnabled"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":10,"file":"Asterism\/AsterismUITests\/WorkRecordCopyUITests.swift","line":90}},"text":"      _, _ in self.app.buttons[\"record-copy-accept\"].isEnabled"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":7,"file":"Asterism\/AsterismUITests\/WorkRecordCopyUITests.swift","line":101}},"text":"      _, _ in self.app.switches[\"record-copy-notes\"].value as? String == \"1\""},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":10,"file":"Asterism\/AsterismUITests\/WorkRecordCopyUITests.swift","line":101}},"text":"      _, _ in self.app.switches[\"record-copy-notes\"].value as? String == \"1\""},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Asterism\/AsterismUITests\/WorksListOptionsUITests.swift","line":93}},"text":"        assertListed([\"Ashfall\", \"Quill Harbour\", \"Vesper Tide\", \"Zephyr Court\", \"Marrow Lane\"], \"Alphabetical order preserves abandoned-last\")"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":21,"file":"Asterism\/SharedUI\/ShareCharacterChipsView.swift","line":144}},"text":"                    index, character in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":28,"file":"Asterism\/SharedUI\/ShareCharacterChipsView.swift","line":144}},"text":"                    index, character in"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationEndpoints.swift","line":125}},"text":"            eligible ? \"chapter\" : \"ineligible\", note])"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationEndpoints.swift","line":134}},"text":"            workID?.uuidString ?? \"\", RecordNameKey.normalize(name), nameKey]"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":48,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":118}},"text":"                                               entries: Set<UUID>, records: Set<AssociationRecordAddress>,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":48,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":119}},"text":"                                               pairs: Set<AssociationPair>) -> Set<AssociationScope> {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 16","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":140}},"text":"    private static func normalizationMayChange(_ payload: BackupImportPayload, context: ModelContext) throws -> Bool {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 106 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":208}},"text":"    private static func project(_ payload: BackupImportPayload, onto original: AssociationEndpointInventory,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 186 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":210}},"text":"                                context: ModelContext) throws -> (endpoints: AssociationEndpointInventory, uncertainScopes: Set<AssociationScope>, arrivalScopes: Set<AssociationScope>) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":214}},"text":"        let entryRows = entryIDs.isEmpty ? [] : try context.fetch(FetchDescriptor<Entry>(predicate: #Predicate { entryIDs.contains($0.id) }))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":224}},"text":"        let present = relevantWorks.isEmpty ? [] : try context.fetch(FetchDescriptor<Work>(predicate: #Predicate { relevantWorks.contains($0.id) }))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 203 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":233}},"text":"            if let chapter { targetData = chapter.authoredTargetData; redirect = chapter.mergedIntoEntryID } else { targetData = rows.first?.authoredTargetData; redirect = rows.first?.mergedIntoEntryID }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":234}},"text":"            let eligible = redirect == nil && (targetData == nil || targetData.flatMap { try? AuthoredEntryTarget.decode($0) }?.kind == .chapter)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":299}},"text":"                let owners: [UUID?] = copies.isEmpty ? [Row.kind == .place ? archivedOwner : archivedOwner.flatMap { liveWorks.contains($0) ? $0 : nil }]"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":332}},"text":"        endpoints: AssociationEndpointInventory, pairs: Set<AssociationPair>,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationImportPreparation.swift","line":333}},"text":"        context: ModelContext) throws -> [UUID: [GroupChapter]] {"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":19}},"text":"        switch self { case .entry(let work, _), .record(let work, _, _), .work(let work): work }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 27","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":332}},"text":"    public init(events copies: [AssociationLedgerEvent], quarantinedIDs: Set<UUID> = []) {"},{"violation":{"ruleName":"Function Body Length","reason":"Initializer body should span 100 lines or less excluding comments and whitespace: currently spans 134 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":332}},"text":"    public init(events copies: [AssociationLedgerEvent], quarantinedIDs: Set<UUID> = []) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":528}},"text":"            recordBarrierDigest: barrierDigest(.record(workID: current.pair.workID, kind: current.pair.kind, recordID: current.pair.recordID)),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":545}},"text":"                groupSupport.spellingKey]"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":618}},"text":"            barrierDigest(.entry(workID: workID, entryID: entryID))])"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":623}},"text":"            sourceFingerprint, matchingDirectory,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":624}},"text":"            barrierDigest(.entry(workID: workID, entryID: entryID))]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 183 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":675}},"text":"            && lhs.rebindAcceptanceID == rhs.rebindAcceptanceID && lhs.authoredAt.timeIntervalSinceReferenceDate.bitPattern == rhs.authoredAt.timeIntervalSinceReferenceDate.bitPattern"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationLedger.swift","line":715}},"text":"                          ExactScalarString(parent.originalContext) == ExactScalarString(note.originalContext) else { memo[id] = false; return false }"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":49,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationMutation.swift","line":21}},"text":"        let selectedEntries: [UUID?] = entryIDs.map { $0 }"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":70,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationMutation.swift","line":22}},"text":"        let selectedRecords: [UUID?] = Array(Set(records.map(\\.id))).map { $0 }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 28","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationMutation.swift","line":49}},"text":"    func finish(context: ModelContext, timestamp: Date, rebinds: [AssociationRebindOperation] = [],"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 140 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationMutation.swift","line":49}},"text":"    func finish(context: ModelContext, timestamp: Date, rebinds: [AssociationRebindOperation] = [],"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 110 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":15}},"text":"    public func seedAssociationNotesFixture(verifyUnicodeAppend: Bool = false) async throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":72}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated association fixture\", reason: \"association acceptance refused\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":88}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated association fixture\", reason: \"chapter seed edit refused\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":94}},"text":"            throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated association fixture\", reason: \"destination note seed refused\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":99}},"text":"            throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated association fixture\", reason: \"Unicode note seed refused\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationNotesFixture.swift","line":124}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"completing isolated association fixture\", reason: \"synthetic Work missing\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationPendingReviews.swift","line":28}},"text":"        self.items = combined.sorted { [$0.key.kind.rawValue, $0.key.nameKey, $0.targetID?.uuidString ?? \"\", $0.spellingKeys.joined(separator: \"\\u{0}\")]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationPendingReviews.swift","line":29}},"text":"            .lexicographicallyPrecedes([$1.key.kind.rawValue, $1.key.nameKey, $1.targetID?.uuidString ?? \"\", $1.spellingKeys.joined(separator: \"\\u{0}\")])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 163 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationPendingReviews.swift","line":109}},"text":"                if marker.sourceGuard.isEmpty || marker.items.isEmpty || Set(marker.items.map(\\.key)).count != marker.items.count || marker.items.contains(where: {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationPendingReviews.swift","line":136}},"text":"                        for item in marker.items where item.key == reference.key && item.key.kind == kind && (item.targetID == nil || item.targetID == recordID) {"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":72}},"text":"            case .pendingReview(let marker): expectedEntry = marker.entryID"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":73}},"text":"            case .reviewAcknowledgement(let acknowledgement): expectedEntry = acknowledgement.entryID"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":74}},"text":"            case .groupSuggestionSkip(let skip): expectedEntry = skip.chapterID"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":84}},"text":"            && lhs.recordKindRaw.map(ExactScalarString.init) == rhs.recordKindRaw.map(ExactScalarString.init) && lhs.recordID == rhs.recordID"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 179 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":101}},"text":"    private enum CodingKeys: String, CodingKey { case id, workID, originPairData, attachmentAcceptIDsData, parentHeadIDsData, operationRaw, text, originalContextData, authoredAt }"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":156}},"text":"            entryID?.uuidString ?? \"\", recordKindRaw == nil ? \"nil\" : \"value\", recordKindRaw ?? \"\","},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":157}},"text":"            recordID?.uuidString ?? \"\", eventData.base64EncodedString(), validationData == nil ? \"nil\" : \"value\","},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":158}},"text":"            validationData?.base64EncodedString() ?? \"\", String(recordedAt.timeIntervalSinceReferenceDate.bitPattern)])"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":164}},"text":"            originPairData.base64EncodedString(), attachmentAcceptIDsData.base64EncodedString(),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":165}},"text":"            parentHeadIDsData.base64EncodedString(), operationRaw, text, originalContextData.base64EncodedString(),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationRawRecords.swift","line":166}},"text":"            String(authoredAt.timeIntervalSinceReferenceDate.bitPattern)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationSnapshots.swift","line":9}},"text":"    public init(entryID: UUID, noteFingerprint: String, spellingKeys: [String], observedRejectionIDs: [UUID] = [], sourceGuard: String? = nil) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 314 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationSnapshots.swift","line":38}},"text":"                activePairs: Set<AssociationPair>, decisions: [AssociationPair: [String: AssociationSpellingDecision]], sourceGuards: [UUID: String] = [:], coherentRecordIDs: [RecordKind: Set<UUID>]? = nil, coverageBases: [UUID: String] = [:], pendingReviewReferences: [UUID: [AssociationReviewReference]] = [:]) {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 16","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationStorage.swift","line":19}},"text":"    static func read(context: ModelContext, workIDs: Set<UUID>, includeNotes: Bool = true,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AssociationStorage.swift","line":107}},"text":"                    quarantinedEventIDs: badEvents, ledger: ledger, notes: foldedNotes, eventFetchCount: eventFetchCount, noteFetchCount: noteFetchCount)"},{"violation":{"ruleName":"Identifier Name","reason":"Enum element name 'm2_0' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":8}},"text":"        case m2_0 = \"m2.0\""},{"violation":{"ruleName":"Identifier Name","reason":"Enum element name 'm2_1' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":12}},"text":"        case m2_1 = \"m2.1\""},{"violation":{"ruleName":"Identifier Name","reason":"Enum element name 'm2_2' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":13}},"text":"        case m2_2 = \"m2.2\""},{"violation":{"ruleName":"Identifier Name","reason":"Enum element name 'm2_3' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":14}},"text":"        case m2_3 = \"m2.3\""},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'm2_0' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":29}},"text":"    public static let m2_0 = AsterismCapabilities(gate: .m2_0)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'm2_1' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":30}},"text":"    public static let m2_1 = AsterismCapabilities(gate: .m2_1)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'm2_2' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":31}},"text":"    public static let m2_2 = AsterismCapabilities(gate: .m2_2)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'm2_3' should only contain alphanumeric and other allowed characters","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismCapabilities.swift","line":32}},"text":"    public static let m2_3 = AsterismCapabilities(gate: .m2_3)"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":291}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":292}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Min or Max over Sorted First or Last","reason":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","severity":"error","ruleIdentifier":"sorted_first_last","ruleDescription":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":512}},"text":"        rows.filter { $0.hostname == hostname }.sorted { $0.id.uuidString < $1.id.uuidString }.first"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":665}},"text":"        try! self.init("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":25,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":1119}},"text":"        typealias Row = ("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":36,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV17Models.swift","line":1226}},"text":"    public static func sortedIDs(_ a: UUID, _ b: UUID) -> (lower: UUID, higher: UUID) {"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV18Models.swift","line":56}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV18Models.swift","line":57}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV19Models.swift","line":56}},"text":"    public var publicationStateData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV19Models.swift","line":57}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV19Models.swift","line":58}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV20Models.swift","line":60}},"text":"    public var publicationStateData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV20Models.swift","line":61}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV20Models.swift","line":62}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV21.swift","line":19}},"text":"        [AsterismSchemaV16.self, AsterismSchemaV17.self, AsterismSchemaV18.self, AsterismSchemaV19.self, AsterismSchemaV20.self, AsterismSchemaV21.self]"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV21Models.swift","line":60}},"text":"    public var publicationStateData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV21Models.swift","line":61}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AsterismSchemaV21Models.swift","line":62}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Implicit Getter","reason":"Computed read-only properties should avoid using the get keyword","severity":"error","ruleIdentifier":"implicit_getter","ruleDescription":"Computed read-only properties and subscripts should avoid using the get keyword.","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/AuthoredEntryTarget.swift","line":73}},"text":"        get { authoredTargetData.flatMap { try? AuthoredEntryTarget.decode($0) } }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveProjection.swift","line":210}},"text":"    private static func requireRepresentableValues("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveProjection.swift","line":210}},"text":"    private static func requireRepresentableValues("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 46","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveReferenceChecks.swift","line":26}},"text":"    static func validate("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 211 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveReferenceChecks.swift","line":26}},"text":"    static func validate("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 13","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveReferenceChecks.swift","line":26}},"text":"    static func validate("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 177 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupArchiveReferenceChecks.swift","line":334}},"text":"            do { try rule.definition.validate(origin: rule.origin, isCurrent: rule.isCurrent) } catch { throw invalid(\"URLRule\", rule.id.uuidString, String(describing: error)) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupImportChapterRecords.swift","line":20}},"text":"                guard rows.allSatisfy({ ExactScalarString($0.urlString) == ExactScalarString(record.urlString) && $0.hostname == record.hostname"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 210 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupImporter.swift","line":332}},"text":"        guard (formatVersion, schemaVersion) == supportedVersions || (formatVersion, schemaVersion) == (20, 21) || (formatVersion, schemaVersion) == (19, 20) || (formatVersion, schemaVersion) == (18, 19) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupImporter.swift","line":351}},"text":"        do { compatible = try BackupV21Codec.decodeCompatible(data) } catch { throw BackupImportError.decodingFailed(reason: String(describing: error)) }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":40,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupJSONCodecSupport.swift","line":70}},"text":"        case .invalidFormatVersion(let v): \"Unsupported backup format version: \\(v)\""},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":40,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupJSONCodecSupport.swift","line":71}},"text":"        case .invalidSchemaVersion(let v): \"Unsupported backup schema version: \\(v)\""},{"violation":{"ruleName":"Min or Max over Sorted First or Last","reason":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","severity":"error","ruleIdentifier":"sorted_first_last","ruleDescription":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV18Codec.swift","line":192}},"text":"        if let unknown = root.subtracting(required).sorted().first {"},{"violation":{"ruleName":"Min or Max over Sorted First or Last","reason":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","severity":"error","ruleIdentifier":"sorted_first_last","ruleDescription":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV18Codec.swift","line":195}},"text":"        if let missing = required.subtracting(root).sorted().first {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV18Codec.swift","line":217}},"text":"    static func validate(payload: BackupV18Payload) throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV19Codec.swift","line":260}},"text":"                      AuthoredEntryTarget.canonicalData(accepted.authoredTargetData) == AuthoredEntryTarget.canonicalData(entry.authoredTargetData),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV19Types.swift","line":444}},"text":"    public init(predecessor: BackupV18Entry, authoredTargetData: Data? = nil, mergedIntoEntryID: UUID? = nil, mergeResolutionData: Data? = nil) {"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":29,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV21Exporter.swift","line":24}},"text":"                            $0.payloadData.base64EncodedString()].lexicographicallyPrecedes("},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":29,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/BackupV21Exporter.swift","line":29}},"text":"                            $0.payloadData.base64EncodedString()].lexicographicallyPrecedes("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CaptureViewModel.swift","line":220}},"text":"            return !needsChoice && chapterProjection?.needsContentChoice(intent: chapterIntent, note: draft.note, rating: draft.rating) != true"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 211 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CaptureViewModel.swift","line":283}},"text":"                    currentContract = CaptureContract(basis: contract.basis, request: contract.request.withChapterProjection(contract.request.chapterProjection, intent: chapterIntent), outcome: contract.outcome)"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":24,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CaptureViewModel.swift","line":522}},"text":"        switch state { case .ready, .saveFailed: break; default: return false }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":57,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CaptureViewModel.swift","line":522}},"text":"        switch state { case .ready, .saveFailed: break; default: return false }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 203 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CaptureViewModel.swift","line":583}},"text":"            currentContract = CaptureContract(basis: contract.basis, request: contract.request.withChapterProjection(contract.request.chapterProjection, intent: chapterIntent), outcome: contract.outcome)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CatchUpProgress.swift","line":113}},"text":"            if effectiveLatest == lastRead { state = .caughtUp } else if effectiveLatest == record.latest && record.confirmation?.isEstimate == false {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":73,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CatchUpWriter.swift","line":25}},"text":"                row.catchUpConfirmationData = record.confirmation.map { try! JSONBlob.encode($0) }"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":69,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CatchUpWriter.swift","line":29}},"text":"                row.lastChapterOverrideData = record.override.map { try! JSONBlob.encode($0) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ChapterCaptureResolver.swift","line":123}},"text":"            resolution = .chooseChapter(entryIDs: sourceMatches.map(\\.id), reason: \"This page is linked to more than one chapter or needs review\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CharacterExtractionTypes.swift","line":215}},"text":"                  !matches.contains(where: \\.isTorn), records.filter({ $0.id == first.id }).allSatisfy({ $0 == first }) else { return .ambiguous }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/CharacterExtractionTypes.swift","line":332}},"text":"        mentions: [AssociationMentionDecision] = [], reviewAcknowledgements: [AssociationReviewAcknowledgement] = [], reviewedKey: AssociationReviewKey? = nil,"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedDeriver.swift","line":158}},"text":"    ) -> (workName: String?, chapterTitle: String?, source: ComposedWorkNameSource, failure: PatternApplicationError?) {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedDeriver.swift","line":185}},"text":"    ) -> ("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":29,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedTeachingProjection.swift","line":228}},"text":"        case .unchanged(let v), .available(let v): v"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":48,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedTeachingProjection.swift","line":228}},"text":"        case .unchanged(let v), .available(let v): v"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedTeachingProjection.swift","line":518}},"text":"        do { _ = try request.titleDefinition.validated() } catch { throw ComposedTeachingProjectionError.invalidTitleDefinition(reason: String(describing: error)) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 182 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedTeachingProjection.swift","line":520}},"text":"            do { try urlDef.validate(origin: .readerTaught, isCurrent: true) } catch { throw ComposedTeachingProjectionError.invalidURLDefinition(reason: String(describing: error)) }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ComposedTeachingProjection.swift","line":731}},"text":"        entries.sorted { a, b in"},{"violation":{"ruleName":"Type Body Length","reason":"Enum body should span 1000 lines or less excluding comments and whitespace: currently spans 1204 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":211}},"text":"enum DuplicateReconciler {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":543}},"text":"    private static func resolveWorkSets("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":710}},"text":"    static func collapseMemberships("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":741}},"text":"    static func collapseMemberships("},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":777}},"text":"            let claimed: [UUID?] = slice.map { $0 }"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":47,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":1314}},"text":"                                              context: ModelContext) throws -> (mutation: AssociationMutation, records: WorkRecordRows) {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 15","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":1417}},"text":"    private static func stage("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 21","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":1921}},"text":"    private static func apply("},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":53,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":2175}},"text":"                                                    rowCount: (Element) -> Int) -> [[Element]] {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1285","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateReconciler.swift","line":2238}},"text":"}"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateScan.swift","line":54}},"text":"    public init(_ a: UUID, _ b: UUID) {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 25","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateScan.swift","line":807}},"text":"    static func workComponents("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":32,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateScan.swift","line":825}},"text":"        func crossSiteLinked(_ a: UUID, _ b: UUID) -> Bool {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":25,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/DuplicateScan.swift","line":857}},"text":"                    for a in byHostnames[left] ?? [] {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":36,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/EntryCitations.swift","line":175}},"text":"    static let defaultBlob: Data = try! JSONBlob.encode(EntryCitations())"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/EntryCitations.swift","line":250}},"text":"    public static let absent = try! FieldProvenance(kind: .none)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/EntryCitations.swift","line":255}},"text":"    public static let manual = try! FieldProvenance(kind: .manual)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":35,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/EntryCitations.swift","line":274}},"text":"        if let patternID { return try! FieldProvenance(kind: .pattern, patternID: patternID) }"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupConflictJourneyFixture.swift","line":10}},"text":"        rootID: UUID) async throws {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":49,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupOrdering.swift","line":317}},"text":"        self.publicationStateData = state.map { try! $0.canonicalData() } ?? publicationStateData"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupOrdering.swift","line":1005}},"text":"    \/\/\/ A stable sort over precomputed keys. Stable because the orderings tie on"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 26","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":191}},"text":"    public static func project(workID: UUID, chapters: [GroupChapter], facts: [GroupFact],"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 154 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":191}},"text":"    public static func project(workID: UUID, chapters: [GroupChapter], facts: [GroupFact],"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":268}},"text":"                switch event.operation { case .create(let name), .setName(let name): name; default: nil }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":92,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":268}},"text":"                switch event.operation { case .create(let name), .setName(let name): name; default: nil }"},{"violation":{"ruleName":"Min or Max over Sorted First or Last","reason":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","severity":"error","ruleIdentifier":"sorted_first_last","ruleDescription":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","location":{"character":24,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":294}},"text":"                return remaining.compactMap { event -> String? in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":348}},"text":"                transitionEventIDs: Dictionary(grouping: validTransitions.filter { $0.groupID == groupID }, by: \\.rootID).mapValues { $0.map(\\.id) })"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":382}},"text":"                                         parents: (Value) -> [UUID]) -> Bool {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":44,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":396}},"text":"                                           in values: [UUID: Value],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":44,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":397}},"text":"                                           parents: (Value) -> [UUID]) -> Bool {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":53,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRoster.swift","line":407}},"text":"                                                    parents: (Value) -> [UUID]) -> [Value]"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupRosterStorage.swift","line":73}},"text":"            rows -> GroupTransitionFact? in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 171 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupSupportInventory.swift","line":146}},"text":"                         projectedTargets: [AssociationRecordAddress: AssociationEndpointInventory.Target]? = nil) throws -> [AssociationPair: [AssociationGroupSupport]] {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":48,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupSupportInventory.swift","line":161}},"text":"                                               claimID: UUID) throws -> [GroupNameClaim] {"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/GroupWorkMerge.swift","line":28}},"text":"            copies -> GroupFact? in"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/IdentityNormalization.swift","line":309}},"text":"        String(decoding: utf8.map { byte in"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryDiagnosticRecords.swift","line":52}},"text":"            let claimed: [UUID?] = slice.map { $0 }"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 106 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryDiagnostics.swift","line":573}},"text":"    public static func scan(context: ModelContext) throws -> Result {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":8}},"text":"    func previewRecordCopy(sourceWorkID: UUID, destinationWorkID: UUID, selections: [RecordCopySelection], includeNotes: Bool) async throws -> RecordCopyPreview"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":11}},"text":"    func updateWorkWithMembershipReceipt(id: UUID, basis: WorkEditBasis, draft: WorkMetadataDraft, calendar: Calendar) async throws -> MembershipWriteReceipt"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":12}},"text":"    func commitSeriesEditsWithMembershipReceipt(seriesID: UUID, name: String, notes: String, members: [SeriesMemberEdit]) async throws -> MembershipWriteReceipt"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":33}},"text":"    func recoverAssociationNotes(basis: AssociationNoteBasis, selectedHeads: [AssociationNoteValue], text: String) async throws -> AssociationNoteWriteOutcome"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":150}},"text":"        groupName: String, characterName: String) async throws -> Bool"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":152}},"text":"        groupName: String, characterName: String) async throws -> Bool"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":366}},"text":"    func projectReplacement(hostname: String, patternDefinition: PatternDefinition, boundaryEntryID: UUID, historicalPatternID: UUID?) async throws -> TeachingContract"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 217 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":383}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":383}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":31,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":430}},"text":"    func recordDistinctPair(_ a: UUID, _ b: UUID) async throws"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":562}},"text":"    func addLink(between a: UUID, and b: UUID, type: String) async throws -> UUID"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":650}},"text":"        groupName: String, characterName: String) async throws -> Bool { false }"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":652}},"text":"        groupName: String, characterName: String) async throws -> Bool { false }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":666}},"text":"        throw LibraryRepositoryError.invalidInput(operation: \"reclassifying recognised character links\", reason: \"unavailable in this library\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":688}},"text":"    func recoverAssociationNotes(basis: AssociationNoteBasis, selectedHeads: [AssociationNoteValue], text: String) async throws -> AssociationNoteWriteOutcome {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":837}},"text":"    func addLink(between a: UUID, and b: UUID, type: String) async throws -> UUID {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":902}},"text":"    public func updateWorkWithMembershipReceipt(id: UUID, basis: WorkEditBasis, draft: WorkMetadataDraft, calendar: Calendar) async throws -> MembershipWriteReceipt {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":905}},"text":"    public func commitSeriesEditsWithMembershipReceipt(seriesID: UUID, name: String, notes: String, members: [SeriesMemberEdit]) async throws -> MembershipWriteReceipt {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":914}},"text":"    public func previewRecordCopy(sourceWorkID: UUID, destinationWorkID: UUID, selections: [RecordCopySelection], includeNotes: Bool) async throws -> RecordCopyPreview {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryProviding.swift","line":943}},"text":"    public func commitManualEntry(projection: ChapterCaptureProjection, draft: ManualEntryDraft) async throws -> ChapterCaptureCommitOutcome {"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+AssociationNotes.swift","line":58}},"text":"            pair.kind.rawValue, endpoints.targets[.init(kind: pair.kind, id: pair.recordID)]?.displayName ?? pair.recordID.uuidString]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+AssociationNotes.swift","line":124}},"text":"                if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { blockedPairs.insert(pair) } else { blockedWorks.insert(raw.workID) }"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Associations.swift","line":102}},"text":"                    record.currentNameKey, record.retainedKey, String(record.aliasKeys.count),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Associations.swift","line":103}},"text":"                    coherentRecordIDs[kind, default: []].contains(record.id) ? \"eligible\" : \"incoherent\"] + record.aliasKeys.sorted())"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Associations.swift","line":132}},"text":"                  CharacterCoverageFingerprint.of(source.note) == mention.noteFingerprint else { return .staleSource(.entry(mention.entryID)) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Associations.swift","line":141}},"text":"                guard Set(storage.ledger.rejectionIDs(pair: pair, spellingKeys: mention.spellingKeys)) == Set(mention.observedRejectionIDs) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Associations.swift","line":197}},"text":"                endpoints: endpoints, ambiguousSources: ambiguous, suppressedUnmatchedKeys: suppressedUnmatched).blocksCoverage else { continue }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 23","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+BackupImport.swift","line":41}},"text":"    static func materializeArchive("},{"violation":{"ruleName":"Min or Max over Sorted First or Last","reason":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","severity":"error","ruleIdentifier":"sorted_first_last","ruleDescription":"Prefer using `min()` or `max()` over `sorted().first` or `sorted().last`","location":{"character":37,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+BackupImportGates.swift","line":66}},"text":"            let (hostname, error) = diagnoses.sorted { $0.key < $1.key }.first!"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Capture.swift","line":591}},"text":"                        ExactScalarString(source.urlString) == ExactScalarString(projection.rawURL) && (desired == nil || desired!.active.isSubset(of:"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":52,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":15}},"text":"                                                   workID: UUID, context: ModelContext) throws -> ChapterCaptureProjection {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":57}},"text":"                note: group.presentedContent.note, rating: group.presentedContent.rating, modifiedAt: group.modifiedAt, authoredContent: group.presentedContent,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":65}},"text":"                resolution: .chooseChapter(entryIDs: projection.entries.map(\\.id), reason: \"Review this page's corrected chapter ownership\"),"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":50,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":76}},"text":"                                                 context: ModelContext) throws -> [ChapterCaptureEvidence] {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 33","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":162}},"text":"    internal func applyChapterCapture(_ draft: ChapterCaptureDraft, hostname: String,"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 188 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":162}},"text":"    internal func applyChapterCapture(_ draft: ChapterCaptureDraft, hostname: String,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 161 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":184}},"text":"            guard let selected = fresh.entries.first(where: { $0.id == id && !$0.requiresReview && (fresh.evidence.isEmpty || $0.target?.kind != .note) }) else {"},{"violation":{"ruleName":"Contains over Filter is Empty","reason":"Prefer `contains` over using `filter(where:).isEmpty`","severity":"error","ruleIdentifier":"contains_over_filter_is_empty","ruleDescription":"Prefer `contains` over using `filter(where:).isEmpty`","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":199}},"text":"                  fresh.entries.filter({ $0.target?.kind != .note }).isEmpty || confirmedNew else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ChapterCapture.swift","line":203}},"text":"               fresh.entries.contains(where: { $0.target?.kind == .chapter && $0.target?.designation.map(ExactScalarString.init) == ExactScalarString(designation) }) {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+CharacterGroups.swift","line":63}},"text":"        groupName: String, characterName: String) async throws -> Bool {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+CharacterGroups.swift","line":95}},"text":"        groupName: String, characterName: String) async throws -> Bool {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 43","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+CharacterGroups.swift","line":147}},"text":"    internal func applyGroupEdits(workID: UUID, operations: [GroupEditOperation],"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 286 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+CharacterGroups.swift","line":147}},"text":"    internal func applyGroupEdits(workID: UUID, operations: [GroupEditOperation],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+CharacterGroups.swift","line":148}},"text":"        currentChapterID: UUID? = nil, context: ModelContext) throws -> GroupEditOutcome {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 16","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":64}},"text":"    public func commitComposedTeaching("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 109 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":64}},"text":"    public func commitComposedTeaching("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 194 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":80}},"text":"            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) } catch { return .invalidated(reason: String(describing: error)) }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":33,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":103}},"text":"            case .unchanged(let v):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":33,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":110}},"text":"            case .available(let v):"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":30,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":118}},"text":"            let resolvedURL: (id: UUID, version: Int, definition: URLRuleDefinition, isNew: Bool)?"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":37,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":121}},"text":"                case .unchanged(let v):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'v' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":37,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":126}},"text":"                case .available(let v):"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 194 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":266}},"text":"            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) } catch { return .invalidated(reason: String(describing: error)) }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":357}},"text":"    private static func composedOutcomeChangesState("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":357}},"text":"    private static func composedOutcomeChangesState("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":533}},"text":"        }.sorted { a, b in"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 10","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":578}},"text":"    static func applyComposedOutcome("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 10","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ComposedTeaching.swift","line":731}},"text":"    private static func applyAssignment("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 23","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ConfirmImport.swift","line":193}},"text":"    internal static func upsert("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 155 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ConfirmImport.swift","line":193}},"text":"    internal static func upsert("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ConfirmImport.swift","line":591}},"text":"    private static func commitWorks("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ConfirmImport.swift","line":691}},"text":"    private static func commitMemberships("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ConfirmImport.swift","line":1212}},"text":"    internal static func apply(_ record: BackupV18Entry, to entry: Entry) {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'p' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":60,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":50}},"text":"        let patterns = try site.patternValues.compactMap { p -> PatternBasisEntry? in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":114}},"text":"        }.sorted { a, b in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":138}},"text":"        entries.map { e in"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 19","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":221}},"text":"    public func commitTeaching(_ contract: TeachingContract) async throws -> TeachingCommitOutcome {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 119 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":221}},"text":"    public func commitTeaching(_ contract: TeachingContract) async throws -> TeachingCommitOutcome {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'p' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Contracts.swift","line":275}},"text":"                for p in site.patternValues where p.isActive {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":38,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+DuplicateResolution.swift","line":29}},"text":"    public func recordDistinctPair(_ a: UUID, _ b: UUID) async throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+DuplicateResolution.swift","line":687}},"text":"        for pair in associationBefore.pairs.sorted(by: { AssociationDigest.pairToken($0).lexicographicallyPrecedes(AssociationDigest.pairToken($1)) })"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 127 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+DuplicateResolution.swift","line":792}},"text":"    private func resolveWorkSet("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+EntryCorrection.swift","line":30}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"chapter correction\", reason: \"Review differing copies before correcting this chapter\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+EntryCorrection.swift","line":80}},"text":"                        EntrySources.Association(entryID: $0.id, url: $0.rawURLString, evidence: .init(confirmed: EntrySources.legacyBindings(of: $0)))"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 119 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+EntryDetail.swift","line":15}},"text":"    public func entryTeachingDetail(id: UUID) async throws -> EntryTeachingDetail {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Export.swift","line":27}},"text":"            if let destination = index.destination(of: entryID, requireResolvedContent: true), !index.hasUnresolvedContent(for: destination) {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 16","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+GroupHistory.swift","line":49}},"text":"    func reconcileGroupHistory(maxBatches: Int? = nil) async throws -> GroupHistoryReconciliationReport {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 105 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+GroupHistory.swift","line":49}},"text":"    func reconcileGroupHistory(maxBatches: Int? = nil) async throws -> GroupHistoryReconciliationReport {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 136 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+GroupHistory.swift","line":167}},"text":"    private static func retireUnsupportedGroupRoots(workID: UUID,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+GroupHistory.swift","line":168}},"text":"        entryIDs: Set<UUID>, context: ModelContext, timestamp: Date) throws -> Bool {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":39,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Groups.swift","line":120}},"text":"                                      context: ModelContext) throws -> EntryGroup {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Groups.swift","line":388}},"text":"            conservativeIdentityKey: group.carrier.authoredTargetData == nil ? base.conservativeIdentityKey : carried.conservativeIdentityKey,"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Groups.swift","line":426}},"text":"    internal static func snapshot("},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Intents.swift","line":56}},"text":"            context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ManualEntry.swift","line":116}},"text":"    public func commitManualEntry(projection: ChapterCaptureProjection, draft: ManualEntryDraft) async throws -> ChapterCaptureCommitOutcome {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 17","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ManualEntry.swift","line":116}},"text":"    public func commitManualEntry(projection: ChapterCaptureProjection, draft: ManualEntryDraft) async throws -> ChapterCaptureCommitOutcome {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ManualEntry.swift","line":158}},"text":"                        EntrySources.Association(entryID: $0.id, url: $0.rawURLString, evidence: .init(confirmed: EntrySources.legacyBindings(of: $0)))"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":51,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":20}},"text":"                                                  suppressions: [RecordKind: SuppressionIndex]) -> Set<AssociationReviewKey> {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":78}},"text":"    public func recordPendingMentionReviews(_ requests: [AssociationPendingReviewRequest]) async throws -> [AssociationPendingReviewResult] {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":93}},"text":"                    throw LibraryRepositoryError.invalidInput(operation: \"preserving pending mention review\", reason: \"invalid pending review identity\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":97}},"text":"                        throw LibraryRepositoryError.invalidInput(operation: \"preserving pending mention review\", reason: \"contradictory pending review batch\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":105}},"text":"                        throw LibraryRepositoryError.invalidInput(operation: \"preserving pending mention review\", reason: \"pending review identity changed\")"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":118}},"text":"                    .place: Self.recordGroups(places[workID] ?? []).values.map(Self.matchTarget)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":120}},"text":"            let characterSuppressions = Dictionary(grouping: try CharacterSuppression.rows(of: works, context: context), by: { $0.work?.id })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":132}},"text":"            let endpoints = try AssociationEndpointInventory.read(context: context, pairs: ledger.pairs, entryIDs: entries, records: selected)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":136}},"text":"            let coherentWorks = Set(Self.workGroups(works, types: try Self.workTypeDirectory(context: context)).values.filter { !$0.isTorn }.map(\\.id))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":147}},"text":"                    before.ledger.sourceGuard(workID: marker.workID, entryID: marker.entryID, sourceFingerprint: source.fingerprint) == marker.sourceGuard {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+PendingMentionReviews.swift","line":173}},"text":"    static func pendingReviewDecisionEvents(_ request: DecisionRequest, recordID: UUID?, ledger: AssociationLedgerInventory) -> [AssociationLedgerEvent] {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":27}},"text":"            throw LibraryRepositoryError.invalidInput(operation: \"saving recognised character links\", reason: \"invalid automatic character authority\")"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 29","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":31}},"text":"    private func commitRecognisedCharacter(_ request: DecisionRequest,"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 143 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":31}},"text":"    private func commitRecognisedCharacter(_ request: DecisionRequest,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":32}},"text":"        restoration: SkippedCharacterLinkSnapshot?,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":33}},"text":"        requiresAutomaticArbitration: Bool) async throws -> DecisionOutcome {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":118}},"text":"                      request.sourceAuthority.contains(where: { $0.ref == .entry(mention.entryID) && $0.fingerprint == mention.noteFingerprint }) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":141}},"text":"                let guardValue = before.storage.ledger.sourceGuard(workID: workID, entryID: captured.entryID, sourceFingerprint: source.fingerprint)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":180}},"text":"            _ = try Self.writeAssociationCoverage(request.completedSources, workID: workID, works: works, context: context, timestamp: timestamp)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":245}},"text":"            }.sorted { [$0.recordName, $0.pair.recordID.uuidString].lexicographicallyPrecedes([$1.recordName, $1.pair.recordID.uuidString]) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecognisedCharacters.swift","line":257}},"text":"                spellingKeys: captured.spellingKeys, observedRejectionIDs: captured.observedRejectionIDs, sourceGuard: captured.sourceGuard)],"},{"violation":{"ruleName":"Contains over Filter is Empty","reason":"Prefer `contains` over using `filter(where:).isEmpty`","severity":"error","ruleIdentifier":"contains_over_filter_is_empty","ruleDescription":"Prefer `contains` over using `filter(where:).isEmpty`","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordCopy.swift","line":61}},"text":"          !preview.rows.filter({ $0.choice == .copy }).isEmpty,"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":7,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordCopy.swift","line":103}},"text":"      context in"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":225}},"text":"    internal func applyRecordEdits(workID: UUID, operations: [RecordEditOperation],"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 135 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":225}},"text":"    internal func applyRecordEdits(workID: UUID, operations: [RecordEditOperation],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":226}},"text":"        context: ModelContext) throws -> RecordEditOutcome {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":413}},"text":"    private static func apply<Row: RecordRow, Suppression: SuppressionRow>("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 10","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":563}},"text":"    private static func convert<"},{"violation":{"ruleName":"Generic Type Name","reason":"Generic type name 'DestinationSuppression' should be between 1 and 20 characters long","severity":"error","ruleIdentifier":"generic_type_name","ruleDescription":"Generic type name should only contain alphanumeric characters, start with an uppercase character and span between 1 and 20 characters in length.","location":{"character":33,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":565}},"text":"        Destination: RecordRow, DestinationSuppression: SuppressionRow"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":10,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":745}},"text":"    ) -> (name: String, note: String, aliases: [String], facts: [RecordFact]) {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 9","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordEditing.swift","line":843}},"text":"    private static func writeSuppression<Suppression: SuppressionRow>("},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":18,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":136}},"text":"                .map { $0 }"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 12","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":140}},"text":"    private static func extractionCandidate("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":195}},"text":"                $0.eligible && $0.workID == group.id && CharacterCoverageFingerprint.of($0.note) == CharacterCoverageFingerprint.of(entry.note)"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":234}},"text":"            }, .place: placeHalf.targets],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 188 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":517}},"text":"                entryIDs: Set(request.mentions.map(\\.entryID)).union(request.requiresCurrentSources ? request.sourceAuthority.compactMap { $0.ref.entryID } : []), records: selectedRecords)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":564}},"text":"            _ = try Self.writeAssociationCoverage(request.completedSources, workID: workID, works: workRows, context: context, timestamp: timestamp)"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":575}},"text":"    private static func apply<Row: RecordRow, Suppression: SuppressionRow>("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 9","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordExtraction.swift","line":915}},"text":"    static func writeSuppression<Suppression: SuppressionRow>("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":40}},"text":"        let physicalEntries = entryIDs.isEmpty ? [] : try context.fetch(FetchDescriptor<Entry>(predicate: #Predicate { entryIDs.contains($0.id) }))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 176 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":54}},"text":"            if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { invalidNotes.insert(pair) } else if raw.workID == workID { opaqueNotes = true }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":97}},"text":"            let title = label.displayTitle.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? \"Unnumbered chapter\" : label.displayTitle"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":102}},"text":"            details.append(.init(pair: pair, sourceText: source.note, annotationHeads: activeHeads, annotationMetadataNeedsReview: noteInvalid))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":112}},"text":"        let status: RecordHistoryAvailability = !targetAvailable ? (review ? .reviewRequired : .unavailable) : review ? .reviewRequired : .available"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+RecordHistory.swift","line":115}},"text":"            activeChapterCount: incompleteMembership ? nil : rows.count, rows: rows, unavailableEntryIDs: unavailable, details: details), diagnostics)"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 118 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ReparseCapture.swift","line":87}},"text":"    public func commitReparse(_ contract: ReparseContract) async throws -> ReparseCommitOutcome {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ReparseCapture.swift","line":244}},"text":"    public func projectCapture("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 143 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ReparseCapture.swift","line":272}},"text":"    public func commitCapture(_ contract: CaptureContract) async throws -> CaptureCommitOutcome {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 12","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":21,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+ReparseCapture.swift","line":502}},"text":"    internal static func applyCaptureAssignment("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 20","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+SaveTimeKnownLinks.swift","line":9}},"text":"    static func recordKnownChapterLinks(entryIDs: Set<UUID>, context: ModelContext,"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 121 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+SaveTimeKnownLinks.swift","line":9}},"text":"    static func recordKnownChapterLinks(entryIDs: Set<UUID>, context: ModelContext,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+SaveTimeKnownLinks.swift","line":91}},"text":"            guard let current = endpoints.current(pair, groupSupports: supports), let source = endpoints.sources[pair.entryID] else { continue }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+SaveTimeKnownLinks.swift","line":131}},"text":"                    entryID: pair.entryID, references: references, outcome: .kept(kind: pair.kind, recordID: pair.recordID)))), recordedAt: timestamp))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Series.swift","line":382}},"text":"            return MembershipWriteReceipt(outcome: .committed, transitions: groups.values.sorted { $0.id.uuidString < $1.id.uuidString }.map { group in"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Series.swift","line":511}},"text":"            let claimed: [UUID?] = slice.map { $0 }"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+Sites.swift","line":166}},"text":"        context: ModelContext) throws -> [String: LibraryValidationError] {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 124 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+TodayPresentation.swift","line":19}},"text":"    public func todayPresentation(calendar: Calendar) async throws -> TodayPresentation {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 265 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+TodayPresentation.swift","line":152}},"text":"                    if entry.authoredTarget != nil { missingWork ? .workMissing : nil } else if site == nil { .siteMissing } else if mode == nil { .siteRulesInvalid } else if isDuplicatedHostname { .siteDuplicated } else if missingWork { .workMissing } else { nil }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 30","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDeletion.swift","line":88}},"text":"    public func commitWorkDeletion("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 137 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDeletion.swift","line":88}},"text":"    public func commitWorkDeletion("},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDetailEdit.swift","line":28}},"text":"        recordOperations: [RecordEditOperation] = [],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDetailEdit.swift","line":29}},"text":"        linkOperations: [WorkLinkEditOperation] = [],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDetailEdit.swift","line":30}},"text":"        groupOperations: [GroupEditOperation] = [],"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDetailEdit.swift","line":31}},"text":"        workURL: WorkURLContract? = nil,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkDetailEdit.swift","line":32}},"text":"        membershipRemovalHostnames: [String] = []) {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":33,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkLinks.swift","line":110}},"text":"    public func addLink(between a: UUID, and b: UUID, type: String) async throws -> UUID {"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkLinks.swift","line":225}},"text":"        context: ModelContext) throws -> WorkLinkError? {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkLinks.swift","line":412}},"text":"        over a: UUID, and b: UUID, context: ModelContext"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkMerge.swift","line":73}},"text":"        postCommitDiagnoses: inout [String: LibraryValidationError]?) throws -> WorkURLCommitOutcome {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 30","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkMerge.swift","line":392}},"text":"    public func commitMerge(_ contract: WorkMergeContract) async throws -> WorkMergeCommitOutcome {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 225 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository+WorkMerge.swift","line":392}},"text":"    public func commitMerge(_ contract: WorkMergeContract) async throws -> WorkMergeCommitOutcome {"},{"violation":{"ruleName":"Type Body Length","reason":"Actor body should span 1000 lines or less excluding comments and whitespace: currently spans 1246 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":8,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":88}},"text":"public actor LibraryRepository {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 131 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":376}},"text":"    public func reconcileAfterSync("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 190 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":1036}},"text":"        do { hostname = try HostnameNormalizer.fromRawURL(rawURL) } catch { throw LibraryRepositoryError.invalidInput(operation: \"checking capture Site\", reason: String(describing: error)) }"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 106 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":1516}},"text":"    internal func applyWorkMetadata(id: UUID, basis: WorkEditBasis, draft: WorkMetadataDraft,"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":1517}},"text":"        calendar: Calendar, context: ModelContext) throws -> MembershipWriteReceipt {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":1673}},"text":"                .init(addressedWorkIDs: [id], resolvedWorkID: group.id, before: initialMembership, after: Self.presentedMembership(of: group))"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":2134}},"text":"            let claimed: [UUID?] = chunk.map { $0 }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":2352}},"text":"            throw LibraryRepositoryError.invalidInput(operation: \"validating canonical URL\", reason: \"canonical URL must be absolute HTTP(S)\")"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1304","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryRepository.swift","line":2427}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Enum body should span 700 lines or less excluding comments and whitespace: currently spans 731 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":8,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":137}},"text":"public enum LibraryValidator {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 163 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":279}},"text":"                do { try validate(site: site, allPatterns: allPatterns, allRules: allRules) } catch let error as LibraryValidationError { record(hostname, error) }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 26","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":394}},"text":"    private static func run("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 113 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":394}},"text":"    private static func run("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":742}},"text":"    private static func validate("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":841}},"text":"            do { try definition.validate(origin: origin, isCurrent: rule.isCurrent) } catch { throw invalid(\"URLRulePattern\", rule.id.uuidString, String(describing: error)) }"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryValidator.swift","line":1151}},"text":"    private static func validateV3("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":49,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryWrites.swift","line":306}},"text":"        self.publicationStateData = state.map { try! $0.canonicalData() } ?? publicationStateData"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/LibraryWrites.swift","line":372}},"text":"        case .strings(let values): \"l=\" + values.map { $0.replacingOccurrences(of: \"\\u{1E}\", with: \"\\u{1E}\\u{1E}\") }.joined(separator: \"\\u{1E}\")"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 21","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/MembershipReconciler.swift","line":423}},"text":"    private static func healWrongHostWorkURLs("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 105 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/MembershipReconciler.swift","line":423}},"text":"    private static func healWrongHostWorkURLs("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/MembershipReconciler.swift","line":423}},"text":"    private static func healWrongHostWorkURLs("},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":430}},"text":"    public var catchUpConfirmationData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":431}},"text":"    public var lastChapterOverrideData: Data? = nil"},{"violation":{"ruleName":"Implicit Optional Initialization","reason":"Optional should be implicitly initialized without nil","severity":"error","ruleIdentifier":"implicit_optional_initialization","ruleDescription":"Optionals should be consistently initialized, either with `= nil` or without.","location":{"character":16,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":433}},"text":"    public var publicationStateData: Data? = nil"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":9,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":805}},"text":"        try! self.init("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":25,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":1259}},"text":"        typealias Row = ("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":36,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":1366}},"text":"    public static func sortedIDs(_ a: UUID, _ b: UUID) -> (lower: UUID, higher: UUID) {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 925","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Models.swift","line":1941}},"text":"}"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":31,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/NoEpisodeHistory.swift","line":6}},"text":"    public static let empty = try! NoEpisodeHistory([])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":135}},"text":"            while idx < lowered.endIndex, lowered[idx] != \" \", lowered[idx] != \";\", lowered[idx] != \"\\\"\", lowered[idx] != \"'\", lowered[idx] != \">\" {"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 29","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":160}},"text":"    private func parse(_ text: String) -> ScannedHeadMetadata {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 122 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":160}},"text":"    private func parse(_ text: String) -> ScannedHeadMetadata {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":212}},"text":"            while index < text.endIndex, text[index] != \" \", text[index] != \"\\t\", text[index] != \"\\n\", text[index] != \"\\r\", text[index] != \">\", text[index] != \"\/\" {"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":378}},"text":"            .map { $0 }"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 16","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":480}},"text":"    private func parseAttributes(text: String, from index: inout String.Index) -> [String: String] {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 163 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/PageTitleFetcher.swift","line":497}},"text":"            while index < text.endIndex, text[index] != \"=\", text[index] != \" \", text[index] != \"\\t\", text[index] != \"\\n\", text[index] != \">\", text[index] != \"\/\" {"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":78,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ProjectionContract.swift","line":664}},"text":"        target.snapshot.memberships.first.map { rulesByHostname[$0.hostname] ?? nil } ?? nil"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":87,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ProjectionContract.swift","line":664}},"text":"        target.snapshot.memberships.first.map { rulesByHostname[$0.hostname] ?? nil } ?? nil"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":42,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ProjectionContract.swift","line":713}},"text":"        where (rulesByHostname[hostname] ?? nil) != nil {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 's' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":29,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ReSharePresentation.swift","line":112}},"text":"        case .readyEdit(let s):"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordHistoryJourneyFixture.swift","line":18}},"text":"                throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated history journey\", reason: \"unexpected fixture state\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordHistoryJourneyFixture.swift","line":39}},"text":"                    mentions: [.init(entryID: id, noteFingerprint: CharacterCoverageFingerprint.of(current.note), spellingKeys: [\"alice\"])]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordHistoryJourneyFixture.swift","line":43}},"text":"                    throw LibraryRepositoryError.invalidInput(operation: \"preparing isolated history journey\", reason: \"detached-note seed refused\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordHistorySnapshot.swift","line":40}},"text":"    public init(pair: AssociationPair, sourceText: String, annotationHeads: [AssociationNoteValue], annotationMetadataNeedsReview: Bool = false) {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":66}},"text":"    static func make("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":136}},"text":"    static func make("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":190}},"text":"    public static func make("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":231}},"text":"    public static func make("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":290}},"text":"    public static func make("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/RecordRow.swift","line":342}},"text":"    public static func make("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 17","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/SharePayloadExtractor.swift","line":70}},"text":"    private func extractItems(from items: [any ExtensionItemProviding]) async throws -> SharePayload {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ShareTransport.swift","line":321}},"text":"    public func projectCapture("},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ShareWorkContext.swift","line":457}},"text":"            context in"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":32,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/Snapshots.swift","line":151}},"text":"        publicationState.map { try! $0.canonicalData() }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":39,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TeachingTypes.swift","line":251}},"text":"    private static func scalarEqual(_ a: String, _ b: String) -> Bool {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 't' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":27,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleParsing.swift","line":817}},"text":"        case .success(let t):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":27,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleParsing.swift","line":819}},"text":"        case .failure(let e):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 't' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":27,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleParsing.swift","line":920}},"text":"        case .success(let t):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":27,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleParsing.swift","line":922}},"text":"        case .failure(let e):"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'p' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":29,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleProjectionPlanner.swift","line":40}},"text":"        case .preserved(let p): p.kind"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleProjectionPlanner.swift","line":342}},"text":"        entries.sorted { a, b in"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 9","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleProjectionPlanner.swift","line":379}},"text":"    private static func projectEntry("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 127 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleProjectionPlanner.swift","line":406}},"text":"    private static func projectEntryWithFieldTargeting("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 11","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TitleProjectionPlanner.swift","line":406}},"text":"    private static func projectEntryWithFieldTargeting("},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 21","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ToReadMatcher.swift","line":57}},"text":"    static func pairs("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ToReadMatcher.swift","line":204}},"text":"    static func candidates("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":31,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ToReadMatcher.swift","line":379}},"text":"    static func titlesMatch(_ a: NormalisedTitle, _ b: NormalisedTitle) -> Bool {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 217 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TodayPresentation.swift","line":436}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":5,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/TodayPresentation.swift","line":436}},"text":"    func projectCapture(hostname: String, captureTitle: String, captureTitleSource: CaptureTitleSource, rawURLString: String, canonicalURLString: String?, note: String, rating: Rating?) async throws -> CaptureContract"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 146 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ToleratedStateFixture.swift","line":94}},"text":"    public func seedToleratedStateFixture(_ kind: ToleratedStateFixtureKind) async throws {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":35,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/ToleratedStateFixture.swift","line":260}},"text":"                let toReadWorks: [(id: UUID, title: String, seriesID: UUID?, offset: Int)] = ["},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 141 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkMergePlanner.swift","line":116}},"text":"    public static func project("},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":56,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkMergePlanner.swift","line":211}},"text":"            let rule = basis.rulesByHostname[hostname] ?? nil"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkPublicationState.swift","line":133}},"text":"            guard let result = CivilDateCodec.parse(value), CivilDateCodec.spelling(result) == value else { throw StateError.invalidDate(value) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkPublicationState.swift","line":147}},"text":"            closedPauses: closedPauses.map { ClosedWire(start: $0.start.map(CivilDateCodec.spelling), end: CivilDateCodec.spelling($0.end)) },"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 161 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkPublicationState.swift","line":148}},"text":"            currentPause: currentPause.map { CurrentWire(start: $0.start.map(CivilDateCodec.spelling), returnDate: $0.returnDate.map(CivilDateCodec.spelling)) })"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":14,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkRecordCopy.swift","line":20}},"text":"  public let a: UUID"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":15,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkRecordCopy.swift","line":22}},"text":"  public init(a: UUID, b: UUID) {"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":7,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkRecordCopy.swift","line":165}},"text":"      other -> RecordCopyClash? in"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 20","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":12,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WorkVariantUnion.swift","line":187}},"text":"    public static func fold("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":26,"file":"Packages\/AsterismCore\/Sources\/AsterismCore\/WrongHostWorkURLResolver.swift","line":83}},"text":"        var candidates: [(hostname: String, orderKey: WorkSiteMembership.OrderKey,"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 18","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterExtractionAssembler.swift","line":123}},"text":"    private static func survivor("},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterExtractionAssembler.swift","line":320}},"text":"                    spellingKeys: survivor.mentionKeys, observedRejectionIDs: rejected, sourceGuard: context.mentionIndex.sourceGuards[entryID])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterExtractionLedger.swift","line":330}},"text":"        var mentions = Dictionary(grouping: older.mentions + newer.mentions, by: \\.entryID).values.compactMap { rows -> AssociationMentionDecision? in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterExtractionLedger.swift","line":333}},"text":"                spellingKeys: rows.flatMap(\\.spellingKeys), observedRejectionIDs: rows.flatMap(\\.observedRejectionIDs), sourceGuard: newest.sourceGuard)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterExtractionTypes.swift","line":77}},"text":"        return result.sorted { ($0.stableOrder, $0.source.orderToken, $0.fingerprint) < ($1.stableOrder, $1.source.orderToken, $1.fingerprint) }"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Sources\/AsterismIntelligence\/CharacterGrounding.swift","line":193}},"text":"    private static func groundFacts("},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 258 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/StatsDerivation.swift","line":225}},"text":"    public init(scope: StatsScope, unit: StatsBarUnit, bars: [StatsBar], totalNotes: Int, totalWorks: Int, undatedNoteCount: Int, earliestUsableCapture: Date?, periodFigures: StatsPeriodFigures, topWorks: [StatsRankingRow], topSites: [StatsSiteRankingRow]) {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 8","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":19,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/TodayAnnouncements.swift","line":94}},"text":"    public static func row("},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 289 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksListOptions.swift","line":38}},"text":"    public static let seededLaunchResets = [sort, RestoreStorageKey.worksDestination, RestoreStorageKey.selectedSidebarItem, RestoreStorageKey.todayPath, RestoreStorageKey.libraryPath, RestoreStorageKey.selectedTab, RestoreStorageKey.selectedTodayEntryID, RestoreStorageKey.selectedWorkID]"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":54,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksListOptions.swift","line":744}},"text":"    public var works: [WorkSnapshot] { switch self { case .noSeries(let works, _): works } }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":43,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksListOptions.swift","line":745}},"text":"    public var id: String { switch self { case .noSeries(_, let leading): leading ? \"works\" : \"empty-works\" } }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":11,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksListOptions.swift","line":877}},"text":"        _ a: WorkSnapshot, _ b: WorkSnapshot, date: (WorkSnapshot) -> Date?, ascending: Bool"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksSearchToken.swift","line":76}},"text":"            + WorkStatus.allCases.map { Self(dimension: .status, label: WorkStatusPresentation.accessibilityLabel($0), filter: WorksFilter(workStatus: $0)) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Sources\/AsterismPresentation\/WorksSearchToken.swift","line":77}},"text":"            + ReadingStatus.allCases.map { Self(dimension: .reading, label: ReadingStatusPresentation.accessibilityLabel($0), filter: WorksFilter(readingStatus: $0)) }"},{"violation":{"ruleName":"Switch and Case Statement Alignment","reason":"Case statements should vertically aligned with their closing brace","severity":"error","ruleIdentifier":"switch_case_alignment","ruleDescription":"Case statements should vertically align with their closing brace, or indented if configured otherwise.","location":{"character":23,"file":"Packages\/AsterismCore\/Sources\/AsterismStoreTestHelper\/main.swift","line":68}},"text":"        switch self { case .invalidArguments(let reason): reason }"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":37,"file":"Packages\/AsterismCore\/Sources\/AsterismTestSupport\/TestFixtures.swift","line":42}},"text":"            chapterTitleProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":39,"file":"Packages\/AsterismCore\/Sources\/AsterismTestSupport\/TestFixtures.swift","line":49}},"text":"            workAssignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":36,"file":"Packages\/AsterismCore\/Sources\/ConstellationKit\/ConstellationBackground.swift","line":69}},"text":"    private static let starSeeds: [(x: CGFloat, y: CGFloat, diameter: CGFloat, opacity: Double)] = ["},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/ConstellationKit\/SiteGlyph.swift","line":62}},"text":"        let a = chroma * cos(hue)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'l' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/ConstellationKit\/SiteGlyph.swift","line":68}},"text":"        let l = lRoot * lRoot * lRoot"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 's' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Sources\/ConstellationKit\/SiteGlyph.swift","line":70}},"text":"        let s = sRoot * sRoot * sRoot"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 194 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":16}},"text":"            try entry.authorTarget(.init(kind: .chapter)); context.insert(work); context.insert(entry); entry.work = work; LibraryRepository.applyManualAssignment(to: entry, at: M5Fixture.epoch)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 168 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":28}},"text":"            let note = AssociationNoteValue(pair: pair, attachmentAcceptanceIDs: [core.id], text: \"Café\", originalContext: \"Original Café context\", authoredAt: instant)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":51}},"text":"        #expect(snapshot.pairNoteVersions.allSatisfy { $0.authoredAt.timeIntervalSinceReferenceDate.bitPattern == instant.timeIntervalSinceReferenceDate.bitPattern })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":52}},"text":"        #expect(snapshot.associationEvents.allSatisfy { $0.recordedAt.timeIntervalSinceReferenceDate.bitPattern == instant.timeIntervalSinceReferenceDate.bitPattern })"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 194 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":74}},"text":"            try entry.authorTarget(.init(kind: .chapter)); context.insert(work); context.insert(entry); entry.work = work; LibraryRepository.applyManualAssignment(to: entry, at: M5Fixture.epoch)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":91}},"text":"        try await target.repository.withLockedContext(mode: .exclusive, operation: \"simulating source before matching metadata arrival\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":117}},"text":"        try await target.repository.withLockedContext(mode: .exclusive, operation: \"simulating unsupported synced note revision\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":128}},"text":"                _ = try await target.repository.withLockedContext(mode: .exclusive, operation: \"injecting later archive chunk failure\") { context in"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 101 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":186}},"text":"    func normalizationChangeCannotLetActualEntryWriterReviveKnownInactiveRoot(mode: Int) async throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":201}},"text":"            try await source.repository.withLockedContext(mode: .exclusive, operation: \"capturing an old receipt that knows an existing barrier\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":220}},"text":"        try await target.repository.withLockedContext(mode: .exclusive, operation: \"seeding split manual owners before normalization changes\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 165 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":243}},"text":"                _ = try await target.repository.withLockedContext(mode: .exclusive, operation: \"failing after the normalization-dependent source chunk\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":254}},"text":"        try await target.repository.withLockedContext(mode: .shared, operation: \"checking final normalized writer and early guard\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":273}},"text":"            try await target.repository.withLockedContext(mode: .exclusive, operation: \"arriving the previously unseen old receipt after normalized import\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":278}},"text":"        let once = try await target.repository.withLockedContext(mode: .shared, operation: \"capturing normalization retry raw rows\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":282}},"text":"        let repeated = try await target.repository.withLockedContext(mode: .shared, operation: \"checking normalization retry has no metadata growth\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":300}},"text":"        try await source.repository.withLockedContext(mode: .exclusive, operation: \"recording a valid pattern assignment for closure\") { context in"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":308}},"text":"            AssociationPair(workID: workID, entryID: entryID, kind: .place, recordID: placeID)]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationArchiveIntegrationTests.swift","line":321}},"text":"        try await target.repository.withLockedContext(mode: .exclusive, operation: \"simulating missing Work relationship arrival\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationDuplicateTests.swift","line":150}},"text":"                #expect(storage.notes.heads(for: pair).first.map { ExactScalarString($0.text) } == ExactScalarString(\"Cafe\\u{301} late exact\"))"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":18,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationGroupSupportTests.swift","line":150}},"text":"        #expect(!String(decoding: receiptData, as: UTF8.self).contains(\"groupSupport\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationHistoricalContextTests.swift","line":12}},"text":"            rebind: .init(operation: .entryMerge(workID: work, fromEntryID: entry, toEntryID: destinationEntry), predecessorIDs: [original.id]))))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":22}},"text":"            entry.work = work; LibraryRepository.applyManualAssignment(to: entry, at: M5Fixture.epoch); character.work = work; try context.save()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":40}},"text":"        #expect(try await fixture.repository.commitDecision(decision(ids, kind: .place, spelling: \"Harbor\")) == .committed(recordID: ids.place))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":59}},"text":"                rawURLString: entry.rawURLString, hostname: site.hostname, entryIdentityKey: \"\", timestamp: M5Fixture.epoch, note: entry.note)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":85}},"text":"        #expect(try await fixture.repository.updateEntry(id: ids.entry, basis: .init(entry: entry), note: \"Only Harbor.\", rating: nil) == .committed)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":240}},"text":"        let saved = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking stale acceptance atomicity\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 168 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":263}},"text":"        _ = try await fixture.repository.commitRecordEdits(workID: ids.work, operations: [.update(basis: basis, draft: .init(kind: .character, name: \"Alice Renamed\"))])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":307}},"text":"        _ = try await fixture.repository.commitRecordEdits(workID: ids.work, operations: [.update(basis: basis, draft: .init(kind: .character, name: \"Alice\"))])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":403}},"text":"        let saved = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking failed acceptance isolation\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":479}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"deleting verified synthetic duplicate chapter\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":511}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding exact head before failed duplicate chunk\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationIntegrationTests.swift","line":525}},"text":"        let raw = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking one committed duplicate rebind\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationJourneyFixtureTests.swift","line":46}},"text":"        let pair = try #require(try await fixture.repository.chapterAssociations(entryID: LibraryRepository.associationFixtureRecoveryChapterID)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":39}},"text":"        #expect(AssociationLedgerInventory(events: [first, second]).activeAcceptanceIDs(for: state(pair, source: \"S2\", target: \"R2\")).isEmpty)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":42}},"text":"        let a = state(pair)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":125}},"text":"            rebind: .init(operation: .entryMerge(workID: work, fromEntryID: entry, toEntryID: destination.entryID), predecessorIDs: [parent.id]))))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'p' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":137}},"text":"            let p = AssociationPair(workID: work, entryID: UUID(), kind: .character, recordID: record)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":138}},"text":"            let e = AssociationLedgerEvent(payload: .accept(.init(pair: p, spellingKeys: [\"alice\"],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":139}},"text":"                rebind: .init(operation: .entryMerge(workID: work, fromEntryID: entry, toEntryID: p.entryID), predecessorIDs: [parent.id]))))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":142}},"text":"        let a = child(), b = child()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":168}},"text":"        let a = child(destination, acknowledgements: [rejection.id]), b = child(other)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":178}},"text":"        let a = accepted(state(pair)), b = accepted(state(pair))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":188}},"text":"        let a = accepted(state(pair), events: [rejection], acknowledging: [rejection.id])"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":203}},"text":"        let a = child(aPair), b = child(bPair)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":234}},"text":"        let invalid = AssociationNoteValue(pair: pair, attachmentAcceptanceIDs: [root.id], parentHeadIDs: [text.id, UUID()], operation: .clear)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":244}},"text":"        let recovery = AssociationNoteValue(pair: other, attachmentAcceptanceIDs: [root.id], parentHeadIDs: [text.id], operation: .recover, text: \"Original\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":285}},"text":"        let a = AssociationLedgerEvent(payload: .invalidate(.entry(workID: work, entryID: entry)))"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":41,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":289}},"text":"        for order in [events.reversed().map { $0 }, [b, a] + events] {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":296}},"text":"        let a = empty.coverageDigest(workID: work, entryID: entry, sourceFingerprint: \"S\", matchingDirectory: \"D1\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationLedgerTests.swift","line":299}},"text":"        #expect(a != AssociationLedgerInventory(events: [invalidation]).coverageDigest(workID: work, entryID: entry, sourceFingerprint: \"S\", matchingDirectory: \"D1\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 191 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":17}},"text":"            context.insert(work); context.insert(entry); context.insert(record); entry.work = work; LibraryRepository.applyManualAssignment(to: entry, at: M5Fixture.epoch); record.work = work"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":26}},"text":"            mentions: [.init(entryID: pair.entryID, noteFingerprint: CharacterCoverageFingerprint.of(\"Alice arrived.\"), spellingKeys: [\"alice\"])])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":62}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Old text\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":63}},"text":"        _ = try await fixture.repository.clearAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":74}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Kept exact text\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":85}},"text":"        #expect(try await fixture.repository.recoverAssociationNotes(basis: current, selectedHeads: [unknown], text: oldHead.text) == .reviewRequired)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":86}},"text":"        #expect(try await fixture.repository.recoverAssociationNotes(basis: current, selectedHeads: [oldHead], text: oldHead.text) == .committed)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":115}},"text":"        do { _ = try await fixture.repository.saveAssociationNote(basis: basis, text: \"Exact draft\"); Issue.record(\"injected save must fail\") } catch { }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":126}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Original\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":138}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Original\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":155}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Original\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":166}},"text":"        #expect(try await fixture.repository.recoverAssociationNotes(basis: basis, selectedHeads: [head], text: head.text) == .reviewRequired)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":175}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding exact contradictory note variants\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":192}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: \"Original\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":214}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding second active record and distinct authored head\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 161 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":223}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pair)), text: firstText)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 163 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":224}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: other)), text: secondText)"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":228}},"text":"            .convert(basis: target, to: .place, draft: .init(kind: .place, name: \"Harbor\"))]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 176 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":230}},"text":"        do { _ = try await fixture.repository.commitRecordEdits(workID: pair.workID, operations: operations); Issue.record(\"injected identity-chain save must fail\") } catch { }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":232}},"text":"        #expect(try #require(try await fixture.repository.associationNoteBasis(pair: pair)).heads.map { ExactScalarString($0.text) } == [ExactScalarString(firstText)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":233}},"text":"        #expect(try #require(try await fixture.repository.associationNoteBasis(pair: other)).heads.map { ExactScalarString($0.text) } == [ExactScalarString(secondText)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":245}},"text":"                .init(entryID: pair.entryID, noteFingerprint: CharacterCoverageFingerprint.of(\"Harbor remains.\"), spellingKeys: [\"harbor\"])]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":250}},"text":"        #expect(try #require(try await fixture.repository.associationNoteBasis(pair: final)).heads.map(\\.text) == [\"Explicit reader resolution\"])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 192 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":261}},"text":"            try entry.authorTarget(.init(kind: .chapter)); context.insert(entry); entry.work = work; LibraryRepository.applyManualAssignment(to: entry, at: M5Fixture.epoch); try context.save()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 179 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationNoteAPITests.swift","line":264}},"text":"        _ = try await fixture.repository.saveAssociationNote(basis: try #require(try await fixture.repository.associationNoteBasis(pair: pairB)), text: \"Other chapter exact text\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":19}},"text":"    private func fixture(alias: Bool = false, save: any RepositorySaveStrategy = ModelContextSaveStrategy()) async throws -> (M5Fixture, IDs) {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":43}},"text":"    private func request(_ fixture: M5Fixture, _ ids: IDs, key: String = \"bryn\", target: UUID? = nil) async throws -> AssociationPendingReviewRequest {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":47}},"text":"            items: [.init(key: .init(kind: .character, nameKey: key), targetID: target ?? (key == \"bryn\" ? ids.bryn : nil), spellingKeys: [key])]),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":48}},"text":"            originalEligibilityBase: current.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: current.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":56}},"text":"            completedSources: [.init(ref: .entry(ids.entry), fingerprint: current.fingerprint, mentionEligibilityDigest: saved.completionDigest)],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":60}},"text":"        guard case .committed = try await fixture.repository.commitDecision(request) else { Issue.record(\"Expected explicit decision\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":79}},"text":"        _ = try await fixture.repository.advanceCoverage(workID: ids.work, sources: [completed(original), completed(try await source(fixture, ids))])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":117}},"text":"            _ = try await fixture.repository.commitRecordEdits(workID: ids.work, operations: [.create(.init(kind: .character, name: \"Unrelated C\"))])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":128}},"text":"            try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"simulating contradictory pending target\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":130}},"text":"                context.insert(other); context.insert(CharacterRecord(id: ids.bryn, name: \"Other\", nameKey: \"bryn\", work: other)); try context.save()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":171}},"text":"            duplicate.eventData = original.eventData; duplicate.validationData = original.validationData; duplicate.recordedAt = original.recordedAt"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":180}},"text":"        if mode == 2 { #expect(try await fixture.repository.chapterAssociations(entryID: ids.entry).first?.activeAcceptanceIDs.isEmpty == false) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":194}},"text":"        let plan = try BackupImporter.plan(from: BackupV20Codec.encode(payload: payload, metadata: .init(appBuild: \"tests\", exportedAt: M5Fixture.epoch)))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":217}},"text":"            try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding a distinct supported typed target\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":219}},"text":"                context.insert(CharacterRecord(id: otherID, name: \"Other\", nameKey: \"other-bryn\", aliases: [\"Bryn\"], work: work)); try context.save()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingReviewTests.swift","line":264}},"text":"        let marker = AssociationLedgerEvent(payload: .pendingReview(.init(workID: work, entryID: entry, sourceGuard: \"guard\", items: [item])))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingSuppressionTests.swift","line":24}},"text":"    private func registration(_ fixture: M5Fixture, _ ids: IDs, kind: RecordKind, key: String = \"cora\", target: UUID? = nil) async throws -> AssociationPendingReviewRequest {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPendingSuppressionTests.swift","line":29}},"text":"            originalEligibilityBase: current.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: current.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPublicationTests.swift","line":18}},"text":"            AssociationPair(workID: work, entryID: entry, kind: .place, recordID: place)]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationPublicationTests.swift","line":51}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"arriving contradictory association metadata only\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":30}},"text":"                try entry.authorTarget(.init(kind: .chapter, title: numbered ? entry.captureTitle : nil)); context.insert(entry); entry.work = work"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":35}},"text":"                    let current = AssociationCurrentPair(pair: pair, sourceFingerprint: AssociationEndpointInventory.sourceFingerprint(entry),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 167 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":38}},"text":"                    let event = AssociationLedgerEvent(payload: .accept(.init(pair: pair, spellingKeys: [name.lowercased()])), validation: empty.receipt(for: current))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":45}},"text":"            context.insert(try AssociationEvent(event: .init(payload: .accept(.init(pair: outsidePair, spellingKeys: [\"empty\"]))), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 172 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":100}},"text":"        let share = try await fixture.repository.shareWorkContext(workID: ids.work, excludingEntryID: ids.entries[2], currentChapterSequence: nil, currentChapterTitle: nil)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":104}},"text":"        #expect(try await fixture.repository.backupV20Snapshot() == before, \"Ranking is a read; it must not mint facts, acceptance or coverage\")"},{"violation":{"ruleName":"Identifier Name","reason":"Function name 'LiteralTextWithoutAcceptanceAndDuplicateReceiptsDoNotAddSupport()' should start with a lowercase character","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":16,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":186}},"text":"    @Test func LiteralTextWithoutAcceptanceAndDuplicateReceiptsDoNotAddSupport() async throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":192}},"text":"            context.insert(try AssociationEvent(event: .init(payload: raw.payload, validation: raw.validation), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":214}},"text":"                    event = .init(payload: .retire(.init(pair: pair, acceptanceIDs: Array(storage.ledger.activeAcceptanceIDs(for: current)))))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":260}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"adding historical facts and place controls\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":263}},"text":"            ada.facts = [RecordFact(statement: \"Historical generic evidence\", quote: \"Stored old quotation\", nameKey: \"ada\", source: .genericNotes),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":264}},"text":"                RecordFact(statement: \"Historical dangling evidence\", quote: \"Stored old quotation\", nameKey: \"ada\", source: .entry(UUID()))]"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":264}},"text":"                RecordFact(statement: \"Historical dangling evidence\", quote: \"Stored old quotation\", nameKey: \"ada\", source: .entry(UUID()))]"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 215 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingTests.swift","line":266}},"text":"            let other = Place(name: \"Zulu place\", nameKey: \"zulu place\", facts: [RecordFact(statement: \"Saved place evidence\", quote: \"Stored place\", nameKey: \"zulu place\", source: .genericNotes)], workID: ids.work)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingValueTests.swift","line":21}},"text":"        #expect(RecordRanking.score(facts: facts, index: index, chapterEntryIDs: [old, recent]) == baseline + RecordRanking.weight(distance: 1))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationRankingValueTests.swift","line":32}},"text":"        #expect(RecordRanking.score(facts: [fact(first, \"one\")], index: index, chapterEntryIDs: [first, second]) == RecordRanking.perBucket(2))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":24}},"text":"        let roots = try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding explicit resolution associations\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":73}},"text":"        let key = try await seed.fixture.repository.withLockedContext(mode: .shared, operation: \"reading explicit duplicate set\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":113}},"text":"        try await value.fixture.repository.withLockedContext(mode: .exclusive, operation: \"choosing unsupported chapter content\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":138}},"text":"            let owner = try await value.fixture.repository.withLockedContext(mode: .shared, operation: \"checking no invented record ownership\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":157}},"text":"        let ownership = try await value.fixture.repository.withLockedContext(mode: .shared, operation: \"checking moved typed record owners\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 218 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":171}},"text":"            if kind == .character { context.insert(CharacterRecord(id: characterID, name: name, nameKey: \"ada\", work: work)) } else { context.insert(Place(id: placeID, name: name, nameKey: \"harbor\", workID: work.id)) }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":273}},"text":"        return try await value.fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding exact legacy literal receipt\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":289}},"text":"                context.insert(try AssociationEvent(event: .init(payload: .reject(.init(pair: pair, spellingKeys: rejectedKeys))), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":313}},"text":"        try await value.fixture.repository.withLockedContext(mode: .exclusive, operation: \"choosing cased substring-only destination\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":345}},"text":"        _ = try await value.fixture.repository.updateEntry(id: value.source, basis: .init(entry: entry), note: \"Nobody remains.\", rating: nil)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 192 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":357}},"text":"        if kind == .character { note = substringOnly ? \"Adam.\" : \"Ada and Addiewood.\"; alias = \"Addie\" } else { note = substringOnly ? \"Harbormaster.\" : \"Harbor and Bayfield.\"; alias = \"Bay\" }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":378}},"text":"        _ = try await value.fixture.repository.updateEntry(id: value.source, basis: .init(entry: entry), note: \"Adam and Addie.\", rating: nil)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/AssociationResolutionTests.swift","line":383}},"text":"        let suppressed = try await value.fixture.repository.withLockedContext(mode: .shared, operation: \"checking standing alias rejection\") { context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":321}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":338}},"text":"            context in"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":16,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":361}},"text":"        return try! Data(contentsOf: url)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":486}},"text":"        let mark = try! NoEpisodeHistory.Action("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":21,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":491}},"text":"        let clear = try! NoEpisodeHistory.Action("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":494}},"text":"        let orphan = try! NoEpisodeHistory.Action("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":44,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":498}},"text":"        return [mark, clear, orphan].map { try! BackupV18NoEpisodeAction($0) }"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":31,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":739}},"text":"            publicationState: try! WorkPublicationState("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":782}},"text":"            try! URLSequenceNameIdentity("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":31,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGoldenExportTests.swift","line":816}},"text":"                chapterTitle: try! FieldProvenance(kind: .manual), workAssignment: .manual))"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGroupRoundTripTests.swift","line":328}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGroupRoundTripTests.swift","line":352}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupGroupRoundTripTests.swift","line":394}},"text":"            context in"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupImportTransactionTests.swift","line":586}},"text":"        let data = try! JSONSerialization.data("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupImportTransactionTests.swift","line":597}},"text":"        let data = try! JSONSerialization.data("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupImportTransactionTests.swift","line":616}},"text":"        let data = try! JSONSerialization.data("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 142 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupImportTransactionTests.swift","line":915}},"text":"private func makeMinimalImportPlan("},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 825 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ArchiveTests.swift","line":44}},"text":"struct BackupV18CodecTests {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":23,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ArchiveTests.swift","line":2100}},"text":"            id: UUID, a: UUID, b: UUID, type: String,"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1284 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ArchiveTests.swift","line":2180}},"text":"struct BackupV18ImportTests {"},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 2813","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ArchiveTests.swift","line":4008}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Enum body should span 700 lines or less excluding comments and whitespace: currently spans 795 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":23}},"text":"enum BackupV18Fixtures {"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":16,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":38}},"text":"        return try! Data(contentsOf: url)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":27,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":207}},"text":"                    work: try! SegmentRangeSpec(origin: .start, offset: 0, length: 1),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":292}},"text":"            try! URLSequenceNameIdentity("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":341}},"text":"        a: UUID = composedWorkID,"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":27,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":596}},"text":"                    work: try! SegmentRangeSpec(origin: .start, offset: 0, length: 1),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":27,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18Fixtures.swift","line":912}},"text":"                    work: try! SegmentRangeSpec(origin: .start, offset: 0, length: 1),"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":33,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ImportMatrixTests.swift","line":33}},"text":"        #expect(work.releaseDays == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":36,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ImportMatrixTests.swift","line":34}},"text":"        #expect(work.releaseDaysRaw == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":96,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ImportMatrixTests.swift","line":93}},"text":"            try await fixture.repository.work(id: BackupV18Fixtures.composedWorkID).releaseDays"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":35,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV18ImportMatrixTests.swift","line":160}},"text":"        #expect(record.releaseDays == [])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":189}},"text":"            memberships: original.library.memberships, distinctPairs: original.library.distinctPairs, characters: original.library.characters,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":190}},"text":"            suppressions: original.library.suppressions, places: original.library.places, placeSuppressions: original.library.placeSuppressions,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":191}},"text":"            series: original.library.series, links: original.library.links, creators: original.library.creators, creatorRoles: original.library.creatorRoles,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":192}},"text":"            credits: original.library.credits, noEpisodeActions: original.library.noEpisodeActions, entrySources: original.library.entrySources + [incoming])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":193}},"text":"        let currentPayload = BackupV20Payload(library: payload, associationEvents: original.associationEvents, pairNoteVersions: original.pairNoteVersions)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BackupV19ChapterTests.swift","line":206}},"text":"        let a = EntrySourceEvidence.Binding(origin: .designation, key: \"é\", ruleID: rule)"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BootstrapActionTests.swift","line":460}},"text":"        try String(decoding: Data(contentsOf: markerURL), as: UTF8.self)"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BoundedFetchBehaviorTests.swift","line":350}},"text":"    override class func canInit(with request: URLRequest) -> Bool { true }"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BoundedFetchBehaviorTests.swift","line":351}},"text":"    override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BoundedFetcherURLProtocolTests.swift","line":19}},"text":"    override class func canInit(with request: URLRequest) -> Bool { true }"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BoundedFetcherURLProtocolTests.swift","line":20}},"text":"    override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/BoundedFetcherURLProtocolTests.swift","line":193}},"text":"        let html = \"<html><head><link rel=\\\"canonical\\\" href=\\\"https:\/\/example.com\/c\\\"><title>T<\/title><\/head><body>\" + String(repeating: \"y\", count: 70_000) + \"<\/body><\/html>\""},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 793 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":8}},"text":"struct CaptureStateTests {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":32}},"text":"            await model.load(payload: .init(providerURL: url, safari: .init(title: \"Chapter 12\", locationHref: url)), coordinator: fixture.coordinator)"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":1202}},"text":"    func projectCapture("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":1255}},"text":"        let noneProvenance = try! FieldProvenance(kind: .none)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":1287}},"text":"        let noneProvenance = try! FieldProvenance(kind: .none)"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1117","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureStateTests.swift","line":1400}},"text":"}"},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureTimestampTests.swift","line":249}},"text":"        if (try? context.fetch(FetchDescriptor<Site>()))?.first(where: { $0.hostname == host }) == nil {"},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CaptureTimestampTests.swift","line":259}},"text":"        if (try? context.fetch(FetchDescriptor<Site>()))?.first(where: { $0.hostname == host }) == nil {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CatchUpRecordTests.swift","line":45}},"text":"            CatchUpRecord(confirmation: .init(latest: 12, confirmedAtMilliseconds: 5, countsUp: true, isEstimate: false), override: .value(9, atMilliseconds: 8)),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CatchUpRecordTests.swift","line":46}},"text":"            CatchUpRecord(confirmation: .init(latest: nil, confirmedAtMilliseconds: 6, countsUp: false, isEstimate: true), override: .cleared(atMilliseconds: 9)),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CatchUpRecordTests.swift","line":47}},"text":"            CatchUpRecord(confirmation: .init(latest: 20, confirmedAtMilliseconds: 6, countsUp: true, isEstimate: false), override: .value(7, atMilliseconds: 9)),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 155 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CatchUpRecordTests.swift","line":65}},"text":"        #expect(CatchUpFold.elect([.init(confirmation: nil, override: .value(8, atMilliseconds: 9)), records[3]]).override == .value(8, atMilliseconds: 9))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CatchUpWriterTests.swift","line":15}},"text":"        let a = Work(displayTitle: \"A\", timestamp: .distantPast)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 165 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureResolverTests.swift","line":108}},"text":"        #expect(project(entries, evidence: [evidence(\"12\")]).resolution == .chooseChapter(entryIDs: [id], reason: \"Choose an existing chapter or confirm a new one\"))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureResolverTests.swift","line":118}},"text":"        let a = UUID(), b = UUID()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureResolverTests.swift","line":148}},"text":"        #expect(project([entry], evidence: [twelve, thirteen]).resolution == .chooseChapter(entryIDs: [id], reason: \"The chapter evidence disagrees\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":18}},"text":"                capture: .init(captureTitle: title, captureTitleSource: .manual, rawURLString: page, note: title), intent: .automatic)) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":33}},"text":"            capture: .init(captureTitle: \"Book - 12\", captureTitleSource: .manual, rawURLString: page, note: \"Saved\"), intent: .automatic)) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 191 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":121}},"text":"        #expect(try await fixture.repository.commitEntryCorrection(combine, target: .init(kind: .chapter, designation: \"13\"), contentChoice: .destination) == .committed(entryID: survivor.id))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":145}},"text":"            capture: .init(captureTitle: \"Book\", captureTitleSource: .manual, rawURLString: otherPage), intent: .existing(chapter.id))) else {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":175}},"text":"        #expect(try await fixture.repository.commitEntryCorrection(contract, target: .init(kind: .note, title: \"12\")) == .committed(entryID: entry.id))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 173 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":178}},"text":"        #expect(try await fixture.repository.projectChapterCapture(rawURL: \"https:\/\/example.com\/other?w=book&c=12\", captureTitle: \"Book\", workID: work.id).resolution == .newChapter(requiresConfirmation: false))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 172 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":210}},"text":"                rawURLString: original, note: \"Keep\", rating: .up), intent: .automatic)) { id = entry.id } else { Issue.record(\"First specific chapter must save\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 177 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":282}},"text":"        if case .chooseChapter(let candidates, _) = projection.resolution { #expect(Set(candidates) == Set(ids)) } else { Issue.record(\"Two linked notes need an entry choice\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 200 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCaptureTransactionTests.swift","line":321}},"text":"            context.insert(try TitlePattern(version: 1, isActive: true, createdAt: M5Fixture.epoch, definition: .phrase(prefix: \"\", separator: \" - \", suffix: \"\", order: .workThenChapter), site: site))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCorrectionTests.swift","line":16}},"text":"                .init(id: source, captureTitle: \"Source\", hostname: \"example.com\", path: \"a\", note: \"Source reaction\", rating: .up, workID: work),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCorrectionTests.swift","line":17}},"text":"                .init(id: destination, captureTitle: \"Destination\", hostname: \"example.com\", path: \"b\", note: \"Destination reaction\", rating: .down, workID: work)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 168 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCorrectionTests.swift","line":43}},"text":"        let loser = Entry(captureTitle: \"12\", captureTitleSource: .manual, rawURLString: \"https:\/\/example.com\/a\", hostname: \"example.com\", entryIdentityKey: \"a\", timestamp: M5Fixture.epoch)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 198 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterCorrectionTests.swift","line":44}},"text":"        let survivor = Entry(captureTitle: \"13\", captureTitleSource: .manual, rawURLString: \"https:\/\/example.com\/b\", hostname: \"example.com\", entryIdentityKey: \"b\", timestamp: M5Fixture.epoch.addingTimeInterval(86_400))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":21}},"text":"        let a = fixture.add(id: id, designation: \"12\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":40}},"text":"        let a = fixture.add(id: id, designation: \"12\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":110}},"text":"        let a = fixture.add(designation: \"12\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":151}},"text":"            fixture.context.insert(EntrySource(id: sourceID, entryID: owner, urlString: \"https:\/\/example.com\/a\", hostname: \"example.com\", timestamp: first.modifiedAt))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 146 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":184}},"text":"                if let expected { #expect(actual.map(ExactScalarString.init) == expected.map(ExactScalarString.init)) } else { expected = actual }"},{"violation":{"ruleName":"Array Init","reason":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","severity":"error","ruleIdentifier":"array_init","ruleDescription":"Prefer using `Array(seq)` over `seq.map { $0 }` to convert a sequence into an Array","location":{"character":52,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":196}},"text":"            for fact in reverse ? facts.reversed().map({ $0 }) : facts {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 175 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":197}},"text":"                fixture.context.insert(EntrySource(entryID: target.id, urlString: \"https:\/\/example.com\/page\", hostname: \"example.com\", timestamp: target.modifiedAt, evidenceData: try fact.encoded()))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":217}},"text":"        container = try ModelContainer(for: schema, configurations: [ModelConfiguration(schema: schema, isStoredInMemoryOnly: true, cloudKitDatabase: .none)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 225 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":221}},"text":"        let entry = Entry(id: id, captureTitle: \"Book\", captureTitleSource: .manual, rawURLString: url, hostname: url.isEmpty ? \"\" : \"example.com\", entryIdentityKey: url, timestamp: Date(timeIntervalSince1970: 1_800_000_000))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterIdentityTests.swift","line":223}},"text":"        try! entry.authorTarget(AuthoredEntryTarget(kind: designation == nil ? .note : .chapter, designation: designation))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ChapterMetadataMigrationTests.swift","line":95}},"text":"        let container = try ModelContainer(for: schema, configurations: [ModelConfiguration(\"AsterismV3\", schema: schema, url: url, cloudKitDatabase: .none)])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 161 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CharacterExtractionRepositoryTests.swift","line":73}},"text":"        #expect(try await fixture.repository.commitEntryCorrection(review, target: .init(kind: .chapter), contentChoice: .source) == .committed(entryID: entry2))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CharacterExtractionRepositoryTests.swift","line":319}},"text":"        let a = try #require(candidates.first { $0.workID == workA })"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 907","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CharacterExtractionRepositoryTests.swift","line":1116}},"text":"}"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CharacterFactsTests.swift","line":225}},"text":"        #expect(CharacterCoverageFingerprint.of(\"a note\")"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 9","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CitedPatternResolutionTests.swift","line":242}},"text":"    private static func insertTaughtRow("},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedCaptureTests.swift","line":307}},"text":"        if (try? context.fetch(FetchDescriptor<Site>()))?.first(where: { $0.hostname == host }) == nil {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 's' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedCaptureTests.swift","line":308}},"text":"            let s = Site(hostname: host)"},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedCaptureTests.swift","line":317}},"text":"        if (try? context.fetch(FetchDescriptor<Site>()))?.first(where: { $0.hostname == host }) == nil {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 's' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedCaptureTests.swift","line":318}},"text":"            let s = Site(hostname: host); s.mode = .untaught; context.insert(s)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":51}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":65}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":77}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":95}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":115}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":127}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":138}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":150}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":169}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":188}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'd' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ComposedDeriverTests.swift","line":200}},"text":"        let d = ComposedDeriver.derive("},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CoverCandidateFetcherTests.swift","line":703}},"text":"    override class func canInit(with request: URLRequest) -> Bool { true }"},{"violation":{"ruleName":"Static Over Final Class","reason":"Prefer `static` over `class` in a final class","severity":"error","ruleIdentifier":"static_over_final_class","ruleDescription":"Prefer `static` over `class` when the declaration is not allowed to be overridden in child classes due to its context being final. Likewise, the compiler complains about `open` being used in `final` classes.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CoverCandidateFetcherTests.swift","line":704}},"text":"    override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":46}},"text":"        let folded = try! #require(directory[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":60}},"text":"        let folded = try! #require(CreatorDirectory(rows: [pristine, touched])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":73}},"text":"        let folded = try! #require(CreatorDirectory(rows: rows)[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":92}},"text":"        let folded = try! #require(CreatorDirectory(rows: [active, merged])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":130}},"text":"        let folded = try! #require(CreatorDirectory(rows: [row])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":26,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":146}},"text":"        let resolution = try! #require(directory.resolve(first))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":274}},"text":"            let resolution = try! #require("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":25,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorDirectoryTests.swift","line":277}},"text":"            let again = try! #require(directory.resolve(resolution.id))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":44}},"text":"        let folded = try! #require(CreatorRoleDirectory(rows: [renamed, moved])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":59}},"text":"        let folded = try! #require(CreatorRoleDirectory(rows: [pristine, touched])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":73}},"text":"        let folded = try! #require(CreatorRoleDirectory(rows: rows)[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":92}},"text":"        let folded = try! #require(CreatorRoleDirectory(rows: [active, merged])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":130}},"text":"        let folded = try! #require(CreatorRoleDirectory(rows: [row])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":26,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":149}},"text":"        let resolution = try! #require(directory.resolve(first))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":288}},"text":"            let resolution = try! #require("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":25,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CreatorRoleDirectoryTests.swift","line":291}},"text":"            let again = try! #require(directory.resolve(resolution.id))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CrossSiteDuplicateScanTests.swift","line":192}},"text":"            let a = Self.id(Int.random(in: 1...10, using: &random))"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CrossSiteDuplicateWorkloadTests.swift","line":418}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/CrossSiteMergeTests.swift","line":261}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcileAfterSyncTests.swift","line":251}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcileAfterSyncTests.swift","line":288}},"text":"            context in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":11,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcilerTestSupport.swift","line":163}},"text":"        _ a: UUID, _ b: UUID, recordedAt: TimeInterval, id: UUID = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":11,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcilerTestSupport.swift","line":179}},"text":"        _ a: UUID, _ b: UUID, type: String, modifiedAt: TimeInterval, id: UUID = UUID()"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1215 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcilerTests.swift","line":16}},"text":"struct DuplicateReconcilerTests {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1222","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateReconcilerTests.swift","line":1789}},"text":"}"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 982 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateResolutionTests.swift","line":17}},"text":"struct DuplicateResolutionTests {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateResolutionTests.swift","line":64}},"text":"            let a = store.insertWork(id: survivor, title: \"Serial\", offset: 0, workStatus: .hiatus)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":31,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateResolutionTests.swift","line":1491}},"text":"    func insertDistinctPair(_ a: UUID, _ b: UUID) -> WorkDistinctPair {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1296","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/DuplicateResolutionTests.swift","line":1721}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/EmptyLibraryTests.swift","line":913}},"text":"            context.insert(try PairNoteVersion(note: .init(pair: pair, attachmentAcceptanceIDs: [event.id], text: \"Synthetic authored note\")))"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/EmptyLibraryTests.swift","line":962}},"text":"            context in"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":19,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/EntryCitationsTests.swift","line":216}},"text":"            work: try! SegmentRangeSpec(origin: .start, offset: 0, length: 2),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":23,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/EntryCitationsTests.swift","line":217}},"text":"            ignored: [try! SegmentPositionSpec(origin: .end, offset: 0)]),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":19,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/EntryCitationsTests.swift","line":219}},"text":"            work: try! SegmentRangeSpec(origin: .end, offset: 1, length: 1), ignored: []),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 178 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/FanOutWriteTests.swift","line":406}},"text":"                genericNotes: \"device one\", memberships: [WorkMembershipBasis(hostname: \"dup.example\", urlIdentity: nil)], lastParsedTitle: \"A Serial\", titleProvenance: .parsed),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/FrozenLibraryPathTests.swift","line":304}},"text":"            \"AsterismSchemaV16\", \"AsterismSchemaV17\", \"AsterismSchemaV18\", \"AsterismSchemaV19\", \"AsterismSchemaV20\", \"AsterismSchemaV21\", \"AsterismSchemaV22\","},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 179 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/FrozenLibraryPathTests.swift","line":305}},"text":"            \"AsterismV17MigrationPlan\", \"AsterismV18MigrationPlan\", \"AsterismV19MigrationPlan\", \"AsterismV20MigrationPlan\", \"AsterismV21MigrationPlan\", \"AsterismV22MigrationPlan\","},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/FrozenLibraryPathTests.swift","line":389}},"text":"                \"AsterismSchemaV16\", \"AsterismSchemaV17\", \"AsterismSchemaV18\", \"AsterismSchemaV19\", \"AsterismSchemaV20\", \"AsterismSchemaV21\", \"AsterismSchemaV22\","},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 174 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/FrozenLibraryPathTests.swift","line":395}},"text":"            referenced == [\"AsterismSchemaV16\", \"AsterismSchemaV17\", \"AsterismSchemaV18\", \"AsterismSchemaV19\", \"AsterismSchemaV20\", \"AsterismSchemaV21\", \"AsterismSchemaV22\"],"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":50,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/GroupFetchTests.swift","line":579}},"text":"            #expect(actual.works.first?.hostnames == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":83,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/GroupOrderingTests.swift","line":541}},"text":"        #expect(GroupOrdering.authoredContent(of: work, types: .empty).releaseDays == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":83,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/GroupOrderingTests.swift","line":554}},"text":"        #expect(GroupOrdering.authoredContent(of: work, types: .empty).releaseDays == [])"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/IdentityReuseWithoutNameTests.swift","line":38}},"text":"        let a = UUID(), b = UUID()"},{"violation":{"ruleName":"Cyclomatic Complexity","reason":"Function should have complexity 15 or less; currently complexity is 17","severity":"error","ruleIdentifier":"cyclomatic_complexity","ruleDescription":"Complexity of function bodies should be limited.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LibraryGraphBaselineTests.swift","line":328}},"text":"    static func dump("},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 333 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LibraryGraphBaselineTests.swift","line":328}},"text":"    static func dump("},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 17","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LibraryGraphBaselineTests.swift","line":328}},"text":"    static func dump("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":21,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LibraryValidatorTests.swift","line":46}},"text":"        let table: [(mode: SiteMode, patterns: [TitlePattern], rules: [URLRulePattern], legal: Bool)] = ["},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LookupFirstCaptureStateTests.swift","line":19}},"text":"            .init(id: fixture.entryID, workID: work, target: .init(kind: .chapter, designation: \"1\"), sourceURLs: [\"https:\/\/example.com\/chapter-1\"], note: \"existing note\", rating: .up),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LookupFirstCaptureStateTests.swift","line":20}},"text":"            .init(id: second, workID: work, target: .init(kind: .chapter, designation: \"2\"), sourceURLs: [\"https:\/\/example.com\/chapter-1\"], note: \"Second\", rating: .down)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LookupFirstCaptureStateTests.swift","line":41}},"text":"        if case .saved(let id) = fixture.viewModel.lookupState { #expect(id == fixture.entryID) } else { Issue.record(\"Reviewed correction must save\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 144 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/LookupFirstCaptureStateTests.swift","line":439}},"text":"        guard let chapterOutcome else { throw LibraryRepositoryError.invalidInput(operation: \"test\", reason: \"Chapter outcome not configured\") }"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 133 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/M5RepositoryTestSupport.swift","line":445}},"text":"    func seedM5Rows("},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/M5RepositoryTestSupport.swift","line":767}},"text":"            context in"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":53,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/M5RepositoryTestSupport.swift","line":771}},"text":"            return values.count == 1 ? values.first ?? nil : nil"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":53,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/M5RepositoryTestSupport.swift","line":781}},"text":"            return values.count == 1 ? values.first ?? nil : nil"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/M5RepositoryTestSupport.swift","line":831}},"text":"            context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ManualEntryRepositoryTests.swift","line":104}},"text":"            draft: .init(target: .init(kind: .note, title: \"Original\"), sourceURL: \"https:\/\/example.com\/z\", note: \"Before\", rating: .up, existingEntryID: saved.id))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ManualEntryRepositoryTests.swift","line":170}},"text":"            #expect(try await fixture.repository.updateWork(id: work.id, basis: WorkEditBasis(work: before), draft: draft, calendar: .current) == .committed)"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipLifecycleTests.swift","line":148}},"text":"            context in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":18,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipLifecycleTests.swift","line":149}},"text":"            for (a, b) in pairs {"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 704 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":17}},"text":"struct MembershipReconcilerTests {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":236}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":252}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":274}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":299}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":319}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":352}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":698}},"text":"        let a = store.insertMembership("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":11,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":1158}},"text":"        _ a: UUID, _ b: UUID, recordedAt: Date, id: UUID = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":11,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":1173}},"text":"        _ a: UUID, _ b: UUID, type: String, modifiedAt: Date, createdAt: Date? = nil,"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":1218}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":1247}},"text":"            context in"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 946","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipReconcilerTests.swift","line":1337}},"text":"}"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MembershipTestSupport.swift","line":58}},"text":"            context in"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":34,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MirroringBootstrapLifecycleTests.swift","line":48}},"text":"        private(set) var calls: [(storeURL: URL, containerID: String, markerVersion: String?, storeExists: Bool)] = []"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 748 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ModelContractTests.swift","line":17}},"text":"struct ModelContractTests {"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ModelContractTests.swift","line":601}},"text":"        let a = UUID(uuidString: \"00000000-0000-4000-8000-000000000001\")!"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ModelContractTests.swift","line":934}},"text":"        let a = UUID(uuidString: \"00000000-0000-4000-8000-000000000001\")!"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/MultiSiteWritePathTests.swift","line":207}},"text":"            context in"},{"violation":{"ruleName":"Vertical Parameter Alignment","reason":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","severity":"error","ruleIdentifier":"vertical_parameter_alignment","ruleDescription":"Function parameters should be aligned vertically if they're in multiple lines in a declaration","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupArchiveTests.swift","line":91}},"text":"        renameCollision: Bool) async throws {"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":45,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupRosterTests.swift","line":47}},"text":"        #expect(result.groups.first?.aliases == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":73,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupRosterTests.swift","line":62}},"text":"        #expect(project([create, add, remove], []).groups.first?.aliases == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":82,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupRosterTests.swift","line":66}},"text":"        #expect(project([create, add, conflictingCopy], []).groups.first?.aliases == [])"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1094 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupSaveLinkTests.swift","line":7}},"text":"struct NamedGroupSaveLinkTests {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 100 lines or less excluding comments and whitespace: currently spans 125 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":11,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupSaveLinkTests.swift","line":939}},"text":"    @Test func missingLeaveAnchorWithholdsLaterLinkButKeepsEarlierNoteRecoverable() async throws {"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1101","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupSaveLinkTests.swift","line":1141}},"text":"}"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":49,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupStorageTests.swift","line":68}},"text":"        #expect(projection.groups.first?.aliases == [])"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":44,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupSuggestionApprovalTests.swift","line":8}},"text":"    private func fixture() async throws -> (M5Fixture, UUID, UUID, UUID) {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":49,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupSuggestionApprovalTests.swift","line":29}},"text":"    private func leaveFixture() async throws -> (M5Fixture, UUID, [UUID], UUID, UUID) {"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 1000 lines or less excluding comments and whitespace: currently spans 1010 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupWorkMergeEditTests.swift","line":7}},"text":"struct NamedGroupWorkMergeEditTests {"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupWorkMergeEditTests.swift","line":269}},"text":"                .create(groupID: healthyID, name: \"Healthy Team\")]) =="},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupWorkMergeEditTests.swift","line":313}},"text":"                .transition(rootID: rootID, groupID: groupID,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupWorkMergeEditTests.swift","line":365}},"text":"                .transition(rootID: UUID(), groupID: otherGroupID,"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1017","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NamedGroupWorkMergeEditTests.swift","line":1048}},"text":"}"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeHistorySessionTests.swift","line":83}},"text":"        let a = fact(), b = fact(work: a.workID)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeHistorySessionTests.swift","line":215}},"text":"        let a = fact(), b = fact(), key = \"mark\/\\(UUID().uuidString)\""},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeHistoryTests.swift","line":54}},"text":"            let a = try NoEpisodeHistory(actions.enumerated().compactMap { bits & (1 << $0.offset) == 0 ? nil : $0.element })"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeHistoryTests.swift","line":111}},"text":"        let string = String(decoding: bytes, as: UTF8.self)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeHistoryTests.swift","line":114}},"text":"            try NoEpisodeHistory.Action.decode(Data(string.replacingOccurrences(of: \"\\\"version\\\":1\", with: \"\\\"version\\\":2\").utf8), workID: Self.work)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeImportHistorySessionTests.swift","line":30}},"text":"                firstCapturedAt: epoch, lastSharedAt: epoch, modifiedAt: epoch, workID: assignedIndices?.contains(index) == false ? nil : work,"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":33}},"text":"        let a = UUID(), b = UUID(), c = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'c' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":37,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":33}},"text":"        let a = UUID(), b = UUID(), c = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":80}},"text":"        let a = UUID(), b = UUID(), c = UUID(), value = fact(a)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'c' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":37,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":80}},"text":"        let a = UUID(), b = UUID(), c = UUID(), value = fact(a)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":99}},"text":"        let a = UUID(), b = UUID(), c = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'c' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":37,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":99}},"text":"        let a = UUID(), b = UUID(), c = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/NoEpisodeRawRowBucketTests.swift","line":121}},"text":"        let a = UUID(), b = UUID(), key = \"mark\/\\(UUID().uuidString)\""},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PendingCaptureDrainTests.swift","line":516}},"text":"        #expect(fixture.entries().first { $0.note == \"the reader's prose\" } != nil)"},{"violation":{"ruleName":"Contains over First not Nil","reason":"Prefer `contains` over `first(where:) != nil`","severity":"error","ruleIdentifier":"contains_over_first_not_nil","ruleDescription":"Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PendingCaptureDrainTests.swift","line":517}},"text":"        #expect(fixture.entries().first { $0.note == \"and a second hand\" } != nil)"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 834 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PendingCaptureSpoolTests.swift","line":14}},"text":"struct PendingCaptureSpoolTests {"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":24,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PerformanceReadReuseTests.swift","line":113}},"text":"        var retained: [(survivor: UUID, loser: UUID, url: String, sourceIDs: Set<UUID>, evidence: Data)] = []"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 181 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PerformanceSignpostContractTests.swift","line":19}},"text":"        #expect(source.contains(\"recentPerformanceSignposter=OSSignposter(subsystem:PresentationPerformanceSignposts.subsystem,category:PresentationPerformanceSignposts.category)\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 164 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PerformanceSignpostContractTests.swift","line":42}},"text":"        #expect(launch.contains(\"signposter=OSSignposter(subsystem:PresentationPerformanceSignposts.subsystem,category:PresentationPerformanceSignposts.category)\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PerformanceSignpostContractTests.swift","line":44}},"text":"        #expect(teaching.contains(\"performanceSignposter=OSSignposter(subsystem:TeachingPerformanceSignposts.subsystem,category:TeachingPerformanceSignposts.category)\"))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PostCollapseRedirectTests.swift","line":464}},"text":"        let a = UUID()"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationArchiveTests.swift","line":9}},"text":"    private static let pending = #\"{\"closedPauses\":[],\"currentPause\":{\"returnDate\":\"2026-10-10\",\"start\":\"2026-09-01\"},\"status\":\"hiatus\",\"version\":1}\"#"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 191 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationArchiveTests.swift","line":10}},"text":"    private static let elapsed = #\"{\"closedPauses\":[{\"end\":\"2026-08-10\",\"start\":\"2026-08-01\"}],\"currentPause\":{\"returnDate\":\"2026-09-10\",\"start\":\"2026-09-01\"},\"status\":\"hiatus\",\"version\":1}\"#"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":23,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationArchiveTests.swift","line":15}},"text":"        var payload = String(decoding: try BackupCanonicalJSON.encoder().encode(base), as: UTF8.self)"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationArchiveTests.swift","line":35}},"text":"        #expect(String(decoding: encoded, as: UTF8.self).contains(#\"\"publicationState\":\"#))"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationArchiveTests.swift","line":82}},"text":"        #expect(String(decoding: encoded, as: UTF8.self).contains(#\"\"publicationState\":\"#))"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationProgressTests.swift","line":36}},"text":"        #expect(Self.progress(record, state: state, on: \"2026-09-12\") == Self.progress(record, state: state, on: \"2026-09-12\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/PublicationProgressTests.swift","line":38}},"text":"        #expect(Self.progress(record, state: state, on: \"2026-09-12\", marks: [Self.day(\"2026-09-07\"), Self.day(\"2026-09-11\")]).effectiveLatest == 104)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":30}},"text":"                nameKey: tier == 1 ? \"ada\" : (tier == 0 && name == \"Ada\" ? \"adaline\" : RecordNameKey.normalize(tier == 0 ? name : \"Adaline\")),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 179 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":47}},"text":"                spellingKeys: [key], observedRejectionIDs: candidate.mentionIndex.rejectionIDs(entryID: ids.entry, kind: .character, recordID: ids.character, spellingKeys: [key]),"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":145}},"text":"        if case .refused = try await fixture.repository.commitRecognisedCharacter(input) {} else { Issue.record(\"Expected guarded refusal\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":156}},"text":"        if case .refused = try await fixture.repository.commitRecognisedCharacter(fresh) {} else { Issue.record(\"Rejected spelling was resurrected\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":177}},"text":"            ]), originalEligibilityBase: current.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: current.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":238}},"text":"        if case .refused = try await fixture.repository.restoreCharacterLink(captured) {} else { Issue.record(\"Stale rejection receipt replayed\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":242}},"text":"        #expect(try await fixture.repository.commitRecognisedCharacter(try await request(fixture, ids)) == .committed(recordID: ids.character))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":251}},"text":"        #expect(try await fixture.repository.commitRecognisedCharacter(try await request(fixture, ids)) == .committed(recordID: ids.character))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":282}},"text":"        if case .committed = try await fixture.repository.commitDecision(input) {} else { Issue.record(\"Legacy dangling-citation tolerance changed\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":292}},"text":"            ]), originalEligibilityBase: current.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: current.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":329}},"text":"            ]), originalEligibilityBase: current.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: current.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 152 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":334}},"text":"        if case .refused = try await fixture.repository.commitRecognisedCharacter(input) {} else { Issue.record(\"Unrelated marker basis acknowledged\") }"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecognisedCharacterLinkTests.swift","line":362}},"text":"        let a = UUID(), b = UUID()"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileAfterSyncTests.swift","line":268}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileAfterSyncTests.swift","line":333}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileAfterSyncTests.swift","line":376}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileTierTests.swift","line":127}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileTierTests.swift","line":157}},"text":"            context in"},{"violation":{"ruleName":"Closure Parameter Position","reason":"Closure parameters should be on the same line as opening brace","severity":"error","ruleIdentifier":"closure_parameter_position","ruleDescription":"Closure parameters should be on the same line as opening brace","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReconcileTierTests.swift","line":191}},"text":"            context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":11}},"text":"        let ids = try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding selected record history\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":37}},"text":"                let event = AssociationLedgerEvent(payload: .accept(.init(pair: pair, spellingKeys: [\"ada\"])), validation: empty.receipt(for: current))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":44}},"text":"                context.insert(try AssociationEvent(event: .init(payload: .accept(.init(pair: outside, spellingKeys: [\"outside\"]))), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":58}},"text":"        let measurement = try await fixture.repository.withLockedContext(mode: .shared, operation: \"measuring selected history\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":65}},"text":"            let result = try LibraryRepository.recordHistory(selection: .init(workID: ids.work, kind: kind, recordID: ids.record), context: context)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":118}},"text":"            mentions: [.init(entryID: entry.id, noteFingerprint: source.fingerprint, spellingKeys: [\"ada\"], sourceGuard: candidate.mentionIndex.sourceGuards[entry.id])],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":121}},"text":"        #expect(renewed.activeChapterCount == 1 && renewed.detail(for: pair, expectedGeneration: renewed.generation)?.annotationHeads.isEmpty == true)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":151}},"text":"            context.insert(try AssociationEvent(event: .init(payload: existing.payload, validation: existing.validation), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RecordHistoryTests.swift","line":153}},"text":"            context.insert(try PairNoteVersion(note: .init(pair: pair, attachmentAcceptanceIDs: [existing.id], text: \"Independent concurrent annotation.\")))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReleaseDayTests.swift","line":176}},"text":"        let a = ReleaseDay.canonical([.thursday, .monday, .thursday]).map(\\.rawValue)"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":36,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReleaseDayWritePathTests.swift","line":172}},"text":"        #expect(created.releaseDays == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":39,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReleaseDayWritePathTests.swift","line":173}},"text":"        #expect(created.releaseDaysRaw == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":84,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReleaseDayWritePathTests.swift","line":174}},"text":"        #expect(try library.workRows(id: created.id).allSatisfy { $0.releaseDaysRaw == [] })"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":74,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ReleaseDayWritePathTests.swift","line":189}},"text":"        #expect(try await fixture.repository.work(id: workID).releaseDays == [])"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":132}},"text":"        let e = try await fixture.capture(title: \"Ch1 - Fiction | Site\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":155}},"text":"        let e = try await fixture.capture(title: \"Ch1 - Fiction | Site\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":178}},"text":"        let e = try await fixture.capture(title: \"Fiction | Royal Road\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":224}},"text":"        let e = try await fixture.capture(title: \"Ch1 - Fiction | Site\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'w' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":330}},"text":"        let w = try await fixture.repository.createWork(NewWorkDraft(displayTitle: \"Fiction\", hostname: \"example.com\"))"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":639}},"text":"        let e = try await fixture.capture(title: \"Ch1 - Fiction | Site\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'e' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":713}},"text":"        let e = try await fixture.capture(title: \"Ch1 - Fiction | Site\", rawURL: \"https:\/\/example.com\/1\")"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":19,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":1274}},"text":"            work: try! SegmentRangeSpec(origin: .end, offset: 1, length: 1),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":23,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":1275}},"text":"            ignored: [try! SegmentPositionSpec(origin: .end, offset: 0)]"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 1294","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RepositoryTeachingTests.swift","line":1598}},"text":"}"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RuleDefinitionComparatorTests.swift","line":13}},"text":"        let a = PatternDefinition.segment("},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/RuleDefinitionComparatorTests.swift","line":138}},"text":"            let a = PatternDefinition.segment(work: work, ignored: ignored)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkMatchingTests.swift","line":29}},"text":"        let a = MatchTarget(id: current, currentNameKey: \"ada\", retainedKey: \"old\", aliasKeys: [], isTorn: false)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'c' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkMatchingTests.swift","line":31}},"text":"        let c = MatchTarget(id: alias, currentNameKey: \"cora\", retainedKey: \"cora\", aliasKeys: [\"ada\"], isTorn: false)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":52}},"text":"            originalEligibilityBase: before.mentionIndex.coverageBases[ids.entry], originalEligibilityDigest: before.mentionIndex.eligibilityByEntry[ids.entry])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":55}},"text":"        #expect(try await fixture.repository.updateEntry(id: ids.entry, basis: .init(entry: entry), note: entry.note, rating: entry.rating) == .committed)"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":83}},"text":"                .init(key: newtown, targetID: nil, spellingKeys: [\"newtown\"])])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 154 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":98}},"text":"        #expect(try await fixture.repository.updateEntry(id: ids.entry, basis: .init(entry: entry), note: entry.note, rating: entry.rating) == .committed)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 151 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":99}},"text":"        let acknowledgements = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking exact saved references\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 162 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":142}},"text":"                draft: .init(target: .init(kind: .chapter), note: entry.note, existingEntryID: ids.entry)) else { Issue.record(\"Expected existing save\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":145}},"text":"            #expect(try await fixture.repository.commitEntryCorrection(correction, target: .init(kind: .chapter)) == .committed(entryID: ids.entry))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":147}},"text":"            #expect(try await fixture.repository.updateEntry(id: ids.entry, basis: .init(entry: entry), note: entry.note, rating: nil) == .committed)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":174}},"text":"            guard case .committed(let entry) = try await fixture.repository.commitCapture(contract) else { Issue.record(\"Expected ordinary capture\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 173 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":180}},"text":"                capture: draft, intent: .newChapter(.init(kind: .chapter, designation: \"12\"), confirmedNew: true))) else { Issue.record(\"Expected chapter capture\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 142 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":186}},"text":"                    intent: .existing(entry.id, contentChoice: .source))) else { Issue.record(\"Expected chosen destination content\"); return }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":209}},"text":"        #expect(try await fixture.repository.commitEntryCorrection(correction, target: .init(kind: .chapter), contentChoice: choice) == .committed(entryID: destination))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 169 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":242}},"text":"            let item = AssociationPendingReviewItem(key: key, targetID: mode == \"newTarget\" ? nil : mode == \"wrongTarget\" ? UUID() : ids.place, spellingKeys: [\"harbor\"])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":254}},"text":"        let acknowledged = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking unsupported obligation\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":271}},"text":"            case \"tornTarget\": context.insert(CharacterRecord(id: ids.character, name: \"Ada\", nameKey: \"ada\", note: \"Conflicting authored notes\", work: work))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":315}},"text":"            default: _ = try await fixture.repository.updateEntry(id: ids.entry, basis: .init(entry: entry), note: \"Ada visits Harbor.\", rating: nil)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 183 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":339}},"text":"        if case .stale = try await fixture.repository.commitReShareUpdate(basis: stale, note: \"Ada visits Harbor.\", rating: nil) {} else { Issue.record(\"Stale re-share must refuse\") }"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 165 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":425}},"text":"                mentions: [.init(entryID: ids.entry, noteFingerprint: CharacterCoverageFingerprint.of(\"Ada visits Harbor and Newtown.\"), spellingKeys: [\"harbor\"])]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":438}},"text":"                context.insert(try AssociationEvent(event: .init(payload: .reject(.init(pair: pair, spellingKeys: [\"harbor\"]))), recordedAt: M5Fixture.epoch))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":489}},"text":"        let stored = try await fixture.repository.withLockedContext(mode: .shared, operation: \"checking rejection preservation\") { context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SaveTimeKnownLinkRepositoryTests.swift","line":491}},"text":"            return (storage.ledger.isSuppressed(pair: pair, spellingKey: \"ada\"), storage.rawEvents.compactMap(\\.value).compactMap { event -> AssociationAcceptance? in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SelectedWorkNoEpisodeReaderTests.swift","line":110}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding selected history\") { @Sendable [work, action] context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 153 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SelectedWorkNoEpisodeReaderTests.swift","line":117}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding unrelated damaged history\") { @Sendable [outside] context in"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 149 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SelectedWorkNoEpisodeReaderTests.swift","line":123}},"text":"        try await fixture.repository.withLockedContext(mode: .exclusive, operation: \"seeding selected damaged history\") { @Sendable [work] context in"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SeriesRepositoryTestSupport.swift","line":38}},"text":"    var a: UUID"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 157 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ShareActivationRuleTests.swift","line":55}},"text":"            \"Activation rule must be a predicate string; the dictionary form rejects payloads with undeclared extra attachments (the Webtoons thumbnail bug)\""},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 935","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ShareWorkContextTests.swift","line":1237}},"text":"}"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":33,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SiteInverseReachTests.swift","line":75}},"text":"    private static let access = try! NSRegularExpression("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":37,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SnapshotTestFixtures.swift","line":19}},"text":"            chapterTitleProvenance: try! FieldProvenance(kind: .none), note: note, rating: nil,"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":52,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/SnapshotTestFixtures.swift","line":21}},"text":"            workID: nil, workAssignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ThumbnailBytesReachTests.swift","line":84}},"text":"            \"AsterismSchemaV20Models.swift\", \"AsterismSchemaV21Models.swift\","},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ThumbnailCodecTests.swift","line":530}},"text":"        pixel: (Int, Int) -> (UInt8, UInt8, UInt8, UInt8)"},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":55,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ThumbnailCodecTests.swift","line":592}},"text":"    private static func samples(of image: CGImage) -> ("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":59,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleProjectionPlannerTests.swift","line":30}},"text":"            chapterTitleProvenance: chapterProvenance ?? (try! FieldProvenance(kind: .none)),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":64,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleProjectionPlannerTests.swift","line":37}},"text":"            workAssignmentProvenance: assignmentProvenance ?? (try! FieldProvenance(kind: .none)),"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'p' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleRuleFormsTests.swift","line":89}},"text":"            let p = prefix ?? \"\""},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 's' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleRuleFormsTests.swift","line":90}},"text":"            let s = suffix ?? \"\""},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":20,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleRuleFormsTests.swift","line":206}},"text":"        let work = try! SegmentRangeSpec(origin: .start, offset: 5, length: 1)"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":59,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleRuleFormsTests.swift","line":421}},"text":"            chapterTitleProvenance: chapterProvenance ?? (try! FieldProvenance(kind: .none)),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":39,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TitleRuleFormsTests.swift","line":428}},"text":"            workAssignmentProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":21,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/ToReadMatcherTests.swift","line":878}},"text":"    func distinct(_ a: UUID, _ b: UUID) {"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 819 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TodayDayPlanTests.swift","line":15}},"text":"struct TodayDayPlanTests {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 7","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TodayDayPlanTests.swift","line":812}},"text":"    func releaseCountSurvivesDST("},{"violation":{"ruleName":"Large Tuple","reason":"Tuples should have at most 3 members","severity":"error","ruleIdentifier":"large_tuple","ruleDescription":"Tuples shouldn't have too many members. Create a custom type instead.","location":{"character":21,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TodayFixtureTests.swift","line":26}},"text":"        let cases: [(String, Int, Int, Bool, CatchUpProgress.State)] = ["},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":31,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/TodayScheduleEquivalenceTests.swift","line":405}},"text":"    func insertDistinctPair(_ a: UUID, _ b: UUID) {"},{"violation":{"ruleName":"Orphaned Doc Comment","reason":"A doc comment should be attached to a declaration","severity":"error","ruleIdentifier":"orphaned_doc_comment","ruleDescription":"A doc comment should be attached to a declaration","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLOptionalSequenceIntegrationTests.swift","line":7}},"text":"\/\/\/ `optional-chapter-sequence` tasks 10 and 11: the declaration's behaviour over"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLOptionalSequenceTests.swift","line":22}},"text":"    return String(decoding: try encoder.encode(value), as: UTF8.self)"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":14,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLOptionalSequenceTests.swift","line":907}},"text":"    #expect(!String(decoding: document, as: UTF8.self).contains(\"sequencePresence\"))"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":16,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLOptionalSequenceTests.swift","line":924}},"text":"    let json = String(decoding: encoded, as: UTF8.self)"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLOptionalSequenceTests.swift","line":942}},"text":"    #expect(String(decoding: encoded, as: UTF8.self).contains(#\"\"sequencePresence\":\"optional\"\"#))"},{"violation":{"ruleName":"Optional Data -> String Conversion","reason":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","severity":"error","ruleIdentifier":"optional_data_string_conversion","ruleDescription":"Prefer failable `String(bytes:encoding:)` initializer when converting `Data` to `String`","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/URLUnanchoredPathAnchorTests.swift","line":20}},"text":"    return String(decoding: try encoder.encode(value), as: UTF8.self)"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 230 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":12,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V16RecordedStoreFixture.swift","line":296}},"text":"    static func install(at storeURL: URL) throws {"},{"violation":{"ruleName":"Function Body Length","reason":"Function body should span 150 lines or less excluding comments and whitespace: currently spans 218 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V16RecordedStoreTests.swift","line":55}},"text":"    func convertsWithEveryLiveRowIntact() async throws {"},{"violation":{"ruleName":"Function Body Length","reason":"Initializer body should span 150 lines or less excluding comments and whitespace: currently spans 163 lines","severity":"error","ruleIdentifier":"function_body_length","ruleDescription":"Function bodies should not span too many lines","location":{"character":5,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V16RecordedStoreTests.swift","line":604}},"text":"    init(context: ModelContext) throws {"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V20RecordedStoreTests.swift","line":71}},"text":"        character.factsData = RecordFactCodec.encode([RecordFact(statement: \"Arrived\", quote: \"Alice\", nameKey: \"alice\", source: .entry(entryID))])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V20RecordedStoreTests.swift","line":74}},"text":"        place.factsData = RecordFactCodec.encode([RecordFact(statement: \"Visited\", quote: \"Harbor\", nameKey: \"harbor\", source: .entry(entryID))])"},{"violation":{"ruleName":"Identifier Name","reason":"Function name 'V22AddsOnlyThreeRelationshipFreeGroupTables()' should start with a lowercase character","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":16,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/V21GroupMigrationTests.swift","line":52}},"text":"    @Test func V22AddsOnlyThreeRelationshipFreeGroupTables() throws {"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkDetailEditTransactionTests.swift","line":48}},"text":"                .transition(rootID: UUID(), groupID: groupID, characterID: characterID,"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 726 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergePlannerTests.swift","line":6}},"text":"struct WorkMergePlannerTests {"},{"violation":{"ruleName":"Function Parameter Count","reason":"Function should have 6 parameters or less: it currently has 14","severity":"error","ruleIdentifier":"function_parameter_count","ruleDescription":"Number of function parameters should be low.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergePlannerTests.swift","line":676}},"text":"        func side("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":37,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergePlannerTests.swift","line":908}},"text":"            chapterTitleProvenance: try! FieldProvenance(kind: .none),"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":39,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergePlannerTests.swift","line":915}},"text":"            workAssignmentProvenance: try! FieldProvenance(kind: .urlRule),"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergeRepositoryTests.swift","line":29}},"text":"                .transition(rootID: UUID(), groupID: groupID,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergeRepositoryTests.swift","line":77}},"text":"                .transition(rootID: UUID(), groupID: groupID,"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergeRepositoryTests.swift","line":110}},"text":"                .transition(rootID: UUID(), groupID: groupID,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkMergeRepositoryTests.swift","line":188}},"text":"                publicationEdit: .set(status: .finished, returnDate: nil), readingStatus: .finished, verdict: \"a fine ending\", releaseDays: [], membership: nil,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 150 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkPublicationStateTests.swift","line":116}},"text":"            #\"{\"version\":1,\"status\":\"ongoing\",\"closedPauses\":[{\"start\":\"2024-03-01\",\"end\":\"2024-03-03\"},{\"start\":\"2024-03-02\",\"end\":\"2024-03-05\"}]}\"#,"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkPublicationStateTests.swift","line":117}},"text":"            #\"{\"version\":1,\"status\":\"hiatus\",\"closedPauses\":[{\"start\":\"2024-03-01\",\"end\":\"2024-03-03\"}],\"currentPause\":{\"start\":\"2024-03-02\"}}\"#,"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkRecordCopyOfferTests.swift","line":145}},"text":"    let a = UUID()"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkRecordCopyRepositoryTests.swift","line":58}},"text":"        .transition(rootID: UUID(), groupID: groupID, characterID: character,"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkRecordCopyTests.swift","line":40}},"text":"    let a = UUID()"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":9,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkRecordCopyTests.swift","line":105}},"text":"    let a = record(\"The Captain\")"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":46}},"text":"        let folded = try! #require(directory[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":63}},"text":"        let folded = try! #require(WorkTypeDirectory(rows: [pristine, touched])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":76}},"text":"        let folded = try! #require(WorkTypeDirectory(rows: rows)[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":98}},"text":"        let folded = try! #require(WorkTypeDirectory(rows: [active, merged])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":22,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":136}},"text":"        let folded = try! #require(WorkTypeDirectory(rows: [row])[identity])"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":26,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":152}},"text":"        let resolution = try! #require(directory.resolve(first))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":26,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":192}},"text":"        let resolution = try! #require(directory.resolve(identity))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":30,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":239}},"text":"            let resolution = try! #require("},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":25,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":241}},"text":"            let again = try! #require(directory.resolve(resolution.canonicalID))"},{"violation":{"ruleName":"Force Try","reason":"Force tries should be avoided","severity":"error","ruleIdentifier":"force_try","ruleDescription":"Force tries should be avoided","location":{"character":28,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeDirectoryTests.swift","line":250}},"text":"            let endpoint = try! #require(directory[resolution.canonicalID])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":78,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WorkTypeResolutionSurfaceTests.swift","line":227}},"text":"        #expect(try await fixture.repository.work(id: survivorID).releaseDays == [])"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'h' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":64,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WritePathQuarantineTests.swift","line":174}},"text":"        #expect(!diagnoses.contains { if case .siteMissing(let h, _, _) = $0 { h == orphaned } else { false } })"},{"violation":{"ruleName":"Redundant Nil Coalescing","reason":"Coalescing operator with right-hand side nil is redundant","severity":"error","ruleIdentifier":"redundant_nil_coalescing","ruleDescription":"Coalescing operator with right-hand side nil is redundant","location":{"character":50,"file":"Packages\/AsterismCore\/Tests\/AsterismCoreTests\/WrongHostWorkURLImportTests.swift","line":412}},"text":"    records.first { $0.id == id }?.workURLString ?? nil"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 143 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":13}},"text":"            mentionIndex: .init(workID: work, eligibleEntries: [entry], eligibilityByEntry: [entry: \"basis\"], activePairs: [], decisions: [:]))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":33}},"text":"        let candidate = GroundedCandidate(name: \"Nova\", nameKey: \"nova\", kind: .place, proposedAliases: [], source: .entry(entry), facts: [])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":34}},"text":"        #expect(CharacterExtractionAssembler.assemble([candidate], revisions: [.entry(entry): \"note\"], context: context, pass: .automatic).isEmpty)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 160 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":35}},"text":"        let manual = try #require(CharacterExtractionAssembler.assemble([candidate], revisions: [.entry(entry): \"note\"], context: context, pass: .manual).first)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 145 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":39}},"text":"        let candidate = GroundedCandidate(name: \"Nova\", nameKey: \"nova\", kind: .character, proposedAliases: [], source: .genericNotes, facts: [])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 165 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":41}},"text":"        let proposal = try #require(CharacterExtractionAssembler.assemble([candidate], revisions: [.genericNotes: \"note\"], context: context, pass: .automatic).first)"},{"violation":{"ruleName":"Identifier Name","reason":"Variable name 'a' should be between 2 and 50 characters long","severity":"error","ruleIdentifier":"identifier_name","ruleDescription":"Identifier names should only contain alphanumeric characters and start with a lowercase character or should only contain capital letters. In an exception to the above, variable names may start with a capital letter when they are declared as static. Variable names should not be too long or too short.","location":{"character":13,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":51}},"text":"        let a = ExtractionProposal(name: \"Nova\", nameKey: \"nova\", kind: .character, proposedAliases: [],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/AssociationProposalTests.swift","line":91}},"text":"            eligibilityByEntry: [:], activePairs: [], decisions: [newPair: [\"nova\": .init(rejectionIDs: [newRejection], suppressed: true)]]))"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":47,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/CharacterExtractionBridgeTests.swift","line":96}},"text":"        #expect(request.nameKeySuppressedKinds == [])"},{"violation":{"ruleName":"Empty Collection Literal","reason":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","severity":"error","ruleIdentifier":"empty_collection_literal","ruleDescription":"Prefer checking `isEmpty` over comparing collection to an empty array or dictionary literal","location":{"character":47,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/CharacterExtractionBridgeTests.swift","line":108}},"text":"        #expect(request.nameKeySuppressedKinds == [])"},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NamedGroupGroundingTests.swift","line":37}},"text":"                .init(groupName: \"Team Loser\", characterName: \"Bjorn\","},{"violation":{"ruleName":"Collection Element Alignment","reason":"All elements in a collection literal should be vertically aligned","severity":"error","ruleIdentifier":"collection_alignment","ruleDescription":"All elements in a collection literal should be vertically aligned","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NamedGroupGroundingTests.swift","line":50}},"text":"                .init(groupName: \"team loser\", characterName: \"Missha\","},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":23}},"text":"        let result = ExtractionResult(characters: kinds.contains(.character) ? [.init(name: \"Ada\", facts: [.init(statement: \"obsolete\", quote: \"Ada\")])] : [],"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 192 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":38}},"text":"        #expect(!FoundationCharacterExtractionModelClient.prompt(for: .init(workID: work, workTitle: \"Story\", source: .genericNotes, text: \"Ada\", fingerprint: \"f\")).contains(\"with any facts\"))"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 166 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":42}},"text":"        let known = ExistingCharacter(id: record, name: tier == 0 ? \"Ada\" : \"Renamed\", retainedKey: tier == 1 ? \"ada\" : \"original\", aliases: tier == 2 ? [\"Ada\"] : [])"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 158 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":43}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates(), revisions: [.entry(entry): \"fp\"], context: context([known]), pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 173 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":55}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates([.character, .place]), revisions: [.entry(entry): \"fp\"], context: context(known), pass: .manual)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 156 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":64}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates(), revisions: [.entry(entry): \"fp\"], context: context(known), pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 173 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":70}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates(), revisions: [.entry(entry): \"fp\"], context: context([known], suppressed: true), pass: .manual)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 172 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":77}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates(), revisions: [.entry(entry): \"fp\"], context: context([known], active: true), pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 178 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":83}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates([.character, .place]), revisions: [.entry(entry): \"fp\"], context: context([known]), pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 200 characters or less; currently it has 202 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":93}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(copies, revisions: Dictionary(uniqueKeysWithValues: Set(copies.map(\\.source)).map { ($0, \"fp\") }), context: context(), pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 147 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/NoteFirstExtractionTests.swift","line":111}},"text":"        let rows = CharacterExtractionAssembler.assembleNoteFirst(candidates(), revisions: [.entry(entry): \"fp\"], context: input, pass: .automatic)"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 148 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismIntelligenceTests\/SaveTimeKnownLinkLedgerTests.swift","line":20}},"text":"        if mode == \"enrichment\" { known.facts = [.init(nameKey: \"harbor\", statement: \"Authored proposal\", quote: \"Harbor\", source: .entry(entry))] }"},{"violation":{"ruleName":"Type Body Length","reason":"Struct body should span 700 lines or less excluding comments and whitespace: currently spans 737 lines","severity":"error","ruleIdentifier":"type_body_length","ruleDescription":"Type bodies should not span too many lines","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/StatsDerivationTests.swift","line":17}},"text":"struct StatsDerivationTests {"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/StatsDerivationTests.swift","line":2417}},"text":"        #expect(key(selectedDay: day) == key(selectedDay: day))"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/StatsDerivationTests.swift","line":2418}},"text":"        #expect(key(selectedDay: day).graphIdentity == key(selectedDay: day).graphIdentity)"},{"violation":{"ruleName":"Identical Operands","reason":"Comparing two identical operands is likely a mistake","severity":"error","ruleIdentifier":"identical_operands","ruleDescription":"Comparing two identical operands is likely a mistake","location":{"character":17,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/StatsDerivationTests.swift","line":2419}},"text":"        #expect(key(selectedDay: day).breakdownIdentity == key(selectedDay: day).breakdownIdentity)"},{"violation":{"ruleName":"File Length","reason":"File should contain 1500 lines or less excluding comments and whitespaces: currently contains 1756","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/StatsDerivationTests.swift","line":2442}},"text":"}"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/TodayShelfTextTests.swift","line":193}},"text":"        #expect(CatchUpText.accessibilityLabel(exact, selectedDay: today, currentDay: today, calendar: calendar) == \"Exact, 1 chapter behind, chapter 9 of 10\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 141 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/TodayShelfTextTests.swift","line":199}},"text":"        #expect(CatchUpText.status(estimated, selectedDay: today, currentDay: today, calendar: calendar) == \"~2 episodes behind · estimated\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 179 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/TodayShelfTextTests.swift","line":200}},"text":"        #expect(CatchUpText.accessibilityLabel(estimated, selectedDay: today, currentDay: today, calendar: calendar) == \"Estimated, 2 episodes behind, episode 8 of 10, estimated\")"},{"violation":{"ruleName":"Line Length","reason":"Line should be 140 characters or less; currently it has 159 characters","severity":"error","ruleIdentifier":"line_length","ruleDescription":"Lines should not span too many characters.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/TodayShelfTextTests.swift","line":229}},"text":"        #expect(CatchUpText.accessibilityLabel(unknown, selectedDay: today, currentDay: today, calendar: calendar) == \"Override, Last read chapter 42 · today\")"},{"violation":{"ruleName":"File Length","reason":"File should contain 900 lines or less excluding comments and whitespaces: currently contains 988","severity":"error","ruleIdentifier":"file_length","ruleDescription":"Files should not span too many lines.","location":{"character":1,"file":"Packages\/AsterismCore\/Tests\/AsterismPresentationTests\/WorksListOptionsTests.swift","line":1300}},"text":"}"}]\ No newline at end of file
.swiftlint-version Modified
diff --git a/.swiftlint-version b/.swiftlint-versionnew file mode 100644index 00000000..522ab7d4--- /dev/null+++ b/.swiftlint-version@@ -0,0 +1 @@+0.65.1
.swiftlint.yml Modified
diff --git a/.swiftlint.yml b/.swiftlint.ymlnew file mode 100644index 00000000..107c0326--- /dev/null+++ b/.swiftlint.yml@@ -0,0 +1,171 @@+# SwiftLint configuration for Asterism, adapted from Prism.+# Tool version is pinned in .swiftlint-version. The gate applies the explicit+# baseline in scripts/lint.sh; make lint-debt always reports the full profile.++# Scope: all application/extension/test Swift plus every local package target.+included:+  - Asterism+  - Packages/AsterismCore/Package.swift+  - Packages/AsterismCore/Sources+  - Packages/AsterismCore/Tests++# Build products and generated code only; frozen schemas remain visible.+excluded:+  - .build+  - DerivedData+  - Packages/AsterismCore/.build+  - Packages/AsterismCore/.swiftpm+  - "*.generated.swift"++# Disabled rules+disabled_rules:+  - trailing_comma                   # Allow trailing commas in arrays/dicts+  - todo                             # Allow TODO/FIXME comments+  - opening_brace                    # SwiftUI style often puts braces on same line+  - redundant_string_enum_value      # Explicit raw values can be clearer+  - for_where                        # If inside for can be clearer than where clause++# Opt-in rules+opt_in_rules:+  - array_init+  - closure_end_indentation+  - closure_spacing+  - collection_alignment+  - contains_over_filter_count+  - contains_over_filter_is_empty+  - contains_over_first_not_nil+  - discouraged_object_literal+  - empty_collection_literal+  - enum_case_associated_values_count+  - explicit_init+  - fallthrough+  - fatal_error_message+  - file_name_no_space+  - first_where+  - flatmap_over_map_reduce+  - identical_operands+  - implicit_return+  - joined_default_parameter+  - last_where+  - literal_expression_end_indentation+  - lower_acl_than_parent+  - modifier_order+  - overridden_super_call+  - override_in_extension+  - prefer_zero_over_explicit_init+  - private_action+  - private_outlet+  - prohibited_super_call+  - redundant_nil_coalescing+  - sorted_first_last+  - static_operator+  - toggle_bool+  - unavailable_function+  - unowned_variable_capture+  - yoda_condition++# Rule configurations+line_length:+  warning: 140+  error: 200+  ignores_comments: true+  ignores_urls: true+  ignores_function_declarations: false+  ignores_interpolated_strings: true++type_body_length:+  warning: 700+  error: 1000++file_length:+  warning: 900+  error: 1500+  ignore_comment_only_lines: true++function_body_length:+  warning: 100+  error: 150++function_parameter_count:+  warning: 6+  error: 8++type_name:+  min_length: 3+  max_length:+    warning: 50+    error: 60+  excluded:+    - AsterismUITests              # Xcode-generated test class name+    - AsterismUITestsLaunchTests   # Xcode-generated test class name++identifier_name:+  min_length:+    warning: 2+    error: 1+  max_length:+    warning: 50+    error: 60+  excluded:+    - id+    - x+    - y+    - z+    - i+    - j+    - k+    - m+    - n+    - r+    - g+    - b+    - ok+    - to+    - _++nesting:+  type_level:+    warning: 2+    error: 3+  function_level:+    warning: 3+    error: 5++cyclomatic_complexity:+  warning: 15+  error: 25+  ignores_case_statements: true++enum_case_associated_values_count:+  warning: 7+  error: 8++large_tuple:+  warning: 3+  error: 4++vertical_whitespace:+  max_empty_lines: 2++trailing_whitespace:+  ignores_empty_lines: true+  ignores_comments: true++colon:+  flexible_right_spacing: false+  apply_to_dictionaries: true++comma:+  severity: warning++force_cast:+  severity: warning++force_try:+  severity: warning++implicit_getter:+  severity: warning++# Custom rules (if needed)+custom_rules: {}
Asterism/Asterism.xcodeproj/project.pbxproj Modified
diff --git a/Asterism/Asterism.xcodeproj/project.pbxproj b/Asterism/Asterism.xcodeproj/project.pbxprojindex a641e143..d0e71f80 100644--- a/Asterism/Asterism.xcodeproj/project.pbxproj+++ b/Asterism/Asterism.xcodeproj/project.pbxproj@@ -608,23 +608,23 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				GENERATE_INFOPLIST_FILE = NO; 				INFOPLIST_FILE = AsterismShareExtension/Info.plist;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				LD_RUNPATH_SEARCH_PATHS = ( 					"$(inherited)", 					"@executable_path/Frameworks", 					"@executable_path/../../Frameworks", 				); 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism.dev.ShareExtension;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism.dev.ShareExtension; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SKIP_INSTALL = YES; 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2"; 			}; 			name = Development;@@ -637,22 +637,22 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				GENERATE_INFOPLIST_FILE = NO; 				INFOPLIST_FILE = AsterismShareExtension/Info.plist;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				LD_RUNPATH_SEARCH_PATHS = ( 					"$(inherited)", 					"@executable_path/Frameworks", 					"@executable_path/../../Frameworks", 				); 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism.ShareExtension;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism.ShareExtension; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SKIP_INSTALL = YES; 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2"; 			}; 			name = Personal;@@ -665,7 +665,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_APP_SANDBOX = YES; 				ENABLE_HARDENED_RUNTIME = YES; 				ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;@@ -677,14 +677,14 @@ 				); 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism.dev.ShareExtensionMac;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism.dev.ShareExtensionMac; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				REGISTER_APP_GROUPS = YES; 				SKIP_INSTALL = YES; 				SUPPORTED_PLATFORMS = macosx; 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 			}; 			name = Development; 		};@@ -696,7 +696,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_APP_SANDBOX = YES; 				ENABLE_HARDENED_RUNTIME = YES; 				ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;@@ -708,13 +708,13 @@ 				); 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism.ShareExtensionMac;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism.ShareExtensionMac; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				REGISTER_APP_GROUPS = YES; 				SKIP_INSTALL = YES; 				SUPPORTED_PLATFORMS = macosx; 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 			}; 			name = Personal; 		};@@ -728,7 +728,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_APP_SANDBOX = YES; 				ENABLE_HARDENED_RUNTIME = YES; 				ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;@@ -747,12 +747,12 @@ 				"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism.dev;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism.dev; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				REGISTER_APP_GROUPS = YES; 				SDKROOT = auto;@@ -762,7 +762,7 @@ 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; 				SWIFT_EMIT_LOC_STRINGS = YES; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				XROS_DEPLOYMENT_TARGET = 26.5; 			};@@ -778,7 +778,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_APP_SANDBOX = YES; 				ENABLE_HARDENED_RUNTIME = YES; 				ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;@@ -797,12 +797,12 @@ 				"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; 				"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.Asterism;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.Asterism; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				REGISTER_APP_GROUPS = YES; 				SDKROOT = auto;@@ -812,7 +812,7 @@ 				SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; 				SWIFT_EMIT_LOC_STRINGS = YES; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				XROS_DEPLOYMENT_TARGET = 26.5; 			};@@ -827,7 +827,7 @@ 				ASTERISM_BACKGROUND_EXPORT_TASK_IDENTIFIER = "$(ASTERISM_IDENTITY).backgroundExport"; 				ASTERISM_EXTENSION_DISPLAY_NAME = "Asterism Dev"; 				ASTERISM_ICLOUD_CONTAINER_IDENTIFIER = "iCloud.$(ASTERISM_IDENTITY)";-				ASTERISM_IDENTITY = me.nore.ig.Asterism.dev;+				ASTERISM_IDENTITY = me.nore.ig.apps.Asterism.dev; 				ASTERISM_MIRRORING_ENABLED = YES; 				ASTERISM_XCENT_SUFFIX = ""; 				"ASTERISM_XCENT_SUFFIX[sdk=*simulator*]" = "-Simulated";@@ -862,7 +862,7 @@ 				COPY_PHASE_STRIP = NO; 				DEAD_CODE_STRIPPING = YES; 				DEBUG_INFORMATION_FORMAT = dwarf;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_STRICT_OBJC_MSGSEND = YES; 				ENABLE_TESTABILITY = YES; 				ENABLE_USER_SCRIPT_SANDBOXING = YES;@@ -899,7 +899,7 @@ 				ASTERISM_BACKGROUND_EXPORT_TASK_IDENTIFIER = "$(ASTERISM_IDENTITY).backgroundExport"; 				ASTERISM_EXTENSION_DISPLAY_NAME = Asterism; 				ASTERISM_ICLOUD_CONTAINER_IDENTIFIER = "iCloud.$(ASTERISM_IDENTITY)";-				ASTERISM_IDENTITY = me.nore.ig.Asterism;+				ASTERISM_IDENTITY = me.nore.ig.apps.Asterism; 				ASTERISM_MIRRORING_ENABLED = YES; 				ASTERISM_XCENT_SUFFIX = ""; 				"ASTERISM_XCENT_SUFFIX[sdk=*simulator*]" = "-Simulated";@@ -934,7 +934,7 @@ 				COPY_PHASE_STRIP = NO; 				DEAD_CODE_STRIPPING = YES; 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				ENABLE_NS_ASSERTIONS = NO; 				ENABLE_STRICT_OBJC_MSGSEND = YES; 				ENABLE_USER_SCRIPT_SANDBOXING = YES;@@ -961,12 +961,12 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				GENERATE_INFOPLIST_FILE = YES;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.AsterismTests;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.AsterismTests; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SDKROOT = auto; 				STRING_CATALOG_GENERATE_SYMBOLS = NO;@@ -974,7 +974,7 @@ 				SWIFT_APPROACHABLE_CONCURRENCY = YES; 				SWIFT_EMIT_LOC_STRINGS = NO; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Asterism.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Asterism"; 				XROS_DEPLOYMENT_TARGET = 26.5;@@ -988,12 +988,12 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				GENERATE_INFOPLIST_FILE = YES;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.AsterismTests;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.AsterismTests; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SDKROOT = auto; 				STRING_CATALOG_GENERATE_SYMBOLS = NO;@@ -1001,7 +1001,7 @@ 				SWIFT_APPROACHABLE_CONCURRENCY = YES; 				SWIFT_EMIT_LOC_STRINGS = NO; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Asterism.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Asterism"; 				XROS_DEPLOYMENT_TARGET = 26.5;@@ -1014,7 +1014,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				"EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*]" = ( 					AccessibilityJourneyUITests.swift, 					AnnouncementUITests.swift,@@ -1054,10 +1054,10 @@ 					WorksSeriesOptionsUITests.swift, 				); 				GENERATE_INFOPLIST_FILE = YES;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.AsterismUITests;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.AsterismUITests; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SDKROOT = auto; 				STRING_CATALOG_GENERATE_SYMBOLS = NO;@@ -1065,7 +1065,7 @@ 				SWIFT_APPROACHABLE_CONCURRENCY = YES; 				SWIFT_EMIT_LOC_STRINGS = NO; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				TEST_TARGET_NAME = Asterism; 				XROS_DEPLOYMENT_TARGET = 26.5;@@ -1078,7 +1078,7 @@ 				CODE_SIGN_STYLE = Automatic; 				CURRENT_PROJECT_VERSION = 1; 				DEAD_CODE_STRIPPING = YES;-				DEVELOPMENT_TEAM = V24684SCZN;+				DEVELOPMENT_TEAM = 4PJS97G236; 				"EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*]" = ( 					AccessibilityJourneyUITests.swift, 					AnnouncementUITests.swift,@@ -1118,10 +1118,10 @@ 					WorksSeriesOptionsUITests.swift, 				); 				GENERATE_INFOPLIST_FILE = YES;-				IPHONEOS_DEPLOYMENT_TARGET = 26.0;+				IPHONEOS_DEPLOYMENT_TARGET = 27.0; 				MACOSX_DEPLOYMENT_TARGET = 26.5; 				MARKETING_VERSION = 0.7.0;-				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.AsterismUITests;+				PRODUCT_BUNDLE_IDENTIFIER = me.nore.ig.apps.AsterismUITests; 				PRODUCT_NAME = "$(TARGET_NAME)"; 				SDKROOT = auto; 				STRING_CATALOG_GENERATE_SYMBOLS = NO;@@ -1129,7 +1129,7 @@ 				SWIFT_APPROACHABLE_CONCURRENCY = YES; 				SWIFT_EMIT_LOC_STRINGS = NO; 				SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;-				SWIFT_VERSION = 5.0;+				SWIFT_VERSION = 6.0; 				TARGETED_DEVICE_FAMILY = "1,2,7"; 				TEST_TARGET_NAME = Asterism; 				XROS_DEPLOYMENT_TARGET = 26.5;
Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swift Modified
diff --git a/Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swift b/Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swiftindex e53da61a..9a79d6cc 100644--- a/Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swift+++ b/Asterism/Asterism/CharacterExtraction/CharacterExtractionCoordinator.swift@@ -167,8 +167,7 @@ final class CharacterExtractionCoordinator {             return .refused(.stale)         }         let plan: (groupID: UUID, transitionID: UUID)-        if let existing = groupPlans[id] { plan = existing }-        else {+        if let existing = groupPlans[id] { plan = existing } else {             plan = (UUID(), UUID()); groupPlans[id] = plan         }         let approval = GroupSuggestionApproval(chapterID: proposal.chapterID,@@ -536,7 +535,7 @@ final class CharacterExtractionCoordinator {     }      /// How one source's attempt ended, in the only terms the caller acts on.-    private nonisolated enum SourceOutcome: Sendable, Equatable {+    nonisolated private enum SourceOutcome: Sendable, Equatable {         /// Grounded and filtered to nothing: covers at pass time (Q65).         case producedNone         /// Rows the reader will decide on; the decision covers the source.@@ -682,7 +681,7 @@ final class CharacterExtractionCoordinator {                         }                         value.sourceEvidence = ProposalSourceEvidence.merged(informational + proposal.sourceEvidence)                         return value-                    }+                }                 do {                     let durable = try await self.preservePendingMentions(proposals, context: routingContext, workID: source.workID)                     try Task.checkCancellation()
Asterism/Asterism/ContentView.swift Modified
diff --git a/Asterism/Asterism/ContentView.swift b/Asterism/Asterism/ContentView.swiftindex 546a2095..8973e774 100644--- a/Asterism/Asterism/ContentView.swift+++ b/Asterism/Asterism/ContentView.swift@@ -416,8 +416,7 @@ struct ContentView: View {                 case .creatorList: .creators                 default: nil                 }-            }).last { storedWorksDestination = destination.storageValue }-            else if path.isEmpty { storedWorksDestination = "" }+            }).last { storedWorksDestination = destination.storageValue } else if path.isEmpty { storedWorksDestination = "" }         }         .task {             await model.bootstrap()
Asterism/Asterism/Intents/WorkEntity.swift Modified
diff --git a/Asterism/Asterism/Intents/WorkEntity.swift b/Asterism/Asterism/Intents/WorkEntity.swiftindex 67dc0b4b..ee6804bb 100644--- a/Asterism/Asterism/Intents/WorkEntity.swift+++ b/Asterism/Asterism/Intents/WorkEntity.swift@@ -104,7 +104,7 @@ struct WorkEntityLookup {     }      /// Several title-ordered answers as one, still in title order.-    private nonisolated static func combine(_ sets: [[WorkSummary]], all: Bool) -> [WorkSummary] {+    nonisolated private static func combine(_ sets: [[WorkSummary]], all: Bool) -> [WorkSummary] {         guard let first = sets.first else { return [] }         if all {             let rest = sets.dropFirst().map { Set($0.map(\.id)) }@@ -138,15 +138,17 @@ struct WorkEntityQuery: EntityStringQuery, EntityPropertyQuery {         injectedLookup = lookup     } -    // Stored, in the builder's own form: the App Intents metadata processor-    // reads these declarations at build time and accepts nothing else.-    static let properties = QueryProperties {+    // App Intents' metadata extractor requires stored, direct builder initializers+    // (computed factories fail export). These SDK wrappers lack Sendable, but+    // expose no setters; their only captured comparator is the pure String+    // identity below. Keep this exception confined to immutable metadata.+    nonisolated(unsafe) static let properties = QueryProperties {         Property(\WorkEntity.$title) {             ContainsComparator { $0 }         }     } -    static let sortingOptions = SortingOptions {+    nonisolated(unsafe) static let sortingOptions = SortingOptions {         SortableBy(\WorkEntity.$title)     } 
Asterism/Asterism/Layout/AppNavigation.swift Modified
diff --git a/Asterism/Asterism/Layout/AppNavigation.swift b/Asterism/Asterism/Layout/AppNavigation.swiftindex 9c74721b..21eb9218 100644--- a/Asterism/Asterism/Layout/AppNavigation.swift+++ b/Asterism/Asterism/Layout/AppNavigation.swift@@ -175,7 +175,7 @@ final class AppNavigation {             } else if selectedTab == .works {                 hasLibraryDestination = true             }-        } else if (hasLibraryDestination || !worksPath.isEmpty),+        } else if hasLibraryDestination || !worksPath.isEmpty,                   worksPath.first?.libraryDestination == nil {             worksPath.insert(.destination(lastLibraryDestination), at: 0)         }@@ -195,12 +195,9 @@ final class AppNavigation {     func back() {         switch selectedTab {         case .today:-            if todayInspectorEntryID != nil { todayInspectorEntryID = nil }-            else if selectedTodayEntryID != nil { selectedTodayEntryID = nil }-            else { popRoute(on: .today) }+            if todayInspectorEntryID != nil { todayInspectorEntryID = nil } else if selectedTodayEntryID != nil { selectedTodayEntryID = nil } else { popRoute(on: .today) }         case .works:-            if selectedWorksEntryID != nil { selectedWorksEntryID = nil }-            else { popRoute(on: .works) }+            if selectedWorksEntryID != nil { selectedWorksEntryID = nil } else { popRoute(on: .works) }         case .stats: break         }     }
Asterism/Asterism/Layout/AppScreens.swift Modified
diff --git a/Asterism/Asterism/Layout/AppScreens.swift b/Asterism/Asterism/Layout/AppScreens.swiftindex 49d23131..6b310e52 100644--- a/Asterism/Asterism/Layout/AppScreens.swift+++ b/Asterism/Asterism/Layout/AppScreens.swift@@ -38,7 +38,7 @@ struct AppScreens {     /// Recent's sync-banner route (Req 8.2), which is the same Settings surface     /// the toolbar and the sidebar row open.     let showSettings: () -> Void-    var paintsOwnSky: Bool? = nil+    var paintsOwnSky: Bool?      /// Req 3.1: the wide tree paints one sky for the whole window, so its     /// screens paint none of their own. The compact tree's screens each paint
Asterism/Asterism/Layout/SettingsScreen.swift Modified
diff --git a/Asterism/Asterism/Layout/SettingsScreen.swift b/Asterism/Asterism/Layout/SettingsScreen.swiftindex 6a23505d..e718c898 100644--- a/Asterism/Asterism/Layout/SettingsScreen.swift+++ b/Asterism/Asterism/Layout/SettingsScreen.swift@@ -27,7 +27,7 @@ struct SettingsScreen: View {     /// How to leave Settings on this host, or nil where Settings is a window of     /// its own and there is nothing to dismiss.     let dismissSheet: (() -> Void)?-    var openMainWindow: (() -> Void)? = nil+    var openMainWindow: (() -> Void)?      /// Only ever called on the arm where `dismissSheet` is nil — the Mac, where     /// the main window may not even be frontmost when a route lands in it.
Asterism/Asterism/Localizable.xcstrings Modified
diff --git a/Asterism/Asterism/Localizable.xcstrings b/Asterism/Asterism/Localizable.xcstringsindex d9bf079d..5000e512 100644--- a/Asterism/Asterism/Localizable.xcstrings+++ b/Asterism/Asterism/Localizable.xcstrings@@ -8,50 +8,42 @@       "comment" : "A suffix to a Work row, indicating that the Work",       "isCommentAutoGenerated" : true     },-    "#%@" : {-      "comment" : "A label displaying the chapter number of a chapter in a book. The argument is the chapter number.",+    "· #%@" : {+      "comment" : "A number that indicates the chapter of a book.",       "isCommentAutoGenerated" : true     },-    "%@" : {-      "comment" : "The dialog for the \"Which chapters release today?\" intent.",+    "· #%@ (derived)" : {+      "comment" : "A number that indicates the chapter of a book.",       "isCommentAutoGenerated" : true     },-    "%@ %@" : {-      "comment" : "A heading with a title and a description. The first argument is the string “Most read works” or the string “Most read sites”. The second argument is a description.",-      "isCommentAutoGenerated" : true,-      "localizations" : {-        "en" : {-          "stringUnit" : {-            "state" : "new",-            "value" : "%1$@ %2$@"-          }-        }-      }+    "· %@" : {+      "comment" : "A chapter the rule *derived* from the",+      "isCommentAutoGenerated" : true     },-    "%@ arrived more than once and the copies differ." : {-      "comment" : "A notice that a character has been duplicated in a work.",+    "“%@”" : {+      "comment" : "A note in the review view that",       "isCommentAutoGenerated" : true     },-    "%@ from your notes" : {-      "comment" : "A label that shows the number of character suggestions for a work. The argument is the number of suggestions.",+    "#%@" : {+      "comment" : "A label displaying the chapter number of a chapter in a book. The argument is the chapter number.",       "isCommentAutoGenerated" : true     },-    "%@ is not the same work as %@" : {-      "comment" : "A label that reads \"<Work> is not the same work as <Work>.\"",+    "%@" : {+      "comment" : "The dialog for the \"Which chapters release today?\" intent.",+      "isCommentAutoGenerated" : true+    },+    "%@ — %@" : {+      "comment" : "A subheading that displays the number of times a sync failure was observed, followed by the detail of the failure. The first argument is the count of times the failure was observed. The second argument is the detail of the failure.",       "isCommentAutoGenerated" : true,       "localizations" : {         "en" : {           "stringUnit" : {             "state" : "new",-            "value" : "%1$@ is not the same work as %2$@"+            "value" : "%1$@ — %2$@"           }         }       }     },-    "%@ ready" : {-      "comment" : "A label that appears when a pass",-      "isCommentAutoGenerated" : true-    },     "%@ · %@" : {       "comment" : "A line of text that shows the hostname of a site, followed by a dash, and then the number of works it has.",       "isCommentAutoGenerated" : true,@@ -76,30 +68,42 @@         }       }     },-    "%@ — %@" : {-      "comment" : "A subheading that displays the number of times a sync failure was observed, followed by the detail of the failure. The first argument is the count of times the failure was observed. The second argument is the detail of the failure.",+    "%@ %@" : {+      "comment" : "A heading with a title and a description. The first argument is the string “Most read works” or the string “Most read sites”. The second argument is a description.",       "isCommentAutoGenerated" : true,       "localizations" : {         "en" : {           "stringUnit" : {             "state" : "new",-            "value" : "%1$@ — %2$@"+            "value" : "%1$@ %2$@"           }         }       }     },-    "%@%@" : {-      "comment" : "A colon and space.",+    "%@ arrived more than once and the copies differ." : {+      "comment" : "A notice that a character has been duplicated in a work.",+      "isCommentAutoGenerated" : true+    },+    "%@ from your notes" : {+      "comment" : "A label that shows the number of character suggestions for a work. The argument is the number of suggestions.",+      "isCommentAutoGenerated" : true+    },+    "%@ is not the same work as %@" : {+      "comment" : "A label that reads \"<Work> is not the same work as <Work>.\"",       "isCommentAutoGenerated" : true,       "localizations" : {         "en" : {           "stringUnit" : {             "state" : "new",-            "value" : "%1$@%2$@"+            "value" : "%1$@ is not the same work as %2$@"           }         }       }     },+    "%@ ready" : {+      "comment" : "A label that appears when a pass",+      "isCommentAutoGenerated" : true+    },     "%@, %@" : {       "comment" : "The accessibility label for a chip is the The argument is the string “selected as Work identity”, the string “selected as chapter sequence”, the string “empty component” or the string “not selected”.",       "isCommentAutoGenerated" : true,@@ -200,18 +204,6 @@       "comment" : "A button that expands or collapses a group of characters. The argument is the name of the group.",       "isCommentAutoGenerated" : true     },-    "%@. %@" : {-      "comment" : "A label for a button that opens a sheet. The argument is the title of the choice.",-      "isCommentAutoGenerated" : true,-      "localizations" : {-        "en" : {-          "stringUnit" : {-            "state" : "new",-            "value" : "%1$@. %2$@"-          }-        }-      }-    },     "%@: %@" : {       "comment" : "The text of a note in the Today screen's noted section. The first argument is the note's title. The second argument is the note's note.",       "isCommentAutoGenerated" : true,@@ -248,10 +240,46 @@         }       }     },+    "%@. %@" : {+      "comment" : "A label for a button that opens a sheet. The argument is the title of the choice.",+      "isCommentAutoGenerated" : true,+      "localizations" : {+        "en" : {+          "stringUnit" : {+            "state" : "new",+            "value" : "%1$@. %2$@"+          }+        }+      }+    },+    "%@%@" : {+      "comment" : "A colon and space.",+      "isCommentAutoGenerated" : true,+      "localizations" : {+        "en" : {+          "stringUnit" : {+            "state" : "new",+            "value" : "%1$@%2$@"+          }+        }+      }+    },     "%lld" : {       "comment" : "A small, rounded number that appears",       "isCommentAutoGenerated" : true     },+    "%lld · %@" : {+      "comment" : "The text of the last chapter read.",+      "isCommentAutoGenerated" : true,+      "localizations" : {+        "en" : {+          "stringUnit" : {+            "state" : "new",+            "value" : "%1$lld · %2$@"+          }+        }+      }+    },     "%lld %@ arrived more than once and their copies differ." : {       "localizations" : {         "en" : {@@ -262,6 +290,18 @@         }       }     },+    "%lld × %lld" : {+      "comment" : "A footnote that shows the width and height of a candidate's image.",+      "isCommentAutoGenerated" : true,+      "localizations" : {+        "en" : {+          "stringUnit" : {+            "state" : "new",+            "value" : "%1$lld × %2$lld"+          }+        }+      }+    },     "%lld behind" : {       "comment" : "A label that shows how many chapters are behind the latest read.",       "isCommentAutoGenerated" : true@@ -379,33 +419,23 @@         }       }     },-    "%lld · %@" : {-      "comment" : "The text of the last chapter read.",-      "isCommentAutoGenerated" : true,-      "localizations" : {-        "en" : {-          "stringUnit" : {-            "state" : "new",-            "value" : "%1$lld · %2$@"-          }-        }-      }-    },-    "%lld × %lld" : {-      "comment" : "A footnote that shows the width and height of a candidate's image.",-      "isCommentAutoGenerated" : true,-      "localizations" : {-        "en" : {-          "stringUnit" : {-            "state" : "new",-            "value" : "%1$lld × %2$lld"-          }-        }-      }-    },     "+%lld" : {       "comment" : "A badge showing the number of additional series members beyond the first three.",       "isCommentAutoGenerated" : true+    },+    "▲" : {+      "comment" : "The up arrow.",+      "isCommentAutoGenerated" : true+    },+    "▲ %lld" : {++    },+    "▼" : {+      "comment" : "A down arrow.",+      "isCommentAutoGenerated" : true+    },+    "▼ %lld" : {+     },     "A suggestion is ready" : {       "comment" : "A notice that a suggestion is ready.",@@ -418,17 +448,13 @@     "Add" : {       "comment" : "The text of a button that adds a new creator.",       "isCommentAutoGenerated" : true-    },-    "Add ${url} as to read" : {-     },     "Add %@ from this chapter" : {       "comment" : "A button that adds a character from a chapter to the current chapter.",       "isCommentAutoGenerated" : true     },-    "Add Page as To Read" : {-      "comment" : "Title of the \"Add this as to read\" intent.",-      "isCommentAutoGenerated" : true+    "Add ${url} as to read" : {+     },     "Add a creator" : {       "comment" : "The title of a sheet that lets the user add a creator.",@@ -462,6 +488,10 @@       "comment" : "A button label for adding a note to a chapter link.",       "isCommentAutoGenerated" : true     },+    "Add Page as To Read" : {+      "comment" : "Title of the \"Add this as to read\" intent.",+      "isCommentAutoGenerated" : true+    },     "Add the role %@" : {       "comment" : "A label for a pill button that lets the user add or remove a role from a credit. The argument is the role's label.",       "isCommentAutoGenerated" : true@@ -491,6 +521,10 @@     },     "Already resolved" : { +    },+    "also %@" : {+      "comment" : "A note that a divergent character is also known as.",+      "isCommentAutoGenerated" : true     },     "Also known as %@" : {       "comment" : "A row of a character review that",@@ -584,10 +618,6 @@       "comment" : "The name of the chapter field in a note.",       "isCommentAutoGenerated" : true     },-    "Chapter Provenance" : {-      "comment" : "A label for the provenance of the chapter.",-      "isCommentAutoGenerated" : true-    },     "Chapter designation (optional)" : {       "comment" : "A label for the chapter designation field in the entry correction form.",       "isCommentAutoGenerated" : true@@ -600,6 +630,10 @@       "comment" : "The title of a screen that allows a user to edit a note for a chapter link.",       "isCommentAutoGenerated" : true     },+    "Chapter Provenance" : {+      "comment" : "A label for the provenance of the chapter.",+      "isCommentAutoGenerated" : true+    },     "Chapter refresh interrupted" : {       "comment" : "A message that appears when chapter refresh fails.",       "isCommentAutoGenerated" : true@@ -610,23 +644,23 @@     },     "Chapter: manual protection (preserved)" : { +    },+    "Chapters · review needed" : {+     },     "Chapters (%lld)" : {       "comment" : "A label showing the number of chapters in a record. The argument is the number of chapters.",       "isCommentAutoGenerated" : true     },-    "Chapters Releasing Today" : {-      "comment" : "Title of the \"Which chapters release today?\" intent.",-      "isCommentAutoGenerated" : true-    },     "Chapters could not be loaded." : {       "comment" : "A message displayed when a user can't load a list of chapters.",       "isCommentAutoGenerated" : true     },-    "Chapters will stay unsettled" : {-+    "Chapters Releasing Today" : {+      "comment" : "Title of the \"Which chapters release today?\" intent.",+      "isCommentAutoGenerated" : true     },-    "Chapters · review needed" : {+    "Chapters will stay unsettled" : {      },     "Character" : {@@ -706,10 +740,6 @@       "comment" : "A button that clears a suggestion. The argument is the suggestion's name.",       "isCommentAutoGenerated" : true     },-    "Clear URL selection" : {-      "comment" : "A button that clears the selection of a URL's components.",-      "isCommentAutoGenerated" : true-    },     "Clear note" : {       "comment" : "A button that clears the note for a chapter link.",       "isCommentAutoGenerated" : true@@ -718,10 +748,18 @@       "comment" : "A button that clears the search field.",       "isCommentAutoGenerated" : true     },+    "Clear URL selection" : {+      "comment" : "A button that clears the selection of a URL's components.",+      "isCommentAutoGenerated" : true+    },     "Close" : {       "comment" : "A button that dismisses a view.",       "isCommentAutoGenerated" : true     },+    "collapsed" : {+      "comment" : "A description of the sidebar's state when it's hidden.",+      "isCommentAutoGenerated" : true+    },     "Combine into" : {       "comment" : "A button that opens a dialog for choosing a target",       "isCommentAutoGenerated" : true@@ -889,9 +927,6 @@     "Delete %@" : {       "comment" : "A button that deletes a set aside capture. The argument is the name of the capture.",       "isCommentAutoGenerated" : true-    },-    "Delete Entry" : {-     },     "Delete all copies" : { @@ -899,6 +934,9 @@     "Delete creator" : {       "comment" : "A button that deletes a creator.",       "isCommentAutoGenerated" : true+    },+    "Delete Entry" : {+     },     "Delete group" : {       "comment" : "A button that deletes a group and its membership history.",@@ -1017,6 +1055,10 @@       "comment" : "A label displayed when an error occurs during reparsing.",       "isCommentAutoGenerated" : true     },+    "estimated" : {+      "comment" : "A description of a number that's not the most recent chapter.",+      "isCommentAutoGenerated" : true+    },     "Example Title" : {       "comment" : "The title of the example title field.",       "isCommentAutoGenerated" : true@@ -1025,6 +1067,10 @@       "comment" : "A label for the example URL in the URL details editor.",       "isCommentAutoGenerated" : true     },+    "example.com or example.com/story" : {+      "comment" : "A placeholder text for the URL field of a new work form.",+      "isCommentAutoGenerated" : true+    },     "Existing %@: %@" : {       "localizations" : {         "en" : {@@ -1039,6 +1085,10 @@       "comment" : "A caption displayed underneath the name of a chapter",       "isCommentAutoGenerated" : true     },+    "expanded" : {+      "comment" : "A description of the sidebar's expanded state.",+      "isCommentAutoGenerated" : true+    },     "Export" : {      },@@ -1100,14 +1150,14 @@       "comment" : "A section for editing a character group's details.",       "isCommentAutoGenerated" : true     },-    "Hiatus Return Date" : {-      "comment" : "The title of a sheet that lets the user set a hiatus",-      "isCommentAutoGenerated" : true-    },     "Hiatus return date" : {       "comment" : "A date picker for setting a work's hiatus return date.",       "isCommentAutoGenerated" : true     },+    "Hiatus Return Date" : {+      "comment" : "The title of a sheet that lets the user set a hiatus",+      "isCommentAutoGenerated" : true+    },     "Hiatus return date, %@" : {      },@@ -1129,13 +1179,13 @@     "Import Backup" : {       "comment" : "A button that imports a backup.",       "isCommentAutoGenerated" : true+    },+    "Import complete" : {+     },     "Import Failed" : {       "comment" : "A title for the error screen when a backup import fails.",       "isCommentAutoGenerated" : true-    },-    "Import complete" : {-     },     "Importing…" : {       "comment" : "A label displayed while the backup is being imported.",@@ -1353,9 +1403,6 @@     "Move to Reading" : {       "comment" : "A button that moves a task to the \"Reading\" section.",       "isCommentAutoGenerated" : true-    },-    "Multiple Works match the parsed title. Assignment will remain unresolved." : {-     },     "Multiple chapters" : {       "comment" : "A description of a work that can have multiple chapters.",@@ -1368,6 +1415,9 @@     "Multiple saved notes" : {       "comment" : "A description of a note that has been saved more than once.",       "isCommentAutoGenerated" : true+    },+    "Multiple Works match the parsed title. Assignment will remain unresolved." : {+     },     "Name" : {       "comment" : "A label for the character's name.",@@ -1377,26 +1427,14 @@       "comment" : "A description of how names and aliases are handled when copying records.",       "isCommentAutoGenerated" : true     },-    "New Series" : {-      "comment" : "The button that adds a new series.",-      "isCommentAutoGenerated" : true-    },-    "New Work" : {-      "comment" : "The label of a button that creates a new work item.",-      "isCommentAutoGenerated" : true-    },-    "New Work title" : {-      "comment" : "The title of the text field for the title of a new work.",+    "New creator “%@”" : {+      "comment" : "A row that lets the user create a new creator. The argument is the creator's name.",       "isCommentAutoGenerated" : true     },     "New creator name" : {       "comment" : "The placeholder text for a field for a new creator's name.",       "isCommentAutoGenerated" : true     },-    "New creator “%@”" : {-      "comment" : "A row that lets the user create a new creator. The argument is the creator's name.",-      "isCommentAutoGenerated" : true-    },     "New entry" : {       "comment" : "A label for a button that creates a new entry.",       "isCommentAutoGenerated" : true@@ -1412,6 +1450,10 @@       "comment" : "A button that adds a new series.",       "isCommentAutoGenerated" : true     },+    "New Series" : {+      "comment" : "The button that adds a new series.",+      "isCommentAutoGenerated" : true+    },     "New series name" : {       "comment" : "A label for the text field for a new series name.",       "isCommentAutoGenerated" : true@@ -1420,16 +1462,17 @@       "comment" : "A label for a text field that lets the user enter a",       "isCommentAutoGenerated" : true     },-    "Next Day" : {-      "comment" : "The label of a menu item that goes to the next day.",+    "New Work" : {+      "comment" : "The label of a button that creates a new work item.",       "isCommentAutoGenerated" : true     },-    "No Reading Yet Recorded" : {-      "comment" : "A label for a view that displays a message that no",+    "New Work title" : {+      "comment" : "The title of the text field for the title of a new work.",       "isCommentAutoGenerated" : true     },-    "No Works match" : {-+    "Next Day" : {+      "comment" : "The label of a menu item that goes to the next day.",+      "isCommentAutoGenerated" : true     },     "No captures yet" : {       "comment" : "A title for a screen that shows when a user has no",@@ -1472,6 +1515,10 @@     },     "No other Works" : { +    },+    "No Reading Yet Recorded" : {+      "comment" : "A label for a view that displays a message that no",+      "isCommentAutoGenerated" : true     },     "No suggestions available" : {       "comment" : "A label that says there are no suggestions available for a work.",@@ -1491,6 +1538,9 @@     "No works in this group yet" : {       "comment" : "A message displayed when a group has no works.",       "isCommentAutoGenerated" : true+    },+    "No Works match" : {+     },     "No works match “%@”." : {       "comment" : "A message that appears when a search for a work in the library returns no results. The argument is the string “”.",@@ -1567,33 +1617,13 @@     "One chapter" : {       "comment" : "A description of a single chapter of a work.",       "isCommentAutoGenerated" : true-    },-    "Open ${work}" : {-     },     "Open %@" : {       "comment" : "A button that opens a work. The",       "isCommentAutoGenerated" : true     },-    "Open Check Library" : {-      "comment" : "A button that opens the Check Library.",-      "isCommentAutoGenerated" : true-    },-    "Open Today" : {-      "comment" : "Text for the shortcut to open the Today view.",-      "isCommentAutoGenerated" : true-    },-    "Open Work" : {-      "comment" : "Shortcut name for opening a work.",-      "isCommentAutoGenerated" : true-    },-    "Open Work %@" : {-      "comment" : "The accessibility label",-      "isCommentAutoGenerated" : true-    },-    "Open Work Page" : {-      "comment" : "The label of a button that opens a web page.",-      "isCommentAutoGenerated" : true+    "Open ${work}" : {+     },     "Open chapter" : {       "comment" : "A button that opens a chapter in a record history row.",@@ -1603,6 +1633,10 @@       "comment" : "A button that opens a chapter in a web browser.",       "isCommentAutoGenerated" : true     },+    "Open Check Library" : {+      "comment" : "A button that opens the Check Library.",+      "isCommentAutoGenerated" : true+    },     "Open destination" : {       "comment" : "A button that opens the destination work.",       "isCommentAutoGenerated" : true@@ -1635,6 +1669,10 @@       "comment" : "A link that opens a work's page on a",       "isCommentAutoGenerated" : true     },+    "Open Today" : {+      "comment" : "Text for the shortcut to open the Today view.",+      "isCommentAutoGenerated" : true+    },     "Open unattached entry %@" : {       "comment" : "A label for an accessibility element that opens an unattached note. The argument is the note's title.",       "isCommentAutoGenerated" : true@@ -1643,12 +1681,20 @@       "comment" : "A button that opens a work.",       "isCommentAutoGenerated" : true     },-    "Opening library…" : {-+    "Open Work" : {+      "comment" : "Shortcut name for opening a work.",+      "isCommentAutoGenerated" : true     },-    "Opens Asterism on the Today screen." : {-      "comment" : "Description of the \"Open Today\" intent.",+    "Open Work %@" : {+      "comment" : "The accessibility label",+      "isCommentAutoGenerated" : true+    },+    "Open Work Page" : {+      "comment" : "The label of a button that opens a web page.",       "isCommentAutoGenerated" : true+    },+    "Opening library…" : {+     },     "Opens a date picker" : {       "comment" : "A hint for a button that opens a date picker.",@@ -1658,6 +1704,10 @@       "comment" : "Intent description for opening a work in Asterism.",       "isCommentAutoGenerated" : true     },+    "Opens Asterism on the Today screen." : {+      "comment" : "Description of the \"Open Today\" intent.",+      "isCommentAutoGenerated" : true+    },     "Opens this %@'s name, aliases and note" : {       "comment" : "A hint for a line in the edit session's collection.",       "isCommentAutoGenerated" : true@@ -1803,13 +1853,13 @@     "Re-teach title pattern" : {       "comment" : "A button that triggers the user to re-teach a title pattern.",       "isCommentAutoGenerated" : true+    },+    "Reading backup…" : {+     },     "Reading Status" : {       "comment" : "The name of the reading status property.",       "isCommentAutoGenerated" : true-    },-    "Reading backup…" : {-     },     "Reading that link…" : { @@ -1869,10 +1919,6 @@       "comment" : "A button that removes a token from a list of selected tokens. The argument is the label of the token to be removed.",       "isCommentAutoGenerated" : true     },-    "Remove %@ from this chapter" : {-      "comment" : "A reader-reviewed suggestion to record that a character leaves a group in this chapter.",-      "isCommentAutoGenerated" : true-    },     "Remove alias %@" : {       "comment" : "A button that removes an alias.",       "isCommentAutoGenerated" : true@@ -2001,13 +2047,6 @@     },     "Returns %@" : { -    },-    "Review URL identity evidence and conflicts for this Work's site" : {--    },-    "Review URL identity evidence and conflicts, one of this Work's sites" : {-      "comment" : "A label for a button that opens a sheet for",-      "isCommentAutoGenerated" : true     },     "Review addition %@, %@, position %@" : {       "comment" : "A description of a review of a saved addition. The first argument is the work title. The second argument is the series label. The third argument is the series position.",@@ -2058,6 +2097,13 @@     },     "Review unavailable" : { +    },+    "Review URL identity evidence and conflicts for this Work's site" : {++    },+    "Review URL identity evidence and conflicts, one of this Work's sites" : {+      "comment" : "A label for a button that opens a sheet for",+      "isCommentAutoGenerated" : true     },     "Reviewing this addition" : {       "comment" : "A label that appears when a user is reviewing a saved addition.",@@ -2126,10 +2172,6 @@       "comment" : "The button that scans a page to find a cover.",       "isCommentAutoGenerated" : true     },-    "Search Works" : {-      "comment" : "A search bar for filtering the list of merge destinations.",-      "isCommentAutoGenerated" : true-    },     "Search or type a new name" : {       "comment" : "A placeholder for a search field in a creator picker.",       "isCommentAutoGenerated" : true@@ -2138,6 +2180,10 @@       "comment" : "A label for a search field in a work picker.",       "isCommentAutoGenerated" : true     },+    "Search Works" : {+      "comment" : "A search bar for filtering the list of merge destinations.",+      "isCommentAutoGenerated" : true+    },     "See all" : {       "comment" : "A button that shows all the work the user is behind on.",       "isCommentAutoGenerated" : true@@ -2244,14 +2290,14 @@       "comment" : "A button that skips a character review row.",       "isCommentAutoGenerated" : true     },-    "Skip Work URL for %@" : {-      "comment" : "The button text for skipping a Work's URL. The argument is the title of the Work.",-      "isCommentAutoGenerated" : true-    },     "Skip this record" : {       "comment" : "A button that either skips or copies a record.",       "isCommentAutoGenerated" : true     },+    "Skip Work URL for %@" : {+      "comment" : "The button text for skipping a Work's URL. The argument is the title of the Work.",+      "isCommentAutoGenerated" : true+    },     "Skipped character links" : {       "comment" : "A button that shows a list of skipped character links.",       "isCommentAutoGenerated" : true@@ -2272,15 +2318,15 @@     },     "Source URL (optional)" : { -    },-    "Split %@ into parts" : {-      "comment" : "A button that splits a chip into two or more parts. The argument is the name of the chip.",-      "isCommentAutoGenerated" : true     },     "Split “%@” into a Work part and a chapter part." : {       "comment" : "A description of the split editor, explaining that the user can split a long Work component into a Work part and a chapter part.",       "isCommentAutoGenerated" : true     },+    "Split %@ into parts" : {+      "comment" : "A button that splits a chip into two or more parts. The argument is the name of the chip.",+      "isCommentAutoGenerated" : true+    },     "Stats" : {       "comment" : "The title of the Stats tab.",       "isCommentAutoGenerated" : true@@ -2297,8 +2343,8 @@       "comment" : "A label for a suggested URL.",       "isCommentAutoGenerated" : true     },-    "Suggested URL" : {-      "comment" : "A label for the suggested URL for a Work.",+    "Suggested — review before saving" : {+      "comment" : "A label that indicates a suggestion.",       "isCommentAutoGenerated" : true     },     "Suggested as both a character and a place" : {@@ -2311,8 +2357,8 @@     "Suggested from your notes — review before keeping" : {      },-    "Suggested — review before saving" : {-      "comment" : "A label that indicates a suggestion.",+    "Suggested URL" : {+      "comment" : "A label for the suggested URL for a Work.",       "isCommentAutoGenerated" : true     },     "Supported spelling: %@" : {@@ -2360,10 +2406,6 @@       "comment" : "A button that opens a screen for teaching a title pattern.",       "isCommentAutoGenerated" : true     },-    "The URL rule does not resolve these captures" : {-      "comment" : "A heading for a list of unresolved captures.",-      "isCommentAutoGenerated" : true-    },     "The chapter part may be absent" : {       "comment" : "A description of the optional chapter part of a URL.",       "isCommentAutoGenerated" : true@@ -2406,6 +2448,10 @@     },     "The series is created straight away and stays even if you cancel this edit." : { +    },+    "The URL rule does not resolve these captures" : {+      "comment" : "A heading for a list of unresolved captures.",+      "isCommentAutoGenerated" : true     },     "Their names and saved details move across. Nothing is written until you tap the checkmark." : {       "comment" : "A message in the dialog that appears when the user",@@ -2499,22 +2545,18 @@     "Toggle Sidebar" : {       "comment" : "The label of a button that toggles the sidebar.",       "isCommentAutoGenerated" : true+    },+    "Try again" : {+     },     "Try Again" : {       "comment" : "A button that retries teaching after a failure.",       "isCommentAutoGenerated" : true-    },-    "Try again" : {-     },     "Type" : {       "comment" : "A picker that lets the user choose a work's type.",       "isCommentAutoGenerated" : true     },-    "URL Identity" : {-      "comment" : "The title of the review screen.",-      "isCommentAutoGenerated" : true-    },     "Undo no episode" : {       "comment" : "A button that undoes the action of marking a release as not having an episode.",       "isCommentAutoGenerated" : true@@ -2537,11 +2579,15 @@       "comment" : "A description of the user's record history being updated.",       "isCommentAutoGenerated" : true     },+    "URL Identity" : {+      "comment" : "The title of the review screen.",+      "isCommentAutoGenerated" : true+    },     "Use" : {      },-    "Use Suggested URL" : {-      "comment" : "A button that confirms a work's URL.",+    "Use “%@”" : {+      "comment" : "The text of the \"Use “...\"\" option in the",       "isCommentAutoGenerated" : true     },     "Use draft note" : {@@ -2557,6 +2603,10 @@     },     "Use saved note" : { +    },+    "Use Suggested URL" : {+      "comment" : "A button that confirms a work's URL.",+      "isCommentAutoGenerated" : true     },     "Use suggested URL for %@" : {       "comment" : "A button that lets the user confirm a suggested URL for a Work. The argument is the title of the Work.",@@ -2581,10 +2631,6 @@       "comment" : "A button that lets the user choose to use whole segments instead of parts.",       "isCommentAutoGenerated" : true     },-    "Use “%@”" : {-      "comment" : "The text of the \"Use “...\"\" option in the",-      "isCommentAutoGenerated" : true-    },     "Verdict" : {      },@@ -2610,14 +2656,25 @@     "Work" : {       "comment" : "The title of the \"Work\" field in a note.",       "isCommentAutoGenerated" : true+    },+    "Work and chapter in one component?" : {+     },     "Work ID" : { +    },+    "Work not found" : {+      "comment" : "A message that appears when a work is not found.",+      "isCommentAutoGenerated" : true     },     "Work Status" : {       "comment" : "The name of the work status property.",       "isCommentAutoGenerated" : true     },+    "Work types" : {+      "comment" : "A label for the work types section in settings.",+      "isCommentAutoGenerated" : true+    },     "Work URL" : {       "comment" : "A label for the URL of a work.",       "isCommentAutoGenerated" : true@@ -2628,17 +2685,6 @@     },     "Work URLs reviewed" : { -    },-    "Work and chapter in one component?" : {--    },-    "Work not found" : {-      "comment" : "A message that appears when a work is not found.",-      "isCommentAutoGenerated" : true-    },-    "Work types" : {-      "comment" : "A label for the work types section in settings.",-      "isCommentAutoGenerated" : true     },     "Work will be named" : {       "comment" : "A label for the preview of the work name.",@@ -2659,13 +2705,13 @@     "Working on a suggestion" : {       "comment" : "A label that appears when a suggestion is being generated.",       "isCommentAutoGenerated" : true-    },-    "Works Unavailable" : {-     },     "Works evaluated" : {       "comment" : "A label for the number of works evaluated in the review.",       "isCommentAutoGenerated" : true+    },+    "Works Unavailable" : {+     },     "You have decided every suggestion for this work." : { @@ -2705,57 +2751,7 @@     "Your link note" : {       "comment" : "A label displayed above the user's link notes.",       "isCommentAutoGenerated" : true-    },-    "also %@" : {-      "comment" : "A note that a divergent character is also known as.",-      "isCommentAutoGenerated" : true-    },-    "collapsed" : {-      "comment" : "A description of the sidebar's state when it's hidden.",-      "isCommentAutoGenerated" : true-    },-    "estimated" : {-      "comment" : "A description of a number that's not the most recent chapter.",-      "isCommentAutoGenerated" : true-    },-    "example.com or example.com/story" : {-      "comment" : "A placeholder text for the URL field of a new work form.",-      "isCommentAutoGenerated" : true-    },-    "expanded" : {-      "comment" : "A description of the sidebar's expanded state.",-      "isCommentAutoGenerated" : true-    },-    "· #%@" : {-      "comment" : "A number that indicates the chapter of a book.",-      "isCommentAutoGenerated" : true-    },-    "· #%@ (derived)" : {-      "comment" : "A number that indicates the chapter of a book.",-      "isCommentAutoGenerated" : true-    },-    "· %@" : {-      "comment" : "A chapter the rule *derived* from the",-      "isCommentAutoGenerated" : true-    },-    "“%@”" : {-      "comment" : "A note in the review view that",-      "isCommentAutoGenerated" : true-    },-    "▲" : {-      "comment" : "The up arrow.",-      "isCommentAutoGenerated" : true-    },-    "▲ %lld" : {--    },-    "▼" : {-      "comment" : "A down arrow.",-      "isCommentAutoGenerated" : true-    },-    "▼ %lld" : {-     }   },   "version" : "1.1"-}+}\ No newline at end of file
Asterism/Asterism/RuleSuggestion/RuleSuggester.swift Modified
diff --git a/Asterism/Asterism/RuleSuggestion/RuleSuggester.swift b/Asterism/Asterism/RuleSuggestion/RuleSuggester.swiftindex 715a64da..9530f1dd 100644--- a/Asterism/Asterism/RuleSuggestion/RuleSuggester.swift+++ b/Asterism/Asterism/RuleSuggestion/RuleSuggester.swift@@ -64,7 +64,7 @@ actor RuleSuggester: RuleSuggesting {     /// The projection that reads the basis: the same whole-title, no-URL request     /// `ComposedTeachingViewModel.load()` opens with, so the suggester sees the     /// hostname exactly as the editor will.-    private nonisolated static let basisRequest = ComposedTeachingRequest(+    nonisolated private static let basisRequest = ComposedTeachingRequest(         titleDefinition: .wholeTitle, trimPrefix: nil, trimSuffix: nil,         urlDefinition: nil, acknowledgeUnsettled: false) @@ -259,7 +259,7 @@ actor RuleSuggester: RuleSuggesting {         return nil     } -    private nonisolated static func describe(_ proposal: RuleProposal) -> String {+    nonisolated private static func describe(_ proposal: RuleProposal) -> String {         """         workName="\(proposal.workName)" chapterText="\(proposal.chapterText)" \         urlWorkIdentity="\(proposal.urlWorkIdentity)" urlSequenceText="\(proposal.urlSequenceText)"@@ -268,7 +268,7 @@ actor RuleSuggester: RuleSuggesting {      /// The three sets Req 3.4 tries, in order. The raw values are what the log     /// carries, which is the only reason they are strings.-    private nonisolated enum CandidateSet: String, Sendable {+    nonisolated private enum CandidateSet: String, Sendable {         case titleAndURL = "title+url"         case titleOnly = "title-only"         case urlOnly = "url-only"@@ -311,7 +311,7 @@ actor RuleSuggester: RuleSuggesting {      /// Why one projected entry disqualified a candidate set. Req 3.4 names the     /// three, and the first one that holds is the one reported.-    private nonisolated static func failure(of entry: ComposedEntryProjection) -> String {+    nonisolated private static func failure(of entry: ComposedEntryProjection) -> String {         if let titleFailure = entry.titleFailure {             return "titleFailure \(String(describing: titleFailure))"         }@@ -323,7 +323,7 @@ actor RuleSuggester: RuleSuggesting {      /// The projection carries no capture title, so the failing entry is named     /// by looking its id back up in the basis it was projected from.-    private nonisolated static func captureTitle(+    nonisolated private static func captureTitle(         of entry: ComposedEntryProjection, in basis: ComposedTeachingBasis     ) -> String {         basis.entries.first { $0.id == entry.entryID }?.captureTitle ?? "<entry not in basis>"@@ -332,7 +332,7 @@ actor RuleSuggester: RuleSuggesting {     // MARK: - Helpers      /// One URL field, located in exactly one component of the anchor URL.-    private nonisolated struct LocatedURLSpan: Sendable {+    nonisolated private struct LocatedURLSpan: Sendable {         let selection: ComposedTeachingPresentation.URLComponentSelection         /// Component-relative, never a span over the raw URL.         let range: Range<Int>@@ -342,7 +342,7 @@ actor RuleSuggester: RuleSuggesting {     /// field. Accepted only on exactly one occurrence across all of them: a     /// slug that repeats has no single span, and text the model copied out of     /// the host or the scheme is found in none (Req 3.1).-    private nonisolated static func locate(+    nonisolated private static func locate(         _ text: String, in components: RawURLLexicalComponents     ) -> LocatedURLSpan? {         guard !text.isEmpty else { return nil }@@ -373,7 +373,7 @@ actor RuleSuggester: RuleSuggesting {         return found     } -    private nonisolated static func request(+    nonisolated private static func request(         title: TitleRuleSuggestion, url: URLRuleDefinition?     ) -> ComposedTeachingRequest {         ComposedTeachingRequest(@@ -384,7 +384,7 @@ actor RuleSuggester: RuleSuggesting {      /// Req 3.4 / Q48: a single-side set fills the other slot with what the Site     /// already holds, because that is the state the reader would save.-    private nonisolated static func storedTitle(_ basis: ComposedTeachingBasis) -> TitleRuleSuggestion {+    nonisolated private static func storedTitle(_ basis: ComposedTeachingBasis) -> TitleRuleSuggestion {         guard let stored = basis.currentTitleRule else {             return TitleRuleSuggestion(definition: .wholeTitle)         }@@ -393,7 +393,7 @@ actor RuleSuggester: RuleSuggesting {             trimPrefix: stored.trimPrefix, trimSuffix: stored.trimSuffix)     } -    private nonisolated static func isUntaughtDefault(_ title: TitleRuleSuggestion) -> Bool {+    nonisolated private static func isUntaughtDefault(_ title: TitleRuleSuggestion) -> Bool {         guard case .wholeTitle = title.definition else { return false }         return (title.trimPrefix ?? "").isEmpty && (title.trimSuffix ?? "").isEmpty     }
Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swift Modified
diff --git a/Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swift b/Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swiftindex ade28fae..0412be0d 100644--- a/Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swift+++ b/Asterism/Asterism/RuleSuggestion/RuleSuggestionCoordinator.swift@@ -341,7 +341,7 @@ final class RuleSuggestionCoordinator {                     // background attempt to yield: cancel and settle on the way                     // out, which is the same two-step protocol this coordinator                     // runs for its own pre-emptions.-                    Task { @MainActor in self?.attemptTask?.cancel() }+                    Task { @MainActor [weak self] in self?.attemptTask?.cancel() }                 }             } catch {                 RuleSuggestionLog.note("\(hostname): lane claim withdrawn before the model call")
Asterism/Asterism/Support/BackgroundExportScheduler.swift Modified
diff --git a/Asterism/Asterism/Support/BackgroundExportScheduler.swift b/Asterism/Asterism/Support/BackgroundExportScheduler.swiftindex 394ed4e2..bdb06364 100644--- a/Asterism/Asterism/Support/BackgroundExportScheduler.swift+++ b/Asterism/Asterism/Support/BackgroundExportScheduler.swift@@ -15,9 +15,8 @@ import os /// request carrying the same identifier, so all three are idempotent and "at /// most one" comes free. ///-/// `submit()` is synchronous. `BGTaskScheduler.submit(_:)` is not deprecated on-/// the iOS 26 SDK (Decision 2); if a later SDK deprecates it, this class is the-/// one place that changes.+/// `submit()` initiates a request synchronously; iOS 27 reports completion+/// asynchronously so all refusal conditions can be logged. @MainActor final class BackgroundExportScheduler { @@ -45,7 +44,7 @@ final class BackgroundExportScheduler {      /// The seam. Injected so the refusal path is testable without a real     /// scheduler, which refuses everything on a simulator anyway.-    private let submitter: (BGAppRefreshTaskRequest) throws -> Void+    private let submitter: ((BGAppRefreshTaskRequest) throws -> Void)?      /// How many refusals this scheduler has logged. One, at most (Req 3.3).     ///@@ -54,7 +53,7 @@ final class BackgroundExportScheduler {     /// holds exactly one scheduler.     private(set) var loggedRefusals = 0 -    init(submitter: @escaping (BGAppRefreshTaskRequest) throws -> Void = BGTaskScheduler.shared.submit) {+    init(submitter: ((BGAppRefreshTaskRequest) throws -> Void)? = nil) {         self.submitter = submitter     } @@ -70,20 +69,38 @@ final class BackgroundExportScheduler {     /// foreground app is untouched (Req 3.3).     func submit() {         let request = BGAppRefreshTaskRequest(identifier: Self.identifier)-        do {-            try submitter(request)-        } catch {-            guard loggedRefusals == 0 else { return }-            loggedRefusals += 1-            Self.logger.error(-                """-                Background export refresh request refused: \-                \(error.localizedDescription, privacy: .public). \-                Captures will reach CloudKit at the next foreground open.-                """)+        if let submitter {+            do {+                try submitter(request)+            } catch {+                recordRefusal(error)+            }+        } else {+            let identifier = request.identifier+            // The SDK explicitly prohibits initiating this API on the main+            // thread. Construct the non-Sendable request inside its task.+            Task.detached { [weak self, identifier] in+                let request = BGAppRefreshTaskRequest(identifier: identifier)+                do {+                    try await BGTaskScheduler.shared.submitTaskRequest(request)+                } catch {+                    await self?.recordRefusal(error)+                }+            }         }     } +    private func recordRefusal(_ error: any Error) {+        guard loggedRefusals == 0 else { return }+        loggedRefusals += 1+        Self.logger.error(+            """+            Background export refresh request refused: \+            \(error.localizedDescription, privacy: .public). \+            Captures will reach CloudKit at the next foreground open.+            """)+    }+     /// The declared identifier, or a trap naming the break in the chain.     ///     /// The ladder itself — missing, not a string, empty, unexpanded — is
Asterism/Asterism/Support/SettingsToolbarActions.swift Modified
diff --git a/Asterism/Asterism/Support/SettingsToolbarActions.swift b/Asterism/Asterism/Support/SettingsToolbarActions.swiftindex 6dbd94eb..1652c9cd 100644--- a/Asterism/Asterism/Support/SettingsToolbarActions.swift+++ b/Asterism/Asterism/Support/SettingsToolbarActions.swift@@ -50,7 +50,7 @@ final class SettingsToolbarActions { }  extension EnvironmentValues {-    @Entry var nativeSettingsToolbar: SettingsToolbarActions? = nil+    @Entry var nativeSettingsToolbar: SettingsToolbarActions? }  private struct NativeSettingsBackControl: ViewModifier {
Asterism/Asterism/ViewModels/AppLibraryModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/AppLibraryModel.swift b/Asterism/Asterism/ViewModels/AppLibraryModel.swiftindex 0dbbcdb7..2e88e264 100644--- a/Asterism/Asterism/ViewModels/AppLibraryModel.swift+++ b/Asterism/Asterism/ViewModels/AppLibraryModel.swift@@ -3625,11 +3625,11 @@ public final class AppLibraryModel {         try await seedTodayCatchUpWork(             title: "Harbor Signal", latest: 8, lastRead: 8,             releaseDays: [], confirmedAt: confirmedAt, in: repo)+        Self.logger.debug("Seeded the today UI test fixture")         #else         throw LibraryRepositoryError.invalidInput(             operation: operation, reason: "the today fixture requires a debug build")         #endif-        Self.logger.debug("Seeded the today UI test fixture")     }      /// Two due works with no notes: one pending and one already marked, so UI@@ -3830,12 +3830,12 @@ public final class AppLibraryModel {         #if DEBUG || ASTERISM_PERFORMANCE_TESTING         _ = try await repo.seedUnresolvedSeriesReferences(             workID: lantern, linkType: "alternate version")+        Self.logger.debug("Seeded the series UI test fixture")         #else         throw LibraryRepositoryError.invalidInput(             operation: "preparing UI test fixture",             reason: "the series fixture requires a debug build")         #endif-        Self.logger.debug("Seeded the series UI test fixture")     }      /// Isolated copy fixtures use only ordinary repository writes. URL-free@@ -4014,12 +4014,12 @@ public final class AppLibraryModel {         #if DEBUG || ASTERISM_PERFORMANCE_TESTING         _ = try await repo.seedUnresolvedCreditReferences(             workID: ember, creatorID: mori, roleIDs: [author])+        Self.logger.debug("Seeded the work-creators UI test fixture")         #else         throw LibraryRepositoryError.invalidInput(             operation: operation,             reason: "the creators fixture requires a debug build")         #endif-        Self.logger.debug("Seeded the work-creators UI test fixture")     }      /// One work of that fixture: a capture, a work on the same site, the move
Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swift b/Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swiftindex 63f1b860..3700d198 100644--- a/Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swift+++ b/Asterism/Asterism/ViewModels/CharacterGroupEditorModel.swift@@ -125,8 +125,7 @@ final class CharacterGroupEditorModel: Identifiable {     init(workID: UUID, group: GroupSummary? = nil, draft: CharacterGroupDraft? = nil,          onStage: @escaping @MainActor (CharacterGroupDraft) -> Void) {         self.workID = workID; self.onStage = onStage-        if let draft { original = draft.original }-        else { original = group }+        if let draft { original = draft.original } else { original = group }         groupID = draft?.groupID ?? group?.groupID ?? UUID()         name = draft?.name ?? group?.name ?? ""         aliases = draft?.aliases ?? group?.aliases.joined(separator: "\n") ?? ""
Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swift b/Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swiftindex 7f22f83f..19c4c07b 100644--- a/Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swift+++ b/Asterism/Asterism/ViewModels/ComposedTeachingViewModel.swift@@ -346,7 +346,7 @@ public final class ComposedTeachingViewModel {     /// One capture the candidate URL rule does not resolve, named individually.     /// A count cannot be checked against anything, and one message per Work hides     /// the captures inside it (Req 3.4).-    public nonisolated struct UnresolvedURLCapture: Equatable, Sendable, Identifiable {+    nonisolated public struct UnresolvedURLCapture: Equatable, Sendable, Identifiable {         public let entryID: UUID         public let captureTitle: String         public let rawURLString: String@@ -356,7 +356,7 @@ public final class ComposedTeachingViewModel {     }      /// One capture whose identity key this commit changes (Reqs 3.5, 3.6).-    public nonisolated struct IdentityKeyChange: Equatable, Sendable, Identifiable {+    nonisolated public struct IdentityKeyChange: Equatable, Sendable, Identifiable {         public let entryID: UUID         public let captureTitle: String         public let fromVersion: Int@@ -373,7 +373,7 @@ public final class ComposedTeachingViewModel {     /// The preview's derived collections. Computed once per outcome rather than     /// per property access: each derivation walks every entry, and a single     /// render pass of the preview section reads several of these properties.-    private nonisolated struct PreviewReport {+    nonisolated private struct PreviewReport {         var unresolved: [UnresolvedURLCapture] = []         var keyChanges: [IdentityKeyChange] = []         var rows: [ComposedEntryProjection] = []@@ -388,7 +388,7 @@ public final class ComposedTeachingViewModel {     /// `.create`, and the previous Work for the rest. `projectedWorkID` is nil     /// for "no projected change" and must not be read as "post-commit     /// attachment".-    public nonisolated struct WorkAttachment: Equatable, Sendable {+    nonisolated public struct WorkAttachment: Equatable, Sendable {         public let before: String?         public let after: String?         /// Whether the commit moves this capture to a different Work. Read off
Asterism/Asterism/ViewModels/EntryDetailModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/EntryDetailModel.swift b/Asterism/Asterism/ViewModels/EntryDetailModel.swiftindex bf2e7b3b..77323628 100644--- a/Asterism/Asterism/ViewModels/EntryDetailModel.swift+++ b/Asterism/Asterism/ViewModels/EntryDetailModel.swift@@ -131,7 +131,8 @@ public final class EntryDetailModel {     func correctionForm() -> EntryCorrectionFormModel? {         entry.map { EntryCorrectionFormModel(entry: $0, library: library, onMutation: { [weak self] in             await self?.load(); await self?.onMutation()-        }) }+        })+        }     }     private let library: any LibraryProviding     public private(set) var chapterAssociations: [ChapterAssociationSnapshot] = []
Asterism/Asterism/ViewModels/MaintenanceViewModels.swift Modified
diff --git a/Asterism/Asterism/ViewModels/MaintenanceViewModels.swift b/Asterism/Asterism/ViewModels/MaintenanceViewModels.swiftindex 13c5873a..93fb17f4 100644--- a/Asterism/Asterism/ViewModels/MaintenanceViewModels.swift+++ b/Asterism/Asterism/ViewModels/MaintenanceViewModels.swift@@ -222,8 +222,7 @@ public final class LibraryDiagnosticsModel {         var records: [String: [LibraryDiagnosticRecord]] = [:]         var readNotice: String?         if !diagnostics.isEmpty {-            do { records = try await library.diagnosticRecords(for: diagnostics.diagnoses) }-            catch { readNotice = "Record details could not be loaded. Try again to see the affected records." }+            do { records = try await library.diagnosticRecords(for: diagnostics.diagnoses) } catch { readNotice = "Record details could not be loaded. Try again to see the affected records." }         }         let workload = await library.duplicateWorkload         guard token == loadGeneration, !Task.isCancelled else { return }@@ -656,7 +655,7 @@ public final class LibraryDiagnosticsModel { public final class RecalculationViewModel: Identifiable {     private static let logger = Logger(subsystem: "me.nore.ig.Asterism", category: "RecalculationViewModel") -    public nonisolated let id = UUID()+    nonisolated public let id = UUID()      public enum State: Equatable, Sendable {         case loading
Asterism/Asterism/ViewModels/ManualEntryFormModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/ManualEntryFormModel.swift b/Asterism/Asterism/ViewModels/ManualEntryFormModel.swiftindex 91ddc7ae..761324bf 100644--- a/Asterism/Asterism/ViewModels/ManualEntryFormModel.swift+++ b/Asterism/Asterism/ViewModels/ManualEntryFormModel.swift@@ -42,8 +42,7 @@ final class ManualEntryFormModel {         projection?.entries.filter { !$0.requiresReview && ($0.target?.kind == kind || ($0.target == nil && kind == .chapter)) } ?? []     }     func load() async {-        do { projection = try await library.projectManualEntry(workID: workID) }-        catch { errorMessage = error.localizedDescription }+        do { projection = try await library.projectManualEntry(workID: workID) } catch { errorMessage = error.localizedDescription }     }     func choose(_ id: UUID?) {         existingEntryID = id; needsContentChoice = false@@ -53,8 +52,7 @@ final class ManualEntryFormModel {             title = entry.target?.title ?? ""             isPrefilling = false         }-        if !hasEditedContent { prefill(entry) }-        else { needsContentChoice = note != entry.note || rating != entry.rating }+        if !hasEditedContent { prefill(entry) } else { needsContentChoice = note != entry.note || rating != entry.rating }     }     func chooseContent(_ choice: EntryCorrectionContentChoice) {         if choice == .destination, let entry = selectedEntry { prefill(entry) }
Asterism/Asterism/ViewModels/MarkdownExportModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/MarkdownExportModel.swift b/Asterism/Asterism/ViewModels/MarkdownExportModel.swiftindex 32c0fabb..0156360a 100644--- a/Asterism/Asterism/ViewModels/MarkdownExportModel.swift+++ b/Asterism/Asterism/ViewModels/MarkdownExportModel.swift@@ -87,7 +87,7 @@ public final class MarkdownExportModel {      /// Where exports are staged, given the library's root (design: under     /// `Library/Caches`, beside the backup exporter's own directory).-    public nonisolated static func stagingDirectory(inRoot rootDirectory: URL) -> URL {+    nonisolated public static func stagingDirectory(inRoot rootDirectory: URL) -> URL {         rootDirectory.appending(path: "Library/Caches/MarkdownExports")     } @@ -201,8 +201,7 @@ public final class MarkdownExportModel {         isAwaitingShareOutcome = false         state = .idle         if let exportedFileURL {-            if ownedInvocationDirectory != nil { removeOwnedInvocation() }-            else { try? FileManager.default.removeItem(at: exportedFileURL) }+            if ownedInvocationDirectory != nil { removeOwnedInvocation() } else { try? FileManager.default.removeItem(at: exportedFileURL) }         }         exportedFileURL = nil     }
Asterism/Asterism/ViewModels/SetLatestModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/SetLatestModel.swift b/Asterism/Asterism/ViewModels/SetLatestModel.swiftindex 7493fae6..b4cc3677 100644--- a/Asterism/Asterism/ViewModels/SetLatestModel.swift+++ b/Asterism/Asterism/ViewModels/SetLatestModel.swift@@ -118,8 +118,7 @@ final class SetLatestModel {         errorMessage = nil         defer { isSaving = false }         let override: OverrideEdit-        if !overrideEdited { override = .unchanged }-        else if overrideText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {+        if !overrideEdited { override = .unchanged } else if overrideText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {             override = .clear         } else {             override = .set(parsed(overrideText)!)
Asterism/Asterism/ViewModels/SettingsBackupImportModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/SettingsBackupImportModel.swift b/Asterism/Asterism/ViewModels/SettingsBackupImportModel.swiftindex 2e1535ad..d874dfec 100644--- a/Asterism/Asterism/ViewModels/SettingsBackupImportModel.swift+++ b/Asterism/Asterism/ViewModels/SettingsBackupImportModel.swift@@ -15,7 +15,7 @@ public protocol BackupDocumentReading: Sendable {  /// Production document reader that validates security-scoped access. public struct SecurityScopedDocumentReader: BackupDocumentReading, Sendable {-    public nonisolated init() {}+    nonisolated public init() {}      public func readData(from url: URL) throws -> Data {         guard url.startAccessingSecurityScopedResource() else {@@ -73,7 +73,7 @@ public protocol BackupImportCommitting: Sendable { public struct LibraryImportCommitter: BackupImportCommitting, Sendable {     private let repository: any LibraryProviding -    public nonisolated init(repository: any LibraryProviding) {+    nonisolated public init(repository: any LibraryProviding) {         self.repository = repository     } 
Asterism/Asterism/ViewModels/WorkMergeModel.swift Modified
diff --git a/Asterism/Asterism/ViewModels/WorkMergeModel.swift b/Asterism/Asterism/ViewModels/WorkMergeModel.swiftindex d1ba611d..ebdf335b 100644--- a/Asterism/Asterism/ViewModels/WorkMergeModel.swift+++ b/Asterism/Asterism/ViewModels/WorkMergeModel.swift@@ -186,7 +186,7 @@ public final class WorkMergeModel {     /// The wording of a destination refusal, shared with the to-read card's     /// blocked choices (`to-read-capture-match` Req 3.4), so the two surfaces     /// say the same thing about the same refusal. Nil for `.available`.-    public nonisolated static func refusalMessage(+    nonisolated public static func refusalMessage(         for availability: DestinationAvailability     ) -> String? {         switch availability {
Asterism/Asterism/Views/ComposedTeachingPresentation.swift Modified
diff --git a/Asterism/Asterism/Views/ComposedTeachingPresentation.swift b/Asterism/Asterism/Views/ComposedTeachingPresentation.swiftindex 4f9e5b6a..a8ffc23c 100644--- a/Asterism/Asterism/Views/ComposedTeachingPresentation.swift+++ b/Asterism/Asterism/Views/ComposedTeachingPresentation.swift@@ -34,13 +34,13 @@ public enum ComposedTeachingPresentation {      /// `nonisolated`: reached from the nonisolated `URLEditorState` through     /// `anchoringPendingNotice`, and constant.-    public nonisolated static let workSlotLabel = "Work identity"+    nonisolated public static let workSlotLabel = "Work identity"     /// `nonisolated` for the same reason as `workSlotLabel`.-    public nonisolated static let sequenceSlotLabel = "Chapter sequence"+    nonisolated public static let sequenceSlotLabel = "Chapter sequence"      /// `nonisolated`: reached from the nonisolated `URLEditorState` through     /// `anchoringPendingNotice`, and pure.-    public nonisolated static func slotLabel(for slot: URLSlot) -> String {+    nonisolated public static func slotLabel(for slot: URLSlot) -> String {         switch slot {         case .work: workSlotLabel         case .sequence: sequenceSlotLabel@@ -53,19 +53,19 @@ public enum ComposedTeachingPresentation {     /// Req 1.3's first ground: the pair is a locator the representation admits,     /// it just does not say which component of *this* URL is meant.     /// `nonisolated`: read by the nonisolated `URLEditorState`, and constant.-    public nonisolated static let anchoringDoesNotResolveNotice =+    nonisolated public static let anchoringDoesNotResolveNotice =         "That choice doesn't pick out this part of the URL on its own. Choose a different one."      /// Req 1.3's second ground. Always the both-sides-unanchored combination,     /// which the representation refuses even where it would resolve (Q8).     /// `nonisolated` for the same reason as `anchoringDoesNotResolveNotice`.-    public nonisolated static let anchoringUnrepresentableNotice =+    nonisolated public static let anchoringUnrepresentableNotice =         "A URL rule has to be anchored on at least one side. Pin one side to its neighbour or to the path's edge."      /// Req 1.4: no anchoring the representation admits singles this component     /// out on this URL — both its neighbours are empty, or it repeats.     /// `nonisolated` for the same reason as `anchoringDoesNotResolveNotice`.-    public nonisolated static let componentUnauthorableNotice =+    nonisolated public static let componentUnauthorableNotice =         "No anchoring can pick out this part of the URL. Choose a different part."      /// Req 1.7: a stored anchoring the controls cannot show, so nothing is@@ -77,12 +77,12 @@ public enum ComposedTeachingPresentation {     /// it (Non-Goals). Reachable only by asking for an anchoring on a query     /// selection, which the controls never offer.     /// `nonisolated` for the same reason as `anchoringDoesNotResolveNotice`.-    public nonisolated static let anchoringNotApplicableNotice =+    nonisolated public static let anchoringNotApplicableNotice =         "This part of the URL has a name of its own, so there is nothing to anchor it against."      /// Req 1.8's commit refusal, naming the incomplete side. `nonisolated`:     /// called from the nonisolated `URLEditorState`, and pure.-    public nonisolated static func anchoringPendingNotice(+    nonisolated public static func anchoringPendingNotice(         slot: URLSlot, missing: Set<AnchorSide>     ) -> String {         let phrase: String@@ -118,7 +118,7 @@ public enum ComposedTeachingPresentation {     /// What one side's anchoring menu shows: the anchor on its face, and whether     /// that anchor is the default in force rather than a decision the reader     /// made. `nil` is "Choose…".-    public nonisolated struct AnchorRowState: Equatable, Sendable {+    nonisolated public struct AnchorRowState: Equatable, Sendable {         public let anchor: PathAnchor?         public let isDefault: Bool @@ -140,7 +140,7 @@ public enum ComposedTeachingPresentation {     /// Takes the slot's resolution rather than deriving it, so both of a slot's     /// rows are read off one derivation. `nonisolated`: pure, and exercised from     /// a nonisolated test suite.-    public nonisolated static func anchorRowState(+    nonisolated public static func anchorRowState(         anchoring: SlotAnchoring, resolution: URLLocatorResolution?, side: AnchorSide     ) -> AnchorRowState {         guard anchoring.retainedLocator == nil || anchoring.edited else { return .undecided }@@ -174,7 +174,7 @@ public enum ComposedTeachingPresentation {      /// `nonisolated`: called from `ComposedTeachingViewModel`'s nonisolated     /// locator descriptions, and pure.-    public nonisolated static func describe(left anchor: PathAnchor) -> String {+    nonisolated public static func describe(left anchor: PathAnchor) -> String {         switch anchor {         case .start: "at the start of the path"         case .literal(let value): "after “\(value.value)”"@@ -185,7 +185,7 @@ public enum ComposedTeachingPresentation {     }      /// `nonisolated` for the same reason as `describe(left:)`.-    public nonisolated static func describe(right anchor: PathAnchor) -> String {+    nonisolated public static func describe(right anchor: PathAnchor) -> String {         switch anchor {         case .end: "at the end of the path"         case .literal(let value): "before “\(value.value)”"@@ -212,7 +212,7 @@ public enum ComposedTeachingPresentation {     /// Character ranges of the maximal alphanumeric runs in a component — the     /// tappable tokens of the split editor. Everything between is separator text.     /// `nonisolated`: reached from the nonisolated `titleChips`, and pure.-    public nonisolated static func tokenRanges(in componentText: String) -> [Range<Int>] {+    nonisolated public static func tokenRanges(in componentText: String) -> [Range<Int>] {         var ranges: [Range<Int>] = []         var runStart: Int?         for (offset, character) in componentText.enumerated() {@@ -230,7 +230,7 @@ public enum ComposedTeachingPresentation {     /// The span that results from tapping one token while a contiguous token span     /// is selected. The span never becomes empty. `nonisolated`: called from the     /// nonisolated `URLEditorState` transitions, and pure.-    public nonisolated static func adjustedSpan(+    nonisolated public static func adjustedSpan(         togglingTokenAt index: Int, tokens: [Range<Int>], current: Range<Int>     ) -> Range<Int> {         guard tokens.indices.contains(index) else { return current }@@ -247,7 +247,7 @@ public enum ComposedTeachingPresentation {     /// Initial Work/sequence ranges when splitting a single component into a     /// combined template. Falls back to everything-but-the-last versus the last.     /// `nonisolated`: called from the nonisolated `URLEditorState`, and pure.-    public nonisolated static func defaultSplitSelection(for componentText: String) -> URLTwoFieldSelection {+    nonisolated public static func defaultSplitSelection(for componentText: String) -> URLTwoFieldSelection {         let characters = Array(componentText)         let separatorIndices = characters.indices.filter {             !(characters[$0].isLetter || characters[$0].isNumber)@@ -280,7 +280,7 @@ public enum ComposedTeachingPresentation {     /// Used for the unteachable-shape message (Req 2.5, Q10): a capture whose     /// URL carries no chapter part cannot express a combined rule, and the     /// reader is told so instead of being offered an editor that cannot work.-    public nonisolated static func canAuthorSplit(in componentText: String) -> Bool {+    nonisolated public static func canAuthorSplit(in componentText: String) -> Bool {         let candidate = defaultSplitSelection(for: componentText)         return (try? URLTwoFieldTemplateDeriver.derive(             from: ExactScalarString(componentText), selection: candidate,@@ -293,7 +293,7 @@ public enum ComposedTeachingPresentation {     /// `nonisolated`: the app target defaults to main-actor isolation, and the     /// synthesized `==` has to be usable off the main actor — `RuleSuggestionAssembler`     /// compares these values on the suggester actor.-    public nonisolated struct TitleSegment: Equatable, Sendable {+    nonisolated public struct TitleSegment: Equatable, Sendable {         public let text: String         public let range: Range<Int>     }@@ -302,7 +302,7 @@ public enum ComposedTeachingPresentation {     /// or one **part** (maximal alphanumeric run) of a segment the reader has     /// subdivided in place.     /// `nonisolated` for the same reason as `TitleSegment`.-    public nonisolated struct TitleChip: Equatable, Sendable {+    nonisolated public struct TitleChip: Equatable, Sendable {         public let text: String         /// Character range within the example title.         public let range: Range<Int>@@ -316,7 +316,7 @@ public enum ComposedTeachingPresentation {     /// The title rule a chip selection authors. The form is inferred from the     /// selection and never chosen by the reader (Req 8.6).     /// `nonisolated` for the same reason as `TitleSegment`.-    public nonisolated struct InferredTitleRule: Equatable, Sendable {+    nonisolated public struct InferredTitleRule: Equatable, Sendable {         public let definition: PatternDefinition         public let trimPrefix: String?         public let trimSuffix: String?@@ -343,7 +343,7 @@ public enum ComposedTeachingPresentation {     /// The example title's delimiter-split segments with their character ranges.     /// A title the tokenizer rejects is one segment covering the whole title.     /// `nonisolated`: reached from the nonisolated `inferenceOutcome`, and pure.-    public nonisolated static func titleSegments(in title: String) -> [TitleSegment] {+    nonisolated public static func titleSegments(in title: String) -> [TitleSegment] {         let whole = [TitleSegment(text: title, range: 0..<title.count)]         guard case .success(let tokenized) = DelimiterTokenizer.tokenize(title),               tokenized.segments.count == tokenized.delimiters.count + 1 else { return whole }@@ -364,7 +364,7 @@ public enum ComposedTeachingPresentation {     /// in place: the subdivided segment's chip is replaced by its part chips in     /// the same row (Req 8.3 — no sheet, no second screen).     /// `nonisolated`: reached from the nonisolated `titleSelection`, and pure.-    public nonisolated static func titleChips(segments: [TitleSegment], subdividing: Set<Int>) -> [TitleChip] {+    nonisolated public static func titleChips(segments: [TitleSegment], subdividing: Set<Int>) -> [TitleChip] {         var chips: [TitleChip] = []         for (index, segment) in segments.enumerated() {             let parts = tokenRanges(in: segment.text)@@ -411,7 +411,7 @@ public enum ComposedTeachingPresentation {     /// author a legal rule; the caller uses that to make such selections     /// unreachable rather than reporting a validation error afterwards.     /// `nonisolated`: called off the main actor by `RuleSuggestionAssembler`, and pure.-    public nonisolated static func inferredTitleRule(+    nonisolated public static func inferredTitleRule(         title: String, segments: [TitleSegment], chips: [TitleChip], roles: [SegmentRole]     ) -> InferredTitleRule? {         inferenceOutcome(title: title, segments: segments, chips: chips, roles: roles).rule@@ -523,7 +523,7 @@ public enum ComposedTeachingPresentation {     /// span — used to re-seed the selector from the rule a Site already holds.     /// Segments a span cuts through are subdivided so the boundary is expressible.     /// `nonisolated`: called off the main actor by `RuleSuggestionAssembler`, and pure.-    public nonisolated static func titleSelection(+    nonisolated public static func titleSelection(         in title: String, workSpan: Range<Int>, chapterSpan: Range<Int>?     ) -> (subdivided: Set<Int>, roles: [SegmentRole]) {         let segments = titleSegments(in: title)@@ -548,7 +548,7 @@ public enum ComposedTeachingPresentation {     // MARK: - Title selection helpers (private)      /// `nonisolated`: called from the nonisolated `inferenceOutcome`, and pure.-    private nonisolated static func segmentFormRule(+    nonisolated private static func segmentFormRule(         segments: [TitleSegment], chips: [TitleChip], roles: [SegmentRole], hasChapter: Bool     ) -> InferredTitleRule? {         guard let definition = segmentDefinition(@@ -564,7 +564,7 @@ public enum ComposedTeachingPresentation {     /// edge-trim branch gives the segment its kept run's role). Segments no whole     /// chip covers stay `.ignore`. `nonisolated`: reached from the nonisolated     /// `inferenceOutcome`, and pure.-    private nonisolated static func segmentRoles(+    nonisolated private static func segmentRoles(         chips: [TitleChip], roles: [SegmentRole], count: Int     ) -> [SegmentRole] {         var segmentRoles = [SegmentRole](repeating: .ignore, count: count)@@ -578,7 +578,7 @@ public enum ComposedTeachingPresentation {     /// whole-segment branch and the edge-trim branch — the latter passing the     /// **post-trim** segment texts (Req 3.4, Q10). `nonisolated`: reached from     /// the nonisolated `inferenceOutcome`, and pure.-    private nonisolated static func segmentDefinition(+    nonisolated private static func segmentDefinition(         texts: [String], segmentRoles: [SegmentRole], hasChapter: Bool     ) -> PatternDefinition? {         guard hasChapter else {@@ -601,7 +601,7 @@ public enum ComposedTeachingPresentation {     /// (Req 3.2), or nil when the trigger does not fire or a guard refuses the     /// derivation. Expects the **reclassified** chip row. `nonisolated`: called     /// from the nonisolated `inferenceOutcome`, and pure.-    private nonisolated static func edgeTrimRule(+    nonisolated private static func edgeTrimRule(         title: String, segments: [TitleSegment], chips: [TitleChip], roles: [SegmentRole]     ) -> InferredTitleRule? {         // Decision 3: the trigger needs at least one whole-segment field@@ -682,7 +682,7 @@ public enum ComposedTeachingPresentation {     /// when the segment is not subdivided, carries no kept chip, or its marking     /// is not such a run. `nonisolated`: reached from the nonisolated     /// `inferenceOutcome`, and pure.-    private nonisolated static func edgeRun(+    nonisolated private static func edgeRun(         chips: [TitleChip], roles: [SegmentRole], segmentIndex: Int, trailing: Bool     ) -> Range<Int>? {         let group = chips.indices.filter { chips[$0].isPart && chips[$0].segmentIndex == segmentIndex }@@ -712,20 +712,20 @@ public enum ComposedTeachingPresentation {     }      /// `nonisolated`: reached from the nonisolated `inferenceOutcome`, and pure.-    private nonisolated static func isContiguous(_ indices: [Int]) -> Bool {+    nonisolated private static func isContiguous(_ indices: [Int]) -> Bool {         guard let first = indices.first, let last = indices.last else { return true }         return indices.count == last - first + 1     }      /// Whether a span's boundary falls strictly inside a segment.     /// `nonisolated`: called from the nonisolated `titleSelection`, and pure.-    private nonisolated static func splits(_ segment: Range<Int>, by span: Range<Int>) -> Bool {+    nonisolated private static func splits(_ segment: Range<Int>, by span: Range<Int>) -> Bool {         (span.lowerBound > segment.lowerBound && span.lowerBound < segment.upperBound)             || (span.upperBound > segment.lowerBound && span.upperBound < segment.upperBound)     }      /// `nonisolated`: reached from the nonisolated `titleSegments`, and pure.-    private nonisolated static func characterOffsetsByScalarOffset(in title: String) -> [Int: Int] {+    nonisolated private static func characterOffsetsByScalarOffset(in title: String) -> [Int: Int] {         var offsets: [Int: Int] = [:]         var scalarOffset = 0         for (characterOffset, character) in title.enumerated() {
Asterism/Asterism/Views/ComposedURLEditorState.swift Modified
diff --git a/Asterism/Asterism/Views/ComposedURLEditorState.swift b/Asterism/Asterism/Views/ComposedURLEditorState.swiftindex 971ab9f2..1911279b 100644--- a/Asterism/Asterism/Views/ComposedURLEditorState.swift+++ b/Asterism/Asterism/Views/ComposedURLEditorState.swift@@ -7,25 +7,25 @@ extension ComposedTeachingPresentation {     /// `nonisolated` because the app target defaults to main-actor isolation, and     /// a main-actor-isolated `Equatable` conformance cannot be used from a     /// nonisolated context — which is where these values are compared.-    public nonisolated enum URLComponentSelection: Equatable, Sendable {+    nonisolated public enum URLComponentSelection: Equatable, Sendable {         case path(Int)         case query(Int)     }      /// Which field the next chip tap fills.-    public nonisolated enum URLSlot: Equatable, Sendable { case work, sequence }+    nonisolated public enum URLSlot: Equatable, Sendable { case work, sequence }      /// Which side of a selected path component an anchoring choice applies to.     /// `nonisolated` for the same reason `URLComponentSelection` is: the app     /// target defaults to main-actor isolation, and these values are compared —     /// and hashed, into `URLLocatorResolution.pending` — from nonisolated code.-    public nonisolated enum AnchorSide: Equatable, Hashable, Sendable, CaseIterable {+    nonisolated public enum AnchorSide: Equatable, Hashable, Sendable, CaseIterable {         case left, right     }      /// One slot's anchoring: the in-force side values plus the stored locator     /// the slot retains while it cannot be shown in full (Decision 6).-    public nonisolated struct SlotAnchoring: Equatable, Sendable {+    nonisolated public struct SlotAnchoring: Equatable, Sendable {         /// In force = reader-chosen, or reflected from a stored locator at seed         /// time; the two are stored identically, so Req 1.9's survival rule         /// covers both. `nil` = no preference, and the default function decides@@ -77,7 +77,7 @@ extension ComposedTeachingPresentation {     /// Why a transition was refused, with the reader-facing wording that names     /// the ground (Reqs 1.3, 1.4). Carried back rather than thrown: a refusal is     /// an answer to a gesture, not an error condition.-    public nonisolated struct TransitionRefusal: Equatable, Sendable {+    nonisolated public struct TransitionRefusal: Equatable, Sendable {         public enum Ground: Equatable, Sendable {             /// The candidate does not resolve exactly once, at the selected             /// component, on the URL it is being taught from.@@ -92,16 +92,11 @@ extension ComposedTeachingPresentation {          public let ground: Ground         public let message: String--        init(ground: Ground, message: String) {-            self.ground = ground-            self.message = message-        }     }      /// What one slot authors. Decision 5's four outcomes collapse to three here:     /// the default and an in-force pair both produce `.locator`.-    public nonisolated enum URLLocatorResolution: Equatable, Sendable {+    nonisolated public enum URLLocatorResolution: Equatable, Sendable {         case locator(URLComponentLocator)         /// Several anchorings qualify and they mean different things, so the         /// reader decides (Req 1.2 outcome 3 / Req 1.8).@@ -118,7 +113,7 @@ extension ComposedTeachingPresentation {     /// `chapterUnsourced`, the collapsed summary and request construction all     /// read as "the reader cleared it". Pending could therefore never gate     /// commit with an explanation, so the status is typed.-    public nonisolated enum URLRuleStatus: Equatable, Sendable {+    nonisolated public enum URLRuleStatus: Equatable, Sendable {         case cleared         case valid(URLRuleDefinition)         /// An anchoring pair is half-chosen; the message names the incomplete@@ -145,7 +140,7 @@ extension ComposedTeachingPresentation {     /// rides beside it on its own channel, shown by the split editor and nowhere     /// else. Making it a fourth status would block the commit on a message about     /// an editor the reader may have already left.-    public nonisolated struct URLRuleOutcome: Equatable, Sendable {+    nonisolated public struct URLRuleOutcome: Equatable, Sendable {         public let status: URLRuleStatus         public let splitErrorMessage: String? @@ -164,7 +159,7 @@ extension ComposedTeachingPresentation {     /// the gesture path itself is testable. A test that hand-builds a definition     /// passes while the editor still drops the reader's template (Req 3.7), so     /// the tests drive this type rather than the definitions it produces.-    public nonisolated struct URLEditorState: Equatable, Sendable {+    nonisolated public struct URLEditorState: Equatable, Sendable {         public var activeSlot: URLSlot = .work         public private(set) var work: URLComponentSelection?         public private(set) var sequence: URLComponentSelection?@@ -799,7 +794,7 @@ extension ComposedTeachingPresentation {     ///     /// "Resolves at exactly the selected index" is `bracketedIndices == [index]`     /// **and** a non-blank component there.-    public nonisolated static func bracketedIndices(+    nonisolated public static func bracketedIndices(         left: PathAnchor, right: PathAnchor, in components: RawURLLexicalComponents     ) -> [Int] {         let path = components.pathComponents@@ -808,7 +803,7 @@ extension ComposedTeachingPresentation {         }     } -    private nonisolated static func matches(+    nonisolated private static func matches(         left anchor: PathAnchor, at index: Int, in path: [ExactScalarString]     ) -> Bool {         switch anchor {@@ -820,7 +815,7 @@ extension ComposedTeachingPresentation {         }     } -    private nonisolated static func matches(+    nonisolated private static func matches(         right anchor: PathAnchor, at index: Int, in path: [ExactScalarString]     ) -> Bool {         switch anchor {@@ -843,7 +838,7 @@ extension ComposedTeachingPresentation {     /// Kept as the one-argument convenience the pure builder tests and the     /// template helpers use: the Work slot, with no anchoring in force, taking     /// only what the default function authors outright.-    public nonisolated static func urlLocator(+    nonisolated public static func urlLocator(         for selection: URLComponentSelection, in components: RawURLLexicalComponents     ) -> URLComponentLocator? {         guard case .locator(let locator) = urlLocatorResolution(@@ -866,7 +861,7 @@ extension ComposedTeachingPresentation {     /// A retained stored locator is *not* consulted here; slot resolution     /// (`URLEditorState.resolution(for:in:)`) handles that row of the table     /// before reaching this function.-    public nonisolated static func urlLocatorResolution(+    nonisolated public static func urlLocatorResolution(         for selection: URLComponentSelection, slot: URLSlot, anchoring: SlotAnchoring,         in components: RawURLLexicalComponents     ) -> URLLocatorResolution {@@ -907,7 +902,7 @@ extension ComposedTeachingPresentation {     /// the immediately neighbouring component's literal where that neighbour     /// exists and is not blank, the path boundary where the component is first     /// or last, and unanchored.-    public nonisolated static func offeredAnchors(+    nonisolated public static func offeredAnchors(         side: AnchorSide, at index: Int, in components: RawURLLexicalComponents     ) -> [PathAnchor] {         let path = components.pathComponents
Asterism/Asterism/Views/EntryDetailView.swift Modified
diff --git a/Asterism/Asterism/Views/EntryDetailView.swift b/Asterism/Asterism/Views/EntryDetailView.swiftindex 76012293..2160688c 100644--- a/Asterism/Asterism/Views/EntryDetailView.swift+++ b/Asterism/Asterism/Views/EntryDetailView.swift@@ -114,8 +114,7 @@ struct EntryDetailView: View {         // reaches the screen. In the wide tree the window owns it (Req 3.1).         .screenSky(showsSky)         .task(id: snapshotGeneration) {-            if model.entry == nil { await model.load() }-            else { await model.refreshAssociations() }+            if model.entry == nil { await model.load() } else { await model.refreshAssociations() }         }         .sheet(isPresented: Binding(get: { associationEditor != nil }, set: { if !$0 { associationEditor = nil } })) {             if let associationEditor {
Asterism/Asterism/Views/RecordCopyOfferView.swift Modified
diff --git a/Asterism/Asterism/Views/RecordCopyOfferView.swift b/Asterism/Asterism/Views/RecordCopyOfferView.swiftindex 1526f38d..c5b5e8cd 100644--- a/Asterism/Asterism/Views/RecordCopyOfferView.swift+++ b/Asterism/Asterism/Views/RecordCopyOfferView.swift@@ -6,7 +6,7 @@ import SwiftUI struct RecordCopyOfferView: View {   @State var coordinator: RecordCopyOfferCoordinator   let onSuccess: (WorkRecordCopyModel.Success) -> Void-  var onCheckLibrary: ((WorkRecordCopyModel) -> Void)? = nil+  var onCheckLibrary: ((WorkRecordCopyModel) -> Void)?   @Environment(\.dismiss) private var dismiss   @Environment(\.locale) private var locale   @Environment(\.siteNames) private var siteNames
Asterism/Asterism/Views/SettingsView.swift Modified
diff --git a/Asterism/Asterism/Views/SettingsView.swift b/Asterism/Asterism/Views/SettingsView.swiftindex 5cc5871e..e1744f1a 100644--- a/Asterism/Asterism/Views/SettingsView.swift+++ b/Asterism/Asterism/Views/SettingsView.swift@@ -972,8 +972,7 @@ struct SettingsView: View {     /// The probe, run and worded. A static function rather than a closure at the     /// property so the `@State` initializer stays one line.     private static func thumbnailProbeSentence() async -> String {-        do { return try await ThumbnailStoreProbe.run().sentence }-        catch { return "Probe failed: \(error.localizedDescription)" }+        do { return try await ThumbnailStoreProbe.run().sentence } catch { return "Probe failed: \(error.localizedDescription)" }     }     #endif 
Asterism/Asterism/Views/SkippedCharacterLinksView.swift Modified
diff --git a/Asterism/Asterism/Views/SkippedCharacterLinksView.swift b/Asterism/Asterism/Views/SkippedCharacterLinksView.swiftindex 7a70acf6..fe1a0139 100644--- a/Asterism/Asterism/Views/SkippedCharacterLinksView.swift+++ b/Asterism/Asterism/Views/SkippedCharacterLinksView.swift@@ -20,8 +20,7 @@ struct SkippedCharacterLinksView: View {                             .disabled(model.isSubmitting)                     }                 }-                if model.state == .loading { ProgressView("Loading skipped links…") }-                else if model.state == .ready, model.links.isEmpty {+                if model.state == .loading { ProgressView("Loading skipped links…") } else if model.state == .ready, model.links.isEmpty {                     Text("No supported skipped character links").accessibilityIdentifier("skipped-links-empty")                 }                 ForEach(model.links) { link in
Asterism/Asterism/Views/TodaySections.swift Modified
diff --git a/Asterism/Asterism/Views/TodaySections.swift b/Asterism/Asterism/Views/TodaySections.swiftindex ebf90d27..e59f5681 100644--- a/Asterism/Asterism/Views/TodaySections.swift+++ b/Asterism/Asterism/Views/TodaySections.swift@@ -23,9 +23,9 @@ struct TodayHeader: View {     let onSelectToday: () -> Void     /// Nil in the wide tree, whose sidebar carries Settings.     let onShowSettings: (() -> Void)?-    var titlePointSize: CGFloat? = nil-    var exportDateText: String? = nil-    var onExportNotes: (() -> Void)? = nil+    var titlePointSize: CGFloat?+    var exportDateText: String?+    var onExportNotes: (() -> Void)?     var exportBusy = false     var exportPreparing = false     @ScaledMetric(relativeTo: .largeTitle) private var titleScale: CGFloat = 1@@ -122,7 +122,7 @@ struct TodayCover: View {     let hostname: String     let baseSize: CGSize     let cornerRadius: CGFloat-    var isDrawn: Binding<Bool>? = nil+    var isDrawn: Binding<Bool>?      /// The same Dynamic Type probe `ThumbnailSlot` sizes itself by, so the     /// placeholder and the picture agree on the slot.@@ -315,7 +315,7 @@ struct ReleaseShelfItem: View { struct CatchUpCard: View {     /// Already in card order (`CatchUpText.ordered`).     let rows: [ReleaseRow]-    var onSeeAll: (() -> Void)? = nil+    var onSeeAll: (() -> Void)?     let selectedDay: CivilDay     let currentDay: CivilDay     let calendar: Calendar@@ -722,13 +722,11 @@ struct TodayEntryPills: View {     }      @ViewBuilder private func pillLabel(_ title: String) -> some View {-        if usesGlass { Text(title).font(.caption.weight(.semibold)) }-        else { Text(title).constellationPill(.attention) }+        if usesGlass { Text(title).font(.caption.weight(.semibold)) } else { Text(title).constellationPill(.attention) }     }      @ViewBuilder private func attentionButton<Label: View>(_ button: Button<Label>) -> some View {-        if usesGlass { button.buttonStyle(.glass).tint(AsterismColors.amberText) }-        else { button.buttonStyle(.plain) }+        if usesGlass { button.buttonStyle(.glass).tint(AsterismColors.amberText) } else { button.buttonStyle(.plain) }     } } 
Asterism/Asterism/Views/WorkRecordCopyView.swift Modified
diff --git a/Asterism/Asterism/Views/WorkRecordCopyView.swift b/Asterism/Asterism/Views/WorkRecordCopyView.swiftindex dcc138c4..f8b48106 100644--- a/Asterism/Asterism/Views/WorkRecordCopyView.swift+++ b/Asterism/Asterism/Views/WorkRecordCopyView.swift@@ -6,8 +6,8 @@ import SwiftUI struct WorkRecordCopyView: View {   @State var model: WorkRecordCopyModel   let onSuccess: (WorkRecordCopyModel.Success) -> Void-  var onCancel: (() -> Void)? = nil-  var onCheckLibrary: (() -> Void)? = nil+  var onCancel: (() -> Void)?+  var onCheckLibrary: (() -> Void)?   @Environment(\.dismiss) private var dismiss   @Environment(\.siteNames) private var siteNames   @Environment(\.locale) private var locale
Asterism/Asterism/Views/WorksGroupView.swift Modified
diff --git a/Asterism/Asterism/Views/WorksGroupView.swift b/Asterism/Asterism/Views/WorksGroupView.swiftindex a12b39eb..296b572b 100644--- a/Asterism/Asterism/Views/WorksGroupView.swift+++ b/Asterism/Asterism/Views/WorksGroupView.swift@@ -160,8 +160,7 @@ struct WorksSearchContent<Hub: View>: View {                             HStack {                                 Button("Move to Reading") {                                     Task {-                                        do { _ = try await library.onSetReadingStatus(work.id, .reading) }-                                        catch { statusError = error.localizedDescription }+                                        do { _ = try await library.onSetReadingStatus(work.id, .reading) } catch { statusError = error.localizedDescription }                                     }                                 }                                 Button("Not yet") { library.onSetLatest(work.id) }
Asterism/Asterism/Views/WorksStatusSheet.swift Modified
diff --git a/Asterism/Asterism/Views/WorksStatusSheet.swift b/Asterism/Asterism/Views/WorksStatusSheet.swiftindex 61282b94..9e13e236 100644--- a/Asterism/Asterism/Views/WorksStatusSheet.swift+++ b/Asterism/Asterism/Views/WorksStatusSheet.swift@@ -21,8 +21,7 @@ struct WorksStatusSheet: View {                     if let prompt = ReadingStatusPresentation.verdictPrompt(model.draftReadingStatus) {                         TextField(prompt, text: $model.draftVerdict, axis: .vertical)                     }-                } else if loading { ProgressView() }-                else if model.isReadOnly {+                } else if loading { ProgressView() } else if model.isReadOnly {                     Text("Resolve this work's conflicting copies before changing its status.")                 }                 if let error = model.errorMessage { Text(error).foregroundStyle(AsterismColors.amberText) }
Asterism/Asterism/Views/WorksView.swift Modified
diff --git a/Asterism/Asterism/Views/WorksView.swift b/Asterism/Asterism/Views/WorksView.swiftindex 73072f3e..68740fe4 100644--- a/Asterism/Asterism/Views/WorksView.swift+++ b/Asterism/Asterism/Views/WorksView.swift@@ -195,7 +195,7 @@ struct WorksView: View {                             (ReadingStatusPresentation.systemImage(group == .finished ? .finished : .abandoned) ?? "book.closed"),                             count: group.members(of: snapshot.works, on: currentDay).count, id: group.rawValue) {                                 select(.group(group))-                            }+                        }                     }                     Divider().overlay(AsterismColors.cardBorder)                     destinationRow("All works", symbol: "sparkles", count: snapshot.works.count, id: "allWorks") {@@ -437,7 +437,7 @@ struct WorkRow: View {     /// of `series-and-related-works`). Off while the Works list is grouped by     /// series, where the section header above the row already says it.     var showsSeries: Bool = true-    var detailText: String? = nil+    var detailText: String?     var showsNewToday: Bool = false      /// Req 2.7: a position is read in the viewing locale, so the row that shows@@ -549,7 +549,7 @@ struct WorkRowHeader<Meta: View, Trailing: View, Detail: View>: View {     let isKnockedDown: Bool     /// Every site to name in full, or nil to stand in for the first with a     /// glyph — which is what the library list does (Req 9.2).-    var sites: [String]? = nil+    var sites: [String]?     @ViewBuilder let meta: () -> Meta     @ViewBuilder let trailing: () -> Trailing     @ViewBuilder let detail: () -> Detail
Asterism/AsterismTests/AddPageToReadFlowTests.swift Modified
diff --git a/Asterism/AsterismTests/AddPageToReadFlowTests.swift b/Asterism/AsterismTests/AddPageToReadFlowTests.swiftindex 3457fbc2..8044c34e 100644--- a/Asterism/AsterismTests/AddPageToReadFlowTests.swift+++ b/Asterism/AsterismTests/AddPageToReadFlowTests.swift@@ -20,6 +20,7 @@ struct AddPageToReadFlowTests {      /// What the prompts and the fetcher were asked, in order, and what they     /// answer.+    @MainActor     private final class Script {         var events: [String] = []         var url = URL(string: "https://example.com/story")!
Asterism/AsterismTests/AnnouncementDocumentViewTests.swift Modified
diff --git a/Asterism/AsterismTests/AnnouncementDocumentViewTests.swift b/Asterism/AsterismTests/AnnouncementDocumentViewTests.swiftindex b7b99213..889b61d5 100644--- a/Asterism/AsterismTests/AnnouncementDocumentViewTests.swift+++ b/Asterism/AsterismTests/AnnouncementDocumentViewTests.swift@@ -8,6 +8,7 @@ import Testing /// bundled versions (`today-announcements` Q7, Q25), the inline-styling /// fallback, and the name a UI journey finds the view by. @Suite("Announcement document view")+@MainActor struct AnnouncementDocumentViewTests {     private let catalog = AnnouncementCatalog(filenames: [         "release-notes-0.7.0.md", "release-notes-0.9.0.md", "release-notes-0.10.0.md",
Asterism/AsterismTests/AppGroupAvailabilityTests.swift Modified
diff --git a/Asterism/AsterismTests/AppGroupAvailabilityTests.swift b/Asterism/AsterismTests/AppGroupAvailabilityTests.swiftindex 97a14f43..e714dcf3 100644--- a/Asterism/AsterismTests/AppGroupAvailabilityTests.swift+++ b/Asterism/AsterismTests/AppGroupAvailabilityTests.swift@@ -31,7 +31,7 @@ struct AppGroupAvailabilityTests {         func containerURL(forAppGroup identifier: String) -> URL? { root }     } -    private static let identifier = "group.me.nore.ig.Asterism.test"+    private static let identifier = "group.me.nore.ig.apps.Asterism.test"      // MARK: - Which platform asks the question 
Asterism/AsterismTests/AppLibraryModelTests.swift Modified
diff --git a/Asterism/AsterismTests/AppLibraryModelTests.swift b/Asterism/AsterismTests/AppLibraryModelTests.swiftindex e1202f6b..a3887d38 100644--- a/Asterism/AsterismTests/AppLibraryModelTests.swift+++ b/Asterism/AsterismTests/AppLibraryModelTests.swift@@ -1442,7 +1442,7 @@ struct AppLibraryModelSnapshotPublicationTests {         // exactly what the notification does: the reader steps off a plane and         // the read already in flight is bucketing entries under the old zone.         mock.worksResult = .success(Self.seededWorks(title: "Second Work"))-        mock.duringTodayPresentation = { inForce.calendar = after }+        mock.duringTodayPresentation = { [after] in inForce.calendar = after }          await model.refreshAll() 
Asterism/AsterismTests/AssociationNoteEditorTests.swift Modified
diff --git a/Asterism/AsterismTests/AssociationNoteEditorTests.swift b/Asterism/AsterismTests/AssociationNoteEditorTests.swiftindex 52d78426..8e3a9755 100644--- a/Asterism/AsterismTests/AssociationNoteEditorTests.swift+++ b/Asterism/AsterismTests/AssociationNoteEditorTests.swift@@ -25,8 +25,7 @@ struct AssociationNoteEditorTests {         await model.load(); model.draftText = "Unsaved exact draft"         #expect(model.hasUnsavedChanges)         #expect(mock.associationNoteWrites.isEmpty)-        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved == basis) }-        else { Issue.record("Loading/editing must not mutate configured saved basis") }+        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved == basis) } else { Issue.record("Loading/editing must not mutate configured saved basis") }     }     @Test @MainActor func canonicallyEquivalentDraftIsMeaningfulAndSavePreservesExactBytes() async {         let (model, mock, basis) = fixture()@@ -89,8 +88,7 @@ struct AssociationNoteEditorTests {         await model.load(); model.stageClear()         #expect(model.displayedHeads == basis.heads && model.basis == basis)         #expect(mock.associationNoteClears.isEmpty && mock.associationNoteWrites.isEmpty && mock.associationNoteRecoveries.isEmpty)-        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved?.heads == basis.heads) }-        else { Issue.record("A field Clear/Cancel must preserve saved heads") }+        if case .success(let saved) = mock.associationNoteBasisResult { #expect(saved?.heads == basis.heads) } else { Issue.record("A field Clear/Cancel must preserve saved heads") }     }     @Test @MainActor func initialDelayedLoadDisablesEditingAndSaveUntilBasisArrives() async throws {         let (model, mock, _) = fixture()
Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swift Modified
diff --git a/Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swift b/Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swiftindex ee7e2747..85792baa 100644--- a/Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swift+++ b/Asterism/AsterismTests/CharacterExtractionCoordinatorTests.swift@@ -65,7 +65,7 @@ struct CharacterExtractionCoordinatorTests {     // MARK: - Fixtures      /// One work, one generic-notes source, nothing covered and nothing known.-    private nonisolated static func candidate(+    nonisolated private static func candidate(         workID: UUID = UUID(),         title: String = "A Work",         recency: TimeInterval = 0,@@ -92,7 +92,7 @@ struct CharacterExtractionCoordinatorTests {             suppressions: [.character: suppressions, .place: placeSuppressions])     } -    private nonisolated static func groupChapterCandidate(workID: UUID, chapterID: UUID,+    nonisolated private static func groupChapterCandidate(workID: UUID, chapterID: UUID,         note: String = "Missha joins Team Loser.",         knownGroupNames: [String] = [],         characters: [MatchTarget] = [],@@ -102,17 +102,18 @@ struct CharacterExtractionCoordinatorTests {             recency: Date(timeIntervalSince1970: 0), sources: [                 CharacterExtractionSource(ref: .entry(chapterID), text: note,                     fingerprint: fingerprint, coveredFingerprint: nil,-                    isChapter: true, knownGroupNames: knownGroupNames)], records: [+                    isChapter: true, knownGroupNames: knownGroupNames)+            ], records: [                         .character: characters-                    ], acceptedFacts: [:], suppressions: [+            ], acceptedFacts: [:], suppressions: [                         .character: characterSuppressions-                    ], knownGroupNames: knownGroupNames)+            ], knownGroupNames: knownGroupNames)     }      /// One work whose two sources both name "Bay", so the pass can hold a     /// dual-kind row from one response and a plain place row from the other —     /// the shape Q56's cross-kind discard is about.-    private nonisolated static func bayCandidate(+    nonisolated private static func bayCandidate(         workID: UUID, entryID: UUID     ) -> ExtractionCandidate {         let notes = "Bay smiles at the harbour."@@ -139,7 +140,7 @@ struct CharacterExtractionCoordinatorTests {     /// The generic notes return "Bay" under both kinds — Req 1.5's union row,     /// displayed as a character (Q20) — and the chapter returns it as a place     /// only, which is its own row under its own key.-    private nonisolated static let bayScript: [StubCharacterExtractionModelClient.ScriptedResult] = [+    nonisolated private static let bayScript: [StubCharacterExtractionModelClient.ScriptedResult] = [         .success(ExtractionResult(             characters: [                 ExtractedCharacter(@@ -163,7 +164,7 @@ struct CharacterExtractionCoordinatorTests {      /// One work with **two** uncovered sources, so a stop taken between them is     /// observable at all: the per-work guard cannot see it.-    private nonisolated static func twoSourceCandidate(+    nonisolated private static func twoSourceCandidate(         workID: UUID, entryID: UUID, recency: TimeInterval = 0     ) -> ExtractionCandidate {         let notes = "Ada carried the lantern."@@ -187,7 +188,7 @@ struct CharacterExtractionCoordinatorTests {             suppressions: [:])     } -    private nonisolated static func result(+    nonisolated private static func result(         _ name: String = "Ada", statement: String = "Ada carried a lantern.",         quote: String = "Ada carried the lantern",         places: [ExtractedPlace] = []
Asterism/AsterismTests/CharacterGroupEditorTests.swift Modified
diff --git a/Asterism/AsterismTests/CharacterGroupEditorTests.swift b/Asterism/AsterismTests/CharacterGroupEditorTests.swiftindex ead82997..085a1414 100644--- a/Asterism/AsterismTests/CharacterGroupEditorTests.swift+++ b/Asterism/AsterismTests/CharacterGroupEditorTests.swift@@ -45,12 +45,14 @@ import Testing         let first = CharacterGroupEditorModel(workID: workID, group: group) { staged = $0 }         first.name = "Jake's Team"         #expect(await first.save())-        let second = CharacterGroupEditorModel(workID: workID, group: group, draft: try #require(staged)) {-            staged = $0+        var secondStage: CharacterGroupDraft?+        let firstStage = try #require(staged)+        let second = CharacterGroupEditorModel(workID: workID, group: group, draft: firstStage) {+            secondStage = $0         }         second.aliases = "The Team\nNight Crew"         #expect(await second.save())-        let operations = try #require(staged).operations+        let operations = try #require(secondStage).operations         #expect(operations.filter {             if case .fact(_, _, .setName) = $0 { return true }             return false@@ -123,8 +125,9 @@ import Testing         #expect(await editor.save())         #expect(staged?.operations.contains { if case .reviseTransition = $0 { return true }; return false } == false) +        let savedStage = try #require(staged)         let nested = CharacterGroupEditorModel(workID: workID, group: group,-            draft: try #require(staged)) { staged = $0 }+            draft: savedStage) { staged = $0 }         nested.chooseConflictChapter(rootID, chapterID: secondChapter)         #expect(!(await nested.save()))         #expect(nested.errorMessage != nil)@@ -134,7 +137,8 @@ import Testing         #expect(staged?.operations.contains(.reviseTransition(rootID: rootID,             expectedEventIDs: basis, chapterID: secondChapter, action: .join)) == true)         #expect(staged?.previewTransitions.contains { $0.rootID == rootID &&-            $0.chapterID == secondChapter && $0.action == .join } == true)+            $0.chapterID == secondChapter && $0.action == .join+        } == true)          let remove = CharacterGroupEditorModel(workID: workID, group: group) { staged = $0 }         remove.toggleConflictRemoval(rootID)
Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swift Modified
diff --git a/Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swift b/Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swiftindex e7f8f8df..3b543c7c 100644--- a/Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swift+++ b/Asterism/AsterismTests/CharacterGroupReviewPresentationTests.swift@@ -2,7 +2,7 @@ import AsterismIntelligence import Testing @testable import Asterism -@Suite struct CharacterGroupReviewPresentationTests {+@Suite @MainActor struct CharacterGroupReviewPresentationTests {     @Test("A leave review states the character remains through the named chapter")     func leaveCaptionUsesInclusiveBoundary() {         #expect(GroupReviewActionCaption.text(kind: .leave, characterName: "Ainar") ==
Asterism/AsterismTests/CharacterReviewModelTests.swift Modified
diff --git a/Asterism/AsterismTests/CharacterReviewModelTests.swift b/Asterism/AsterismTests/CharacterReviewModelTests.swiftindex 6d4722de..d379e0e3 100644--- a/Asterism/AsterismTests/CharacterReviewModelTests.swift+++ b/Asterism/AsterismTests/CharacterReviewModelTests.swift@@ -21,20 +21,20 @@ struct CharacterReviewModelTests {      /// The row identity every identifier is built from: the **assembled** kind     /// and the name key (Q28).-    private nonisolated static func rowID(+    nonisolated private static func rowID(         _ nameKey: String, _ kind: RecordKind = .character     ) -> String {         ProposalKey(kind: kind, nameKey: nameKey).rowID     } -    private nonisolated static func fact(+    nonisolated private static func fact(         _ statement: String, quote: String, key: String = "ada",         source: SourceRef = .genericNotes     ) -> GroundedFact {         GroundedFact(nameKey: key, statement: statement, quote: quote, source: source)     } -    private nonisolated static func candidate(+    nonisolated private static func candidate(         name: String = "Ada", key: String = "ada", kind: RecordKind = .character,         aliases: [String] = [],         facts: [GroundedFact]? = nil,@@ -53,7 +53,7 @@ struct CharacterReviewModelTests {      /// One record the work already has, of either kind — what a bundle is drawn     /// against and what a reclassify preview resolves onto.-    private nonisolated static func record(+    nonisolated private static func record(         id: UUID, kind: RecordKind = .character, name: String = "Ada",         nameKey: String? = nil, aliases: [String] = [], facts: [RecordFact] = [], note: String = ""     ) -> WorkRecordPresentation {@@ -71,14 +71,14 @@ struct CharacterReviewModelTests {                 kind: kind, recordID: id, name: name, note: note, aliases: aliases, facts: facts))     } -    private nonisolated static func character(+    nonisolated private static func character(         id: UUID, name: String = "Ada", facts: [RecordFact] = []     ) -> WorkRecordPresentation {         record(id: id, kind: .character, name: name, facts: facts)     }      /// The suppression half of a candidate read, as the coordinator retains it.-    private nonisolated static func context(+    nonisolated private static func context(         suppressedFacts: [RecordKind: Set<RecordFactIdentity>] = [:]     ) -> CharacterExtractionContext {         CharacterExtractionContext(@@ -103,7 +103,7 @@ struct CharacterReviewModelTests {         return (model, mock)     } -    private nonisolated static func groupSuggestion(workID: UUID, chapterID: UUID) -> GroundedGroupSuggestion {+    nonisolated private static func groupSuggestion(workID: UUID, chapterID: UUID) -> GroundedGroupSuggestion {         let source = ExtractionSource(workID: workID, workTitle: "Story", source: .entry(chapterID),             text: "Missha joins Team Loser.", fingerprint: "saved", isChapter: true)         return GroupExtractionGrounding.ground(ExtractionResult(groupJoins: [@@ -116,20 +116,20 @@ struct CharacterReviewModelTests {         let work = UUID(), chapter = UUID()         let proposal = Self.groupSuggestion(workID: work, chapterID: chapter)         let library = MockLibraryProvider()-        var shouldCommit = false+        let shouldCommit = ReviewFixtureValue(false)         var decisions: [String] = []         let model = CharacterReviewModel(workID: work, proposals: [], groupProposals: [proposal],             characters: [], library: library, extractionContext: { nil },             onDecision: { _, _ in }, onReRoute: { _, _ in }, onReclassify: { _, _, _ in },             refresh: { [] }, onGroupDecision: { id, _ in                 decisions.append(id)-                return shouldCommit ? .committed(groupIDs: [UUID()]) : .refused(.stale)+                return shouldCommit.value ? .committed(groupIDs: [UUID()]) : .refused(.stale)             }, currentHeldGroups: { [proposal] })         #expect(!model.isEmpty)         await model.acceptGroup(proposal.id)         #expect(model.groupRows.count == 1)         #expect(model.disclosure != nil)-        shouldCommit = true+        shouldCommit.value = true         await model.acceptGroup(proposal.id)         #expect(model.isEmpty)         #expect(decisions == [proposal.id, proposal.id])@@ -385,7 +385,7 @@ struct CharacterReviewModelTests {     /// The library row an activation sweep reads, naming Ada in the generic     /// notes. `characters` are the work's existing characters, which is what     /// decides whether the assembled proposal is a candidate or a bundle.-    private nonisolated static func extractionCandidate(+    nonisolated private static func extractionCandidate(         workID: UUID,         notes: String = "Ada keeps the light.",         characters: [MatchTarget] = []@@ -405,7 +405,7 @@ struct CharacterReviewModelTests {             suppressions: [:])     } -    private nonisolated static func workPresentation(+    nonisolated private static func workPresentation(         workID: UUID, characters: [WorkRecordPresentation],         places: [WorkRecordPresentation] = []     ) -> WorkDetailPresentation {@@ -853,14 +853,14 @@ struct CharacterReviewModelTests {     func snapshotAtOpen() {         let workID = UUID()         let mock = MockLibraryProvider()-        nonisolated(unsafe) var latest = [Self.candidate(name: "Ada", key: "ada")]+        let latest = ReviewFixtureValue([Self.candidate(name: "Ada", key: "ada")])         let model = CharacterReviewModel(-            workID: workID, proposals: latest, characters: [], library: mock,+            workID: workID, proposals: latest.value, characters: [], library: mock,             extractionContext: { nil },             onDecision: { _, _ in }, onReRoute: { _, _ in }, onReclassify: { _, _, _ in },-            refresh: { latest })+            refresh: { latest.value }) -        latest.append(Self.candidate(name: "Brede", key: "brede"))+        latest.value.append(Self.candidate(name: "Brede", key: "brede"))          #expect(model.rows.map(\.name) == ["Ada"])     }@@ -1451,3 +1451,9 @@ struct CharacterReviewModelTests {         #expect(mock.committedDecisions.count == 1)     } }+++@MainActor private final class ReviewFixtureValue<Value> {+    var value: Value+    init(_ value: Value) { self.value = value }+}
Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swift Modified
diff --git a/Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swift b/Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swiftindex 115e5ee4..03ff87dc 100644--- a/Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swift+++ b/Asterism/AsterismTests/ConflictRecentEntryDetailPresentationTests.swift@@ -8,6 +8,7 @@ import Testing /// warnings, reachable records/actions, sequence precedence/actionability, rule /// disclosure, reload recovery, appearances, and accessibility. @Suite("ConflictRecentEntryDetailPresentation")+@MainActor struct ConflictRecentEntryDetailPresentationTests {      // MARK: - Fixtures
Asterism/AsterismTests/DuplicateSurfaceTests.swift Modified
diff --git a/Asterism/AsterismTests/DuplicateSurfaceTests.swift b/Asterism/AsterismTests/DuplicateSurfaceTests.swiftindex 1034f721..328696a7 100644--- a/Asterism/AsterismTests/DuplicateSurfaceTests.swift+++ b/Asterism/AsterismTests/DuplicateSurfaceTests.swift@@ -15,6 +15,7 @@ import Testing /// it was not showing (Req 4.6); and Check Library names a route instead of /// saying no merge exists (Req 9.3). @Suite("Duplicate reader surfaces")+@MainActor struct DuplicateSurfaceTests {      // MARK: - DuplicateResolutionModel (Requirement 4)@@ -316,11 +317,13 @@ struct DuplicateSurfaceTests {         model.delete()          #expect(mock.deleteEntryCallCount == 0)-        let disclosure = try? #require(model.deleteDisclosure)-        #expect(disclosure?.variants.count == 2)+        guard let disclosure = model.deleteDisclosure else {+            Issue.record("Expected delete disclosure"); return+        }+        #expect(disclosure.variants.count == 2)         // The alert lists what each copy holds, which is the disclosure.-        #expect(disclosure?.lines.contains { $0.contains("first note") } == true)-        #expect(disclosure?.lines.contains { $0.contains("second note") } == true)+        #expect(disclosure.lines.contains { $0.contains("first note") } == true)+        #expect(disclosure.lines.contains { $0.contains("second note") } == true)     }      @Test("Confirming the disclosure passes exactly the variants it listed")@@ -446,10 +449,12 @@ struct DuplicateSurfaceTests {             .torn(recordID: entry.id, variants: []), recordType: .entry)         #expect(app.duplicateBannerCount == 1) -        let detail = try? #require(app.entryDetailModel(for: entry.id))-        await detail?.load()-        detail?.draftNote = "saved again"-        await detail?.update()+        guard let detail = app.entryDetailModel(for: entry.id) else {+            Issue.record("Expected entry detail model"); return+        }+        await detail.load()+        detail.draftNote = "saved again"+        await detail.update()          #expect(app.pendingConflicts.isEmpty)         #expect(app.duplicateBannerCount == 0)@@ -468,9 +473,11 @@ struct DuplicateSurfaceTests {         app.recordConflict(             .survivorDiverged(recordID: UUID(), survivorID: survivor.id), recordType: .entry) -        let detail = try? #require(app.entryDetailModel(for: survivor.id))-        await detail?.load()-        await detail?.update()+        guard let detail = app.entryDetailModel(for: survivor.id) else {+            Issue.record("Expected entry detail model"); return+        }+        await detail.load()+        await detail.update()          #expect(app.pendingConflicts.isEmpty)     }
Asterism/AsterismTests/IntentLibraryBrokerTests.swift Modified
diff --git a/Asterism/AsterismTests/IntentLibraryBrokerTests.swift b/Asterism/AsterismTests/IntentLibraryBrokerTests.swiftindex d42ddce7..519f9b60 100644--- a/Asterism/AsterismTests/IntentLibraryBrokerTests.swift+++ b/Asterism/AsterismTests/IntentLibraryBrokerTests.swift@@ -91,7 +91,7 @@ struct IntentLibraryBrokerTests {         return !entered.events.isEmpty     } -    private nonisolated static func draft(_ title: String) -> NewWorkDraft {+    nonisolated private static func draft(_ title: String) -> NewWorkDraft {         NewWorkDraft(             displayTitle: title, hostname: "https://example.com/\(UUID())", readingStatus: .toRead)     }@@ -105,7 +105,7 @@ struct IntentLibraryBrokerTests {         var calendar = Calendar(identifier: .gregorian)         calendar.timeZone = TimeZone(identifier: "Pacific/Auckland")! -        _ = try await model.intentBroker.withPreparedToday(calendar: calendar) { library in+        _ = try await model.intentBroker.withPreparedToday(calendar: calendar) { [calendar] library in             try await library.todayPresentation(calendar: calendar)         } 
Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swift Modified
diff --git a/Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swift b/Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swiftindex d1e8d0e4..c227207e 100644--- a/Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swift+++ b/Asterism/AsterismTests/NoteFirstCharacterRoutingTests.swift@@ -88,7 +88,7 @@ struct NoteFirstCharacterRoutingTests {     private func insertIncomingChapter(_ fixture: Fixture) async throws -> UUID {         let id = UUID(), workID = fixture.workID         let stamp = try await fixture.repository.entry(id: fixture.entryID).modifiedAt.addingTimeInterval(1)-        try await fixture.repository.withLockedContext(mode: .exclusive, operation: "seeding incoming chapter") { context in+        try await fixture.repository.withLockedContext(mode: .exclusive, operation: "seeding incoming chapter") { @Sendable context in             let work = try #require(try context.fetch(FetchDescriptor<Work>(predicate: #Predicate { $0.id == workID })).first)             let row = Entry(id: id, captureTitle: "", captureTitleSource: .manual,                 rawURLString: "", hostname: "", entryIdentityKey: "", timestamp: stamp,@@ -329,8 +329,7 @@ struct NoteFirstCharacterRoutingTests {             owner.reclassify(captured.key, for: fixture.workID, to: .place, target: nil)         }         gate.open(); await reconcile.value-        if skip { #expect(owner.held(for: fixture.workID).isEmpty) }-        else {+        if skip { #expect(owner.held(for: fixture.workID).isEmpty) } else {             #expect(owner.held(for: fixture.workID).map(\.key) == [captured.key])             #expect(owner.held(for: fixture.workID).first?.displayedKind == .place)         }@@ -391,8 +390,7 @@ struct NoteFirstCharacterRoutingTests {         let deadline = ContinuousClock.now.advanced(by: .seconds(5))         while !entered.withLock({ $0 }) && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(2)) }         try #require(entered.withLock { $0 })-        if change { owner.reclassify(characterKey, for: fixture.workID, to: .place, target: nil) }-        else { owner.discard(characterKey, for: fixture.workID) }+        if change { owner.reclassify(characterKey, for: fixture.workID, to: .place, target: nil) } else { owner.discard(characterKey, for: fixture.workID) }         gate.open(); await reconcile.value         let retained = try #require(owner.held(for: fixture.workID).first { $0.kind == .place })         #expect(retained.citedRevisions == originalPlace.citedRevisions)
Asterism/AsterismTests/OpenTargetFlowTests.swift Modified
diff --git a/Asterism/AsterismTests/OpenTargetFlowTests.swift b/Asterism/AsterismTests/OpenTargetFlowTests.swiftindex ac6169e4..fa2776ab 100644--- a/Asterism/AsterismTests/OpenTargetFlowTests.swift+++ b/Asterism/AsterismTests/OpenTargetFlowTests.swift@@ -37,7 +37,7 @@ struct OpenTargetFlowTests {      /// `nonisolated`: it is a default argument, which is evaluated outside the     /// suite's main actor.-    private nonisolated static let work = WorkSummary(+    nonisolated private static let work = WorkSummary(         id: UUID(), displayTitle: "Open Serial", readingStatus: .reading, workStatus: .ongoing)      private func harness(holding works: [WorkSummary] = [work]) -> (Harness, MockLibraryProvider) {
Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swift Modified
diff --git a/Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swift b/Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swiftindex d7b0419f..ed16aade 100644--- a/Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swift+++ b/Asterism/AsterismTests/PostTeachingWorkURLHandoffTests.swift@@ -7,6 +7,7 @@ import Testing /// affected Works with available candidates appear for independent confirm/skip. /// Failures and stale state retain the remaining queue and never roll back the rule. @Suite("PostTeachingWorkURLHandoff")+@MainActor struct PostTeachingWorkURLHandoffTests {      // MARK: - Fixtures
Asterism/AsterismTests/RecordCopyNavigationTests.swift Modified
diff --git a/Asterism/AsterismTests/RecordCopyNavigationTests.swift b/Asterism/AsterismTests/RecordCopyNavigationTests.swiftindex 6fe5e8a0..2033b349 100644--- a/Asterism/AsterismTests/RecordCopyNavigationTests.swift+++ b/Asterism/AsterismTests/RecordCopyNavigationTests.swift@@ -138,8 +138,7 @@ struct RecordCopyNavigationTests {     let navigation = AppNavigation()     navigation.selectedTab = stack == .today ? .today : .works     let route = WorksRoute.series(id: UUID(), originWorkID: nil)-    if stack == .today { navigation.todayPath = [route] }-    else { navigation.worksPath = [route] }+    if stack == .today { navigation.todayPath = [route] } else { navigation.worksPath = [route] }     let host = navigation.recordCopyReviewHost(for: route, on: stack)     let copy = WorkRecordCopyModel(sourceWorkID: UUID(), library: MockLibraryProvider(), onMutation: {})     copy.suspendForResolution()@@ -164,8 +163,7 @@ struct RecordCopyNavigationTests {     copy.suspendForResolution(); host.suspendedModel = copy     host.isVisitingResolution = true     navigation.showCheckLibrary(on: .works)-    if mode == "tab" { navigation.selectedTab = .stats }-    else { navigation.showWork(UUID()) }+    if mode == "tab" { navigation.selectedTab = .stats } else { navigation.showWork(UUID()) }     #expect(host.suspendedModel == nil && copy.state == .closed)   } 
Asterism/AsterismTests/RuleSuggesterTests.swift Modified
diff --git a/Asterism/AsterismTests/RuleSuggesterTests.swift b/Asterism/AsterismTests/RuleSuggesterTests.swiftindex 58ad5182..c7bd3cfa 100644--- a/Asterism/AsterismTests/RuleSuggesterTests.swift+++ b/Asterism/AsterismTests/RuleSuggesterTests.swift@@ -87,7 +87,7 @@ struct RuleSuggesterTests {         delay: Duration? = nil,         timeout: Duration = .seconds(30),         verification: (@Sendable (ComposedTeachingRequest) -> ComposedTeachingOutcome)? = nil-    ) -> (RuleSuggester, MockLibraryProvider, StubRuleSuggestionModelClient) {+    ) async -> (RuleSuggester, MockLibraryProvider, StubRuleSuggestionModelClient) {         let mock = MockLibraryProvider()         let resolved = basis ?? Self.basis()         let verify = verification ?? { _ in Self.outcome() }@@ -99,14 +99,15 @@ struct RuleSuggesterTests {         }         let stub = StubRuleSuggestionModelClient(             proposal: proposal, error: error, delay: delay, results: results)-        return (RuleSuggester(library: mock, model: stub, timeout: timeout), mock, stub)+        let suggester = await RuleSuggester(library: mock, model: stub, timeout: timeout)+        return (suggester, mock, stub)     }      // MARK: - The happy path      @Test("Both sides verify together and are offered together")     func happyPathBothSides() async throws {-        let (suggester, mock, stub) = makeSUT()+        let (suggester, mock, stub) = await makeSUT()         let result = try await suggester.attempt(hostname: Self.hostname)         let suggestion = try #require(result.suggestion) @@ -127,7 +128,7 @@ struct RuleSuggesterTests {      @Test("The model is shown the newest capture as the anchor and older ones as context")     func corpusIsAnchoredOnTheNewestCapture() async throws {-        let (suggester, _, stub) = makeSUT()+        let (suggester, _, stub) = await makeSUT()         _ = try await suggester.attempt(hostname: Self.hostname)         let corpus = try #require(stub.recorder.recordedCorpora.first)         #expect(corpus.anchor.title == "Some Story - Chapter 3")@@ -144,7 +145,7 @@ struct RuleSuggesterTests {         let taughtBasis = Self.basis(             currentURLRule: ComposedURLRuleBasis(                 id: UUID(), version: 1, origin: .readerTaught, definition: stored))-        let (suggester, mock, _) = makeSUT(basis: taughtBasis) { request in+        let (suggester, mock, _) = await makeSUT(basis: taughtBasis) { request in             // Only the pair carries both candidates; the single-side sets carry             // one candidate and one stored rule.             guard case .workAndSequence = request.urlDefinition,@@ -172,7 +173,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Absent From The Title", chapterText: "Chapter 3",             urlWorkIdentity: "some-story", urlSequenceText: "chapter-3")-        let (suggester, mock, _) = makeSUT(basis: taughtBasis, proposal: proposal)+        let (suggester, mock, _) = await makeSUT(basis: taughtBasis, proposal: proposal)          let suggestion = try #require(try await suggester.attempt(hostname: Self.hostname).suggestion)         #expect(suggestion.title == nil)@@ -186,7 +187,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Absent From The Title", chapterText: "Chapter 3",             urlWorkIdentity: "some-story", urlSequenceText: "chapter-3")-        let (suggester, mock, _) = makeSUT(proposal: proposal)+        let (suggester, mock, _) = await makeSUT(proposal: proposal)          let suggestion = try #require(try await suggester.attempt(hostname: Self.hostname).suggestion)         #expect(suggestion.url != nil)@@ -202,7 +203,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Some Story - Chapter 3", chapterText: "Chapter 3",             urlWorkIdentity: "some-story", urlSequenceText: "chapter-3")-        let (suggester, mock, _) = makeSUT(proposal: proposal) { _ in+        let (suggester, mock, _) = await makeSUT(proposal: proposal) { _ in             Self.outcome(titleFailure: .blankResult(field: "work"))         } @@ -215,7 +216,7 @@ struct RuleSuggesterTests {      @Test("An entry the title rule fails on fails the whole set")     func titleFailureFailsTheSet() async throws {-        let (suggester, _, _) = makeSUT { _ in+        let (suggester, _, _) = await makeSUT { _ in             Self.outcome(titleFailure: .blankResult(field: "work"))         }         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)@@ -223,7 +224,7 @@ struct RuleSuggesterTests {      @Test("An entry the URL rule fails on fails the whole set")     func urlFailureFailsTheSet() async throws {-        let (suggester, _, _) = makeSUT { _ in+        let (suggester, _, _) = await makeSUT { _ in             Self.outcome(urlFailure: .ambiguousSeparator(count: 0))         }         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)@@ -231,13 +232,13 @@ struct RuleSuggesterTests {      @Test("An entry with no Work name fails the whole set")     func missingWorkNameFailsTheSet() async throws {-        let (suggester, _, _) = makeSUT { _ in Self.outcome(workName: nil) }+        let (suggester, _, _) = await makeSUT { _ in Self.outcome(workName: nil) }         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)     }      @Test("A set that would require the unsettled-chapters acknowledgment fails")     func unsettledAcknowledgmentFailsTheSet() async throws {-        let (suggester, _, _) = makeSUT { _ in Self.outcome(requiresAck: true) }+        let (suggester, _, _) = await makeSUT { _ in Self.outcome(requiresAck: true) }         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)     } @@ -248,7 +249,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Some Story", chapterText: "",             urlWorkIdentity: "some-story", urlSequenceText: "")-        let (suggester, mock, stub) = makeSUT(proposal: proposal)+        let (suggester, mock, stub) = await makeSUT(proposal: proposal)          #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)         // The model ran; nothing was projected beyond the basis read.@@ -264,7 +265,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Some Story - Chapter 3", chapterText: "Chapter 3",             urlWorkIdentity: "some-story", urlSequenceText: "chapter-3")-        let (suggester, mock, _) = makeSUT(proposal: proposal)+        let (suggester, mock, _) = await makeSUT(proposal: proposal)          let suggestion = try #require(try await suggester.attempt(hostname: Self.hostname).suggestion) @@ -284,7 +285,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Some Story", chapterText: "Chapter 3",             urlWorkIdentity: "chapter-3", urlSequenceText: "chapter")-        let (suggester, _, _) = makeSUT(proposal: proposal)+        let (suggester, _, _) = await makeSUT(proposal: proposal)          let suggestion = try #require(try await suggester.attempt(hostname: Self.hostname).suggestion)         let url = try #require(suggestion.url)@@ -301,7 +302,7 @@ struct RuleSuggesterTests {         let proposal = RuleProposal(             workName: "Some Story", chapterText: "Chapter 3",             urlWorkIdentity: "example.com", urlSequenceText: "chapter-3")-        let (suggester, mock, _) = makeSUT(proposal: proposal)+        let (suggester, mock, _) = await makeSUT(proposal: proposal)          let suggestion = try #require(try await suggester.attempt(hostname: Self.hostname).suggestion)         #expect(suggestion.url == nil)@@ -317,7 +318,7 @@ struct RuleSuggesterTests {         let anchored = RuleProposal(             workName: "Some Story", chapterText: "Chapter 5",             urlWorkIdentity: "some-story", urlSequenceText: "chapter-5")-        let (suggester, _, stub) = makeSUT(+        let (suggester, _, stub) = await makeSUT(             basis: Self.basis(entries: 5), proposal: nil,             results: [                 .failure(StubRuleSuggestionModelClientError.contextWindowOverflow),@@ -333,7 +334,7 @@ struct RuleSuggesterTests {      @Test("Any other model failure settles the attempt with nothing")     func otherModelErrorYieldsNothing() async throws {-        let (suggester, mock, _) = makeSUT(+        let (suggester, mock, _) = await makeSUT(             proposal: nil, error: StubRuleSuggestionModelClientError.noCannedProposal)         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)         #expect(mock.projectComposedRequests.count == 1)@@ -345,7 +346,7 @@ struct RuleSuggesterTests {     /// this case builds no particular library state behind it.     @Test("A basis read that throws settles the attempt with nothing, model untouched")     func basisReadThrowYieldsNothing() async throws {-        let (suggester, _, stub) = makeSUT(+        let (suggester, _, stub) = await makeSUT(             basisFailure: ComposedTeachingProjectionError.invalidTitleDefinition(                 reason: "the basis could not be projected")) @@ -360,7 +361,7 @@ struct RuleSuggesterTests {         let empty = ComposedTeachingBasis(             siteMode: .untaught, hostname: Self.hostname, entries: [], works: [],             currentTitleRule: nil, currentURLRule: nil)-        let (suggester, _, stub) = makeSUT(basis: empty)+        let (suggester, _, stub) = await makeSUT(basis: empty)         #expect(try await suggester.attempt(hostname: Self.hostname).suggestion == nil)         #expect(stub.recorder.callCount == 0)     }@@ -369,7 +370,7 @@ struct RuleSuggesterTests {      @Test("An attempt that outlives its bound throws AttemptTimeout carrying what it spent")     func timeoutThrowsAttemptTimeout() async throws {-        let (suggester, _, _) = makeSUT(delay: .seconds(30), timeout: .milliseconds(50))+        let (suggester, _, _) = await makeSUT(delay: .seconds(30), timeout: .milliseconds(50))         do {             _ = try await suggester.attempt(hostname: Self.hostname)             Issue.record("expected the attempt to time out")@@ -380,7 +381,7 @@ struct RuleSuggesterTests {      @Test("A system cancellation propagates rather than settling as no suggestion")     func cancellationPropagates() async throws {-        let (suggester, _, stub) = makeSUT(delay: .seconds(30))+        let (suggester, _, stub) = await makeSUT(delay: .seconds(30))         let task = Task { try await suggester.attempt(hostname: Self.hostname) }         while stub.recorder.callCount == 0 { await Task.yield() }         task.cancel()
Asterism/AsterismTests/SettingsBackupModelTests.swift Modified
diff --git a/Asterism/AsterismTests/SettingsBackupModelTests.swift b/Asterism/AsterismTests/SettingsBackupModelTests.swiftindex 1e7501aa..7cd8a778 100644--- a/Asterism/AsterismTests/SettingsBackupModelTests.swift+++ b/Asterism/AsterismTests/SettingsBackupModelTests.swift@@ -523,14 +523,14 @@ struct SettingsBackupModelTests {     @Test("Scavenges stale files on initialization")     @MainActor func scavengesOnInit() {         let mock = MockBackupExporting()-        let _ = SettingsBackupModel(exporter: mock)+        _ = SettingsBackupModel(exporter: mock)         #expect(mock.scavengeCallCount == 1)     }      @Test("Can skip stale file scavenging on initialization")     @MainActor func skipsScavengingOnInitWhenDisabled() {         let mock = MockBackupExporting()-        let _ = SettingsBackupModel(exporter: mock, scavengesOnInit: false)+        _ = SettingsBackupModel(exporter: mock, scavengesOnInit: false)         #expect(mock.scavengeCallCount == 0)     } }
Asterism/AsterismTests/SettingsImportTests.swift Modified
diff --git a/Asterism/AsterismTests/SettingsImportTests.swift b/Asterism/AsterismTests/SettingsImportTests.swiftindex 1bb21b8e..96ef1c9b 100644--- a/Asterism/AsterismTests/SettingsImportTests.swift+++ b/Asterism/AsterismTests/SettingsImportTests.swift@@ -193,10 +193,10 @@ struct SettingsBackupImportModelTests {                 .committed(                     LibraryRecordCounts(entries: 1, works: 0, sites: 1, titlePatterns: 0),                     report: .empty))-            var completed = false+            let completed = ImportCompletionFlag()             let model = SettingsBackupImportModel(                 documentReader: reader, committer: committer,-                onCompletion: { completed = true })+                onCompletion: { await completed.mark() })              model.beginImport()             await model.handleDocumentSelection(URL(filePath: "/tmp/my-backup.json"))@@ -218,7 +218,7 @@ struct SettingsBackupImportModelTests {                 return             }             // Completion refreshes; it does not re-bootstrap (Q43).-            #expect(completed)+            #expect(await completed.value)         }     } @@ -251,10 +251,12 @@ struct SettingsBackupImportModelTests {         }         #expect(report.droppedThumbnails == ["Actual Title", "Second Work"]) -        let message = try? #require(SettingsBackupImportModel.droppedCoversMessage(report))-        #expect(message?.contains("2 works") == true)-        #expect(message?.contains("Actual Title") == true)-        #expect(message?.contains("Second Work") == true)+        guard let message = SettingsBackupImportModel.droppedCoversMessage(report) else {+            Issue.record("Expected dropped-cover message"); return+        }+        #expect(message.contains("2 works") == true)+        #expect(message.contains("Actual Title") == true)+        #expect(message.contains("Second Work") == true)     }      /// Singular reads as a sentence rather than as "1 works", and an empty@@ -355,3 +357,9 @@ struct SettingsBackupImportModelTests {         #expect(failed != failed2)     } }+++private actor ImportCompletionFlag {+    private(set) var value = false+    func mark() { value = true }+}
Asterism/AsterismTests/WorkDetailCharacterTests.swift Modified
diff --git a/Asterism/AsterismTests/WorkDetailCharacterTests.swift b/Asterism/AsterismTests/WorkDetailCharacterTests.swiftindex 7759b969..b03039e7 100644--- a/Asterism/AsterismTests/WorkDetailCharacterTests.swift+++ b/Asterism/AsterismTests/WorkDetailCharacterTests.swift@@ -108,13 +108,13 @@ struct WorkDetailCharacterTests {      // MARK: - Fixtures -    private nonisolated static func fact(+    nonisolated private static func fact(         _ statement: String, quote: String, source: SourceRef = .genericNotes     ) -> RecordFact {         RecordSessionFixtures.fact(statement, quote: quote, source: source)     } -    private nonisolated static func character(+    nonisolated private static func character(         id: UUID = UUID(), name: String = "Ada", note: String = "",         aliases: [String] = [], facts: [RecordFact] = [], isTorn: Bool = false     ) -> WorkRecordPresentation {@@ -460,7 +460,7 @@ struct WorkDetailCharacterTests { @MainActor struct WorkDetailRecordSessionTests { -    private nonisolated static func character(+    nonisolated private static func character(         id: UUID = UUID(), name: String = "Ada", note: String = "",         aliases: [String] = [], facts: [RecordFact] = [], isTorn: Bool = false     ) -> WorkRecordPresentation {@@ -468,7 +468,7 @@ struct WorkDetailRecordSessionTests {             id: id, name: name, note: note, aliases: aliases, facts: facts, isTorn: isTorn)     } -    private nonisolated static func place(+    nonisolated private static func place(         id: UUID = UUID(), name: String = "Kestrel Head", note: String = "",         aliases: [String] = [], facts: [RecordFact] = [], isTorn: Bool = false     ) -> WorkRecordPresentation {@@ -870,7 +870,7 @@ struct WorkDetailRecordSessionTests { @MainActor struct EntryDetailCitingCharactersTests { -    private nonisolated static func detail(+    nonisolated private static func detail(         entryID: UUID, citing: [EntryCitingRecord], citingPlaces: [EntryCitingRecord] = []     ) -> EntryTeachingDetail {         EntryTeachingDetail(@@ -958,7 +958,7 @@ struct EntryDetailCitingCharactersTests { @MainActor struct DuplicateResolutionCharacterArmTests { -    private nonisolated static func contract(+    nonisolated private static func contract(         setKey: DuplicateSetKey, variants: [RecordVariantChoice]     ) -> DuplicateResolutionContract {         .character(@@ -992,7 +992,7 @@ struct DuplicateResolutionCharacterArmTests {         #expect(model.selectedVariantID == VariantID(rawValue: "a"))     } -    private nonisolated static func tornCharacterItem() -> DuplicateReviewItem {+    nonisolated private static func tornCharacterItem() -> DuplicateReviewItem {         let id = UUID()         return DuplicateReviewItem(             key: DuplicateSetKey(recordType: .character, memberIDs: [id]),@@ -1036,7 +1036,7 @@ struct DuplicateResolutionCharacterArmTests {      // MARK: - The place arm (`place-extraction` Req 5.3, design §Convergence parity) -    private nonisolated static func tornPlaceItem() -> DuplicateReviewItem {+    nonisolated private static func tornPlaceItem() -> DuplicateReviewItem {         let id = UUID()         return DuplicateReviewItem(             key: DuplicateSetKey(recordType: .place, memberIDs: [id]),@@ -1144,7 +1144,7 @@ struct WorkDetailCharacterCommitTests {         func cleanup() { try? FileManager.default.removeItem(at: directory) }     } -    private nonisolated static func fact(+    nonisolated private static func fact(         _ statement: String, _ quote: String, key: String     ) -> RecordFact {         RecordFact(statement: statement, quote: quote, nameKey: key, source: .genericNotes)
Asterism/AsterismTests/WorkDetailModelTests.swift Modified
diff --git a/Asterism/AsterismTests/WorkDetailModelTests.swift b/Asterism/AsterismTests/WorkDetailModelTests.swiftindex 6fa2c5eb..039f9aa3 100644--- a/Asterism/AsterismTests/WorkDetailModelTests.swift+++ b/Asterism/AsterismTests/WorkDetailModelTests.swift@@ -178,7 +178,7 @@ struct WorkDetailModelTests {             transitionEventIDs: [joinRoot: [joinRoot], leaveRoot: [leaveRoot]])]         let detail = TestFixtures.makeWorkDetail(work: work, chapterRows: [chapterOne, chapterTwo],             characterGroups: groups)-        let (model, mock, _) = makeSUT(work: work, detail: detail)+        let (model, _, _) = makeSUT(work: work, detail: detail)         await model.load(); model.beginEditing()          let first = model.groupEditor(groups[0])@@ -312,7 +312,8 @@ struct WorkDetailModelTests {         #expect(mock.workDetailEditCalls.first?.metadata?.draft.displayTitle == "A title change")          model.beginEditing()-        let reopened = model.groupEditor(try #require(model.characterGroups.first))+        let reopenedGroup = try #require(model.characterGroups.first)+        let reopened = model.groupEditor(reopenedGroup)         reopened.chooseConflictChapter(rootID, chapterID: chapter.id)         reopened.chooseConflictAction(rootID, action: .join)         #expect(await reopened.save())@@ -1105,7 +1106,7 @@ struct WorkDetailModelTests {     /// A chapter row stated by the parts these cases are about: its key, its     /// position where its sequence is a site-wide id, when it was shared, and a     /// title that names it in the expectations.-    private nonisolated static func row(+    nonisolated private static func row(         _ title: String, key: ChapterKey? = nil, position: ChapterKey? = nil, sharedAt: Date     ) -> WorkChapterRow {         WorkChapterRow(@@ -1113,15 +1114,15 @@ struct WorkDetailModelTests {             chapterKey: key, sequencePosition: position)     } -    private nonisolated static func position(_ value: Int) -> ChapterKey {+    nonisolated private static func position(_ value: Int) -> ChapterKey {         ChapterKey(components: [value], label: String(value))     } -    private nonisolated static func key(_ components: [Int], _ label: String) -> ChapterKey {+    nonisolated private static func key(_ components: [Int], _ label: String) -> ChapterKey {         ChapterKey(components: components, label: label)     } -    private nonisolated static func detail(_ rows: [WorkChapterRow]) -> WorkDetailPresentation {+    nonisolated private static func detail(_ rows: [WorkChapterRow]) -> WorkDetailPresentation {         TestFixtures.makeWorkDetail(             work: TestFixtures.makeWork(displayTitle: "Serial"), chapterRows: rows)     }@@ -3083,6 +3084,7 @@ struct WorkDetailReleaseDaysTests { /// line, the editor's toggles and the duplicate sheet cannot come to spell one /// set of days three ways. @Suite("Release days text")+@MainActor struct ReleaseDaysTextTests {      private static func calendar(firstWeekday: Int) -> Calendar {@@ -3166,7 +3168,7 @@ struct ReleaseDaysTextTests {     @Test("A toggle's identifier is its stored spelling")     func toggleIdentifiersAreTheStoredSpelling() {         #expect(-            ReleaseDay.allCases.map(ReleaseDayToggles.identifier) == [+            ReleaseDay.allCases.map { ReleaseDayToggles.identifier($0) } == [                 "work-detail-release-day-monday", "work-detail-release-day-tuesday",                 "work-detail-release-day-wednesday", "work-detail-release-day-thursday",                 "work-detail-release-day-friday", "work-detail-release-day-saturday",
Asterism/AsterismTests/WorkMergeModelTests.swift Modified
diff --git a/Asterism/AsterismTests/WorkMergeModelTests.swift b/Asterism/AsterismTests/WorkMergeModelTests.swiftindex cf086493..953068dd 100644--- a/Asterism/AsterismTests/WorkMergeModelTests.swift+++ b/Asterism/AsterismTests/WorkMergeModelTests.swift@@ -8,6 +8,7 @@ import Testing /// Merge view-model tests: same-Site picker, full preview, retained/discarded /// treatments, audit disclosure, stale/errors, appearances, labels and hit targets. @Suite("WorkMergeModel")+@MainActor struct WorkMergeModelTests {      // MARK: - The picker
Asterism/AsterismUITests/AccessibilityJourneyUITests.swift Modified
diff --git a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swiftindex f79fa565..260f0378 100644--- a/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift+++ b/Asterism/AsterismUITests/AccessibilityJourneyUITests.swift@@ -1,21 +1,24 @@ import UIKit import XCTest +@MainActor final class AccessibilityJourneyUITests: XCTestCase {     private var app: XCUIApplication!--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        app = XCUIApplication()-        terminateAndWaitForExit(app)-    }--    override func tearDown() {-        if let app {+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            app = XCUIApplication()             terminateAndWaitForExit(app)         }-        app = nil+    }+    override func tearDown() async throws {+        await MainActor.run {+            if let app {+                terminateAndWaitForExit(app)+            }+            app = nil+        }     }      @MainActor@@ -1542,6 +1545,7 @@ final class AccessibilityJourneyUITests: XCTestCase { /// It is covered by `WideLayoutPolicyTests`, which pins the asymmetry that made /// it necessary (`initialVisibility` answers for an unmoved width where /// `crossing` returns nil), and by a checklist row.+@MainActor final class WideLayoutAccessibilityUITests: XCTestCase {     let app = XCUIApplication() @@ -1549,15 +1553,17 @@ final class WideLayoutAccessibilityUITests: XCTestCase {     /// any accessibility size: at 320 or 370 pt a row's date and pill have     /// nowhere to drop to.     private let accessibilityListWidth: CGFloat = 420--    override func setUp() {-        continueAfterFailure = false-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/AnnouncementUITests.swift Modified
diff --git a/Asterism/AsterismUITests/AnnouncementUITests.swift b/Asterism/AsterismUITests/AnnouncementUITests.swiftindex dea657b4..d575708c 100644--- a/Asterism/AsterismUITests/AnnouncementUITests.swift+++ b/Asterism/AsterismUITests/AnnouncementUITests.swift@@ -19,6 +19,7 @@ import XCTest /// `seeded-today` is the fixture because the row's conditions are about the /// screen as much as the library: entries exist, and Today is showing the /// current day as one day.+@MainActor final class AnnouncementUITests: XCTestCase {     let app = XCUIApplication() @@ -29,15 +30,17 @@ final class AnnouncementUITests: XCTestCase {     private let currentVersion = "0.7.0"     /// Something older, so the pin leaves the note unseen.     private let olderVersion = "0.6.0"--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      private func launch(
Asterism/AsterismUITests/AssociationNotesUITests.swift Modified
diff --git a/Asterism/AsterismUITests/AssociationNotesUITests.swift b/Asterism/AsterismUITests/AssociationNotesUITests.swiftindex e314e11e..8b11493e 100644--- a/Asterism/AsterismUITests/AssociationNotesUITests.swift+++ b/Asterism/AsterismUITests/AssociationNotesUITests.swift@@ -2,19 +2,25 @@ import XCTest  /// Same bounded saved-note/recovery journeys on phone, iPad and native Mac. /// No UIKit dependency; every app and test-host launch selects a synthetic root.+@MainActor final class AssociationNotesUITests: XCTestCase {     private let app = XCUIApplication()     private let chapterID = "24680000-0000-4000-8000-000000000002"     private let characterID = "24680000-0000-4000-8000-000000000004"     private let placeID = "24680000-0000-4000-8000-000000000005"     private var runID = UUID().uuidString--    override func setUp() {-        continueAfterFailure = false-        terminateAndWaitForExit(app)-        launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            terminateAndWaitForExit(app)+            launch()+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }-    override func tearDown() { terminateAndWaitForExit(app) }     private func launch() {         app.configureSyntheticLaunch(scenario: "seeded-association-notes", runID: runID)         app.launch()@@ -992,7 +998,6 @@ final class AssociationNotesUITests: XCTestCase {         XCTAssertEqual(Array(staticTextString(savedDetached).utf8), Array(detached.utf8))  -     }      #if os(macOS)
Asterism/AsterismUITests/AsterismUITests.swift Modified
diff --git a/Asterism/AsterismUITests/AsterismUITests.swift b/Asterism/AsterismUITests/AsterismUITests.swiftindex b536add6..974b9cd7 100644--- a/Asterism/AsterismUITests/AsterismUITests.swift+++ b/Asterism/AsterismUITests/AsterismUITests.swift@@ -7,6 +7,7 @@  import XCTest +@MainActor final class AsterismUITests: XCTestCase {      override func setUpWithError() throws {
Asterism/AsterismUITests/AsterismUITestsLaunchTests.swift Modified
diff --git a/Asterism/AsterismUITests/AsterismUITestsLaunchTests.swift b/Asterism/AsterismUITests/AsterismUITestsLaunchTests.swiftindex 75238c89..fe7ee20e 100644--- a/Asterism/AsterismUITests/AsterismUITestsLaunchTests.swift+++ b/Asterism/AsterismUITests/AsterismUITestsLaunchTests.swift@@ -7,6 +7,7 @@  import XCTest +@MainActor final class AsterismUITestsLaunchTests: XCTestCase {      override class var runsForEachTargetApplicationUIConfiguration: Bool {
Asterism/AsterismUITests/BackgroundExportSettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/BackgroundExportSettingsUITests.swift b/Asterism/AsterismUITests/BackgroundExportSettingsUITests.swiftindex b787e1cb..51b6d052 100644--- a/Asterism/AsterismUITests/BackgroundExportSettingsUITests.swift+++ b/Asterism/AsterismUITests/BackgroundExportSettingsUITests.swift@@ -14,20 +14,23 @@ import XCTest /// The other half of Req 4.2 — that `Personal` shows **no** control — has no /// test here: that scheme carries no test bundle at all, so it is by inspection /// of the `#if DEBUG` gate on the model and on the row (Q17).+@MainActor final class BackgroundExportSettingsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-m1"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-m1"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      func testTheDebugTriggerRunsAPassAndReportsItsOutcome() {
Asterism/AsterismUITests/ChapterNotesUITests.swift Modified
diff --git a/Asterism/AsterismUITests/ChapterNotesUITests.swift b/Asterism/AsterismUITests/ChapterNotesUITests.swiftindex 6ef19bc8..7d3a5aed 100644--- a/Asterism/AsterismUITests/ChapterNotesUITests.swift+++ b/Asterism/AsterismUITests/ChapterNotesUITests.swift@@ -1,26 +1,31 @@ import XCTest  /// Bounded journeys; every launch uses the test-only isolated library.+@MainActor final class ChapterNotesUITests: XCTestCase {     let app = XCUIApplication()-    override func setUp() {-        continueAfterFailure = false-        let orientation: UIDeviceOrientation = UIDevice.current.userInterfaceIdiom == .pad ? .landscapeLeft : .portrait-        XCUIDevice.shared.orientation = orientation-        terminateAndWaitForExit(app)-        let seededSpine = UIDevice.current.userInterfaceIdiom == .pad && name.contains("testSpineContentStartsAtTopAndShowsOnlyPrefixedNumbers")-        let manualCast = name.contains("testManualCharacterChips")-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = manualCast ? "seeded-manual-note-cast" : (seededSpine ? "seeded-chapter-spine" : "seeded-composed")-        app.launchArguments = name.contains("testManualCharacterChipsAtLargestTextSize")-            ? ["-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL"] : []-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()-        XCUIDevice.shared.orientation = orientation-        waitFor(app.anyElement("recent-list"), "Isolated library opens", timeout: 60)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            let orientation: UIDeviceOrientation = UIDevice.current.userInterfaceIdiom == .pad ? .landscapeLeft : .portrait+            XCUIDevice.shared.orientation = orientation+            terminateAndWaitForExit(app)+            let seededSpine = UIDevice.current.userInterfaceIdiom == .pad && name.contains("testSpineContentStartsAtTopAndShowsOnlyPrefixedNumbers")+            let manualCast = name.contains("testManualCharacterChips")+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = manualCast ? "seeded-manual-note-cast" : (seededSpine ? "seeded-chapter-spine" : "seeded-composed")+            app.launchArguments = name.contains("testManualCharacterChipsAtLargestTextSize")+                ? ["-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL"] : []+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+            XCUIDevice.shared.orientation = orientation+            waitFor(app.anyElement("recent-list"), "Isolated library opens", timeout: 60)+        }     }-    override func tearDown() {-        terminateAndWaitForExit(app)-        XCUIDevice.shared.orientation = .portrait+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+            XCUIDevice.shared.orientation = .portrait+        }     }     private func openWork() {         openAllWorks(in: app)
Asterism/AsterismUITests/CharacterExtractionUITests.swift Modified
diff --git a/Asterism/AsterismUITests/CharacterExtractionUITests.swift b/Asterism/AsterismUITests/CharacterExtractionUITests.swiftindex 6d5f5565..abb70440 100644--- a/Asterism/AsterismUITests/CharacterExtractionUITests.swift+++ b/Asterism/AsterismUITests/CharacterExtractionUITests.swift@@ -20,6 +20,7 @@ import XCTest /// characters, Kestrel Head as a place, and Selkie — returned under both kinds /// with no existing record of either — as Req 1.5's union row, displayed as a /// character (Q20) and disclosing that a skip decides both (Q38).+@MainActor final class CharacterExtractionUITests: XCTestCase {     let app = XCUIApplication() @@ -36,19 +37,21 @@ final class CharacterExtractionUITests: XCTestCase {         /// alone, carrying Q41's cross-kind hint.         static let selkiePlace = "place:selkie"     }--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "canned"-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "canned"+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      private func relaunchWithLegacyFacts() {@@ -565,7 +568,7 @@ final class CharacterExtractionUITests: XCTestCase {         let field = waitFor(             app.anyElement("character-review-note-field-\(rowID)"),             "The proposal's note field is available")-        field.coordinate(withNormalizedOffset: CGVector(dx: 0, dy: 0))+        field.coordinate(withNormalizedOffset: CGVector.zero)             .withOffset(CGVector(dx: 12, dy: 10)).tap()         XCTAssertTrue(app.keyboards.firstMatch.waitForExistence(timeout: 5),             "Tapping the note text line focuses the field and opens the software keyboard")@@ -575,7 +578,7 @@ final class CharacterExtractionUITests: XCTestCase {         // The field fills the row width. Use an absolute inset from the first         // line to select its first word, independent of the blank width to its         // right and the unused line below it.-        field.coordinate(withNormalizedOffset: CGVector(dx: 0, dy: 0))+        field.coordinate(withNormalizedOffset: CGVector.zero)             .withOffset(CGVector(dx: 12, dy: 10)).doubleTap()         XCTAssertTrue(app.keyboards.firstMatch.exists,             "Word selection leaves the software keyboard visible")@@ -587,7 +590,7 @@ final class CharacterExtractionUITests: XCTestCase {         XCTAssertEqual(field.value as? String, "ONE two three",             "The finger-selected first word is replaced in the proposal draft") -        field.coordinate(withNormalizedOffset: CGVector(dx: 0, dy: 0))+        field.coordinate(withNormalizedOffset: CGVector.zero)             .withOffset(CGVector(dx: 1, dy: 10)).tap()         XCTAssertTrue(app.keyboards.firstMatch.exists,             "Placing the caret by touch keeps the software keyboard visible")@@ -1205,19 +1208,22 @@ final class CharacterExtractionUITests: XCTestCase {  /// The same journey with the two other scripted clients, which are the only way /// to reach Req 1.11's other two states.+@MainActor final class CharacterExtractionOutcomeUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      private func openWorkDetail() {
Asterism/AsterismUITests/CharacterGroupsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/CharacterGroupsUITests.swift b/Asterism/AsterismUITests/CharacterGroupsUITests.swiftindex 839cc68c..88729d80 100644--- a/Asterism/AsterismUITests/CharacterGroupsUITests.swift+++ b/Asterism/AsterismUITests/CharacterGroupsUITests.swift@@ -4,20 +4,25 @@ import XCTest /// The smallest rendered Work-detail journey for the named-group editor. /// Model tests pin the edit transaction; this verifies its entry point and /// that only Save publishes the draft back into the roster.+@MainActor final class CharacterGroupsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "unavailable"-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "unavailable"+            app.launch()+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() { terminateAndWaitForExit(app) }      func testGroupEditorCancelAndSave() {         waitFor(app.anyElement("recent-list"), "The seeded library opens", timeout: 60)@@ -573,19 +578,24 @@ final class CharacterGroupsUITests: XCTestCase { #if os(macOS) /// Native Mac entry/save/cancel journey. The iOS helper extensions are not /// available to the macOS UI test target, so this test keeps its queries local.+@MainActor final class CharacterGroupsMacUITests: XCTestCase {     private let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "unavailable"-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-characters"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launchEnvironment["ASTERISM_UI_TEST_EXTRACTION"] = "unavailable"+            app.launch()+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() { terminateAndWaitForExit(app) }      private func element(_ identifier: String) -> XCUIElement {         app.descendants(matching: .any).matching(identifier: identifier).firstMatch
Asterism/AsterismUITests/ComposedSurfaceUITests.swift Modified
diff --git a/Asterism/AsterismUITests/ComposedSurfaceUITests.swift b/Asterism/AsterismUITests/ComposedSurfaceUITests.swiftindex 4e9f8311..adc7a517 100644--- a/Asterism/AsterismUITests/ComposedSurfaceUITests.swift+++ b/Asterism/AsterismUITests/ComposedSurfaceUITests.swift@@ -10,20 +10,23 @@ import XCTest /// The surface has no title-mode picker: the rule form is inferred from the chip /// selection (Req 8.6, Decision 8), so these tests drive chips and subdivision /// rather than modes.+@MainActor final class ComposedSurfaceUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Element helpers
Asterism/AsterismUITests/CreatorRolesSettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/CreatorRolesSettingsUITests.swift b/Asterism/AsterismUITests/CreatorRolesSettingsUITests.swiftindex 57b2947b..23435859 100644--- a/Asterism/AsterismUITests/CreatorRolesSettingsUITests.swift+++ b/Asterism/AsterismUITests/CreatorRolesSettingsUITests.swift@@ -14,20 +14,23 @@ import XCTest /// /// `seeded-creators` is the fixture: the three seeded roles, a reader-added /// **letterer** nothing holds, and a removed **editor** one credit still holds.+@MainActor final class CreatorRolesSettingsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-creators"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-creators"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/CreatorsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/CreatorsUITests.swift b/Asterism/AsterismUITests/CreatorsUITests.swiftindex 2ca4e703..838118f0 100644--- a/Asterism/AsterismUITests/CreatorsUITests.swift+++ b/Asterism/AsterismUITests/CreatorsUITests.swift@@ -13,17 +13,20 @@ import XCTest /// `seeded-creators` is the fixture: **Mori Ayane** credited on three works, /// **Studio Lantern** on one, **Quill Wright** on none; four works, of which /// **Salt and Ember** carries the two unresolved credit references.+@MainActor final class CreatorsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/DuplicateResolutionUITests.swift Modified
diff --git a/Asterism/AsterismUITests/DuplicateResolutionUITests.swift b/Asterism/AsterismUITests/DuplicateResolutionUITests.swiftindex 9f7d03d2..6b7481e9 100644--- a/Asterism/AsterismUITests/DuplicateResolutionUITests.swift+++ b/Asterism/AsterismUITests/DuplicateResolutionUITests.swift@@ -12,17 +12,20 @@ import XCTest /// Each `seeded-tolerated-*` scenario opens an isolated temporary library /// carrying one duplicate shape, written underneath the validating commit path /// because none of them can be produced through it.+@MainActor final class DuplicateResolutionUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Helpers
Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swift b/Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swiftindex 2fee3f11..3143f55c 100644--- a/Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swift+++ b/Asterism/AsterismUITests/EmptyLibrarySettingsUITests.swift@@ -18,17 +18,20 @@ import XCTest /// here either: that scheme carries no test bundle, so it is by inspection of /// the `#if DEBUG` gate on the model, the row and the presentations /// (`BackgroundExportSettingsUITests` says the same about its own row).+@MainActor final class EmptyLibrarySettingsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      private func launch(_ scenario: String) {
Asterism/AsterismUITests/EntryToWorkLinkUITests.swift Modified
diff --git a/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift b/Asterism/AsterismUITests/EntryToWorkLinkUITests.swiftindex c010f122..de46314b 100644--- a/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift+++ b/Asterism/AsterismUITests/EntryToWorkLinkUITests.swift@@ -21,17 +21,20 @@ import XCTest /// The control is queried type-agnostically for existence and tapped through /// the button query, which is the whole assertion in the Merge case: it exists /// either way, and only one of the two is a `Button`.+@MainActor final class EntryToWorkLinkUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Helpers
Asterism/AsterismUITests/LibraryDiagnosticsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/LibraryDiagnosticsUITests.swift b/Asterism/AsterismUITests/LibraryDiagnosticsUITests.swiftindex bb4a704e..febd8540 100644--- a/Asterism/AsterismUITests/LibraryDiagnosticsUITests.swift+++ b/Asterism/AsterismUITests/LibraryDiagnosticsUITests.swift@@ -12,17 +12,20 @@ import XCTest /// Each `seeded-tolerated-*` scenario opens an isolated temporary library carrying /// one incoherent shape, written underneath the validating commit path because /// none of these can be produced through it.+@MainActor final class LibraryDiagnosticsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      func testUnresolvedNineWorksAreNamedAndOpenWithoutChangingTheFinding() {
Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swift Modified
diff --git a/Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swift b/Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swiftindex 3dcaf18b..fd9eb2c0 100644--- a/Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swift+++ b/Asterism/AsterismUITests/M4ScaleTodayPerformanceUITests.swift@@ -15,6 +15,7 @@ import XCTest /// every `make test-ui`, because the failure this whole task exists to correct /// was a seeder that threw while the suite reported nothing but a /// `waitForExistence` timeout on a screen that was never going to appear.+@MainActor final class M4ScaleTodayPerformanceUITests: XCTestCase {     private static let subsystem = "me.nore.ig.Asterism"     private static let category = "PresentationPerformance"
Asterism/AsterismUITests/PendingCaptureSettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/PendingCaptureSettingsUITests.swift b/Asterism/AsterismUITests/PendingCaptureSettingsUITests.swiftindex f7514b7d..42da4045 100644--- a/Asterism/AsterismUITests/PendingCaptureSettingsUITests.swift+++ b/Asterism/AsterismUITests/PendingCaptureSettingsUITests.swift@@ -13,21 +13,24 @@ import XCTest /// identifier so the second launch opens the *same* library and the same spool. /// The fixture is a no-op when the area is already seeded, so what the relaunch /// shows is the state the first launch left, not a fresh seeding.+@MainActor final class PendingCaptureSettingsUITests: XCTestCase {     let app = XCUIApplication()     /// Fixed for the test case, so a relaunch returns to the same disposable     /// library rather than seeding a new one.     private let runID = UUID().uuidString--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        launchSeededLibrary()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            launchSeededLibrary()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      private func launchSeededLibrary() {
Asterism/AsterismUITests/PublicationReturnDateUITests.swift Modified
diff --git a/Asterism/AsterismUITests/PublicationReturnDateUITests.swift b/Asterism/AsterismUITests/PublicationReturnDateUITests.swiftindex 9df70612..c995dba6 100644--- a/Asterism/AsterismUITests/PublicationReturnDateUITests.swift+++ b/Asterism/AsterismUITests/PublicationReturnDateUITests.swift@@ -1,18 +1,21 @@ import UIKit import XCTest +@MainActor final class PublicationReturnDateUITests: XCTestCase {     private let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        terminateAndWaitForExit(app)-        XCUIDevice.shared.orientation = UIDevice.current.userInterfaceIdiom == .pad ? .landscapeLeft : .portrait+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            terminateAndWaitForExit(app)+            XCUIDevice.shared.orientation = UIDevice.current.userInterfaceIdiom == .pad ? .landscapeLeft : .portrait+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)-        XCUIDevice.shared.orientation = .portrait+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+            XCUIDevice.shared.orientation = .portrait+        }     }      private func launch(accessibilitySize: Bool = false, history: Bool = false) {
Asterism/AsterismUITests/ReparseSheetUITests.swift Modified
diff --git a/Asterism/AsterismUITests/ReparseSheetUITests.swift b/Asterism/AsterismUITests/ReparseSheetUITests.swiftindex 95e2b18e..37659342 100644--- a/Asterism/AsterismUITests/ReparseSheetUITests.swift+++ b/Asterism/AsterismUITests/ReparseSheetUITests.swift@@ -3,20 +3,23 @@ import XCTest /// UI tests for Re-parse sheet: opens seeded taught Entry detail, opens Re-parse sheet, /// validates before/after sections and Confirm button accessibility identifier. /// Note: Requires a UI test seed scenario with a taught entry. Run individually.+@MainActor final class ReparseSheetUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-taught"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-taught"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      func testReparseSheetShowsBeforeAfterAndConfirm() {
Asterism/AsterismUITests/SearchUITests.swift Modified
diff --git a/Asterism/AsterismUITests/SearchUITests.swift b/Asterism/AsterismUITests/SearchUITests.swiftindex 7ff3e133..08fe4ba7 100644--- a/Asterism/AsterismUITests/SearchUITests.swift+++ b/Asterism/AsterismUITests/SearchUITests.swift@@ -15,17 +15,20 @@ import XCTest /// `seeded-composed` is the fixture with a taught Work in it: two `id.test` /// entries under the Work "Real Work", plus one untaught `composed.test` entry /// captured as `TtH - Story - Real Title`.+@MainActor final class SearchUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Helpers
Asterism/AsterismUITests/SeriesUITests.swift Modified
diff --git a/Asterism/AsterismUITests/SeriesUITests.swift b/Asterism/AsterismUITests/SeriesUITests.swiftindex 8c6b9cc7..bde9dccc 100644--- a/Asterism/AsterismUITests/SeriesUITests.swift+++ b/Asterism/AsterismUITests/SeriesUITests.swift@@ -16,17 +16,20 @@ import XCTest /// 1.3's qualifier show its date and its ordinal; an empty "Quiet Shelf"; /// **Ashfall on Stage** and the abandoned **Cold Harbour** in no series; and /// **Lantern Papers**, which carries a series id and a link end no row holds.+@MainActor final class SeriesUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/SettingsLayoutUITests.swift Modified
diff --git a/Asterism/AsterismUITests/SettingsLayoutUITests.swift b/Asterism/AsterismUITests/SettingsLayoutUITests.swiftindex ada231c3..91733e8b 100644--- a/Asterism/AsterismUITests/SettingsLayoutUITests.swift+++ b/Asterism/AsterismUITests/SettingsLayoutUITests.swift@@ -1,11 +1,19 @@ import XCTest  /// T-2483: real platform settings roots, using the existing UUID-scoped stores.+@MainActor final class SettingsLayoutUITests: XCTestCase {     private let app = XCUIApplication()--    override func setUp() { continueAfterFailure = false; terminateAndWaitForExit(app) }-    override func tearDown() { terminateAndWaitForExit(app) }+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false; terminateAndWaitForExit(app)+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }+    }      private func openSettings(scenario: String) {         app.configureSyntheticLaunch(scenario: scenario)
Asterism/AsterismUITests/SitesSettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/SitesSettingsUITests.swift b/Asterism/AsterismUITests/SitesSettingsUITests.swiftindex d1531e3d..eeb4518f 100644--- a/Asterism/AsterismUITests/SitesSettingsUITests.swift+++ b/Asterism/AsterismUITests/SitesSettingsUITests.swift@@ -13,20 +13,23 @@ import XCTest /// /// `seeded-composed` carries both site modes the screen distinguishes: an /// untaught `composed.test` and a taught `id.test`.+@MainActor final class SitesSettingsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Navigation helpers
Asterism/AsterismUITests/StatsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/StatsUITests.swift b/Asterism/AsterismUITests/StatsUITests.swiftindex 875fea8e..3c99f2f1 100644--- a/Asterism/AsterismUITests/StatsUITests.swift+++ b/Asterism/AsterismUITests/StatsUITests.swift@@ -22,21 +22,24 @@ import XCTest /// image and no identifier at all, and moving the identifier onto a custom /// `label:` view does not change it. The three tabs are therefore asserted by /// label, which is what the accessibility tree actually publishes.+@MainActor final class StatsUITests: XCTestCase {     private var app: XCUIApplication!--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        app = XCUIApplication()-        terminateAndWaitForExit(app)-    }--    override func tearDown() {-        if let app {+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            app = XCUIApplication()             terminateAndWaitForExit(app)         }-        app = nil+    }+    override func tearDown() async throws {+        await MainActor.run {+            if let app {+                terminateAndWaitForExit(app)+            }+            app = nil+        }     }      /// Reqs 1.1, 1.2: three tabs, Stats beside Recent and Works.
Asterism/AsterismUITests/TodayUITests.swift Modified
diff --git a/Asterism/AsterismUITests/TodayUITests.swift b/Asterism/AsterismUITests/TodayUITests.swiftindex 37bb74e8..1e388784 100644--- a/Asterism/AsterismUITests/TodayUITests.swift+++ b/Asterism/AsterismUITests/TodayUITests.swift@@ -33,17 +33,20 @@ import XCTest /// says nothing about the tab. The sidebar's `sidebar-today` is the wide tree's /// control and is asserted by `WideLayoutUITests`, which is where a sidebar /// exists.+@MainActor final class TodayUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/UIJourneySupport.swift Modified
diff --git a/Asterism/AsterismUITests/UIJourneySupport.swift b/Asterism/AsterismUITests/UIJourneySupport.swiftindex 4f3916fc..e8b954ee 100644--- a/Asterism/AsterismUITests/UIJourneySupport.swift+++ b/Asterism/AsterismUITests/UIJourneySupport.swift@@ -26,6 +26,7 @@ enum UITab: String, CaseIterable { /// pattern and starts being duplication. Deliberately named apart from those /// private copies (`require`/`any`/`scrollAndTap`) so nothing in the existing /// suites changes meaning.+@MainActor extension XCUIApplication {     /// Matches an identifier across element types. SwiftUI surfaces the same     /// identifier as different element kinds depending on how it composes a row,@@ -72,6 +73,7 @@ extension XCUIApplication {     } } +@MainActor extension XCTestCase {     /// The native activity sheet publishes its close control from another     /// process. Use its stable identifier/label instead of a scrolling gesture.@@ -405,7 +407,7 @@ extension XCTestCase {     /// caller was already getting.     func scrollUntilTappableAndTap(         _ element: XCUIElement, in app: XCUIApplication, _ message: String,-        attempts: Int = 8, scroll: (XCUIApplication) -> Void = { $0.swipeUp() },+        attempts: Int = 8, scroll: @MainActor (XCUIApplication) -> Void = { $0.swipeUp() },         readyToTap: ((XCUIElement) -> Bool)? = nil,         beforeTap: ((XCUIElement) -> Void)? = nil,         file: StaticString = #filePath, line: UInt = #line
Asterism/AsterismUITests/WideLayoutUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WideLayoutUITests.swift b/Asterism/AsterismUITests/WideLayoutUITests.swiftindex 7548f464..7af64685 100644--- a/Asterism/AsterismUITests/WideLayoutUITests.swift+++ b/Asterism/AsterismUITests/WideLayoutUITests.swift@@ -20,17 +20,20 @@ import XCTest /// a UI test reaches the collapsed-sidebar layout. The wide ↔ compact crossing /// is not drivable from XCUITest at all (it needs iPad Split View), and is /// covered by `AppNavigationTests` plus a checklist row on a physical iPad.+@MainActor final class WideLayoutUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }      func testDiagnosedCaptureOpensFromTheWideListing() {@@ -336,11 +339,9 @@ final class WideLayoutUITests: XCTestCase {     // MARK: - Req 2.3 — the selection survives the layout change  -     // MARK: - Req 9.6 — the sidebar selects a tab like the tab bar does  -     /// `work-and-reading-status` Req 10.3: the statuses are the wide layout's     /// too, with no platform-specific omission.     ///
Asterism/AsterismUITests/WorkCoverUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkCoverUITests.swift b/Asterism/AsterismUITests/WorkCoverUITests.swiftindex fb05cfd5..511a050f 100644--- a/Asterism/AsterismUITests/WorkCoverUITests.swift+++ b/Asterism/AsterismUITests/WorkCoverUITests.swift@@ -15,20 +15,23 @@ import XCTest /// with a 600×900 portrait cover and one entry, and **Cold Harbour** on the same /// site with none. Two works, because every assertion here is a comparison — a /// slot drawn on every row would pass a suite written against one work.+@MainActor final class WorkCoverUITests: XCTestCase {     let app = XCUIApplication()      private let coveredTitle = "Lantern in the Deep"     private let uncoveredTitle = "Cold Harbour"--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/WorkDetailActionsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkDetailActionsUITests.swift b/Asterism/AsterismUITests/WorkDetailActionsUITests.swiftindex 0dcebfe0..6e53114a 100644--- a/Asterism/AsterismUITests/WorkDetailActionsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailActionsUITests.swift@@ -13,20 +13,23 @@ import XCTest /// two it is a `Menu` under the same identifier and label (`multi-site-works` /// Q33), because the review sheet is per site. Giving the fixture a second /// membership changes the element type under every assertion below.+@MainActor final class WorkDetailActionsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Navigation helpers
Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift b/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swiftindex 0fd2b318..d066c09a 100644--- a/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailConnectionsUITests.swift@@ -15,17 +15,20 @@ import XCTest /// this suite edits, **Ashfall Falling** is the one it links, and **Lantern /// Papers** carries both unresolved references — a series id and a link end no /// row holds, which is the only way either state is reachable (`SeriesStateFixture`).+@MainActor final class WorkDetailConnectionsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/WorkDetailCreditsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift b/Asterism/AsterismUITests/WorkDetailCreditsUITests.swiftindex 21d491aa..81a69d63 100644--- a/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailCreditsUITests.swift@@ -16,17 +16,20 @@ import XCTest /// references — a credit naming a creator no row holds and a credit holding a /// role id no row holds, which is the only way either state is reachable /// (`CreditStateFixture`).+@MainActor final class WorkDetailCreditsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/WorkDetailStatusUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkDetailStatusUITests.swift b/Asterism/AsterismUITests/WorkDetailStatusUITests.swiftindex 8cdc5a70..7583179c 100644--- a/Asterism/AsterismUITests/WorkDetailStatusUITests.swift+++ b/Asterism/AsterismUITests/WorkDetailStatusUITests.swift@@ -21,17 +21,20 @@ import XCTest /// and Thursday, Ashfall carries Saturday, and Zephyr Court and Quill Harbour /// carry none — so the toggles have a stored set to open on, the meta line has /// an item to show, and a work with nothing set is one tab away.+@MainActor final class WorkDetailStatusUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Driving
Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swift b/Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swiftindex e707a178..1a12211b 100644--- a/Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swift+++ b/Asterism/AsterismUITests/WorkRecordCopyOfferUITests.swift@@ -2,10 +2,19 @@ import XCTest  /// Saved membership receipts reach an optional review only after each editor closes. /// All fixtures use ordinary isolated repository writes and default next positions.+@MainActor final class WorkRecordCopyOfferUITests: XCTestCase {   let app = XCUIApplication()-  override func setUp() { continueAfterFailure = false; terminateAndWaitForExit(app) }-  override func tearDown() { terminateAndWaitForExit(app) }+  override func setUp() async throws {+      await MainActor.run {+          continueAfterFailure = false; terminateAndWaitForExit(app)+      }+  }+  override func tearDown() async throws {+      await MainActor.run {+          terminateAndWaitForExit(app)+      }+  }   private func launch() {     app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-record-copy"     app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString
Asterism/AsterismUITests/WorkRecordCopyUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkRecordCopyUITests.swift b/Asterism/AsterismUITests/WorkRecordCopyUITests.swiftindex c798d681..c3effd0e 100644--- a/Asterism/AsterismUITests/WorkRecordCopyUITests.swift+++ b/Asterism/AsterismUITests/WorkRecordCopyUITests.swift@@ -1,12 +1,19 @@ import XCTest +@MainActor final class WorkRecordCopyUITests: XCTestCase {   let app = XCUIApplication()-  override func setUp() {-    continueAfterFailure = false-    terminateAndWaitForExit(app)+  override func setUp() async throws {+      await MainActor.run {+        continueAfterFailure = false+        terminateAndWaitForExit(app)+      }+  }+  override func tearDown() async throws {+      await MainActor.run {+          terminateAndWaitForExit(app)+      }   }-  override func tearDown() { terminateAndWaitForExit(app) }    private func launch(_ scenario: String = "seeded-record-copy") {     app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = scenario
Asterism/AsterismUITests/WorkTypesSettingsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorkTypesSettingsUITests.swift b/Asterism/AsterismUITests/WorkTypesSettingsUITests.swiftindex b8781829..0f15ddeb 100644--- a/Asterism/AsterismUITests/WorkTypesSettingsUITests.swift+++ b/Asterism/AsterismUITests/WorkTypesSettingsUITests.swift@@ -8,20 +8,23 @@ import XCTest /// confirmation over a count that writes nothing until it is confirmed /// (Req 1.5). The rename in between is the one write that reaches works without /// touching them (Req 4.1, Decision 3).+@MainActor final class WorkTypesSettingsUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-composed"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      // MARK: - Navigation helpers
Asterism/AsterismUITests/WorksAndAssignmentUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift b/Asterism/AsterismUITests/WorksAndAssignmentUITests.swiftindex 1717ac16..fd69a9a3 100644--- a/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift+++ b/Asterism/AsterismUITests/WorksAndAssignmentUITests.swift@@ -1,20 +1,23 @@ import XCTest  /// UI tests for Works tab, Work detail, and assignment flows.+@MainActor final class WorksAndAssignmentUITests: XCTestCase {     let app = XCUIApplication()--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-m1"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-m1"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }     }--    override func tearDown() {-        terminateAndWaitForExit(app)+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }      func testWorksTabAccessible() {
Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swiftindex 5107d442..b9d98176 100644--- a/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksCreatorOptionsUITests.swift@@ -1,16 +1,23 @@ import XCTest +@MainActor final class WorksCreatorOptionsUITests: XCTestCase {     let app = XCUIApplication()-    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-creators"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-creators"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }-    override func tearDown() { terminateAndWaitForExit(app) }     private func assertTitles(_ titles: [String]) {         let query = app.elements(withIdentifierPrefix: "work-row-")         let expectation = XCTNSPredicateExpectation(predicate: NSPredicate { _, _ in
Asterism/AsterismUITests/WorksListOptionsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorksListOptionsUITests.swift b/Asterism/AsterismUITests/WorksListOptionsUITests.swiftindex 89abf293..04c6ad54 100644--- a/Asterism/AsterismUITests/WorksListOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksListOptionsUITests.swift@@ -1,15 +1,22 @@ import XCTest  /// The library hub, destination sorts, and native search tokens.+@MainActor final class WorksListOptionsUITests: XCTestCase {     let app = XCUIApplication()     private let newestOrder = ["Zephyr Court", "Ashfall", "Vesper Tide", "Quill Harbour", "Marrow Lane"]-    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }-    override func tearDown() { terminateAndWaitForExit(app) }      private func launch(textSize: String? = nil) {         app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-works-options"
Asterism/AsterismUITests/WorksLoadGateUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorksLoadGateUITests.swift b/Asterism/AsterismUITests/WorksLoadGateUITests.swiftindex 8090594a..f9a21d17 100644--- a/Asterism/AsterismUITests/WorksLoadGateUITests.swift+++ b/Asterism/AsterismUITests/WorksLoadGateUITests.swift@@ -11,21 +11,24 @@ import XCTest /// `ASTERISM_UI_TEST_WORKS_LOAD=fail-until-retry` (Q17), and it holds until /// Retry clears it — so one launch can be walked across both gated tabs and /// back.+@MainActor final class WorksLoadGateUITests: XCTestCase {     private var app: XCUIApplication!--    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        app = XCUIApplication()-        terminateAndWaitForExit(app)-    }--    override func tearDown() {-        if let app {+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            app = XCUIApplication()             terminateAndWaitForExit(app)         }-        app = nil+    }+    override func tearDown() async throws {+        await MainActor.run {+            if let app {+                terminateAndWaitForExit(app)+            }+            app = nil+        }     }      /// Reqs 3.6, 3.7 end to end: a failed first works load leaves Today alone,
Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift Modified
diff --git a/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift b/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swiftindex 416faf49..1307a79e 100644--- a/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift+++ b/Asterism/AsterismUITests/WorksSeriesOptionsUITests.swift@@ -1,16 +1,23 @@ import XCTest +@MainActor final class WorksSeriesOptionsUITests: XCTestCase {     let app = XCUIApplication()-    override func setUp() {-        continueAfterFailure = false-        XCUIDevice.shared.orientation = .portrait-        terminateAndWaitForExit(app)-        app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-series"-        app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString-        app.launch()+    override func setUp() async throws {+        await MainActor.run {+            continueAfterFailure = false+            XCUIDevice.shared.orientation = .portrait+            terminateAndWaitForExit(app)+            app.launchEnvironment["ASTERISM_UI_TEST_SCENARIO"] = "seeded-series"+            app.launchEnvironment["ASTERISM_UI_TEST_RUN_ID"] = UUID().uuidString+            app.launch()+        }+    }+    override func tearDown() async throws {+        await MainActor.run {+            terminateAndWaitForExit(app)+        }     }-    override func tearDown() { terminateAndWaitForExit(app) }     private func assertTitles(_ titles: [String]) {         let query = app.elements(withIdentifierPrefix: "work-row-")         let expectation = XCTNSPredicateExpectation(predicate: NSPredicate { _, _ in
Asterism/AsterismUITests/XCUIApplication+TestIsolation.swift Modified
diff --git a/Asterism/AsterismUITests/XCUIApplication+TestIsolation.swift b/Asterism/AsterismUITests/XCUIApplication+TestIsolation.swiftindex e6f3f6a1..c7a27e6e 100644--- a/Asterism/AsterismUITests/XCUIApplication+TestIsolation.swift+++ b/Asterism/AsterismUITests/XCUIApplication+TestIsolation.swift@@ -1,5 +1,6 @@ import XCTest +@MainActor extension XCTestCase {     /// XCUIApplication.terminate() returns before SpringBoard always observes the exit.     /// Waiting prevents the next UI test from attaching to a process launched with stale@@ -16,6 +17,7 @@ extension XCTestCase { }  +@MainActor extension XCUIApplication {     /// Select the disposable UUID library before app bootstrap on every launch.     /// CloudKit is nil in the scenario resolver, including native Mac launches.
Makefile Modified
diff --git a/Makefile b/Makefileindex 139646a1..5c9efdd0 100644--- a/Makefile+++ b/Makefile@@ -6,7 +6,7 @@ SHELL = /bin/bash  PROJECT ?= Asterism/Asterism.xcodeproj SCHEME ?= Asterism Development-BUNDLE_ID ?= me.nore.ig.Asterism.dev+BUNDLE_ID ?= me.nore.ig.apps.Asterism.dev CONFIG ?= Development # xcodebuild resolves a bare name at OS:latest, so this must be a device that # exists on the newest installed runtime. Under Xcode 27 the iPhone 17 Pro only@@ -80,6 +80,9 @@ help: 	@echo "    archive         - Create a Release iOS archive" 	@echo "" 	@echo "  Utilities:"+	@echo "    lint             - Strict SwiftLint, no new violations"+	@echo "    lint-debt        - Full known + new SwiftLint debt (expected nonzero)"+	@echo "    verify           - Identity checks plus SwiftLint ratchet" 	@echo "    verify-identity  - Check the identity declarations agree and the extension stays isolated" 	@echo "    resolve          - Resolve Swift package dependencies" 	@echo "    devices          - List known physical devices"@@ -98,6 +101,17 @@ help: # guard that is silently broken. It also carries the share extension's isolation # check (rule-suggestion Req 4.4), for the same reason and over the same file; # see the script's header.+# Full local verification entry point. Lint failures stay visible; do not+# autocorrect or baseline existing debt as a side effect of running checks.+.PHONY: lint lint-debt verify+lint:+	@scripts/lint.sh $(LINT_FLAGS)++lint-debt:+	@scripts/lint.sh --full $(LINT_FLAGS)++verify: verify-identity lint+ .PHONY: verify-identity verify-identity: 	@scripts/verify-identity.sh@@ -109,13 +123,13 @@ SWIFT_TEST_FLAGS ?= # `--no-parallel` is load-bearing, not a speed choice: parallel `swift test` # crashes the run with `NSUnknownKeyException: the entity Site is not key value # coding-compliant for the key "entries"` (Q34, docs/agent-notes/testing.md).-test-core: verify-identity+test-core: verify-identity lint 	$(PIPEFAIL) swift test --package-path Packages/AsterismCore --no-parallel $(SWIFT_TEST_FLAGS) $(if $(CORE_TEST),--filter '$(CORE_TEST)',) $(PIPE_PRETTY)  # Explicit pilot cohort: keep the existing identity guard and serial SwiftPM # execution. This does not change test-core, test-quick or simulator checkpoints. .PHONY: test-fast-test-fast: verify-identity+test-fast: verify-identity lint 	@scripts/test-fast.sh $(SWIFT_TEST_FLAGS)  .PHONY: build build-ios@@ -129,6 +143,7 @@ build-ios: 		-destination '$(DESTINATION)' \ 		-configuration $(CONFIG) \ 		-derivedDataPath $(DERIVED_DATA) \+		$(XCODE_BUILD_FLAGS) \ 		$(PIPE_PRETTY)  # The Mac build (Req 9.1). Build only: the product is never installed and never@@ -249,8 +264,8 @@ define device_run_warning 	echo "  About to run a UI test suite on a PHYSICAL DEVICE."; \ 	echo ""; \ 	echo "    device      : $(DEVICE_LABEL) -- $(DEVICE_ID)"; \-	echo "    app         : me.nore.ig.Asterism  (Personal configuration)"; \-	echo "    app group   : group.me.nore.ig.Asterism"; : "# identity-lint: allowed"; \+	echo "    app         : me.nore.ig.apps.Asterism  (Personal configuration)"; \+	echo "    app group   : group.me.nore.ig.apps.Asterism"; : "# identity-lint: allowed"; \ 	echo ""; \ 	echo "  This BUILDS AND INSTALLS over that app on the device, then launches"; \ 	echo "  it repeatedly under a test scenario. The scenario seeds an isolated"; \@@ -622,10 +637,10 @@ build-release: 	$(MAKE) build SCHEME="Asterism Personal" CONFIG=Personal  install-release:-	$(MAKE) install SCHEME="Asterism Personal" CONFIG=Personal BUNDLE_ID=me.nore.ig.Asterism+	$(MAKE) install SCHEME="Asterism Personal" CONFIG=Personal BUNDLE_ID=me.nore.ig.apps.Asterism  run-release:-	$(MAKE) run SCHEME="Asterism Personal" CONFIG=Personal BUNDLE_ID=me.nore.ig.Asterism+	$(MAKE) run SCHEME="Asterism Personal" CONFIG=Personal BUNDLE_ID=me.nore.ig.apps.Asterism  .PHONY: archive archive:@@ -649,3 +664,6 @@ resolve: .PHONY: clean clean: 	rm -rf $(DERIVED_DATA) build++# Pre-push units always enforce the no-new-style-debt gate.+test-quick: lint
Packages/AsterismCore/Package.swift Modified
diff --git a/Packages/AsterismCore/Package.swift b/Packages/AsterismCore/Package.swiftindex eef4ec60..5509cc8e 100644--- a/Packages/AsterismCore/Package.swift+++ b/Packages/AsterismCore/Package.swift@@ -5,7 +5,7 @@ import PackageDescription let package = Package(     name: "AsterismCore",     platforms: [-        .iOS(.v26),+        .iOS("27.0"),         .macOS(.v26),     ],     products: [
Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swift b/Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swiftindex 8d14d7b5..37d67764 100644--- a/Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/ArchiveRecordBuilders.swift@@ -74,7 +74,7 @@ internal enum ArchiveRecordBuilders {     static func makeTitlePattern(         _ record: BackupV18TitlePattern, site: Site?     ) throws -> TitlePattern {-        return try TitlePattern(+        try TitlePattern(             id: record.id,             version: record.version,             isActive: record.isActive,
Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swift b/Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swiftindex aa7eaf8d..4c0496c3 100644--- a/Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/AssociationEndpoints.swift@@ -53,7 +53,8 @@ struct AssociationEndpointInventory {                 RecordNameKey.normalize(support.spellingKey) == support.spellingKey &&                 RecordMentionGrounding.completeNameEvidence(names: [support.spelling],                     in: source.note).contains { $0.key == support.spellingKey &&-                        $0.spelling == support.spelling }+                        $0.spelling == support.spelling+                }             } : []         guard !evidence.isEmpty || !eligibleGroups.isEmpty else { return nil }         return .init(pair: pair, sourceFingerprint: source.fingerprint,
Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swift b/Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swiftindex 9e1d24bb..8e6f172b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/AssociationImportPreparation.swift@@ -230,8 +230,7 @@ struct AssociationImportPreparation {             let rows = byEntry[record.id, default: []]             let chapter = payload.chapterEntries[record.id]             let targetData: Data?, redirect: UUID?-            if let chapter { targetData = chapter.authoredTargetData; redirect = chapter.mergedIntoEntryID }-            else { targetData = rows.first?.authoredTargetData; redirect = rows.first?.mergedIntoEntryID }+            if let chapter { targetData = chapter.authoredTargetData; redirect = chapter.mergedIntoEntryID } else { targetData = rows.first?.authoredTargetData; redirect = rows.first?.mergedIntoEntryID }             let eligible = redirect == nil && (targetData == nil || targetData.flatMap { try? AuthoredEntryTarget.decode($0) }?.kind == .chapter)             let owner = record.workID.flatMap { liveWorks.contains($0) ? $0 : nil }             if !rows.isEmpty, LibraryRepository.applicableImportedEntryGroup(record, rows: rows,
Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swift b/Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swiftindex 1fb7742e..5e240893 100644--- a/Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/AssociationLedger.swift@@ -733,10 +733,12 @@ public struct AssociationNoteFold: Sendable {     public func heads(for pair: AssociationPair) -> [AssociationNoteValue] { groupedHeads[pair, default: []] }     public func textHeads(for pair: AssociationPair, activeAcceptanceIDs: Set<UUID>) -> [AssociationNoteValue] {         heads(for: pair).filter { $0.operation != .clear && !$0.text.isEmpty-            && !Set($0.attachmentAcceptanceIDs).isDisjoint(with: activeAcceptanceIDs) }+            && !Set($0.attachmentAcceptanceIDs).isDisjoint(with: activeAcceptanceIDs)+        }     }     public func detachedTextHeads(activeAcceptanceIDs: Set<UUID>) -> [AssociationNoteValue] {         validHeads.filter { $0.operation != .clear && !$0.text.isEmpty-            && Set($0.attachmentAcceptanceIDs).isDisjoint(with: activeAcceptanceIDs) }+            && Set($0.attachmentAcceptanceIDs).isDisjoint(with: activeAcceptanceIDs)+        }     } }
Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swift b/Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swiftindex 662bd1ae..86a7d939 100644--- a/Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/AssociationPendingReviews.swift@@ -26,7 +26,8 @@ public struct AssociationPendingReview: Sendable, Equatable, Codable {             return [.init(key: first.key, targetID: first.targetID, spellingKeys: values.flatMap(\.spellingKeys))]         }         self.items = combined.sorted { [$0.key.kind.rawValue, $0.key.nameKey, $0.targetID?.uuidString ?? "", $0.spellingKeys.joined(separator: "\u{0}")]-            .lexicographicallyPrecedes([$1.key.kind.rawValue, $1.key.nameKey, $1.targetID?.uuidString ?? "", $1.spellingKeys.joined(separator: "\u{0}")]) }+            .lexicographicallyPrecedes([$1.key.kind.rawValue, $1.key.nameKey, $1.targetID?.uuidString ?? "", $1.spellingKeys.joined(separator: "\u{0}")])+        }     } } public struct AssociationReviewReference: Sendable, Equatable, Hashable, Codable {
Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swiftindex a5ca982e..a8f183fe 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveProjection.swift@@ -223,8 +223,7 @@ extension LibraryRepository {             // The whole citation surface is one blob on the wire now (Q25), so a             // row whose blob will not decode is named here by its bytes rather             // than reached by a mapper that would throw a raw `DecodingError`.-            do { _ = try citations.value(of: entry) }-            catch {+            do { _ = try citations.value(of: entry) } catch {                 throw BackupV18ExportError.unrepresentableValue(                     record: record, field: "citations", value: String(describing: error))             }@@ -232,15 +231,13 @@ extension LibraryRepository {         for work in works {             let record = "Work \(work.id)"             if let data = work.catchUpConfirmationData {-                do { _ = try JSONBlob.decode(CatchUpConfirmation.self, from: data) }-                catch {+                do { _ = try JSONBlob.decode(CatchUpConfirmation.self, from: data) } catch {                     throw BackupV18ExportError.unrepresentableValue(                         record: record, field: "catch-up confirmation", value: String(describing: error))                 }             }             if let data = work.lastChapterOverrideData {-                do { _ = try JSONBlob.decode(LastChapterOverride.self, from: data) }-                catch {+                do { _ = try JSONBlob.decode(LastChapterOverride.self, from: data) } catch {                     throw BackupV18ExportError.unrepresentableValue(                         record: record, field: "last chapter override", value: String(describing: error))                 }@@ -336,8 +333,7 @@ extension LibraryRepository {             // own: a definition that decodes is a form the wire can spell, and             // one that does not is named here by its bytes rather than by a             // `formRaw` that no longer exists.-            do { _ = try pattern.storedDefinition }-            catch {+            do { _ = try pattern.storedDefinition } catch {                 throw BackupV18ExportError.unrepresentableValue(                     record: record, field: "definition", value: String(describing: error))             }@@ -1070,8 +1066,7 @@ extension LibraryRepository {         _ projected: SiteUnionProjection.ProjectedURLRule, hostname: String     ) throws -> BackupV18URLRule {         let definition: URLRuleDefinition-        do { definition = try projected.rule.definition }-        catch {+        do { definition = try projected.rule.definition } catch {             throw BackupV18ExportError.unrepresentableValue(                 record: "URL rule \(projected.rule.id)", field: "definition",                 value: "\(projected.rule.definitionData.count) bytes that do not decode")
Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swiftindex 128dd8b9..6cfb2662 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupArchiveReferenceChecks.swift@@ -331,8 +331,7 @@ internal enum BackupArchiveReferenceChecks {         // here would strand a library nothing can repair. The         // at-most-one-current rule (Req 3.3) is unaffected.         for rule in rules {-            do { try rule.definition.validate(origin: rule.origin, isCurrent: rule.isCurrent) }-            catch { throw invalid("URLRule", rule.id.uuidString, String(describing: error)) }+            do { try rule.definition.validate(origin: rule.origin, isCurrent: rule.isCurrent) } catch { throw invalid("URLRule", rule.id.uuidString, String(describing: error)) }         }          let currentRules = rules.filter(\.isCurrent)
Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swiftindex f488f256..b1a22fd0 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupImportCreators.swift@@ -46,8 +46,7 @@ extension LibraryRepository {                 creatorRoles, importedAt: importedAt, context: context) || wrote          if wrote {-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "merging the imported creators and roles",                     reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swiftindex 3ae0ffc8..2daa1d1b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupImportWorkTypes.swift@@ -136,8 +136,7 @@ extension LibraryRepository {         }          guard wrote else { return }-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: "merging the imported work-type list",                 reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swiftindex 4dc9f4d4..2995524b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupImporter.swift@@ -348,8 +348,7 @@ public enum BackupImporter {      private static func planFromArchive(_ data: Data) throws -> BackupImportPlan {         let compatible: CompatibleBackupV21Document-        do { compatible = try BackupV21Codec.decodeCompatible(data) }-        catch { throw BackupImportError.decodingFailed(reason: String(describing: error)) }+        do { compatible = try BackupV21Codec.decodeCompatible(data) } catch { throw BackupImportError.decodingFailed(reason: String(describing: error)) }         let payload: BackupImportPayload         let metadata: BackupImportMetadata         switch compatible {
Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swiftindex 456e1bcf..9cf20227 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupJSONCodecSupport.swift@@ -261,8 +261,7 @@ internal struct DuplicateJSONKeyValidator {                 escaped = true             } else if byte == 0x22 {                 let slice = Data(bytes[start..<index])-                do { return try JSONDecoder().decode(String.self, from: slice) }-                catch {+                do { return try JSONDecoder().decode(String.self, from: slice) } catch {                     throw BackupCodecError.decodingFailed(reason: "invalid JSON string at byte \(start)")                 }             } else if byte < 0x20 {
Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swiftindex ff323612..05a32e6e 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV18Codec.swift@@ -150,8 +150,7 @@ public enum BackupV18Codec {             try BackupV18ReferenceValidator.validate(payload: document.payload)              return document-        } catch let error as BackupCodecError { throw error }-        catch {+        } catch let error as BackupCodecError { throw error } catch {             throw BackupCodecError.decodingFailed(reason: String(describing: error))         }     }@@ -233,8 +232,7 @@ internal enum BackupV18ReferenceValidator {                     reason: "publication state disagrees with work status")             }         }-        do { _ = try NoEpisodeHistory(payload.noEpisodeActions.map { try $0.action() }) }-        catch {+        do { _ = try NoEpisodeHistory(payload.noEpisodeActions.map { try $0.action() }) } catch {             throw BackupCodecError.invalidStateTuple(                 type: "NoEpisodeAction", id: BackupV18Codec.label,                 reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swiftindex 23b1b281..3def2b8a 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV18Exporter.swift@@ -110,8 +110,7 @@ extension LibraryRepository: BackupV18SnapshotProviding {                 do {                     try Self.requireLegacyAssociationRepresentation(context: context)                     return .success(try Self.projectV18Payload(context: context))-                }-                catch let error as BackupV18ExportError { return .failure(error) }+                } catch let error as BackupV18ExportError { return .failure(error) }             }         return try outcome.get()     }
Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swiftindex 89bfd10e..3b514e95 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV19Codec.swift@@ -133,8 +133,7 @@ public enum BackupV19Codec {             try BackupV19ReferenceValidator.validate(payload: document.payload)              return document-        } catch let error as BackupCodecError { throw error }-        catch {+        } catch let error as BackupCodecError { throw error } catch {             throw BackupCodecError.decodingFailed(reason: String(describing: error))         }     }@@ -153,8 +152,7 @@ internal enum BackupV19ReferenceValidator {                     reason: "publication state disagrees with work status")             }         }-        do { _ = try NoEpisodeHistory(payload.noEpisodeActions.map { try $0.action() }) }-        catch {+        do { _ = try NoEpisodeHistory(payload.noEpisodeActions.map { try $0.action() }) } catch {             throw BackupCodecError.invalidStateTuple(                 type: "NoEpisodeAction", id: BackupV19Codec.label,                 reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swiftindex fa9796e7..625686fa 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV20Codec.swift@@ -123,8 +123,7 @@ public enum BackupV20Codec {             try BackupV19ReferenceValidator.validate(payload: document.payload.library)              return document-        } catch let error as BackupCodecError { throw error }-        catch {+        } catch let error as BackupCodecError { throw error } catch {             throw BackupCodecError.decodingFailed(reason: String(describing: error))         }     }
Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swiftindex 1b1c0732..4b4b65d5 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV21Codec.swift@@ -123,8 +123,7 @@ public enum BackupV21Codec {             try BackupV19ReferenceValidator.validate(payload: document.payload.library)              return document-        } catch let error as BackupCodecError { throw error }-        catch {+        } catch let error as BackupCodecError { throw error } catch {             throw BackupCodecError.decodingFailed(reason: String(describing: error))         }     }
Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swift b/Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swiftindex 55e349ba..b65ea343 100644--- a/Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/BackupV21Exporter.swift@@ -17,15 +17,18 @@ extension LibraryRepository: BackupV21SnapshotProviding {                         .sorted { [$0.id.uuidString, $0.variantIdentity].lexicographicallyPrecedes([$1.id.uuidString, $1.variantIdentity]) }                     let groups = try context.fetch(FetchDescriptor<NamedCharacterGroup>())                         .map(GroupRawIdentity.init).sorted { [$0.id.uuidString, $0.workID.uuidString]-                            .lexicographicallyPrecedes([$1.id.uuidString, $1.workID.uuidString]) }+                            .lexicographicallyPrecedes([$1.id.uuidString, $1.workID.uuidString])+                        }                     let facts = try context.fetch(FetchDescriptor<GroupFactEvent>())                         .map(GroupRawFact.init).sorted { [$0.id.uuidString, $0.groupID.uuidString,                             $0.payloadData.base64EncodedString()].lexicographicallyPrecedes(-                                [$1.id.uuidString, $1.groupID.uuidString, $1.payloadData.base64EncodedString()]) }+                                [$1.id.uuidString, $1.groupID.uuidString, $1.payloadData.base64EncodedString()])+                        }                     let transitions = try context.fetch(FetchDescriptor<GroupTransition>())                         .map(GroupRawTransition.init).sorted { [$0.id.uuidString, $0.groupID.uuidString,                             $0.payloadData.base64EncodedString()].lexicographicallyPrecedes(-                                [$1.id.uuidString, $1.groupID.uuidString, $1.payloadData.base64EncodedString()]) }+                                [$1.id.uuidString, $1.groupID.uuidString, $1.payloadData.base64EncodedString()])+                        }                     return .success(.init(predecessor: .init(library: base,                         associationEvents: events, pairNoteVersions: notes), groups: groups,                         groupFacts: facts, groupTransitions: transitions))@@ -107,4 +110,3 @@ public final class BackupV21Exporter: Sendable {         ExportStaging.scavengeBackups(in: stagingDirectory)     } }-
Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swift b/Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swiftindex 8222e54f..6b520ab2 100644--- a/Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/CatchUpProgress.swift@@ -110,8 +110,7 @@ public struct CatchUpProgress: Equatable, Sendable {          let state: State         if let effectiveLatest, let lastRead {-            if effectiveLatest == lastRead { state = .caughtUp }-            else if effectiveLatest == record.latest && record.confirmation?.isEstimate == false {+            if effectiveLatest == lastRead { state = .caughtUp } else if effectiveLatest == record.latest && record.confirmation?.isEstimate == false {                 state = .exact             } else { state = .estimated }         } else { state = .unknown }
Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swift b/Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swiftindex 861752c0..5a74c33d 100644--- a/Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/ChapterCaptureResolver.swift@@ -46,14 +46,14 @@ public enum ChapterCaptureResolution: Equatable, Sendable { public struct ChapterCaptureProjection: Equatable, Sendable {     public let workID: UUID?     public let rawURL: String-    public var captureTitle: String? = nil+    public var captureTitle: String?     public let evidence: [ChapterCaptureEvidence]     public let entries: [ChapterCaptureEntry]     public let resolution: ChapterCaptureResolution     public let offersAnotherChapter: Bool-    public var workContent: WorkAuthoredContent? = nil-    public var workModifiedAt: Date? = nil-    public var ruleBasis: CaptureBasis? = nil+    public var workContent: WorkAuthoredContent?+    public var workModifiedAt: Date?+    public var ruleBasis: CaptureBasis?     public var captureDefault: ChapterCaptureDefault = .ordinary      /// Optional alternatives must not look like a required confirmation in the
Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swift b/Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swiftindex 56f17d13..9a4ad58b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/ComposedTeachingProjection.swift@@ -515,11 +515,9 @@ public enum ComposedTeachingProjectionPlanner {     // MARK: - Validation      private static func validate(basis: ComposedTeachingBasis, request: ComposedTeachingRequest) throws {-        do { _ = try request.titleDefinition.validated() }-        catch { throw ComposedTeachingProjectionError.invalidTitleDefinition(reason: String(describing: error)) }+        do { _ = try request.titleDefinition.validated() } catch { throw ComposedTeachingProjectionError.invalidTitleDefinition(reason: String(describing: error)) }         if let urlDef = request.urlDefinition {-            do { try urlDef.validate(origin: .readerTaught, isCurrent: true) }-            catch { throw ComposedTeachingProjectionError.invalidURLDefinition(reason: String(describing: error)) }+            do { try urlDef.validate(origin: .readerTaught, isCurrent: true) } catch { throw ComposedTeachingProjectionError.invalidURLDefinition(reason: String(describing: error)) }         }         var entryIDs: Set<UUID> = []         for entry in basis.entries where !entryIDs.insert(entry.id).inserted {@@ -627,8 +625,7 @@ public enum ComposedTeachingProjectionPlanner {     ) throws -> [IdentityFirstWorkCandidate] {         basis.works.map { work in             let matchingTitle: String-            if let lpt = work.lastParsedTitle, !M2Unicode.isBlank(lpt) { matchingTitle = lpt }-            else { matchingTitle = work.displayTitle }+            if let lpt = work.lastParsedTitle, !M2Unicode.isBlank(lpt) { matchingTitle = lpt } else { matchingTitle = work.displayTitle }             return IdentityFirstWorkCandidate(                 id: work.id, matchingTitle: ExactScalarString(matchingTitle),                 previousIdentity: work.identity,
Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swift b/Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swiftindex 184781e3..02c05a94 100644--- a/Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/CreatorReconciler.swift@@ -81,8 +81,7 @@ enum CreatorReconciler {         outcome.formUnion(creatorPass.outcome)         outcome.formUnion(try convergeRoles(context: context))         guard !outcome.isEmpty else { return outcome }-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: "converging the creator and role lists",                 reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swift b/Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swiftindex 3f344b05..21768809 100644--- a/Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/CreditReconciler.swift@@ -132,8 +132,7 @@ enum CreditReconciler {     private static func save(         _ context: ModelContext, saveStrategy: any RepositorySaveStrategy     ) throws {-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: "converging duplicate credits",                 reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swift b/Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swiftindex 89722fb9..ade57a52 100644--- a/Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/DocumentExportOutcome.swift@@ -12,7 +12,7 @@ import Foundation /// /// `.completed` means an activity *ran*, not that a file reached a destination: /// Copy counts, which is why the requirement says handed off.-public nonisolated enum DocumentExportOutcome: Sendable, Equatable {+nonisolated public enum DocumentExportOutcome: Sendable, Equatable {     case completed     case cancelled @@ -55,7 +55,7 @@ public nonisolated enum DocumentExportOutcome: Sendable, Equatable { /// A value type because the whole hazard is a sequence of calls, and a sequence /// is something a test can drive (`DocumentExportOutcomeTests`) where neither /// sharing surface can be.-public nonisolated struct ExportOutcomeLedger: Sendable {+nonisolated public struct ExportOutcomeLedger: Sendable {     /// The presentation now up, or the last one to have been up. Zero before     /// the first, which nothing can report for.     public private(set) var presentation = 0
Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swift b/Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swiftindex f02d80fd..20ddc109 100644--- a/Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/DuplicateReconciler.swift@@ -1036,7 +1036,8 @@ enum DuplicateReconciler {                 guard let carrier = carrierRow(                     among: allRows, content: content,                     authored: { GroupOrdering.authoredContent(of: $0)-                        .normalizingAssignment(using: canonicalWorkIDs) },+                        .normalizingAssignment(using: canonicalWorkIDs)+                    },                     ordered: GroupOrdering.sortedEntryRows)                 else { continue }                 wrote = apply(carrier, to: survivor) || wrote@@ -1751,7 +1752,8 @@ enum DuplicateReconciler {         fingerprint(             memberIDs, rowsByID: rowsByID,             authored: { GroupOrdering.authoredContent(of: $0)-                .normalizingAssignment(using: canonicalWorkIDs) },+                .normalizingAssignment(using: canonicalWorkIDs)+            },             earliest: \.firstCapturedAt, latest: \.lastSharedAt)     } 
Packages/AsterismCore/Sources/AsterismCore/EntrySources.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/EntrySources.swift b/Packages/AsterismCore/Sources/AsterismCore/EntrySources.swiftindex f9db5950..3584d165 100644--- a/Packages/AsterismCore/Sources/AsterismCore/EntrySources.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/EntrySources.swift@@ -130,7 +130,7 @@ internal enum EntrySources {     struct Association {         let entryID: UUID         let url: String-        var evidence: EntrySourceEvidence? = nil+        var evidence: EntrySourceEvidence?     }     static func associate(entryID: UUID, url: String, evidence: EntrySourceEvidence? = nil,                           timestamp: Date, context: ModelContext) throws {
Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swift b/Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swiftindex 4f3fb36a..bb976172 100644--- a/Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/GroupReferenceResolver.swift@@ -110,7 +110,8 @@ public enum GroupReferenceResolver {             // Generic Work notes have no chapter anchor: their group spelling             // still arbitrates spans, but cannot imply any chapter membership.             let members = chapterID.map { roster.members(groupID: mention.id,-                chapterID: $0) } ?? []+                chapterID: $0)+            } ?? []             characterIDs.formUnion(members)             let transitionIDs: [UUID: [UUID]]             if let chapterID {
Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swift b/Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swiftindex 634df54a..7e16619f 100644--- a/Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/GroupRoster.swift@@ -208,7 +208,8 @@ public enum GroupRoster {             let completeChain = chain.filter { complete($0.id, in: transitionByID,                 parents: { $0.parentHeadIDs }) &&                 ($0.id == rootID || hasAncestor($0.id, ancestor: rootID,-                    in: transitionByID, parents: { $0.parentHeadIDs })) }+                    in: transitionByID, parents: { $0.parentHeadIDs }))+            }             if completeChain.contains(where: { $0.action == .remove }) { continue }             let liveHeads = heads(completeChain, all: completeChain,                                   parents: { $0.parentHeadIDs })@@ -250,7 +251,8 @@ public enum GroupRoster {         let summaries = groupIDs.sorted { $0.uuidString < $1.uuidString }.compactMap { groupID -> GroupSummary? in             let events = validFacts.filter { $0.groupID == groupID && $0.workID == workID &&                 complete($0.id, in: factByID,-                parents: { $0.parentHeadIDs }) }+                parents: { $0.parentHeadIDs })+            }             guard events.contains(where: { if case .create = $0.operation { return true }; return false }),                   !events.contains(where: { if case .delete = $0.operation { return true }; return false })             else { return nil }
Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swift b/Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swiftindex 83c000b7..a265f585 100644--- a/Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/GroupSupportInventory.swift@@ -171,13 +171,15 @@ enum GroupSupportInventory {                         names = copies.flatMap { [$0.name, $0.nameKey] + $0.aliases }                     }                     claims += names.map { GroupNameClaim(kind: Row.kind == .character-                        ? .character : .place, id: claimID, spelling: $0) }+                        ? .character : .place, id: claimID, spelling: $0)+                    }                 }                 for (address, projected) in projectedTargets ?? [:]                 where address.kind == Row.kind && projected.workID == workID                     && grouped[address.id] == nil {                     claims += projected.names.map { GroupNameClaim(kind: Row.kind == .character-                        ? .character : .place, id: claimID, spelling: $0) }+                        ? .character : .place, id: claimID, spelling: $0)+                    }                 }                 return claims             }
Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swift b/Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swiftindex 1f2b79a2..ee78b9d3 100644--- a/Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/GroupTransitionRebind.swift@@ -52,6 +52,7 @@ enum GroupTransitionRebind {         guard let first = heads.first else { return false }         return heads.allSatisfy { $0.workID == first.workID &&             $0.groupID == first.groupID && $0.characterID == first.characterID &&-            $0.chapterID == first.chapterID && $0.action == first.action }+            $0.chapterID == first.chapterID && $0.action == first.action+        }     } }
Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swift b/Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swiftindex c9b2c10d..b326279c 100644--- a/Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/GroupWorkMerge.swift@@ -37,7 +37,8 @@ enum GroupWorkMerge {         let deletedIDs = Set(absentIDs.filter { groupID in             let events = coherentFacts.filter { $0.groupID == groupID &&                 $0.workID == sourceID && GroupRoster.complete($0.id, in: factsByID,-                    parents: { $0.parentHeadIDs }) }+                    parents: { $0.parentHeadIDs })+            }             return events.contains(where: { if case .create = $0.operation { return true }; return false }) &&                 events.contains(where: { if case .delete = $0.operation { return true }; return false })         })
Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swiftindex e9857956..11b5a4b2 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryDiagnosticRecords.swift@@ -67,7 +67,8 @@ enum LibraryDiagnosticRecords {                     predicate: #Predicate { $0.hostname == hostname }))                     .filter { !$0.hasSiteFreeAuthoredSource || $0.site != nil }                     .sorted { ($0.id.uuidString, $0.captureTitle, $0.rawURLString, $0.firstCapturedAt)-                        < ($1.id.uuidString, $1.captureTitle, $1.rawURLString, $1.firstCapturedAt) }+                        < ($1.id.uuidString, $1.captureTitle, $1.rawURLString, $1.firstCapturedAt)+                    }                 var variants: [UUID: Int] = [:]                 records = entries.map { entry in                     let variant = variants[entry.id, default: 0]@@ -83,8 +84,7 @@ enum LibraryDiagnosticRecords {                 let sites = SiteResolutionOrder.sorted(try context.fetch(FetchDescriptor<Site>(                     predicate: #Predicate { $0.hostname == hostname })))                 let shown: [Site]-                if case .siteTuple = diagnosis { shown = Array(sites.prefix(1)) }-                else { shown = sites }+                if case .siteTuple = diagnosis { shown = Array(sites.prefix(1)) } else { shown = sites }                 records = shown.enumerated().map { index, site in                     LibraryDiagnosticRecord(                         kind: .site, recordID: hostname, title: site.displayName,
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swiftindex 4b333e4f..49f0d407 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+AssociationNotes.swift@@ -121,8 +121,7 @@ extension LibraryRepository {             let detached = Set(storage.notes.detachedTextHeads(activeAcceptanceIDs: activeIDs).map(\.id))             var blockedPairs: Set<AssociationPair> = [], blockedWorks: Set<UUID> = []             for raw in storage.rawNotes where raw.value == nil || storage.notes.invalidIDs.contains(raw.id) {-                if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { blockedPairs.insert(pair) }-                else { blockedWorks.insert(raw.workID) }+                if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { blockedPairs.insert(pair) } else { blockedWorks.insert(raw.workID) }             }             var variants: [String: DetachedAssociationNoteSnapshot] = [:]             for raw in storage.rawNotes {
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swiftindex 9c2a9c61..639fe3f7 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Associations.swift@@ -88,7 +88,8 @@ extension LibraryRepository {                 rawNotes: rawByPair[pair, default: []],                 removalCorrectionIDs: storage.ledger.pairCorrectionIDs(pair: pair))         }.sorted { [$0.pair.kind.rawValue, $0.recordName, $0.pair.recordID.uuidString]-            .lexicographicallyPrecedes([$1.pair.kind.rawValue, $1.recordName, $1.pair.recordID.uuidString]) }+            .lexicographicallyPrecedes([$1.pair.kind.rawValue, $1.recordName, $1.pair.recordID.uuidString])+        }     } } 
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swiftindex 7d48c2c4..5c12d6fc 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CatchUpProgress.swift@@ -55,8 +55,7 @@ extension LibraryRepository {     ) async throws -> LibraryWriteOutcome {         func valid(_ number: Int?) -> Bool { number.map { (0...9_999).contains($0) } ?? true }         let overrideNumber: Int?-        if case .set(let number) = draft.override { overrideNumber = number }-        else { overrideNumber = nil }+        if case .set(let number) = draft.override { overrideNumber = number } else { overrideNumber = nil }         guard valid(draft.latest), valid(overrideNumber) else {             throw LibraryRepositoryError.invalidInput(                 operation: "saving catch-up progress", reason: "chapter number must be from 0 to 9,999")@@ -82,8 +81,7 @@ extension LibraryRepository {             }             CatchUpWriter.apply(record, to: group.rows)             for row in group.rows { row.modifiedAt = timestamp }-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving catch-up progress", reason: String(describing: error))             }@@ -108,8 +106,7 @@ extension LibraryRepository {                 row.readingStatus = status                 row.modifiedAt = timestamp             }-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically setting reading status", reason: String(describing: error))             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swiftindex b8a28910..3950d49a 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ChapterCapture.swift@@ -36,7 +36,8 @@ extension LibraryRepository {             let related = index.sourcesByDestination[group.id] ?? []             let sourceEvidence = related.compactMap { $0.evidenceData.flatMap {                 try? JSONBlob.decode(EntrySourceEvidence.self, from: $0)-            } }+            }+            }             let union = EntrySourceEvidence.union(sourceEvidence)             var bindings = union.active             if group.carrier.authoredTargetData == nil {@@ -188,8 +189,7 @@ extension LibraryRepository {             guard !differs || contentChoice != nil else {                 return .reviewRequired(fresh, reason: "Choose which note and rating to keep")             }-            if contentChoice == .destination { contentNote = selected.note; contentRating = selected.rating }-            else if contentChoice == nil {+            if contentChoice == .destination { contentNote = selected.note; contentRating = selected.rating } else if contentChoice == nil {                 if contentNote.isEmpty { contentNote = selected.note }                 contentRating = contentRating ?? selected.rating             }@@ -215,8 +215,7 @@ extension LibraryRepository {             guard !differs || contentChoice != nil else {                 return .reviewRequired(fresh, reason: "Choose which note and rating to keep")             }-            if contentChoice == .destination { contentNote = selected.note; contentRating = selected.rating }-            else if contentChoice == nil {+            if contentChoice == .destination { contentNote = selected.note; contentRating = selected.rating } else if contentChoice == nil {                 if contentNote.isEmpty { contentNote = selected.note }                 contentRating = contentRating ?? selected.rating             }@@ -321,8 +320,7 @@ extension LibraryRepository {             }             try EntrySources.associateAll(associations, timestamp: stamp, context: context)             let deliberatelyAddsChapter: Bool-            if case .newChapter = draft.intent { deliberatelyAddsChapter = true }-            else { deliberatelyAddsChapter = false }+            if case .newChapter = draft.intent { deliberatelyAddsChapter = true } else { deliberatelyAddsChapter = false }             let learnsMultiple = deliberatelyAddsChapter && selectedID == nil && isChapter && fresh.entries.contains {                 $0.target?.kind != .note && $0.sourceURLs.contains(ExactScalarString(capture.rawURLString))             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swiftindex b98b604e..f38dddee 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+CharacterGroups.swift@@ -132,8 +132,7 @@ extension LibraryRepository {             let result = try self.applyGroupEdits(workID: workID, operations: operations,                 currentChapterID: currentChapterID, context: context)             if case .committed = result {-                do { try saveStrategy.save(context) }-                catch { context.rollback(); throw error }+                do { try saveStrategy.save(context) } catch { context.rollback(); throw error }             }             return result         }@@ -217,7 +216,8 @@ extension LibraryRepository {                     return copies.allSatisfy { $0.workID == first.workID &&                         $0.groupID == first.groupID && $0.payloadData == first.payloadData &&                         $0.parentHeadIDsData == first.parentHeadIDsData &&-                        $0.recordedAt == first.recordedAt }+                        $0.recordedAt == first.recordedAt+                    }                 }) else { return .groupTorn }                 let projection = GroupRoster.project(workID: workID, chapters: [],                     groupRows: rows, factRows: factRows, transitionRows: [])@@ -390,7 +390,8 @@ extension LibraryRepository {                             $0.groupID == first.groupID && $0.characterID == first.characterID &&                             $0.entryID == first.entryID && $0.payloadData == first.payloadData &&                             $0.parentHeadIDsData == first.parentHeadIDsData &&-                            $0.recordedAt == first.recordedAt }+                            $0.recordedAt == first.recordedAt+                        }                     }) else { return refuse(.stale) }                     let chain = Dictionary(grouping: chains, by: \.id).values.compactMap {                         $0.first?.transitionValue
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swiftindex 1c68d8e8..4c01c15f 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ComposedTeaching.swift@@ -74,12 +74,10 @@ extension LibraryRepository {              // 1. Refetch basis and re-project.             let currentBasis: ComposedTeachingBasis-            do { currentBasis = try self.buildComposedTeachingBasis(hostname: hostname, context: context) }-            catch { return .invalidated(reason: "failed to refetch composed basis: \(error)") }+            do { currentBasis = try self.buildComposedTeachingBasis(hostname: hostname, context: context) } catch { return .invalidated(reason: "failed to refetch composed basis: \(error)") }              let currentOutcome: ComposedTeachingOutcome-            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) }-            catch { return .invalidated(reason: String(describing: error)) }+            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) } catch { return .invalidated(reason: String(describing: error)) }              // 2. Compare basis AND outcome.             if currentBasis != contract.basis || currentOutcome != contract.outcome {@@ -213,8 +211,7 @@ extension LibraryRepository {                         + "'\(hostname)': \(introduced.diagnosis)")             } -            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving composed teaching", reason: String(describing: error))             }@@ -263,12 +260,10 @@ extension LibraryRepository {             let hostname = contract.basis.hostname              let currentBasis: ComposedTeachingBasis-            do { currentBasis = try self.buildComposedTeachingBasis(hostname: hostname, context: context) }-            catch { return .invalidated(reason: "failed to refetch composed basis: \(error)") }+            do { currentBasis = try self.buildComposedTeachingBasis(hostname: hostname, context: context) } catch { return .invalidated(reason: "failed to refetch composed basis: \(error)") }              let currentOutcome: ComposedTeachingOutcome-            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) }-            catch { return .invalidated(reason: String(describing: error)) }+            do { currentOutcome = try ComposedTeachingProjectionPlanner.project(basis: currentBasis, request: contract.request) } catch { return .invalidated(reason: String(describing: error)) }              if currentBasis != contract.basis || currentOutcome != contract.outcome {                 return .refreshed(ComposedTeachingContract(@@ -323,8 +318,7 @@ extension LibraryRepository {                 after: NoEpisodeWriter.facts(rows: noteRows, calendar: noteCalendar), context: context)              let diagnoses: [String: LibraryValidationError]-            do { diagnoses = try LibraryValidator.validate(context: context).quarantineMap() }-            catch {+            do { diagnoses = try LibraryValidator.validate(context: context).quarantineMap() } catch {                 context.rollback()                 return .invalidated(reason: "recalculation produced an invalid library: \(error)")             }@@ -338,8 +332,7 @@ extension LibraryRepository {                         + "'\(hostname)': \(introduced.diagnosis)")             } -            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving recalculation", reason: String(describing: error))             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swiftindex a79be53d..db22ecf1 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ConfirmImport.swift@@ -69,8 +69,7 @@ extension LibraryRepository {         // Imported rule forms must be usable at the running gate (Req 4.7's         // sibling): refuse before anything is written.         for pattern in plan.payload.titlePatterns {-            do { try capabilities.validate(patternDefinition: pattern.definition.definition) }-            catch {+            do { try capabilities.validate(patternDefinition: pattern.definition.definition) } catch {                 throw LibraryRepositoryError.invalidInput(                     operation: "validating imported pattern forms",                     reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swiftindex 8c484146..871f1fd5 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Contracts.swift@@ -49,8 +49,7 @@ extension LibraryRepository {          let patterns = try site.patternValues.compactMap { p -> PatternBasisEntry? in             let def: PatternDefinition-            do { def = try p.definition }-            catch {+            do { def = try p.definition } catch {                 // T-2289: a retired pattern that will not decode is history the                 // validator tolerates; the basis leaves it out rather than                 // refusing to teach the site. The active one must still read.@@ -374,8 +373,7 @@ extension LibraryRepository {                 }             } -            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving teaching",                     reason: String(describing: error)
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swiftindex d92a10bf..fa048690 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+Export.swift@@ -219,8 +219,7 @@ extension LibraryRepository {         ) throws -> (title: String, typeLabel: String?)? {             if let cached = works[workID] { return cached.fields }             let directory: WorkTypeDirectory-            if let types { directory = types }-            else {+            if let types { directory = types } else {                 directory = try LibraryRepository.workTypeDirectory(context: context)                 types = directory             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swiftindex 351465c7..263e78b0 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupHistory.swift@@ -12,8 +12,8 @@ private struct GroupHistoryCursor: Codable {     var digest: String     var nextIndex: Int     var completed: Bool-    var chapterDigest: String? = nil-    var targetDigest: String? = nil+    var chapterDigest: String?+    var targetDigest: String? }  private struct GroupHistorySidecar: Codable {@@ -149,8 +149,7 @@ extension LibraryRepository {                         context: context, timestamp: timestamp, groupOnly: true)                     let wrote = retired || linked                     if wrote {-                        do { try saveStrategy.save(context) }-                        catch { context.rollback(); throw error }+                        do { try saveStrategy.save(context) } catch { context.rollback(); throw error }                     }                     return wrote                 }@@ -189,7 +188,7 @@ extension LibraryRepository {                     $0.work?.id == workID && AssociationEndpointInventory.eligible($0)                 }) else { return nil }                 return id-            })+        })         // This fold only needs canonical uncertainty, not chapter order. Give         // it the bounded, verified anchors so a missing independent leave is         // disputed without treating every healthy member as unresolved.@@ -222,7 +221,8 @@ extension LibraryRepository {                           $0.groupID == first.groupID &&                           $0.payloadData == first.payloadData &&                           $0.parentHeadIDsData == first.parentHeadIDsData &&-                          $0.recordedAt == first.recordedAt }+                          $0.recordedAt == first.recordedAt+                      }                   }) else { return false }             let factsByID = Dictionary(grouping: factRows, by: \.id)                 .compactMapValues { $0.first?.factValue }@@ -256,7 +256,8 @@ extension LibraryRepository {                           $0.characterID == first.characterID &&                           $0.entryID == first.entryID && $0.payloadData == first.payloadData &&                           $0.parentHeadIDsData == first.parentHeadIDsData &&-                          $0.recordedAt == first.recordedAt }+                          $0.recordedAt == first.recordedAt+                      }                   }) else { return false }             let transitionsByID = Dictionary(grouping: transitionRows, by: \.id)                 .compactMapValues { $0.first?.transitionValue }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swiftindex 2d3295ec..6459ee4e 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+GroupSuggestionSkip.swift@@ -47,8 +47,7 @@ extension LibraryRepository {             context.insert(try AssociationEvent(event: .init(                 payload: .groupSuggestionSkip(skip)),                 recordedAt: MillisecondInstant.quantize(clock.now())))-            do { try saveStrategy.save(context) }-            catch { context.rollback(); throw error }+            do { try saveStrategy.save(context) } catch { context.rollback(); throw error }             return .committed(groupIDs: [])         }     }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swiftindex 3b130a8f..e8e677ca 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ManualEntry.swift@@ -102,8 +102,7 @@ extension LibraryRepository {     }      private static func manualSourceURL(_ input: String?, operation: String) throws -> String? {-        do { return try HostnameNormalizer.optionalSourceURL(input) }-        catch {+        do { return try HostnameNormalizer.optionalSourceURL(input) } catch {             throw LibraryRepositoryError.invalidInput(operation: operation,                 reason: "Enter a source address such as example.com/book or an HTTP(S) URL")         }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swiftindex 7e1c3f5f..bd2f449a 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+NoEpisode.swift@@ -70,14 +70,13 @@ extension LibraryRepository {                 .contains { $0.workID == workID && $0.day == day }             guard !matchingNote else { return .conflict(.recordChanged(recordID: workID)) }             let history = try NoEpisodeIndex(context: context).history(for: workID)-            guard try !history.isMarked(workID: workID, day: day.description) else { return .committed }+            guard !history.isMarked(workID: workID, day: day.description) else { return .committed }             let action = try NoEpisodeHistory.Action(                 workID: workID, key: "mark/\(UUID().uuidString)", day: day.description,                 kind: .mark,                 observedClearKeys: history.clearKeys(workID: workID, day: day.description).sorted())             try NoEpisodeWriter.insertMissing([action], context: context)-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "saving no-episode mark", reason: String(describing: error))             }@@ -90,13 +89,12 @@ extension LibraryRepository {             let group = try self.resolveWorkWriteTarget(id: workID, context: context)             if let refusal = Self.tornRefusal(group) { return refusal }             let history = try NoEpisodeIndex(context: context).history(for: workID)-            guard try history.isMarked(workID: workID, day: day.description) else { return .committed }+            guard history.isMarked(workID: workID, day: day.description) else { return .committed }             let action = try NoEpisodeHistory.Action(                 workID: workID, key: "clear/\(UUID().uuidString)", day: day.description,                 kind: .clear, observedClearKeys: [])             try NoEpisodeWriter.insertMissing([action], context: context)-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "saving no-episode undo", reason: String(describing: error))             }@@ -111,8 +109,7 @@ extension LibraryRepository {             let wrote = try NoEpisodeWriter.reconcileCurrentNotes(                 context: context, calendar: calendar)             if wrote {-                do { try saveStrategy.save(context) }-                catch {+                do { try saveStrategy.save(context) } catch {                     throw LibraryRepositoryError.libraryUnavailable(                         operation: "saving no-episode note clears", reason: String(describing: error))                 }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swiftindex f58aefa1..ce84dc6d 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+PendingMentionReviews.swift@@ -127,7 +127,8 @@ extension LibraryRepository {             })             let selected = Set(records.values.flatMap { $0.flatMap { kind, targets in                 targets.map { AssociationRecordAddress(kind: kind, id: $0.id) }-            } })+            }+            })             let endpoints = try AssociationEndpointInventory.read(context: context, pairs: ledger.pairs, entryIDs: entries, records: selected)             let coherentByWork = Dictionary(grouping: endpoints.targets.values, by: \.workID).mapValues {                 Dictionary(grouping: $0, by: { $0.address.kind }).mapValues { Set($0.map { $0.address.id }) }@@ -162,8 +163,7 @@ extension LibraryRepository {                     for event in additions { context.insert(try AssociationEvent(event: event, recordedAt: timestamp)) }                     try self.saveStrategy.save(context)                 }-            }-            catch { context.rollback(); throw error }+            } catch { context.rollback(); throw error }             return results         }     }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swiftindex a157bdf3..99782bc3 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecognisedCharacters.swift@@ -178,8 +178,7 @@ extension LibraryRepository {             }             Self.writeCoverage(chapterSources, works: works)             _ = try Self.writeAssociationCoverage(request.completedSources, workID: workID, works: works, context: context, timestamp: timestamp)-            do { try self.saveStrategy.save(context) }-            catch { context.rollback(); throw error }+            do { try self.saveStrategy.save(context) } catch { context.rollback(); throw error }             return .committed(recordID: targetID)         }     }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swiftindex a1d63ccb..1dbc20e0 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordEditing.swift@@ -422,8 +422,7 @@ extension LibraryRepository {         switch operation {         case .create(let draft), .createIdentified(_, let draft):             let id: UUID-            if case .createIdentified(let planned, _) = operation { id = planned }-            else { id = UUID() }+            if case .createIdentified(let planned, _) = operation { id = planned } else { id = UUID() }             let key = RecordNameKey.normalize(draft.name)             let row = Row.make(                 id: id, name: draft.name, nameKey: key, aliases: draft.aliases,
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swiftindex 912903d7..a87b0f7d 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+RecordHistory.swift@@ -51,8 +51,7 @@ extension LibraryRepository {         var invalidNotes: Set<AssociationPair> = []         var opaqueNotes = false         for raw in storage.rawNotes where raw.value == nil || storage.notes.invalidIDs.contains(raw.id) {-            if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { invalidNotes.insert(pair) }-            else if raw.workID == workID { opaqueNotes = true }+            if let pair = try? JSONBlob.decode(AssociationPair.self, from: raw.originPairData) { invalidNotes.insert(pair) } else if raw.workID == workID { opaqueNotes = true }         }         var rowsByEntry: [UUID: RecordHistoryRow] = [:]         var details: [RecordHistoryDetail] = []
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swiftindex a4fbf1ca..07979ab0 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+ReparseCapture.swift@@ -224,8 +224,7 @@ extension LibraryRepository {              try associationBefore.finish(context: context, timestamp: timestamp)             try Self.recordKnownChapterLinks(entryIDs: [group.id], context: context, timestamp: timestamp)-            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving Re-parse",                     reason: String(describing: error)@@ -477,8 +476,7 @@ extension LibraryRepository {                 context: context)              try Self.recordKnownChapterLinks(entryIDs: [entry.id], context: context, timestamp: timestamp)-            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 // One capture's save failing is not the library going away                 // (Req 5.7). They were the same case here, told apart only by                 // `operation:` — which Req 6.6 forbids a retry decision from
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swiftindex a7db7124..4b66ac86 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+SaveTimeKnownLinks.swift@@ -47,8 +47,10 @@ extension LibraryRepository {                     : GroupSupportInventory.placeClaimID                 let claims = records.values.flatMap { group in group.rows.flatMap { row in                     ([row.name, row.nameKey] + row.aliases).map { GroupNameClaim(kind: kind,-                        id: claimID, spelling: $0) }-                } }+                        id: claimID, spelling: $0)+                    }+                }+                }                 return .init(targets: targets, names: names,                     claimedKeys: Set(names.map(RecordNameKey.normalize)), claims: claims)             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swiftindex 63da5dce..4d4e30ed 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+TodayPresentation.swift@@ -149,12 +149,7 @@ extension LibraryRepository {                 // and leads; duplication is informational, and the app repairs it                 // on its own.                 let siteAttention: RecentRowAttention? =-                    if entry.authoredTarget != nil { missingWork ? .workMissing : nil }-                    else if site == nil { .siteMissing }-                    else if mode == nil { .siteRulesInvalid }-                    else if isDuplicatedHostname { .siteDuplicated }-                    else if missingWork { .workMissing }-                    else { nil }+                    if entry.authoredTarget != nil { missingWork ? .workMissing : nil } else if site == nil { .siteMissing } else if mode == nil { .siteRulesInvalid } else if isDuplicatedHostname { .siteDuplicated } else if missingWork { .workMissing } else { nil }                  // **A nil mode yields `.none`, never `.untaught`.** Defaulting it                 // would render a Teach pill routing into
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swiftindex 7fd9f9df..72a89c1b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+URLIdentity.swift@@ -115,7 +115,7 @@ extension LibraryRepository {         previousIdentity: Self.identitySnapshot(           of: onHostname.memberships(of: group.representative),           hostname: hostname, fallbackRules: siteRules))-    }+      }      logger.debug("Built URL evidence for \(hostname): \(entries.count) entries")     return try URLSiteEvidenceBasis(
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swiftindex 1c9113c8..4cb88fad 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDeletion.swift@@ -303,8 +303,7 @@ extension LibraryRepository {                         "Work deletion produced an invalid library state: \(introduced.diagnosis)")             } -            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically deleting Work",                     reason: String(describing: error))
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swiftindex cdbd12c6..da87930e 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkDetailEdit.swift@@ -113,8 +113,7 @@ extension LibraryRepository {             // those keys instead of re-fetching the Work and traversing its             // membership relationship a second time.             let removalHostnames = Set(removalDiagnoses.map { Array($0.keys) } ?? [])-            do { try self.saveStrategy.save(context) }-            catch {+            do { try self.saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(operation: "saving Work detail",                     reason: String(describing: error))             }
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swiftindex 73822add..4107188d 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository+WorkMerge.swift@@ -52,8 +52,7 @@ extension LibraryRepository {             let outcome = try self.applyWorkURL(contract, context: context,                 postCommitDiagnoses: &diagnoses)             if case .committed = outcome {-                do { try self.saveStrategy.save(context) }-                catch {+                do { try self.saveStrategy.save(context) } catch {                     context.rollback()                     _ = try? context.fetch(FetchDescriptor<Work>())                     _ = try? context.fetch(FetchDescriptor<Site>())@@ -374,8 +373,7 @@ extension LibraryRepository {                 context: context             ).basis             let outcome: WorkMergeOutcome-            do { outcome = try WorkMergePlanner.project(basis, request: request) }-            catch let error as WorkMergePlanningError {+            do { outcome = try WorkMergePlanner.project(basis, request: request) } catch let error as WorkMergePlanningError {                 // `projectWorkURL`'s shape, and Q41's reason: `withLockedContext`                 // re-wraps anything that is not a `LibraryRepositoryError` as                 // `libraryUnavailable`, so "these works are in different series"
Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swiftindex f8b884d9..71905292 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryRepository.swift@@ -267,8 +267,7 @@ public actor LibraryRepository {     /// private copy of this. Three spellings of one two-line rule are three     /// places for the wrapping to drift.     internal func commit(_ context: ModelContext, operation: String) throws {-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: operation, reason: String(describing: error))         }@@ -1034,8 +1033,7 @@ public actor LibraryRepository {      public func siteStatus(forRawURL rawURL: String) async throws -> CaptureSiteStatus {         let hostname: String-        do { hostname = try HostnameNormalizer.fromRawURL(rawURL) }-        catch { throw LibraryRepositoryError.invalidInput(operation: "checking capture Site", reason: String(describing: error)) }+        do { hostname = try HostnameNormalizer.fromRawURL(rawURL) } catch { throw LibraryRepositoryError.invalidInput(operation: "checking capture Site", reason: String(describing: error)) }          return try await withLockedContext(mode: .shared, operation: "checking capture Site") { context in             let sites = try Self.fetchSites(hostname: hostname, context: context)@@ -1081,8 +1079,7 @@ public actor LibraryRepository {             entry.conservativeIdentityKey = draft.rawURLString             // This convenience capture leaves the entry unattached. Its later             // assignment records the work/date clear in that transaction.-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving Entry and Site",                     reason: String(describing: error)@@ -1138,8 +1135,7 @@ public actor LibraryRepository {                 before: before, after: Self.noteFacts(group, calendar: calendar), context: context)             try associationBefore.finish(context: context, timestamp: timestamp)             try Self.recordKnownChapterLinks(entryIDs: [group.id], context: context, timestamp: timestamp)-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "saving Entry note and rating",                     reason: String(describing: error)@@ -1230,8 +1226,7 @@ public actor LibraryRepository {                 }             }             try associationBefore.finish(context: context, timestamp: timestamp)-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically deleting Entry",                     reason: String(describing: error)@@ -1270,8 +1265,7 @@ public actor LibraryRepository {         let operation = "checking the site or URL"         let hostname: String         let workURL: String?-        do { (hostname, workURL) = try HostnameNormalizer.siteOrURL(draft.hostname) }-        catch {+        do { (hostname, workURL) = try HostnameNormalizer.siteOrURL(draft.hostname) } catch {             throw LibraryRepositoryError.invalidInput(                 operation: operation, reason: String(describing: error))         }@@ -1343,8 +1337,7 @@ public actor LibraryRepository {         // status and for its reason: `Work.create` is the one door every         // other creation path goes through, and none of them carries a URL.         if let workURL { work.membership(for: hostname)?.workURLString = workURL }-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: "atomically saving Work and Site",                 reason: String(describing: error)@@ -1504,15 +1497,14 @@ public actor LibraryRepository {     public func updateWorkWithMembershipReceipt(         id: UUID, basis: WorkEditBasis, draft: WorkMetadataDraft, calendar: Calendar     ) async throws -> MembershipWriteReceipt {-        return try await withLockedContext(mode: .exclusive, operation: "updating Work") { context in+        try await withLockedContext(mode: .exclusive, operation: "updating Work") { context in             let receipt = try self.applyWorkMetadata(id: id, basis: basis, draft: draft,                 calendar: calendar, context: context)             guard receipt.outcome == .committed else {                 Self.rollbackMembershipWrite(context)                 return receipt             }-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 Self.rollbackMembershipWrite(context)                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving Work metadata", reason: String(describing: error))@@ -1813,8 +1805,7 @@ public actor LibraryRepository {                 before: before, after: Self.noteFacts(group, calendar: calendar), context: context)             try associationBefore.finish(context: context, timestamp: timestamp)             try Self.recordKnownChapterLinks(entryIDs: [group.id], context: context, timestamp: timestamp)-            do { try saveStrategy.save(context) }-            catch {+            do { try saveStrategy.save(context) } catch {                 throw LibraryRepositoryError.libraryUnavailable(                     operation: "atomically saving Work assignment",                     reason: String(describing: error)@@ -1865,7 +1856,6 @@ public actor LibraryRepository {     }  -     // MARK: - Private Teaching Helpers      internal static func applyProjection(@@ -2008,9 +1998,7 @@ public actor LibraryRepository {         )         defer { withExtendedLifetime(lease) {} }         let context = ModelContext(try liveContainer(operation))-        do { return try body(context) }-        catch let error as LibraryRepositoryError { throw error }-        catch {+        do { return try body(context) } catch let error as LibraryRepositoryError { throw error } catch {             throw LibraryRepositoryError.libraryUnavailable(operation: operation, reason: String(describing: error))         }     }@@ -2127,8 +2115,7 @@ public actor LibraryRepository {             // the fallback is for a row no writer in this build produces. It             // faults one relationship rather than dropping a Work the previous             // traversal would have offered.-            if let workID = membership.workID { ids.insert(workID) }-            else if let work = membership.work { ids.insert(work.id) }+            if let workID = membership.workID { ids.insert(workID) } else if let work = membership.work { ids.insert(work.id) }         }         guard !ids.isEmpty else {             return HostnameWorks(works: [], membershipsByWorkID: [:])
Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swift b/Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swiftindex 24a21458..27dfefdb 100644--- a/Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/LibraryValidator.swift@@ -273,16 +273,13 @@ public enum LibraryValidator {                 by: { $0.id.uuidString }, GroupOrdering.sortedWorkRows)              for source in try context.fetch(FetchDescriptor<EntrySource>(predicate: #Predicate { $0.hostname == hostname })) {-                do { try validateEntrySourceTuple(source) }-                catch let error as LibraryValidationError { record(hostname, error) }+                do { try validateEntrySourceTuple(source) } catch let error as LibraryValidationError { record(hostname, error) }             }             for site in rows {-                do { try validate(site: site, allPatterns: allPatterns, allRules: allRules) }-                catch let error as LibraryValidationError { record(hostname, error) }+                do { try validate(site: site, allPatterns: allPatterns, allRules: allRules) } catch let error as LibraryValidationError { record(hostname, error) }             }             for membership in memberships {-                do { try validate(membership: membership) }-                catch let error as LibraryValidationError {+                do { try validate(membership: membership) } catch let error as LibraryValidationError {                     // Q47: this arm returns a **tuple** map, and a wrong-host                     // Work URL is not a tuple finding — it is the Work-keyed                     // tolerated state `validate(graph:)` and the foreground pass@@ -493,8 +490,7 @@ public enum LibraryValidator {         // Sources are independent sync rows. A not-yet-arrived owner is kept,         // but malformed link/evidence bytes are tuple findings on its own host.         for source in graph.entrySources {-            do { try validateEntrySourceTuple(source) }-            catch let error as LibraryValidationError { record(source.hostname, error) }+            do { try validateEntrySourceTuple(source) } catch let error as LibraryValidationError { record(source.hostname, error) }         }          var orphanedEntries: [String: Int] = [:]@@ -515,8 +511,7 @@ public enum LibraryValidator {         var wrongHostRows: [UUID: [WorkSiteMembership]] = [:]         for membership in membershipRows         where seenMemberships.insert(ObjectIdentifier(membership)).inserted {-            do { try validate(membership: membership) }-            catch let error as LibraryValidationError {+            do { try validate(membership: membership) } catch let error as LibraryValidationError {                 // Decision 1: the finding is tolerated rather than recorded, so                 // it takes no site's rules away and does not stand in front of a                 // Work or Entry finding on the same hostname (Q21).@@ -633,8 +628,7 @@ public enum LibraryValidator {                 reason: "Source URL must be absolute HTTP(S) on its recorded hostname")         }         if let data = source.evidenceData {-            do { _ = try JSONBlob.decode(EntrySourceEvidence.self, from: data) }-            catch {+            do { _ = try JSONBlob.decode(EntrySourceEvidence.self, from: data) } catch {                 throw LibraryValidationError.invalidStateTuple(type: "EntrySource", id: source.id.uuidString,                     reason: "Source evidence cannot be read: \(error)")             }@@ -812,8 +806,7 @@ public enum LibraryValidator {             // Ownership was checked above for every row.             guard pattern.isActive else { continue }             let stored: StoredPatternDefinition-            do { stored = try pattern.storedDefinition }-            catch { throw unreadablePattern(pattern, error) }+            do { stored = try pattern.storedDefinition } catch { throw unreadablePattern(pattern, error) }             // Trims exist only on title rules (structurally true) and, when present,             // are exact nonempty affixes.             if let prefix = stored.trimPrefix, prefix.isEmpty {@@ -844,10 +837,8 @@ public enum LibraryValidator {             // and only the current rule's structure is checked (T-2289).             guard rule.isCurrent else { continue }             let definition: URLRuleDefinition-            do { definition = try rule.definition }-            catch { throw unreadableRule(rule, error) }-            do { try definition.validate(origin: origin, isCurrent: rule.isCurrent) }-            catch { throw invalid("URLRulePattern", rule.id.uuidString, String(describing: error)) }+            do { definition = try rule.definition } catch { throw unreadableRule(rule, error) }+            do { try definition.validate(origin: origin, isCurrent: rule.isCurrent) } catch { throw invalid("URLRulePattern", rule.id.uuidString, String(describing: error)) }         }          // This one counts **rows** where `siteTupleIsLegal` counts groups (Q107).@@ -1038,8 +1029,7 @@ public enum LibraryValidator {         // over a loss no write can undo. `entriesWithoutCitationBlobCount`         // counts it and the archive repairs it.         let citations: EntryCitations-        do { citations = try entry.citations }-        catch {+        do { citations = try entry.citations } catch {             throw LibraryValidationError.unreadableCitations(                 id: id, reason: String(describing: error))         }@@ -1058,8 +1048,7 @@ public enum LibraryValidator {         }          if let data = entry.authoredTargetData {-            do { _ = try AuthoredEntryTarget.decode(data) }-            catch { throw invalid("Entry", id, "unreadable authored target") }+            do { _ = try AuthoredEntryTarget.decode(data) } catch { throw invalid("Entry", id, "unreadable authored target") }             guard entry.identityBasis == .authoredUUID,                   entry.entryIdentityKey == "entry/\(entry.id.uuidString.lowercased())",                   entry.conservativeIdentityKey.isEmpty,@@ -1156,8 +1145,7 @@ public enum LibraryValidator {             guard try EntryIdentityKeyV2Codec.decode(entry.entryIdentityKey) == expected else {                 throw invalid("Entry", id, "v2 key does not match its semantic tuple")             }-        } catch let error as LibraryValidationError { throw error }-        catch { throw invalid("Entry", id, "invalid v2 identity key: \(error)") }+        } catch let error as LibraryValidationError { throw error } catch { throw invalid("Entry", id, "invalid v2 identity key: \(error)") }     }      private static func validateV3(@@ -1200,8 +1188,7 @@ public enum LibraryValidator {         // host and sequence are all that can be checked.         guard let namePattern else { return }         let stored: StoredPatternDefinition-        do { stored = try namePattern.storedDefinition }-        catch {+        do { stored = try namePattern.storedDefinition } catch {             // A retired pattern that will not decode leaves nothing to replay             // against, exactly as an unresolved citation does; only the active             // one is a diagnosis (T-2289).@@ -1249,8 +1236,7 @@ public enum LibraryValidator {             // per-Site rule loop throwing first, but this branch must not depend             // on that ordering.             let definition: URLRuleDefinition-            do { definition = try rule.definition }-            catch {+            do { definition = try rule.definition } catch {                 // Retired and unreadable: nothing to replay against (T-2289).                 if !rule.isCurrent { return }                 throw unreadableRule(rule, error)@@ -1272,8 +1258,7 @@ public enum LibraryValidator {             }             // `definition` decodes JSON on every access; read it once per Entry.             let definition: URLRuleDefinition-            do { definition = try rule.definition }-            catch {+            do { definition = try rule.definition } catch {                 if !rule.isCurrent { return }                 throw unreadableRule(rule, error)             }@@ -1365,7 +1350,7 @@ public enum LibraryValidator {             }         case .manual:             guard !hasURLReference,-                  (work == nil ? entry.intentionallyUnattached : !entry.intentionallyUnattached) else {+                  work == nil ? entry.intentionallyUnattached : !entry.intentionallyUnattached else {                 throw invalid("Entry", id, "manual assignment has incompatible relationship or provenance")             }         case .pattern:
Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swift b/Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swiftindex 13ce064c..00be95f3 100644--- a/Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/MarkdownExport.swift@@ -425,8 +425,7 @@ public enum MarkdownExport {         // Collapsed like every other title-bearing value: a raw URL carrying a         // stray newline would otherwise split the link across two paragraphs.         let headingText = heading.isEmpty ? (input.rawURLString.isEmpty ? "Note" : escape(collapsed(input.rawURLString))) : heading-        if input.rawURLString.isEmpty { paragraphs.append("## \(headingText)") }-        else { paragraphs.append("## [\(headingText)](\(encodeLinkTarget(input.rawURLString)))") }+        if input.rawURLString.isEmpty { paragraphs.append("## \(headingText)") } else { paragraphs.append("## [\(headingText)](\(encodeLinkTarget(input.rawURLString)))") }         if !input.additionalSourceURLs.isEmpty {             paragraphs.append("Sources: " + input.additionalSourceURLs.map {                 "[\(escape(collapsed($0)))](\(encodeLinkTarget($0)))"
Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swift b/Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swiftindex 5c85c036..73f47c40 100644--- a/Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/NSItemProvider+ItemProviderLoading.swift@@ -30,6 +30,9 @@ extension NSItemProvider: ItemProviderLoading {             return progress         } +        // Legacy concrete plain-text providers do not bridge to either modern+        // object or data loading on the current SDK; retain their supported+        // representation until a replacement passes the concrete provider tests.         loadItem(forTypeIdentifier: typeIdentifier, options: nil) { item, error in             progress.completedUnitCount = 1             let text = (item as? String) ?? (item as? Data).flatMap {@@ -42,9 +45,23 @@ extension NSItemProvider: ItemProviderLoading {      public func loadPropertyList(completion: @escaping @Sendable ([String: Any]?, (any Error)?) -> Void) -> Progress {         let progress = Progress(totalUnitCount: 1)-        self.loadItem(forTypeIdentifier: UTType.propertyList.identifier, options: nil) { item, error in+        // Safari's preprocessing attachment can be an NSDictionary-backed legacy+        // item. loadDataRepresentation cannot read that representation (covered+        // with a concrete NSItemProvider), and NSDictionary is not an+        // NSItemProviderReading class. Retain this compatibility call until the+        // platform supplies a replacement that preserves Safari metadata.+        loadItem(forTypeIdentifier: UTType.propertyList.identifier, options: nil) { item, error in             progress.completedUnitCount = 1-            completion(item as? [String: Any], error)+            if let data = item as? Data {+                do {+                    let value = try PropertyListSerialization.propertyList(from: data, options: [], format: nil)+                    completion(value as? [String: Any], error)+                } catch {+                    completion(nil, error)+                }+            } else {+                completion(item as? [String: Any], error)+            }         }         return progress     }
Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swift b/Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swiftindex 2bb3a0ea..29f3881c 100644--- a/Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/PageTitleFetcher.swift@@ -158,8 +158,8 @@ public struct HeadMetadataScanner: Sendable {     // MARK: - HTML parsing      private func parse(_ text: String) -> ScannedHeadMetadata {-        var title: String? = nil-        var openGraphTitle: String? = nil+        var title: String?+        var openGraphTitle: String?         var canonicalCandidates: [String] = []         var collected: [CollectedImageCandidate] = []         var bodyImages: [BodyImage] = []@@ -644,7 +644,7 @@ public final class BoundedPageTitleFetcher: PageTitleFetching, @unchecked Sendab     public func fetch(url: String) async throws -> FetchedPageMetadata? {         guard let components = URLComponents(string: url),               let scheme = components.scheme?.lowercased(),-              (scheme == "http" || scheme == "https"),+              scheme == "http" || scheme == "https",               let host = components.host,               !host.isEmpty,               let requestURL = components.url else {
Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swift b/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swiftindex f102e540..46687a2a 100644--- a/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureDrain.swift@@ -544,8 +544,7 @@ public actor PendingCaptureDrain {             return .waiting(.observedFailure)         }         let hostname: String-        do { hostname = try HostnameNormalizer.fromRawURL(preparation.rawURL) }-        catch { return .invalidated(.invalidated) }+        do { hostname = try HostnameNormalizer.fromRawURL(preparation.rawURL) } catch { return .invalidated(.invalidated) }          let contract = try await repository.projectCapture(             hostname: hostname,
Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swift b/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swiftindex d03506a2..e607245b 100644--- a/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/PendingCaptureSpool.swift@@ -829,8 +829,7 @@ public actor PendingCaptureSpool {     private func evictOldestRefusals() throws {         var existing: [PendingCaptureRecord] = []         for url in try files(in: paths.pendingCapturesRefusalsURL) {-            if case .record(let record) = read(url) { existing.append(record) }-            else { try remove(at: url) }+            if case .record(let record) = read(url) { existing.append(record) } else { try remove(at: url) }         }         guard existing.count >= PendingCaptureBounds.maxRefusalRecords else { return }         let ordered = existing.sorted {
Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swift b/Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swiftindex 5b230c22..4c83cb5e 100644--- a/Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/ReSharePresentation.swift@@ -124,4 +124,3 @@ public enum ReShareActionLabels {         }     } }-
Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swift b/Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swiftindex 470bd045..426b761f 100644--- a/Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/SeriesPresentation.swift@@ -6,7 +6,7 @@ import Foundation /// Composes `SeriesDisplay.label` with a formatted position and never builds a /// label from a name (Q26) — the qualifier that tells two same-named series /// apart is the display's, and a second composition here would drop it.-public nonisolated enum SeriesPresentation {+nonisolated public enum SeriesPresentation {      /// "Ashfall Cycle · 2", "Ashfall Cycle · 5 Sep 2026 · 2.5", or     /// "Unavailable series"; nil for a work in no series, which has nothing to
Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swift b/Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swiftindex a188df07..5114e2a6 100644--- a/Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/ShareTransport.swift@@ -185,7 +185,7 @@ public actor CaptureCoordinator: CaptureCoordinating, LookupCaptureCoordinating         // 3. Title resolution — evidence and title selection are separate         let resolvedTitle: String?         let titleSource: CaptureTitleSource-        var fetchedCanonical: String? = nil+        var fetchedCanonical: String?          let effectiveHostTitle = payload.hostTitle.flatMap {             $0.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? nil : $0@@ -294,7 +294,7 @@ public actor CaptureCoordinator: CaptureCoordinating, LookupCaptureCoordinating     private static func isValidHTTPURL(_ value: String) -> Bool {         guard let components = URLComponents(string: value),               let scheme = components.scheme?.lowercased(),-              (scheme == "http" || scheme == "https"),+              scheme == "http" || scheme == "https",               let host = components.host, !host.isEmpty else {             return false         }@@ -310,7 +310,7 @@ public actor CaptureCoordinator: CaptureCoordinating, LookupCaptureCoordinating             guard let resolved = URL(string: candidate, relativeTo: base) else { continue }             let absolute = resolved.absoluteURL             guard let scheme = absolute.scheme?.lowercased(),-                  (scheme == "http" || scheme == "https"),+                  scheme == "http" || scheme == "https",                   let host = absolute.host, !host.isEmpty else { continue }             return absolute.absoluteString         }
Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swift b/Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swiftindex d83298b9..62fbfb88 100644--- a/Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/SyncMonitor.swift@@ -102,7 +102,7 @@ public final class SyncMonitor {     /// `@ObservationIgnored` because the attribute has to land on a *stored*     /// property, and because nothing observes a private registration list.     @ObservationIgnored-    private nonisolated(unsafe) var observers: [any NSObjectProtocol] = []+    nonisolated(unsafe) private var observers: [any NSObjectProtocol] = []     private var lastArrivalAt: Date?     private var debounceTask: Task<Void, Never>?     /// Callers parked in `awaitQuiescence`, with the deadline each was given.@@ -213,7 +213,7 @@ public final class SyncMonitor {     /// cannot be forgotten.     deinit { removeObservers() } -    private nonisolated func removeObservers() {+    nonisolated private func removeObservers() {         for observer in observers { NotificationCenter.default.removeObserver(observer) }         observers.removeAll()     }
Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swift b/Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swiftindex 150298aa..57de0804 100644--- a/Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/WorkTypeReconciler.swift@@ -60,8 +60,7 @@ enum WorkTypeReconciler {             outcome.formUnion(merge(collision, rowsByID: rowsByID))         }         guard !outcome.isEmpty else { return outcome }-        do { try saveStrategy.save(context) }-        catch {+        do { try saveStrategy.save(context) } catch {             throw LibraryRepositoryError.libraryUnavailable(                 operation: "converging the work-type list", reason: String(describing: error))         }
Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swift b/Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swiftindex f0c57ccc..1432dc74 100644--- a/Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swift+++ b/Packages/AsterismCore/Sources/AsterismCore/WrongHostWorkURLResolver.swift@@ -27,12 +27,6 @@ enum WrongHostWorkURLResolver {         let hostname: String         let value: String?         let orderKey: WorkSiteMembership.OrderKey--        init(hostname: String, value: String?, orderKey: WorkSiteMembership.OrderKey) {-            self.hostname = hostname-            self.value = value-            self.orderKey = orderKey-        }     }      /// One reading of a Work, taken before any write
Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swift b/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swiftindex e4009d5f..20baba2a 100644--- a/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swift+++ b/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterExtractionAssembler.swift@@ -183,12 +183,13 @@ public enum CharacterExtractionAssembler {         if case .entry(let entryID) = key.source, context.mentionIndex.eligibleEntries.contains(entryID),            match.map({ context.mentionIndex.canLink(kind: key.kind, recordID: $0.id) }) ?? true {             let suppressed = match.map { context.mentionIndex.isSuppressed(entryID: entryID,-                kind: key.kind, recordID: $0.id, spellingKey: key.nameKey) } ?? false+                kind: key.kind, recordID: $0.id, spellingKey: key.nameKey)+            } ?? false             let active = match.flatMap { context.mentionIndex.pair(entryID: entryID, kind: key.kind, recordID: $0.id) }                 .map { context.mentionIndex.activePairs.contains($0) } ?? false             if noteFirst && key.kind == .character {                 if !suppressed { mentionKeys = [key.nameKey] }-            } else if (!active || suppressed), pass == .manual || !suppressed {+            } else if !active || suppressed, pass == .manual || !suppressed {                 mentionKeys = [key.nameKey]             }         }@@ -313,7 +314,8 @@ public enum CharacterExtractionAssembler {                 guard case .entry(let entryID) = survivor.source, !survivor.mentionKeys.isEmpty,                       let fingerprint = revisions[survivor.source] else { return nil }                 let rejected = survivor.match.map { context.mentionIndex.rejectionIDs(entryID: entryID,-                    kind: key.kind, recordID: $0.id, spellingKeys: survivor.mentionKeys) } ?? []+                    kind: key.kind, recordID: $0.id, spellingKeys: survivor.mentionKeys)+                } ?? []                 return .init(entryID: entryID, noteFingerprint: fingerprint,                     spellingKeys: survivor.mentionKeys, observedRejectionIDs: rejected, sourceGuard: context.mentionIndex.sourceGuards[entryID])             }
Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swift b/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swiftindex 7237790f..30a90fd9 100644--- a/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swift+++ b/Packages/AsterismCore/Sources/AsterismIntelligence/CharacterGrounding.swift@@ -75,7 +75,7 @@ public enum CharacterGrounding {                             facts: place.facts.map {                                 ExtractedFact(statement: $0.statement, quote: $0.quote)                             })-               },+        },                kind: .place, cap: CharacterExtractionBounds.maximumPlaceCandidates,                in: haystack, source: source.source, into: &outcome)         outcome.candidates = outcome.candidates.map { candidate in
Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swift b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swiftindex b269bf67..1a3e7e79 100644--- a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swift+++ b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationCharacterExtractionModelClient.swift@@ -32,7 +32,7 @@ public struct FoundationCharacterExtractionModelClient: CharacterExtractionModel     /// across two full runs under it (Decision 3), and that repeatability is     /// what the dedup story leans on: a proposal the reader skipped must not     /// come back reworded next launch.-    static let generationOptions = GenerationOptions(sampling: .greedy)+    static let generationOptions = GenerationOptions(samplingMode: .greedy)      public func isContextWindowOverflow(_ error: any Error) -> Bool {         FoundationModelDiagnostics.isContextWindowOverflow(error)
Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swiftindex 1a4daf8e..b731f8ea 100644--- a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift+++ b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationModelDiagnostics.swift@@ -43,7 +43,47 @@ enum FoundationModelDiagnostics {         }     } +    @available(iOS 27, macOS 27, *)+    private static func caseName(of error: LanguageModelError) -> String {+        switch error {+        case .contextSizeExceeded: "contextSizeExceeded"+        case .rateLimited: "rateLimited"+        case .guardrailViolation: "guardrailViolation"+        case .refusal: "refusal"+        case .unsupportedCapability: "unsupportedCapability"+        case .unsupportedTranscriptContent: "unsupportedTranscriptContent"+        case .unsupportedGenerationGuide: "unsupportedGenerationGuide"+        case .unsupportedLanguageOrLocale: "unsupportedLanguageOrLocale"+        case .timeout: "timeout"+        @unknown default: "unknown"+        }+    }+     static func describe(_ error: any Error) -> String {+        if #available(iOS 27, macOS 27, *) {+            if let modern = error as? LanguageModelError {+                return "LanguageModelError.\(caseName(of: modern)): \(String(describing: modern))"+            }+            if let system = error as? SystemLanguageModel.Error {+                let name: String+                switch system {+                case .assetsUnavailable: name = "assetsUnavailable"+                @unknown default: name = "unknown"+                }+                return "SystemLanguageModel.Error.\(name): \(String(describing: system))"+            }+            if let session = error as? LanguageModelSession.Error {+                let name: String+                switch session {+                case .concurrentRequests: name = "concurrentRequests"+                case .transcriptMutationWhileResponding: name = "transcriptMutationWhileResponding"+                @unknown default: name = "unknown"+                }+                return "LanguageModelSession.Error.\(name): \(String(describing: session))"+            }+        }+        // Keep legacy errors readable too: macOS 26.5 remains supported, and+        // older error values must not lose their retry/diagnostic semantics.         guard let generation = error as? LanguageModelSession.GenerationError else {             return SuggestionFailure.describe(error)         }@@ -51,6 +91,10 @@ enum FoundationModelDiagnostics {     }      static func isContextWindowOverflow(_ error: any Error) -> Bool {+        if #available(iOS 27, macOS 27, *), let modern = error as? LanguageModelError {+            if case .contextSizeExceeded = modern { return true }+            return false+        }         guard let generation = error as? LanguageModelSession.GenerationError else { return false }         if case .exceededContextWindowSize = generation { return true }         return false
Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swift b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swiftindex 3cb7b2c5..06f2e94a 100644--- a/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swift+++ b/Packages/AsterismCore/Sources/AsterismIntelligence/FoundationRuleSuggestionModelClient.swift@@ -37,7 +37,7 @@ public struct FoundationRuleSuggestionModelClient: RuleSuggestionModelClient {     /// Greedy sampling: the same corpus must yield the same proposal, or a     /// suggestion the reader dismissed could come back different next launch     /// (Q24).-    static let generationOptions = GenerationOptions(sampling: .greedy)+    static let generationOptions = GenerationOptions(samplingMode: .greedy)      /// Whether an error is the model saying the input was too long. The     /// suggester answers it by halving the corpus and retrying, which is why@@ -58,10 +58,6 @@ public struct FoundationRuleSuggestionModelClient: RuleSuggestionModelClient {         FoundationModelDiagnostics.describe(error)     } -    static func caseName(of error: LanguageModelSession.GenerationError) -> String {-        FoundationModelDiagnostics.caseName(of: error)-    }-     // MARK: - Prompting      /// Fixed instructions: the task, the verbatim-copying rule that makes
Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swift b/Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swiftindex f90c6017..ebeb6275 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/AnnouncementCatalog.swift@@ -7,7 +7,7 @@ import Foundation /// groups copy resources flat into the bundle root: a `Documents/` subdirectory /// exists in the repository and not in the built bundle, so the directory cannot /// carry the meaning and the name has to.-public nonisolated enum AnnouncementDocument: Equatable, Hashable {+nonisolated public enum AnnouncementDocument: Equatable, Hashable {     /// `release-notes-<version>.md`, one file per released version.     case releaseNote(version: String)     /// `getting-started.md`, the shared guide.@@ -49,7 +49,7 @@ public nonisolated enum AnnouncementDocument: Equatable, Hashable { /// A pure value built from a list of filenames, so the rules above it can be /// asserted without a bundle. ``load(from:)`` is the thin wrapper that asks a /// real one.-public nonisolated struct AnnouncementCatalog: Equatable {+nonisolated public struct AnnouncementCatalog: Equatable {     public static let releaseNotePrefix = "release-notes-"     /// The one extension a bundled document has, spelled once: the resource     /// names, the bundle listing and the bundle lookup all derive from it.
Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swift b/Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swiftindex ce803e3a..1010032d 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/Pluralisation.swift@@ -5,7 +5,7 @@ import Foundation /// Two view models word counts for the reader — the diagnosis screen and the /// Settings iCloud section — and each carried a byte-identical private copy of /// this. It is one sentence-building rule, so it lives in one place.-public nonisolated enum Pluralisation {+nonisolated public enum Pluralisation {     public static func count(_ count: Int, _ singular: String, _ plural: String) -> String {         "\(count) \(noun(count, singular, plural))"     }
Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swift b/Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swiftindex 21a53085..9a12404f 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/ReleaseDaysText.swift@@ -6,7 +6,7 @@ import Foundation /// /// `nonisolated` for `WorksFilterPresentation`'s reason: pure functions of value /// types, reachable from anywhere that holds the days.-public nonisolated enum ReleaseDaysText {+nonisolated public enum ReleaseDaysText {      /// The three-letter abbreviations in the region's order, joined by ` · `     /// (Req 2.1) — `Mon · Thu`. The empty set is the empty string; every caller
Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swift b/Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swiftindex eae0926f..f3f913b5 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/RestoreStorageKey.swift@@ -6,7 +6,7 @@ import Foundation /// Named for the reason the markers are: the mirror writes them in one place and /// the restore reads them in another, and a typo in either is a restore that /// silently never happens.-public nonisolated enum RestoreStorageKey {+nonisolated public enum RestoreStorageKey {     public static let selectedSidebarItem = "restore.selectedSidebarItem"     public static let todayPath = "restore.todayPath"     public static let libraryPath = "restore.libraryPath"
Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swift b/Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swiftindex 6d83f102..8af09657 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/SiteNames.swift@@ -23,7 +23,7 @@ import Foundation /// and one of those places — `WorksFilterPresentation.activeLabels` — is itself /// `nonisolated`. Under the project's `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor` /// an unannotated `label(for:)` is main-actor isolated, and that call warns.-public nonisolated struct SiteNames: Equatable, Sendable {+nonisolated public struct SiteNames: Equatable, Sendable {      /// The empty lookup: every hostname reads as itself. Both the environment     /// default and what `AppLibraryModel` publishes before its first refresh.
Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swift b/Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swiftindex da186a66..3978e8b1 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/StatsDerivation.swift@@ -20,7 +20,7 @@ import Foundation /// The three units the period control offers (`stats-period-navigation`). The /// unit says *how wide* a period is; which one is shown is the navigation's /// `anchor`, and the two together resolve to a `StatsScope`.-public nonisolated enum StatsUnit: String, CaseIterable, Identifiable, Sendable {+nonisolated public enum StatsUnit: String, CaseIterable, Identifiable, Sendable {     case week, month, allTime      public var id: String { rawValue }@@ -54,7 +54,7 @@ public nonisolated enum StatsUnit: String, CaseIterable, Identifiable, Sendable /// What a graph covers: one whole calendar week, one whole calendar month, or /// the library's whole history. A bounded case carries the period's own start, /// so a scope is a complete answer without a clock beside it.-public nonisolated enum StatsScope: Equatable, Sendable {+nonisolated public enum StatsScope: Equatable, Sendable {     case week(start: Date)     case month(start: Date)     case allTime@@ -65,12 +65,12 @@ public nonisolated enum StatsScope: Equatable, Sendable {     public var isAllTime: Bool { self == .allTime } } -public nonisolated enum StatsBarUnit: Equatable, Sendable { case day, month }+nonisolated public enum StatsBarUnit: Equatable, Sendable { case day, month }  /// `index` is the x value; the scale is declared categorical over these /// indices. `start` is the bucket's inclusive lower bound, its upper bound the /// next bucket's `start` (Req 3.4).-public nonisolated struct StatsBar: Identifiable, Equatable, Sendable {+nonisolated public struct StatsBar: Identifiable, Equatable, Sendable {     public let index: Int     public let start: Date     public let count: Int@@ -88,7 +88,7 @@ public nonisolated struct StatsBar: Identifiable, Equatable, Sendable {  /// `Hashable`, not merely `Equatable`: it is the `Identifiable` id below, and /// `Identifiable` constrains `ID: Hashable`.-public nonisolated enum StatsCategory: Hashable, Sendable {+nonisolated public enum StatsCategory: Hashable, Sendable {     case work(id: UUID, title: String)     /// Holds a work reference that resolves to no title (Req 6.4).     case unresolvedWork@@ -107,7 +107,7 @@ public nonisolated enum StatsCategory: Hashable, Sendable {     } } -public nonisolated struct StatsBreakdownRow: Identifiable, Equatable, Sendable {+nonisolated public struct StatsBreakdownRow: Identifiable, Equatable, Sendable {     public let category: StatsCategory     public let count: Int @@ -121,7 +121,7 @@ public nonisolated struct StatsBreakdownRow: Identifiable, Equatable, Sendable {  } -public nonisolated struct StatsBreakdown: Equatable, Sendable {+nonisolated public struct StatsBreakdown: Equatable, Sendable {     /// The start of the day this describes, normalised through the calendar the     /// derivation was given, so two callers naming the same day cannot produce     /// two breakdowns.@@ -143,7 +143,7 @@ public nonisolated struct StatsBreakdown: Equatable, Sendable { /// /// The pair mirrors the lifetime pair and is derived over exactly the notes the /// bars count — the ones carrying a usable capture date inside the span.-public nonisolated struct StatsPeriodFigures: Equatable, Sendable {+nonisolated public struct StatsPeriodFigures: Equatable, Sendable {     /// The notes first captured inside the span.     public let notes: Int     /// The **distinct non-nil `workID`s** among those notes. A note holding no@@ -164,7 +164,7 @@ public nonisolated struct StatsPeriodFigures: Equatable, Sendable { /// and how many of them it holds. Only a *resolved* work reference reaches this /// list (Q13) — an unattached note and one whose work resolves to no title are /// counted in the sites list and nowhere here.-public nonisolated struct StatsRankingRow: Identifiable, Equatable, Sendable {+nonisolated public struct StatsRankingRow: Identifiable, Equatable, Sendable {     public let workID: UUID     public let title: String     public let count: Int@@ -182,7 +182,7 @@ public nonisolated struct StatsRankingRow: Identifiable, Equatable, Sendable {  /// One row of the "Most read sites" list. A site is the note's capture hostname /// (Q4): work-level attribution would be wrong for a work read on two sites.-public nonisolated struct StatsSiteRankingRow: Identifiable, Equatable, Sendable {+nonisolated public struct StatsSiteRankingRow: Identifiable, Equatable, Sendable {     public let hostname: String     public let count: Int @@ -199,7 +199,7 @@ public nonisolated struct StatsSiteRankingRow: Identifiable, Equatable, Sendable /// The graph and the totals. `bars` is empty only when the scope resolves no /// span at all (Reqs 3.6, 4.7); a span with no reading is a full set of /// zero-count bars (Req 4.6), and the two render differently.-public nonisolated struct StatsGraph: Equatable, Sendable {+nonisolated public struct StatsGraph: Equatable, Sendable {     public let scope: StatsScope     public let unit: StatsBarUnit     public let bars: [StatsBar]@@ -244,7 +244,7 @@ public nonisolated struct StatsGraph: Equatable, Sendable { /// that moves after a republish — notes reconciled away, so the library's /// earliest capture is later than it was — has to disable the chevron rather /// than let a step walk past it.-public nonisolated struct StatsPeriodBounds: Equatable, Sendable {+nonisolated public struct StatsPeriodBounds: Equatable, Sendable {     public let canStepBackward: Bool     public let canStepForward: Bool     /// What the date picker offers: the lower period's start through `now`.@@ -281,7 +281,7 @@ public nonisolated struct StatsPeriodBounds: Equatable, Sendable { /// and the shown period cannot disagree. Every transition takes the calendar, /// `now` and the library's earliest usable capture, because normalising to a /// period start and clamping to both ends is what a transition *is* here.-public nonisolated struct StatsNavigation: Equatable, Sendable {+nonisolated public struct StatsNavigation: Equatable, Sendable {     /// The page opens on Week, and `@State` re-initialisation is what keeps the     /// selection from persisting across launches.     public private(set) var unit: StatsUnit = .week@@ -490,7 +490,7 @@ public nonisolated struct StatsNavigation: Equatable, Sendable { /// calendar can assert nothing about them. The view passes `.current`, which is /// Q22's formatting exemption — naming a stored anchor derives nothing, and the /// temporal key already re-renders it on a zone or first-weekday change.-public nonisolated enum StatsPeriodNaming {+nonisolated public enum StatsPeriodNaming {      /// The shown period named on its own, with no preposition — the form the     /// chevron row shows between its two chevrons. Nil for All time, whose@@ -596,7 +596,7 @@ public nonisolated enum StatsPeriodNaming { /// The day stamp alone is insufficient for Req 3.7: moving between zones that /// share a UTC offset but differ in week rules changes what "This week" means /// without changing `startOfDay`.-public nonisolated struct StatsTemporalKey: Equatable {+nonisolated public struct StatsTemporalKey: Equatable {     public let timeZoneIdentifier: String     public let firstWeekday: Int     public let startOfDay: Date@@ -628,7 +628,7 @@ public nonisolated struct StatsTemporalKey: Equatable { /// stance is that nothing derives on a `body` evaluation. The scope is resolved /// inside `deriveIfNeeded()`, and the temporal key is what makes a nil anchor /// re-resolve when midnight or a zone change moves the current period.-public nonisolated struct StatsInputKey: Equatable {+nonisolated public struct StatsInputKey: Equatable {     public let generation: Int     public let unit: StatsUnit     public let anchor: Date?@@ -720,7 +720,7 @@ public nonisolated struct StatsInputKey: Equatable { /// repository (Req 1.5). Every bucket boundary is calendar arithmetic through /// `dateInterval(of:for:)`, never fixed-length day maths, so a daylight-saving /// day of 23 or 25 hours is one whole day (Req 3.3).-public nonisolated enum StatsDerivation {+nonisolated public enum StatsDerivation {      /// 1971-01-01T00:00:00Z — 365 days after the schema's `firstCapturedAt`     /// default, 1970 not being a leap year. A note captured **before** this has
Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swift b/Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swiftindex b0ead1cf..741abb0c 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/TodayAnnouncements.swift@@ -7,7 +7,7 @@ import Foundation /// enters search, the day plan or the duplicate plan, and is identified by what /// it is rather than by any record. The row copies the entry row's look and /// nothing else.-public nonisolated enum TodayAnnouncement: Equatable, Hashable, Identifiable {+nonisolated public enum TodayAnnouncement: Equatable, Hashable, Identifiable {     /// The guide a reader with nothing captured is shown, in place of the     /// settled empty-library message (Q5).     case gettingStarted@@ -65,7 +65,7 @@ public nonisolated enum TodayAnnouncement: Equatable, Hashable, Identifiable { /// `nonisolated enum` of static functions in the app target, so `make /// test-quick` covers them and the share extension — which has no use for any of /// this — is untouched.-public nonisolated enum TodayAnnouncements {+nonisolated public enum TodayAnnouncements {     // MARK: - Which row shows      /// The announcement to draw, or nil for none.
Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swift b/Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swiftindex c9274eaa..67201a7d 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/TodayDisplayPlan.swift@@ -7,7 +7,7 @@ import Foundation /// /// A pair of id sets rather than the rows themselves: what Req 10.1 asks is a /// membership question, and comparing the rows would deep-compare the day.-public nonisolated struct TodayVisibility: Equatable {+nonisolated public struct TodayVisibility: Equatable {     /// The entries actually drawn — the spanning list's rows while a filter or a     /// query is active, the selected day's noted rows otherwise.     public let entries: Set<UUID>@@ -36,7 +36,7 @@ public nonisolated struct TodayVisibility: Equatable { /// No `Equatable` conformance: nothing compares plans, and a synthesised one /// would deep-compare up to the whole library. ``visibility`` is the one part /// that *is* compared, and it is a pair of id sets for that reason.-public nonisolated struct TodayDisplayPlan {+nonisolated public struct TodayDisplayPlan {     /// `nonisolated` because the app target sets     /// `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor`, so this enum would otherwise     /// be implicitly `@MainActor` and its synthesised `Equatable` conformance@@ -244,7 +244,7 @@ public nonisolated struct TodayDisplayPlan { /// /// A value rather than two `if`s in the body, so that "which header is first" /// is decided in one place and can be asserted without drawing anything.-public nonisolated struct TodaySectionAccents: Equatable {+nonisolated public struct TodaySectionAccents: Equatable {     /// Whether the releases header is the first one drawn.     public let releasesIsFirst: Bool @@ -277,7 +277,7 @@ public nonisolated struct TodaySectionAccents: Equatable { /// The invariant this type exists for: `accountedCount` equals the banner's /// count. A counted item is either a row in the filtered list or a line in /// `elsewhere`, never neither.-public nonisolated struct RecentDuplicatePlan: Equatable {+nonisolated public struct RecentDuplicatePlan: Equatable {     public struct Elsewhere: Identifiable, Equatable {         public enum Route: Equatable {             /// The duplicate route, forked by the caller exactly as a row's pill
Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swift b/Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swiftindex 85d6d7f2..b1c7e048 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/TodayText.swift@@ -24,7 +24,7 @@ import Foundation /// /// The shapes are constant, so they are built once; only the three stamps move /// per call.-public nonisolated enum TodayDateText {+nonisolated public enum TodayDateText {     private static let completeStyle = Date.FormatStyle(date: .complete, time: .omitted)     private static let abbreviatedStyle = Date.FormatStyle(date: .abbreviated, time: .omitted) @@ -82,7 +82,7 @@ public nonisolated enum TodayDateText { /// dated headers named that same day four more times. The wide tree's list /// column is headed with the tab's name, the way the Works column is, so /// nothing derives a title from a day any more.-public nonisolated enum TodayTitleText {+nonisolated public enum TodayTitleText {     /// The release row identifier, shared by the native view and text tests.     public static let releaseRowPrefix = "today-release-" @@ -123,7 +123,7 @@ public nonisolated enum TodayTitleText {  /// A release row's second line: Req 5.2's closed table, spelled (Q16, Q34, /// Q37).-public nonisolated enum ReleaseLineText {+nonisolated public enum ReleaseLineText {     /// The line for one arm, against the day being shown.     ///     /// The chapter line takes its ` · ` with it when it is absent — the@@ -177,7 +177,7 @@ public nonisolated enum ReleaseLineText { }  /// The week strip's identifiers and labels (Reqs 4.3, 4.5, 10.3).-public nonisolated enum WeekStripText {+nonisolated public enum WeekStripText {     /// The seven days of the week containing `day`, in calendar order.     ///     /// The week's start comes from `dateInterval(of: .weekOfYear)`, which@@ -251,7 +251,7 @@ public nonisolated enum WeekStripText {  /// The header's date title (Today v2 §3): the selected day, and the way back to /// the current one — the job the week-range pill had under Q80.-public nonisolated enum TodayHeaderText {+nonisolated public enum TodayHeaderText {     public static let identifier = "today-header-date"      /// What tapping the title does, said only where it does something.@@ -265,7 +265,7 @@ public nonisolated enum TodayHeaderText { /// The prefix follows the work's type, which is a reader-owned name: a comic /// type counts episodes and anything else counts chapters. An untyped work /// counts chapters.-public nonisolated enum ChapterNumberText {+nonisolated public enum ChapterNumberText {     /// Whole words only, so `cartoon novel` is not a comic.     private static let episodeTypeWords: Set<String> = [         "webtoon", "toon", "manga", "manhwa", "manhua", "comic", "comics",@@ -288,7 +288,7 @@ public nonisolated enum ChapterNumberText { }  /// The releasing shelf's words and order (Today v2 §4).-public nonisolated enum ReleaseShelfText {+nonisolated public enum ReleaseShelfText {     public static let shelfIdentifier = "today-releases-shelf"      public static func markActionTitle(@@ -347,7 +347,7 @@ public nonisolated enum ReleaseShelfText { }  /// The catching-up card's words and order for the selected day.-public nonisolated enum CatchUpText {+nonisolated public enum CatchUpText {     /// Rows the card shows before `Show all`.     public static let collapsedLimit = 5 
Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swift b/Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swiftindex 84d575fa..83a6eeb5 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/WorkStatusPresentation.swift@@ -11,7 +11,7 @@ import AsterismCore /// `nonisolated` throughout: `WorksFilterPresentation` is a pure value-type /// helper and reads these, so under this target's MainActor-by-default /// isolation the whole table has to be reachable from outside the actor.-public nonisolated enum WorkStatusPresentation {+nonisolated public enum WorkStatusPresentation {      /// What the reader is told a status is called — the picker row, the meta     /// line, and the second half of every label below.@@ -55,7 +55,7 @@ public nonisolated enum WorkStatusPresentation { }  /// The same table for the reader's side of a work (Q36).-public nonisolated enum ReadingStatusPresentation {+nonisolated public enum ReadingStatusPresentation {      public static func name(_ status: ReadingStatus) -> String {         switch status {
Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swift b/Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swiftindex 0322783d..68e50b4b 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/WorksListOptions.swift@@ -24,7 +24,7 @@ import Foundation /// the view writes it and `ContentView.launchModel()` clears it for a seeded /// UI-test launch (Q8), and a typo in either is a preference that silently /// never persists — or never resets.-public nonisolated enum WorksListStorageKey {+nonisolated public enum WorksListStorageKey {     public static let sort = "worksList.sort"      /// What a seeded UI-test launch clears (Q8, and Q51 of@@ -44,7 +44,7 @@ public nonisolated enum WorksListStorageKey { /// One four-way choice rather than a key plus a direction: with the two stored /// separately, a reader on Z to A who switches to latest entry lands on Oldest /// first without asking for it.-public nonisolated enum WorksSort: String, CaseIterable, Identifiable, Sendable {+nonisolated public enum WorksSort: String, CaseIterable, Identifiable, Sendable {     /// The repository's own order, untouched (Req 1).     case newest     case oldest@@ -151,7 +151,7 @@ public nonisolated enum WorksSort: String, CaseIterable, Identifiable, Sendable /// so works on either side of a type merge share one option without an /// app-layer directory fetch. `untyped` is an enum case rather than a reserved /// string, so a type literally named "Untyped" cannot collide with it.-public nonisolated enum WorksTypeSelection: Hashable, Sendable {+nonisolated public enum WorksTypeSelection: Hashable, Sendable {     /// A work that draws no type pill: untyped, or an entry that has not     /// arrived on this device. Both read as untyped to the reader, and the     /// unresolved one leaves the option when its row arrives.@@ -179,7 +179,7 @@ public nonisolated enum WorksTypeSelection: Hashable, Sendable { /// stores and what the picker binds — resolves to `Optional.none`, so the one /// value that means "works in no series" would be unwritable wherever the type /// is inferred and would silently read as "Any" wherever it compiled (Q51).-public nonisolated enum WorksSeriesSelection: Hashable, Sendable {+nonisolated public enum WorksSeriesSelection: Hashable, Sendable {     /// Req 4.2: a work with no membership, **and** a work whose series has not     /// arrived — both read to the reader as a work that is in no series here.     case noSeries@@ -194,7 +194,7 @@ public nonisolated enum WorksSeriesSelection: Hashable, Sendable { /// the picker binds — resolves to `Optional.none`, so the one value that means /// "works nothing credits" would be unwritable wherever the type is inferred and /// would silently read as "Any" wherever it compiled.-public nonisolated enum WorksCreatorSelection: Hashable, Sendable {+nonisolated public enum WorksCreatorSelection: Hashable, Sendable {     /// Req 5.1: a work with no credit, **and** a work whose every credit is     /// unresolved — both read to the reader as a work no creator they can see is     /// credited on.@@ -216,7 +216,7 @@ public nonisolated enum WorksCreatorSelection: Hashable, Sendable { /// schedule" would silently read as "Any". The **raw** values stay `none` and /// `some`: they are what the menu rows are keyed by, and a spelling in a UI /// journey should not move because a Swift case had to be renamed.-public nonisolated enum ReleaseDayPresence: String, CaseIterable, Hashable, Sendable {+nonisolated public enum ReleaseDayPresence: String, CaseIterable, Hashable, Sendable {     case noReleaseDays = "none"     case hasReleaseDays = "some" @@ -240,7 +240,7 @@ public nonisolated enum ReleaseDayPresence: String, CaseIterable, Hashable, Send /// The two status dimensions differ from the other three in one way only: their /// vocabularies are closed, so they carry nothing in `WorksFilterOptions` and /// `pruned(to:)` never touches them (Q30).-public nonisolated struct WorksFilter: Equatable, Sendable {+nonisolated public struct WorksFilter: Equatable, Sendable {     public var type: WorksTypeSelection?     public var tag: String?     public var hostname: String?@@ -393,7 +393,7 @@ public nonisolated struct WorksFilter: Equatable, Sendable { /// /// Derived once per snapshot publication in `AppLibraryModel` and passed in, /// never in `WorksView.body` — that runs once per keystroke of the search field.-public nonisolated struct WorksFilterOptions: Equatable, Sendable {+nonisolated public struct WorksFilterOptions: Equatable, Sendable {      /// What the reader sees for a work that draws no type pill.     public static let untypedLabel = "Untyped"@@ -589,7 +589,7 @@ public nonisolated struct WorksFilterOptions: Equatable, Sendable { /// accessibility identifiers cannot drift apart. Beside the values it formats /// rather than in the view file (Q16), and `nonisolated` for the same reason /// the values are `Sendable`: pure functions of value types.-public nonisolated enum WorksFilterPresentation {+nonisolated public enum WorksFilterPresentation {      /// The active values in menu order — type, tag, site, work status, reading     /// status — spelled as the pickers spell them. A type is named by the option@@ -739,7 +739,7 @@ public nonisolated enum WorksFilterPresentation { /// /// Two cases rather than a header string: only a series section navigates /// anywhere, and only a series section has an identity the reader can act on.-public nonisolated enum WorksSection: Equatable, Sendable, Identifiable {+nonisolated public enum WorksSection: Equatable, Sendable, Identifiable {     case noSeries([WorkSnapshot], isLeading: Bool)     public var works: [WorkSnapshot] { switch self { case .noSeries(let works, _): works } }     public var id: String { switch self { case .noSeries(_, let leading): leading ? "works" : "empty-works" } }@@ -752,7 +752,7 @@ public nonisolated enum WorksSection: Equatable, Sendable, Identifiable { /// a view. The **input is unsorted** — the narrowed snapshot in repository /// order — because a series section is ordered by position rather than by the /// reader's sort, and only the No series run pays for `sort.apply`.-public nonisolated enum WorksGrouping {+nonisolated public enum WorksGrouping {      public static func ungrouped(_ works: [WorkSnapshot], sort: WorksSort) -> [WorksSection] {         let sorted = sort.apply(to: works)@@ -774,7 +774,7 @@ public nonisolated enum WorksGrouping {  // MARK: - Library destinations -public nonisolated enum WorksDestination: Hashable, Sendable, Codable {+nonisolated public enum WorksDestination: Hashable, Sendable, Codable {     case group(WorksGroup)     case allWorks     case seriesIndex@@ -797,8 +797,7 @@ public nonisolated enum WorksDestination: Hashable, Sendable, Codable {     }      public init?(storedValue: String) {-        if let group = WorksGroup(rawValue: storedValue) { self = .group(group) }-        else {+        if let group = WorksGroup(rawValue: storedValue) { self = .group(group) } else {             switch storedValue {             case "allWorks": self = .allWorks             case "series": self = .seriesIndex@@ -818,7 +817,7 @@ public nonisolated enum WorksDestination: Hashable, Sendable, Codable {     } } -public nonisolated enum WorksGroup: String, CaseIterable, Hashable, Sendable, Codable {+nonisolated public enum WorksGroup: String, CaseIterable, Hashable, Sendable, Codable {     case catchingUp, reading, toRead, onHiatus, finished, abandoned      public var title: String {@@ -901,7 +900,7 @@ public nonisolated enum WorksGroup: String, CaseIterable, Hashable, Sendable, Co     } } -public nonisolated enum WorksGroupSort: String, CaseIterable, Sendable {+nonisolated public enum WorksGroupSort: String, CaseIterable, Sendable {     case groupDefault, aToZ, newestAdded     public func label(group: WorksGroup) -> String {         switch self {@@ -912,7 +911,7 @@ public nonisolated enum WorksGroupSort: String, CaseIterable, Sendable {     } } -public nonisolated enum WorksRowDetail {+nonisolated public enum WorksRowDetail {     public static func lastNoted(_ work: WorkSnapshot) -> Date? { work.entries.map(\.lastSharedAt).max() }     public static func noted(_ work: WorkSnapshot, now: Date = .now, calendar: Calendar = .current) -> String {         guard let entry = work.entries.max(by: { $0.lastSharedAt < $1.lastSharedAt }) else { return "Not noted yet" }
Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swift b/Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swiftindex 93f660d2..86273cf5 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/WorksRowPresentation.swift@@ -1,7 +1,7 @@ import AsterismCore import Foundation -public nonisolated enum WorksRowPresentation {+nonisolated public enum WorksRowPresentation {      /// Req 6.4: the row shows one glyph — the first membership's — but its     /// accessibility label names **every** site the Work is on. A reader using
Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swift b/Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swiftindex d9f718e6..bb840f1e 100644--- a/Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swift+++ b/Packages/AsterismCore/Sources/AsterismPresentation/WorksSearchToken.swift@@ -1,7 +1,7 @@ import AsterismCore import Foundation -public nonisolated struct WorksSearchToken: Identifiable, Equatable, Sendable {+nonisolated public struct WorksSearchToken: Identifiable, Equatable, Sendable {     public enum Dimension: String, CaseIterable, Sendable {         case type, tag, site, series, creator, status, reading, releases         public var title: String { rawValue.capitalized }
Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swift Modified
diff --git a/Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swift b/Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swiftindex d9915bc5..62c5e10c 100644--- a/Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swift+++ b/Packages/AsterismCore/Sources/AsterismTestSupport/TestFixtures.swift@@ -2,7 +2,7 @@ import AsterismCore import Foundation  /// Factory helpers for creating test snapshot fixtures.-public nonisolated enum TestFixtures {+nonisolated public enum TestFixtures {     public static let publicationDay = CivilDateCodec.parse("2026-09-30")!     public static let fixedDate = Date(timeIntervalSince1970: 1_750_000_000)     public static let laterDate = Date(timeIntervalSince1970: 1_750_000_060)
Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swiftindex 2c6c17a9..7ac9ef7f 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationArchiveIntegrationTests.swift@@ -190,7 +190,8 @@ struct AssociationArchiveIntegrationTests {             .init(id: workA, displayTitle: "Same", hostname: "synthetic.test", titleProvenance: .parsed,                 lastParsedTitle: "Same", createdAt: M5Fixture.epoch),             .init(id: workB, displayTitle: "Same", hostname: "synthetic.test", titleProvenance: .parsed,-                lastParsedTitle: "Same", createdAt: M5Fixture.epoch.addingTimeInterval(10))], entries: [+                lastParsedTitle: "Same", createdAt: M5Fixture.epoch.addingTimeInterval(10))+        ], entries: [             .init(id: entryID, captureTitle: "Chapter", hostname: "synthetic.test", path: "one", note: "Nova arrived.", workID: workA)],             characters: [.init(id: recordID, name: "Alice", aliases: ["Nova"], workID: workA)])         _ = try await source.repository.commitDecision(.init(workID: workA, kind: .character, action: .accept,
Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swiftindex 4bc67008..b8e72ff9 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationIntegrationTests.swift@@ -397,8 +397,7 @@ struct AssociationIntegrationTests {         request.facts = [.init(statement: "Visited", quote: "Alice visited Harbor.", nameKey: "alice", source: .entry(ids.entry))]         request.completedSources = candidate.sources.map(\.completedSource)         strategy.resetCounts(); strategy.shouldFail = true-        do { _ = try await fixture.repository.commitDecision(request); Issue.record("injected save must fail") }-        catch { }+        do { _ = try await fixture.repository.commitDecision(request); Issue.record("injected save must fail") } catch { }         strategy.shouldFail = false         #expect(strategy.attemptCount == 1 && strategy.successCount == 0)         let saved = try await fixture.repository.withLockedContext(mode: .shared, operation: "checking failed acceptance isolation") { context in
Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swiftindex 5617a56d..3a8ed437 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationNoteAPITests.swift@@ -112,8 +112,7 @@ struct AssociationNoteAPITests {         let (fixture, pair) = try await fixture(strategy: strategy)         let basis = try #require(try await fixture.repository.associationNoteBasis(pair: pair))         strategy.resetCounts(); strategy.shouldFail = true-        do { _ = try await fixture.repository.saveAssociationNote(basis: basis, text: "Exact draft"); Issue.record("injected save must fail") }-        catch { }+        do { _ = try await fixture.repository.saveAssociationNote(basis: basis, text: "Exact draft"); Issue.record("injected save must fail") } catch { }         strategy.shouldFail = false         #expect(strategy.attemptCount == 1 && strategy.successCount == 0)         let current = try #require(try await fixture.repository.associationNoteBasis(pair: pair))@@ -228,8 +227,7 @@ struct AssociationNoteAPITests {         let operations: [RecordEditOperation] = [.combine(source: source, target: target),             .convert(basis: target, to: .place, draft: .init(kind: .place, name: "Harbor"))]         strategy.resetCounts(); strategy.shouldFail = true-        do { _ = try await fixture.repository.commitRecordEdits(workID: pair.workID, operations: operations); Issue.record("injected identity-chain save must fail") }-        catch { }+        do { _ = try await fixture.repository.commitRecordEdits(workID: pair.workID, operations: operations); Issue.record("injected identity-chain save must fail") } catch { }         strategy.shouldFail = false         #expect(try #require(try await fixture.repository.associationNoteBasis(pair: pair)).heads.map { ExactScalarString($0.text) } == [ExactScalarString(firstText)])         #expect(try #require(try await fixture.repository.associationNoteBasis(pair: other)).heads.map { ExactScalarString($0.text) } == [ExactScalarString(secondText)])
Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swiftindex 366bf4cb..7bfa0512 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationRankingTests.swift@@ -125,7 +125,8 @@ struct AssociationRankingTests {                 context.insert(try AssociationEvent(event: .init(payload: .pendingReview(.init(workID: ids.work,                     entryID: pair.entryID, sourceGuard: "historical source guard", items: [                         .init(key: .init(kind: .place, nameKey: expectedNames[index].lowercased()),-                              targetID: id, spellingKeys: [expectedNames[index].lowercased()])]))), recordedAt: M5Fixture.epoch))+                              targetID: id, spellingKeys: [expectedNames[index].lowercased()])+                    ]))), recordedAt: M5Fixture.epoch))             }             let conflict = UUID()             for owner in [ids.work, ids.outside] {@@ -207,8 +208,7 @@ struct AssociationRankingTests {             } else {                 let storage = try AssociationStorageInventory.read(context: context, workIDs: [ids.work], includeNotes: false)                 let event: AssociationLedgerEvent-                if change == "rejected" { event = .init(payload: .reject(.init(pair: pair, spellingKeys: ["zulu"]))) }-                else {+                if change == "rejected" { event = .init(payload: .reject(.init(pair: pair, spellingKeys: ["zulu"]))) } else {                     let endpoints = try AssociationEndpointInventory.read(context: context, pairs: [pair])                     let current = try #require(endpoints.current(pair))                     event = .init(payload: .retire(.init(pair: pair, acceptanceIDs: Array(storage.ledger.activeAcceptanceIDs(for: current)))))
Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swiftindex 775b0b47..67571655 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/AssociationResolutionTests.swift@@ -51,7 +51,8 @@ struct AssociationResolutionTests {             }             let kinds: [RecordKind] = mode == "work" ? [.character, .place] : [kind]             let pairs = kinds.map { AssociationPair(workID: sourceWork.id, entryID: sourceID, kind: $0,-                recordID: $0 == .character ? characterID : placeID) }+                recordID: $0 == .character ? characterID : placeID)+            }             let endpoints = try AssociationEndpointInventory.read(context: context, pairs: Set(pairs))             var result: [AssociationPair: UUID] = [:]             for pair in pairs {@@ -151,7 +152,8 @@ struct AssociationResolutionTests {         let links = try await active(value, entry: value.source)         #expect(Set(links.map { $0.pair.kind }) == [.character, .place])         #expect(links.allSatisfy { $0.pair.workID == value.destinationWork-            && $0.noteHeads.first.map { ExactScalarString($0.text) } == ExactScalarString(exactText) })+            && $0.noteHeads.first.map { ExactScalarString($0.text) } == ExactScalarString(exactText)+        })         let ownership = try await value.fixture.repository.withLockedContext(mode: .shared, operation: "checking moved typed record owners") { context in             (try CharacterRecord.rows(ids: [characterID], context: context).map(\.ownerWorkID),              try Place.rows(ids: [placeID], context: context).map(\.ownerWorkID),@@ -166,8 +168,7 @@ struct AssociationResolutionTests {         let workID = value.work, characterID = value.character, placeID = value.place         try await value.fixture.repository.withLockedContext(mode: .exclusive, operation: "arriving divergent record copy") { context in             let work = try #require(context.fetch(FetchDescriptor<Work>()).first { $0.id == workID })-            if kind == .character { context.insert(CharacterRecord(id: characterID, name: name, nameKey: "ada", work: work)) }-            else { context.insert(Place(id: placeID, name: name, nameKey: "harbor", workID: work.id)) }+            if kind == .character { context.insert(CharacterRecord(id: characterID, name: name, nameKey: "ada", work: work)) } else { context.insert(Place(id: placeID, name: name, nameKey: "harbor", workID: work.id)) }             try context.save()         }     }@@ -353,8 +354,7 @@ struct AssociationResolutionTests {         let value = try await seed(mode: "record", kind: kind)         let note: String         let alias: String-        if kind == .character { note = substringOnly ? "Adam." : "Ada and Addiewood."; alias = "Addie" }-        else { note = substringOnly ? "Harbormaster." : "Harbor and Bayfield."; alias = "Bay" }+        if kind == .character { note = substringOnly ? "Adam." : "Ada and Addiewood."; alias = "Addie" } else { note = substringOnly ? "Harbormaster." : "Harbor and Bayfield."; alias = "Bay" }         let rootID = try await insertLegacyLiteralRoot(value, kind: kind, note: note, aliases: [alias], text: "Legacy byte exact\n🌟")         let before = try #require(try await active(value, entry: value.source).first { $0.pair.kind == kind })         #expect(before.activeAcceptanceIDs == [rootID])
Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swiftindex 90ab1ae6..723fcb5e 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/BackupExportDegradedRefusalTests.swift@@ -407,7 +407,8 @@ struct BackupExportDegradedRefusalTests {         // And the substituted rule the old accessor would have written is         // nowhere in the file.         #expect(!payload.urlRules.contains { $0.definition == .work(-            locator: .query(name: ExactScalarString("identity"))) })+            locator: .query(name: ExactScalarString("identity")))+        })     }      /// Q14's second half, and the regression test for the hole Decision 5@@ -1013,7 +1014,7 @@ private final class SeedStore {     ) -> Work {         // V8: `Work.create` is the single membership-minting door (Req 1.3), so         // a fixture Work is born with the site presence every reader now reads.-        return Work.create(+        Work.create(             in: context, id: id, title: title, hostname: hostname,             site: try? LibraryRepository.fetchSites(hostname: hostname, context: context).first,             timestamp: DegradedExportFixture.epoch.addingTimeInterval(offset))
Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swiftindex 879b384e..ef97821f 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/CaptureStateTests.swift@@ -41,8 +41,7 @@ struct CaptureStateTests {             }             #expect(model.canSave)             await model.save(coordinator: fixture.coordinator)-            if case .saved(let id) = model.state { #expect(id == chapter) }-            else { Issue.record("Every reviewed stage must save") }+            if case .saved(let id) = model.state { #expect(id == chapter) } else { Issue.record("Every reviewed stage must save") }             #expect(fixture.coordinator.lastCommittedContract?.request.rawURLString == url)             if step == 1 { #expect(fixture.coordinator.lastCommittedContract?.request.note == "Whole-view draft") }         }@@ -1191,7 +1190,7 @@ private final class FakeCaptureCoordinating: CaptureCoordinating, @unchecked Sen         let rawURL = payload.safari?.locationHref ?? payload.providerURL         guard let components = URLComponents(string: rawURL),               let scheme = components.scheme?.lowercased(),-              (scheme == "http" || scheme == "https"),+              scheme == "http" || scheme == "https",               let host = components.host, !host.isEmpty else {             throw CapturePreparationError(                 userMessage: "A page URL is required. The shared content does not contain a usable web address."
Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swiftindex 68fe53f4..0fb34fbe 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterCaptureTransactionTests.swift@@ -207,8 +207,7 @@ struct ChapterCaptureTransactionTests {         let id: UUID         if case .committed(let entry) = try await fixture.repository.commitChapterCapture(             .init(projection: initial, capture: .init(captureTitle: "Book", captureTitleSource: .manual,-                rawURLString: original, note: "Keep", rating: .up), intent: .automatic)) { id = entry.id }-        else { Issue.record("First specific chapter must save"); return }+                rawURLString: original, note: "Keep", rating: .up), intent: .automatic)) { id = entry.id } else { Issue.record("First specific chapter must save"); return }         let projection = try await fixture.repository.projectChapterCapture(rawURL: alternate, captureTitle: "Book", workID: work.id)         #expect(projection.resolution == .update(entryID: id))         let target = DrainedReShareTarget(entryID: id, hostname: "example.com", identityKey: "entry/\(id.uuidString.lowercased())", chapterProjection: projection)@@ -280,8 +279,7 @@ struct ChapterCaptureTransactionTests {         }         #expect(ids.count == 2)         let projection = try await fixture.repository.projectChapterCapture(rawURL: page, captureTitle: "Book", workID: work.id)-        if case .chooseChapter(let candidates, _) = projection.resolution { #expect(Set(candidates) == Set(ids)) }-        else { Issue.record("Two linked notes need an entry choice") }+        if case .chooseChapter(let candidates, _) = projection.resolution { #expect(Set(candidates) == Set(ids)) } else { Issue.record("Two linked notes need an entry choice") }         let id = try #require(ids.first)         if case .committed(let updated) = try await fixture.repository.commitChapterCapture(             .init(projection: projection, capture: .init(captureTitle: "Book", captureTitleSource: .manual,
Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swiftindex d202c5c4..164664f2 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/ChapterIdentityTests.swift@@ -181,8 +181,7 @@ struct ChapterIdentityTests {                 #expect(index.hasUnresolvedContent(for: target.id))                 let actual = index.urls(for: target.id)                 #expect(Set(actual.map(ExactScalarString.init)).count == 4)-                if let expected { #expect(actual.map(ExactScalarString.init) == expected.map(ExactScalarString.init)) }-                else { expected = actual }+                if let expected { #expect(actual.map(ExactScalarString.init) == expected.map(ExactScalarString.init)) } else { expected = actual }             }         }     }
Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swiftindex eb85cfaf..ed4f2950 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/CreatorRepositoryTestSupport.swift@@ -87,18 +87,6 @@ struct SeedCredit: Sendable, Equatable {     var roleIDs: [String] = []     var createdAt: Date = M5Fixture.epoch     var modifiedAt: Date = M5Fixture.epoch--    init(-        id: UUID = UUID(), workID: UUID, creatorID: UUID, roleIDs: [String] = [],-        createdAt: Date = M5Fixture.epoch, modifiedAt: Date = M5Fixture.epoch-    ) {-        self.id = id-        self.workID = workID-        self.creatorID = creatorID-        self.roleIDs = roleIDs-        self.createdAt = createdAt-        self.modifiedAt = modifiedAt-    } }  extension LibraryRepository {
Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swiftindex efb5d1cc..2392c986 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/CropGeometryTests.swift@@ -132,7 +132,7 @@ struct CropGeometryTests {             let scale = landscape.clamped(scale: rawScale)             for raw in [CGSize(width: 5_000, height: 5_000),                         CGSize(width: -5_000, height: -5_000),-                        CGSize(width: 0, height: 0)] {+                        CGSize.zero] {                 let offset = landscape.clamped(offset: raw, scale: scale)                 let crop = landscape.cropRect(scale: scale, offset: offset)                 let overLeft = max(-crop.minX, 0)
Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swiftindex 6ed9b31a..388f1fd2 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/LibraryToleranceScanTests.swift@@ -613,8 +613,7 @@ extension LibraryToleranceScanTests {         let entry = Entry(captureTitle: "Damaged", captureTitleSource: .host,             rawURLString: "", hostname: "", entryIdentityKey: "", timestamp: ToleranceScanStore.epoch)         try entry.authorTarget(.init(kind: .note))-        if unreadable { entry.authoredTargetData = Data([0xff]) }-        else { entry.entryIdentityKey = "wrong" }+        if unreadable { entry.authoredTargetData = Data([0xff]) } else { entry.entryIdentityKey = "wrong" }         store.context.insert(entry)         try store.save()         let full = try LibraryValidator.validate(context: store.context)
Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swiftindex df2192c7..3915c480 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/LookupFirstCaptureStateTests.swift@@ -38,8 +38,7 @@ struct LookupFirstCaptureStateTests {         fixture.coordinator.chapterOutcome = .committed(SnapshotTestFixtures.makeEntry(id: fixture.entryID))         await fixture.viewModel.submitUpdate(coordinator: fixture.coordinator)         #expect(fixture.coordinator.chapterDrafts.count == 2)-        if case .saved(let id) = fixture.viewModel.lookupState { #expect(id == fixture.entryID) }-        else { Issue.record("Reviewed correction must save") }+        if case .saved(let id) = fixture.viewModel.lookupState { #expect(id == fixture.entryID) } else { Issue.record("Reviewed correction must save") }     }      // MARK: - Lookup before title acquisition
Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swiftindex 96128879..90ac1b98 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/M4ToleratedFixtureTests.swift@@ -229,4 +229,3 @@ private final class M4ToleratedFixtureLibrary {         try? FileManager.default.removeItem(at: directory)     } }-
Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swiftindex fd8024da..4519dfcd 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/NSItemProviderTextBridgeTests.swift@@ -44,4 +44,32 @@ struct NSItemProviderTextBridgeTests {          #expect(payload.providerURL == "https://example.com/data-backed")     }++    @Test("Concrete Safari dictionary representation preserves preprocessing metadata")+    func dictionaryBackedSafariMetadata() async throws {+        let value: NSDictionary = [safariPreprocessingResultsKey: [+            "locationHref": "https://example.com/safari-dictionary",+            "title": "Dictionary chapter"+        ]]+        let provider = NSItemProvider(item: value, typeIdentifier: UTType.propertyList.identifier)+        let payload = try await SharePayloadExtractor().extract(+            from: [ConcreteProviderExtensionItem(providers: [provider])])+        #expect(payload.providerURL == "https://example.com/safari-dictionary")+        #expect(payload.safari?.title == "Dictionary chapter")+    }++    @Test("Data-backed Safari property list preserves preprocessing metadata")+    func dataBackedSafariMetadata() async throws {+        let value = [safariPreprocessingResultsKey: [+            "locationHref": "https://example.com/safari-data",+            "title": "Data chapter"+        ]]+        let data = try PropertyListSerialization.data(fromPropertyList: value, format: .binary, options: 0)+        let provider = NSItemProvider(item: data as NSData, typeIdentifier: UTType.propertyList.identifier)+        let payload = try await SharePayloadExtractor().extract(+            from: [ConcreteProviderExtensionItem(providers: [provider])])+        #expect(payload.providerURL == "https://example.com/safari-data")+        #expect(payload.safari?.title == "Data chapter")+    }+ }
Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swiftindex 56390c86..561ede4e 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupRecordOperationsTests.swift@@ -46,7 +46,8 @@ struct NamedGroupRecordOperationsTests {             operation: "reading membership root before character combine") { context in             try #require(context.fetch(FetchDescriptor<GroupTransition>())                 .first { $0.characterID == ids.source &&-                    $0.transitionValue?.parentHeadIDs.isEmpty == true }?.id)+                    $0.transitionValue?.parentHeadIDs.isEmpty == true+                }?.id)         }         let sourceHeadIDs = [UUID(), UUID()]         try await fixture.repository.withLockedContext(mode: .exclusive,@@ -101,7 +102,8 @@ struct NamedGroupRecordOperationsTests {             operation: "reading root before explicit record removal") { context in             try #require(context.fetch(FetchDescriptor<GroupTransition>())                 .first { $0.characterID == ids.source &&-                    $0.transitionValue?.parentHeadIDs.isEmpty == true }?.id)+                    $0.transitionValue?.parentHeadIDs.isEmpty == true+                }?.id)         }         let headIDs = [UUID(), UUID()]         try await fixture.repository.withLockedContext(mode: .exclusive,
Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swiftindex 53f45b92..e6515369 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupSuggestionApprovalTests.swift@@ -156,7 +156,8 @@ struct NamedGroupSuggestionApprovalTests {         let group = try #require(try await fixture.repository.characterGroups(workID: workID)             .first { $0.groupID == groupID })         #expect(group.transitions.contains { $0.chapterID == chapterID &&-            $0.characterID == characterID && $0.action == .leave })+            $0.characterID == characterID && $0.action == .leave+        })         #expect(group.members[characterID]?.first?.endChapterID == chapterID)         #expect(try await fixture.repository.groupSuggestionLeaveIsApplicable(             workID: workID, chapterID: chapterID,
Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swiftindex b0f54cf8..246cccd9 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/NamedGroupWorkMergeEditTests.swift@@ -397,7 +397,8 @@ struct NamedGroupWorkMergeEditTests {             .first(where: { $0.pair == pair })?.activeAcceptanceIDs.isEmpty != false)         #expect(try await repository.characterGroups(workID: targetID)             .contains { $0.groupID == otherGroupID &&-                $0.members[merged.characterID]?.count == 1 })+                $0.members[merged.characterID]?.count == 1+            })         try await repository.withLockedContext(mode: .exclusive,             operation: "hydrating the exact inherited fact ancestor") { context in             context.insert(GroupFactEvent(raw: rawAncestor))@@ -418,19 +419,22 @@ struct NamedGroupWorkMergeEditTests {         let groupID = merged.group.groupID         let renamed = try await repository.commitGroupEdits(workID: targetID, operations: [             .fact(groupID: groupID, expectedEventIDs: merged.group.factEventIDs,-                operation: .setName("New Team"))])+                operation: .setName("New Team"))+        ])         guard renamed == .committed(groupIDs: []) else {             Issue.record("Merged group rename refused: \(renamed)")             return         }         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .fact(groupID: groupID, expectedEventIDs: merged.group.factEventIDs,-                operation: .addAlias("Stale"))]) == .refused(.stale))+                operation: .addAlias("Stale"))+        ]) == .refused(.stale))          var current = try #require(try await repository.characterGroups(workID: targetID).first)         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .fact(groupID: groupID, expectedEventIDs: current.factEventIDs,-                operation: .addAlias("The Team"))]) == .committed(groupIDs: []))+                operation: .addAlias("The Team"))+        ]) == .committed(groupIDs: []))         current = try #require(try await repository.characterGroups(workID: targetID).first)         #expect(current.name == "New Team")         #expect(current.aliases.contains("The Team"))@@ -438,22 +442,26 @@ struct NamedGroupWorkMergeEditTests {         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .transition(rootID: addedRootID, groupID: groupID,                 characterID: merged.characterID, chapterID: merged.chapterID,-                action: .join)]) == .committed(groupIDs: []))+                action: .join)+        ]) == .committed(groupIDs: []))          current = try #require(try await repository.characterGroups(workID: targetID).first)         let inheritedBasis = try #require(current.transitionEventIDs[merged.inheritedRootID])         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .reviseTransition(rootID: merged.inheritedRootID,                 expectedEventIDs: inheritedBasis, chapterID: merged.chapterID,-                action: .leave)]) == .committed(groupIDs: []))+                action: .leave)+        ]) == .committed(groupIDs: []))         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .reviseTransition(rootID: merged.inheritedRootID,                 expectedEventIDs: inheritedBasis, chapterID: merged.chapterID,-                action: .join)]) == .refused(.stale))+                action: .join)+        ]) == .refused(.stale))         current = try #require(try await repository.characterGroups(workID: targetID).first)         #expect(try await repository.commitGroupEdits(workID: targetID, operations: [             .fact(groupID: groupID, expectedEventIDs: current.factEventIDs,-                operation: .delete)]) == .committed(groupIDs: []))+                operation: .delete)+        ]) == .committed(groupIDs: []))         #expect(try await repository.characterGroups(workID: targetID).isEmpty)          let inheritedRootID = merged.inheritedRootID@@ -488,11 +496,13 @@ struct NamedGroupWorkMergeEditTests {                 operation: .setName("Third Team")),             .reviseTransition(rootID: merged.inheritedRootID,                 expectedEventIDs: currentBasis, chapterID: merged.chapterID,-                action: .leave)]) == .committed(groupIDs: []))+                action: .leave)+        ]) == .committed(groupIDs: []))         #expect(try await merged.repository.commitGroupEdits(workID: third.id, operations: [             .reviseTransition(rootID: merged.inheritedRootID,                 expectedEventIDs: currentBasis, chapterID: merged.chapterID,-                action: .join)]) == .refused(.stale))+                action: .join)+        ]) == .refused(.stale))         #expect(try await merged.repository.characterGroups(workID: third.id).first?.name == "Third Team")         withExtendedLifetime(merged.fixture) {}     }@@ -508,7 +518,8 @@ struct NamedGroupWorkMergeEditTests {                 operation: .setName("Unsaved Team")),             .reviseTransition(rootID: merged.inheritedRootID,                 expectedEventIDs: basis, chapterID: merged.chapterID,-                action: .leave)]+                action: .leave)+        ]         strategy.resetCount()         strategy.failFrom = 1         do {
Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swiftindex efec1a51..1ae0475e 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/NoEpisodeImportHistorySessionTests.swift@@ -32,9 +32,11 @@ struct NoEpisodeImportHistorySessionTests {                 citations: EntryCitations(workAssignment: .manual))         }         let facts = entries.filter { $0.workID != nil }.map { NoEpisodeWriter.NoteFact(entryID: $0.id, workID: work,-            sharedAt: $0.lastSharedAt, calendar: calendar) }+            sharedAt: $0.lastSharedAt, calendar: calendar)+        }         var actions = try facts.map { try NoEpisodeHistory.Action(workID: work, key: $0.stableKey,-            day: $0.day.description, kind: .clear, observedClearKeys: []) }+            day: $0.day.description, kind: .clear, observedClearKeys: [])+        }         actions.append(try .init(workID: work, key: "mark/\(UUID().uuidString)",             day: facts[0].day.description, kind: .mark, observedClearKeys: facts.map(\.stableKey)))         return BackupImportPayload(entries: entries,
Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swiftindex d8dece48..a2aa8466 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/PageTitleFetcherTests.swift@@ -334,7 +334,7 @@ private struct FetcherTestFixture { private final class SpyPageTitleFetcher: PageTitleFetching, @unchecked Sendable {     private let lock = NSLock()     private var _callCount = 0-    var response: FetchedPageMetadata? = nil+    var response: FetchedPageMetadata?     var shouldThrow = false      var callCount: Int { lock.withLock { _callCount } }
Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swiftindex 229fa3d1..2e53989a 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/PerformanceReadReuseTests.swift@@ -37,8 +37,7 @@ struct PerformanceReadReuseTests {         default: break         }         let broken: Data-        if fault == "json" { broken = Data("broken".utf8) }-        else { broken = try JSONSerialization.data(withJSONObject: wire) }+        if fault == "json" { broken = Data("broken".utf8) } else { broken = try JSONSerialization.data(withJSONObject: wire) }         let decoder = JSONDecoder()         #expect(throws: Error.self) {             try NoEpisodeHistory.Action.decode(broken, workID: workID, decoder: decoder)@@ -151,7 +150,8 @@ struct PerformanceReadReuseIntegrationTests {                 #expect(original.count == 2)                 #expect(Set(original.map(\.id)) == expected.sourceIDs)                 #expect(original.allSatisfy { $0.entryID == expected.survivor && $0.urlString == expected.url-                    && $0.evidenceData == expected.evidence })+                    && $0.evidenceData == expected.evidence+                })                 #expect(sources.filter { $0.urlString == expected.url }.count == 2)             }         }
Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swiftindex ba2b7ec3..c01bc020 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/ReShareExtensionUITests.swift@@ -413,7 +413,7 @@ private final class FakeReShareUICoordinator: LookupCaptureCoordinating, @unchec     var reShareShouldThrow = false      func captureLookup(rawURL: String) async throws -> CaptureLookupDisposition {-        return lookupResult+        lookupResult     }      func commitReShareUpdate(basis: ReShareEditBasis, note: String, rating: Rating?) async throws -> ReShareUpdateOutcome {@@ -424,6 +424,6 @@ private final class FakeReShareUICoordinator: LookupCaptureCoordinating, @unchec     }      func fetchTitle(rawURL: String) async throws -> String? {-        return "Test Title"+        "Test Title"     } }
Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swiftindex ecb1554b..fadc8fe3 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/SaveTimeKnownLinkRepositoryTests.swift@@ -285,8 +285,7 @@ struct SaveTimeKnownLinkRepositoryTests {             note: mode == "higherTier" ? "Addie visits Harbor." : entry.note, rating: entry.rating)         if mode == "tornSource" { if case .conflict = result {} else { Issue.record("Torn source must refuse") } }         let links = try await active(fixture, entry: ids.entry)-        if mode == "tornSource" { #expect(links.isEmpty) }-        else {+        if mode == "tornSource" { #expect(links.isEmpty) } else {             #expect(links.contains { $0.pair.kind == .place })             let characters = links.filter { $0.pair.kind == .character }             #expect(characters.count == (["tornTarget", "ambiguous"].contains(mode) ? 0 : 1))@@ -386,8 +385,7 @@ struct SaveTimeKnownLinkRepositoryTests {         let before = try await fixture.repository.backupV20Snapshot()         save.fail = true         await #expect(throws: LibraryRepositoryError.self) {-            if terminal == "ordinary" { _ = try await fixture.repository.commitCapture(capture) }-            else {+            if terminal == "ordinary" { _ = try await fixture.repository.commitCapture(capture) } else {                 _ = try await fixture.repository.commitChapterCapture(.init(projection: chapter,                     capture: .init(captureTitle: title, captureTitleSource: .manual, rawURLString: url, note: "Ada visits Harbor."),                     intent: .newChapter(.init(kind: .chapter, designation: "14"), confirmedNew: true)))
Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swiftindex c8a6144a..641ff433 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/SeriesRepositoryTestSupport.swift@@ -19,17 +19,6 @@ struct SeedSeries: Sendable {     var notes: String = ""     var createdAt: Date = M5Fixture.epoch     var modifiedAt: Date = M5Fixture.epoch--    init(-        id: UUID = UUID(), name: String, notes: String = "",-        createdAt: Date = M5Fixture.epoch, modifiedAt: Date = M5Fixture.epoch-    ) {-        self.id = id-        self.name = name-        self.notes = notes-        self.createdAt = createdAt-        self.modifiedAt = modifiedAt-    } }  /// A `Series` row as a suite reads it back, without holding a model.@@ -51,18 +40,6 @@ struct SeedWorkLink: Sendable {     var type: String     var createdAt: Date = M5Fixture.epoch     var modifiedAt: Date = M5Fixture.epoch--    init(-        id: UUID = UUID(), a: UUID, b: UUID, type: String,-        createdAt: Date = M5Fixture.epoch, modifiedAt: Date = M5Fixture.epoch-    ) {-        self.id = id-        self.a = a-        self.b = b-        self.type = type-        self.createdAt = createdAt-        self.modifiedAt = modifiedAt-    } }  /// A `WorkLink` row as a suite reads it back, without holding a model.
Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swiftindex 71c2ecde..d9cbc2ce 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/ShareTransportTests.swift@@ -410,7 +410,7 @@ private struct ShareTransportFixture { private final class RecordingPageTitleFetcher: PageTitleFetching, @unchecked Sendable {     private let lock = NSLock()     private var _fetchCount = 0-    var result: FetchedPageMetadata? = nil+    var result: FetchedPageMetadata?     var shouldFail = false      var fetchCount: Int {
Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swiftindex d1295bbd..19b526ee 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/V21GroupMigrationTests.swift@@ -28,9 +28,11 @@ struct V21GroupMigrationTests {             return (                 storage.ledger.invalidIDs.contains(history.conflictedID),                 storage.rawEvents.contains { $0.id == history.rejectionID &&-                    $0.value?.payload == .reject(.init(pair: history.rejectedPair, spellingKeys: ["bob"])) },+                    $0.value?.payload == .reject(.init(pair: history.rejectedPair, spellingKeys: ["bob"]))+                },                 storage.rawEvents.contains { $0.id == history.rebindID &&-                    $0.value?.payload == history.rebindPayload },+                    $0.value?.payload == history.rebindPayload+                },                 storage.notes.heads(for: history.rejectedPair).contains {                     $0.text == "Detached V21 note" && $0.attachmentAcceptanceIDs == [history.detachedRootID]                 })
Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swiftindex 9b79507a..a5187f53 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/V4RecordedStoreTests.swift@@ -173,4 +173,3 @@ struct V4RecordedStoreTests {                 "the shipped refusal reads the store's metadata; it never constructs a container")     } }-
Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swiftindex 98db0aa9..991d5fe1 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/WorkMergeRepositoryTests.swift@@ -44,14 +44,16 @@ struct WorkMergeRepositoryTests {             .committed(targetID: targetID))         let transferred = try await fixture.repository.characterGroups(workID: targetID)         #expect(transferred.contains { $0.name == "Team Loser" &&-            $0.members[characterID]?.count == 1 })+            $0.members[characterID]?.count == 1+        })         let targetPair = AssociationPair(workID: targetID, entryID: sourceEntryID,             kind: .character, recordID: characterID)         let active = try await fixture.repository.chapterAssociations(entryID: sourceEntryID)         #expect(active.contains { $0.pair == targetPair && !$0.activeAcceptanceIDs.isEmpty })         let detached = try await fixture.repository.detachedAssociationNotes()         #expect(detached.contains { $0.pair == targetPair &&-            $0.raw.text == "Bjorn is still in the team" && $0.canRecover })+            $0.raw.text == "Bjorn is still in the team" && $0.canRecover+        })     }      @Test("A second Work merge follows the original transition root")
Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swift b/Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swiftindex 2d8e18d0..63aa68c7 100644--- a/Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swift+++ b/Packages/AsterismCore/Tests/AsterismCoreTests/WorkPublicationStateTests.swift@@ -147,7 +147,8 @@ struct WorkPublicationStateTests {                     let offset = day.days(since: start, calendar: calendar)                     let paused = (3 + seed..<13 + seed).contains(offset)                         || (20..<24).contains(offset) || (30..<39 + seed).contains(offset)-                    return weekdays.contains(day.weekday(calendar: calendar)) && !paused && !marks.contains(day) }.count+                    return weekdays.contains(day.weekday(calendar: calendar)) && !paused && !marks.contains(day)+                }.count             #expect(count == oracle)         }         #expect(CivilDateCodec.spelling(Self.day("2024-02-29")) == "2024-02-29")
Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swift b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swiftindex 55b1b59f..c6ef7aa7 100644--- a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swift+++ b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationCharacterExtractionModelClientTests.swift@@ -157,7 +157,7 @@ struct FoundationCharacterExtractionModelClientTests {     @Test("Sampling is greedy so the same source yields the same output")     func greedyOptions() {         #expect(FoundationCharacterExtractionModelClient.generationOptions-            == GenerationOptions(sampling: .greedy))+            == GenerationOptions(samplingMode: .greedy))     }      @Test("A context-window overflow is recognisable by type, so the source can be skipped")
Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationModelModernErrorTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationModelModernErrorTests.swift b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationModelModernErrorTests.swiftnew file mode 100644index 00000000..5620bbbd--- /dev/null+++ b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationModelModernErrorTests.swift@@ -0,0 +1,42 @@+import Foundation+import FoundationModels+import Testing+@testable import AsterismIntelligence++@Suite("Modern Foundation Models errors")+struct FoundationModelModernErrorTests {+    @Test("Both clients recognize the iOS 27 context-size error for retry")+    func contextSizeExceeded() {+        if #available(iOS 27, macOS 27, *) {+            let overflow = LanguageModelError.contextSizeExceeded(.init(+                contextSize: 100, tokenCount: 101, debugDescription: "synthetic overflow"))+            let refusal = LanguageModelError.guardrailViolation(.init(debugDescription: "synthetic refusal"))+            let extraction = FoundationCharacterExtractionModelClient()+            let rules = FoundationRuleSuggestionModelClient()+            #expect(extraction.isContextWindowOverflow(overflow))+            #expect(rules.isContextWindowOverflow(overflow))+            #expect(!extraction.isContextWindowOverflow(refusal))+            #expect(!rules.isContextWindowOverflow(refusal))+            #expect(extraction.describe(overflow).contains("contextSizeExceeded"))+            #expect(rules.describe(refusal).contains("guardrailViolation"))+        }+    }++    @Test("Modern service/session errors retain their cases without becoming overflow")+    func serviceAndSessionErrors() {+        if #available(iOS 27, macOS 27, *) {+            let client = FoundationCharacterExtractionModelClient()+            let assets = SystemLanguageModel.Error.assetsUnavailable(.init(debugDescription: "synthetic assets"))+            let concurrent = LanguageModelSession.Error.concurrentRequests+            #expect(client.describe(assets).contains("assetsUnavailable"))+            #expect(client.describe(concurrent).contains("concurrentRequests"))+            #expect(!client.isContextWindowOverflow(assets))+            #expect(!client.isContextWindowOverflow(concurrent))+            #expect(LiveFoundationModelIssue.isTransient(assets))+            #expect(LiveFoundationModelIssue.isTransient(concurrent))+            #expect(!LiveFoundationModelIssue.isTransient(DecodingError.dataCorrupted(.init(+                codingPath: [], debugDescription: "synthetic invalid response"))))+        }+    }++}
Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swift b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swiftindex 96550549..23169d0a 100644--- a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swift+++ b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/FoundationRuleSuggestionModelClientTests.swift@@ -94,7 +94,7 @@ struct FoundationRuleSuggestionModelClientTests {     @Test("Sampling is greedy so the same corpus yields the same proposal")     func greedyOptions() {         #expect(FoundationRuleSuggestionModelClient.generationOptions-            == GenerationOptions(sampling: .greedy))+            == GenerationOptions(samplingMode: .greedy))     }      // MARK: - Context overflow (Req 3.7)
Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swift b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swiftindex 3700414b..ec7e99fa 100644--- a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swift+++ b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/LiveFoundationModelIssue.swift@@ -7,6 +7,10 @@ import Testing enum LiveFoundationModelIssue {     static func isTransient(_ error: (any Error)?) -> Bool {         guard let error else { return false }+        if #available(iOS 27, macOS 27, *) {+            if error is LanguageModelError || error is SystemLanguageModel.Error ||+                error is LanguageModelSession.Error { return true }+        }         if let generation = error as? LanguageModelSession.GenerationError {             if case .decodingFailure = generation { return false }             return true
Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swift b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swiftindex 23123a3b..a5871cf9 100644--- a/Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swift+++ b/Packages/AsterismCore/Tests/AsterismIntelligenceTests/NamedGroupGroundingTests.swift@@ -22,9 +22,11 @@ struct NamedGroupGroundingTests {         let grounded = GroupExtractionGrounding.ground(result, from: source(text))         #expect(grounded.count == 2)         #expect(grounded.contains { $0.kind == .create && $0.groupName == "Team Loser" &&-            $0.chapterID == chapterID && $0.sourceFingerprint == "saved-revision" })+            $0.chapterID == chapterID && $0.sourceFingerprint == "saved-revision"+        })         #expect(grounded.contains { $0.kind == .join && $0.characterName == "Missha" &&-            $0.quote == "Missha joins Team Loser" })+            $0.quote == "Missha joins Team Loser"+        })     }      @Test("Ungrounded names, invented quotes and nonchapters cannot propose roster changes")
Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swift Modified
diff --git a/Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swift b/Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swiftindex 65b7019b..9d09852a 100644--- a/Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swift+++ b/Packages/AsterismCore/Tests/ConstellationKitTests/FlowLayoutTests.swift@@ -30,7 +30,7 @@ struct FlowLayoutTests {     func oneRowKeepsTheSpacing() {         let result = arrangement(             [CGSize(width: 40, height: 20), CGSize(width: 60, height: 30)], rowWidth: 200)-        #expect(result.positions == [CGPoint(x: 0, y: 0), CGPoint(x: 48, y: 0)])+        #expect(result.positions == [CGPoint.zero, CGPoint(x: 48, y: 0)])         // 40 + 8 + 60 wide, and as tall as the tallest item.         #expect(result.size == CGSize(width: 108, height: 30))     }@@ -46,7 +46,7 @@ struct FlowLayoutTests {             rowWidth: 130)         // 60 + 8 + 60 = 128 fits; the third would need 196.         #expect(result.positions == [-            CGPoint(x: 0, y: 0), CGPoint(x: 68, y: 0), CGPoint(x: 0, y: 38),+            CGPoint.zero, CGPoint(x: 68, y: 0), CGPoint(x: 0, y: 38),         ])         #expect(result.size == CGSize(width: 128, height: 58))     }@@ -56,7 +56,7 @@ struct FlowLayoutTests {         let result = arrangement(             [CGSize(width: 400, height: 20), CGSize(width: 400, height: 20)],             rowWidth: .infinity)-        #expect(result.positions == [CGPoint(x: 0, y: 0), CGPoint(x: 408, y: 0)])+        #expect(result.positions == [CGPoint.zero, CGPoint(x: 408, y: 0)])         #expect(result.size.height == 20)     } @@ -67,7 +67,7 @@ struct FlowLayoutTests {     func oversizedItemIsClamped() {         let result = arrangement(             [CGSize(width: 400, height: 40), CGSize(width: 50, height: 20)], rowWidth: 130)-        #expect(result.positions == [CGPoint(x: 0, y: 0), CGPoint(x: 0, y: 48)])+        #expect(result.positions == [CGPoint.zero, CGPoint(x: 0, y: 48)])         #expect(result.size == CGSize(width: 130, height: 68))     } @@ -77,7 +77,7 @@ struct FlowLayoutTests {     func oversizedItemDoesNotWidenTheRow() {         let result = arrangement(             [CGSize(width: 50, height: 20), CGSize(width: 400, height: 40)], rowWidth: 130)-        #expect(result.positions == [CGPoint(x: 0, y: 0), CGPoint(x: 0, y: 28)])+        #expect(result.positions == [CGPoint.zero, CGPoint(x: 0, y: 28)])         #expect(result.size == CGSize(width: 130, height: 68))     } 
scripts/lint.sh Modified
diff --git a/scripts/lint.sh b/scripts/lint.shnew file mode 100755index 00000000..46a8ea22--- /dev/null+++ b/scripts/lint.sh@@ -0,0 +1,32 @@+#!/bin/sh+# Run pinned lint with the reviewed legacy baseline; --full reports all debt.+set -eu+repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)+cd "$repo_root"+if ! command -v swiftlint >/dev/null 2>&1; then+    echo 'SwiftLint is required; install the version recorded in .swiftlint-version.' >&2+    exit 2+fi+expected=$(cat .swiftlint-version)+actual=$(swiftlint version)+if [ "$actual" != "$expected" ]; then+    echo "SwiftLint version mismatch: expected $expected, found $actual." >&2+    exit 2+fi+# Baseline adoption is explicit. Full-debt mode never filters known findings.+mode=gate+if [ "${1-}" = --full ]; then mode=full; shift; fi+for argument in "$@"; do+    case "$argument" in+        --quiet|--reporter|json|xcode|sarif) ;;+        *) echo "Unsupported verification option: $argument (reporting options only)." >&2; exit 2 ;;+    esac+done+if [ "$mode" = full ]; then+    exec swiftlint lint --strict --no-cache --config "$repo_root/.swiftlint.yml" "$@"+fi+if [ ! -f .swiftlint-baseline.json ]; then+    echo 'Missing reviewed SwiftLint baseline; do not regenerate it automatically.' >&2+    exit 2+fi+exec swiftlint lint --strict --no-cache --config "$repo_root/.swiftlint.yml" --baseline "$repo_root/.swiftlint-baseline.json" "$@"
scripts/verify-identity.sh Modified
diff --git a/scripts/verify-identity.sh b/scripts/verify-identity.shindex b79266b7..161b7711 100755--- a/scripts/verify-identity.sh+++ b/scripts/verify-identity.sh@@ -27,8 +27,8 @@ #     shadow, which is the whole failure mode check 1 exists for. # #   * All string matching is boundary-aware. Every Personal composed value is a-#     strict prefix of its Development sibling (group.me.nore.ig.Asterism is a-#     prefix of group.me.nore.ig.Asterism.dev), so a naive substring match+#     strict prefix of its Development sibling (group.me.nore.ig.apps.Asterism is a+#     prefix of group.me.nore.ig.apps.Asterism.dev), so a naive substring match #     corrupts every "equals" and every "appears nowhere" check in here. # #   * A build setting can carry a condition — `ASTERISM_IDENTITY[sdk=iphoneos*]` —@@ -48,8 +48,8 @@ readonly PBXPROJ="$REPO_ROOT/Asterism/Asterism.xcodeproj/project.pbxproj" # registers the typo'd App Group and the app comes up on an empty library, the # incident class this repo's AGENTS.md exists for. An intentional identity change # is a deliberate two-place edit, matching the Q8 banner precedent.-readonly EXPECTED_TOKEN_DEVELOPMENT="me.nore.ig.Asterism.dev"-readonly EXPECTED_TOKEN_PERSONAL="me.nore.ig.Asterism"+readonly EXPECTED_TOKEN_DEVELOPMENT="me.nore.ig.apps.Asterism.dev"+readonly EXPECTED_TOKEN_PERSONAL="me.nore.ig.apps.Asterism"  # The exact derivation text expected at project level, verbatim. readonly EXPECTED_GROUP_DERIVATION='group.$(ASTERISM_IDENTITY)'@@ -968,8 +968,8 @@ check_literal_sweep() { # # `grep -w` is NOT good enough here, and this is the trap the whole file warns # about: grep's word characters are [A-Za-z0-9_], so `.` counts as a boundary and-# `-w group.me.nore.ig.Asterism` happily matches inside-# group.me.nore.ig.Asterism.dev. Every Personal value is a strict prefix of its+# `-w group.me.nore.ig.apps.Asterism` happily matches inside+# group.me.nore.ig.apps.Asterism.dev. Every Personal value is a strict prefix of its # Development sibling, so that would report the Personal literal on every line # carrying the Development one. The class below therefore includes `.` and `-`. identifier_pattern() {

Docs (4)

AGENTS.md Modified
diff --git a/AGENTS.md b/AGENTS.mdindex c321897c..2c91be0a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -15,7 +15,7 @@ approval in the same exchange.** This applies to: - `make install`, `make run`, and any `xcodebuild ... -destination 'id=<udid>'`   with the `Asterism Personal` scheme or `Personal` configuration - any `xcrun devicectl device install` / `uninstall` of the `Personal` bundle-  (`me.nore.ig.Asterism`)+  (`me.nore.ig.apps.Asterism`) - **launching the `Personal` Mac app** (Req 9.5 of `specs/ipad-and-mac-layouts/`):   the Mac is a physical device with the user's real library on it. `make   build-mac` / `build-mac-release` are safe — they compile and never install or@@ -143,12 +143,18 @@ The `-m4` and `-m4-recent` targets are easy to confuse and only one of them is s  If you run `swift test` by hand instead of through the Makefile, pass `--no-parallel`. It is load-bearing, not a flakiness preference: mixed-schema suites in one parallel process fight over SwiftData's global entity registry and die with `NSUnknownKeyException`. See `docs/agent-notes/testing.md`. -There is no code-style linter or formatter configured in this repo — no-`.swiftformat`, `.swiftlint.yml`, or `.swift-format`, and no `make lint`/`format`-target. A clean `make test-core` with no new compiler warnings is the pre-commit-bar. `make verify-identity` (a `test-core` prerequisite) is an identity lint,-not a style one: it checks the App Group / CloudKit identifier declarations-without building anything — see `specs/configuration-identity/`.+SwiftLint is configured in `.swiftlint.yml`, pinned by `.swiftlint-version` and+ratcheted against the explicitly reviewed `.swiftlint-baseline.json`. `make lint`+fails on new violations; `make lint-debt` reports all known and new debt without+filtering. `make verify` runs identity checks plus the lint ratchet. Core/fast/+quick verification targets enforce it as a prerequisite. No command autocorrects+or regenerates the baseline automatically. See `docs/agent-notes/linting.md` and+Transit T-2498 for the remaining debt, preserved frozen schemas and cleanup+criteria. Do not expand the baseline, blanket-disable rules or exclude broad+source paths merely to obtain a green result. Keep the unfiltered report visible.+A clean serial `make test-core` with no new compiler warnings remains the+pre-commit bar. `make verify-identity` validates app identity, not code style —+see `specs/configuration-identity/`.  When adding tests, follow **Writing efficient tests** in `docs/agent-notes/testing.md`: put value rules on the native host, state runtime@@ -196,8 +202,8 @@ clears the convergence residue are verified by hand from  | Configuration | Scheme | Display name | Bundle ID | App Group | CloudKit container | Optimization | |---|---|---|---|---|---|---|-| `Development` | `Asterism Development` | Devsterism | `me.nore.ig.Asterism.dev` | `group.me.nore.ig.Asterism.dev` | `iCloud.me.nore.ig.Asterism.dev` | `-Onone`, `ENABLE_TESTABILITY=YES` |-| `Personal` | `Asterism Personal` | Asterism | `me.nore.ig.Asterism` | `group.me.nore.ig.Asterism` | `iCloud.me.nore.ig.Asterism` | `-O`, `wholemodule` |+| `Development` | `Asterism Development` | Devsterism | `me.nore.ig.apps.Asterism.dev` | `group.me.nore.ig.apps.Asterism.dev` | `iCloud.me.nore.ig.apps.Asterism.dev` | `-Onone`, `ENABLE_TESTABILITY=YES` |+| `Personal` | `Asterism Personal` | Asterism | `me.nore.ig.apps.Asterism` | `group.me.nore.ig.apps.Asterism` | `iCloud.me.nore.ig.apps.Asterism` | `-O`, `wholemodule` |  **Both configurations mirror to CloudKit** since tasks 26/27 of `specs/cloudkit-mirroring/`. A `Development` install is therefore **no longer@@ -206,6 +212,11 @@ installed shares the dev library, so installing it on a second phone merges that phone's dev data in. `Personal` syncs the real library. Both containers are in CloudKit's development environment. +The T-2485 local `.apps` identifier migration selects new App Group and CloudKit+identities; it does not copy or transfer the previous library. After the owner completed the manual transfer, the display names were restored+to **Devsterism** and **Asterism**, retaining the new identities. See+[account migration](docs/account-migration.md) before any signed use.+ These install as **separate apps with separate data**. `PRODUCT_NAME` is shared, but the display name is not: two apps with one name would give Siri two answers to one phrase (`app-intents` Req 7.3), and `make verify-identity` fails
CHANGELOG.md Modified
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 50f7a3b8..0ec29d31 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -22,6 +22,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).  ### Changed +- **Developer-account preparation (T-2485):** isolate the new `.apps` identities, retain Development/Personal separation and restore the ordinary names after the owner’s manual data transfer, target iOS 27 with Swift 6 language mode, and preserve modern and legacy model-error handling.+- **SwiftLint adoption (T-2498):** apply reviewed supported corrections, preserve model snapshots and optional-state contracts, enforce a pinned no-new-violations baseline in verification, and retain an unfiltered debt report for the remaining cleanup.+ - **Named character groups (T-2491):** manage chapter-based memberships with inclusive joins/leaves, aliases, reciprocal app/share-sheet rosters, reviewed group/join/leave suggestions, historical link recalculation, and ordinary Remove/Restore links. Preserve membership history through archives and record merges.  - **Selection controls (T-2491):** share softer cyan selection styling across group membership, chapter sorting, Work and Reading status. Retain native Liquid Glass where labels fit and readable stacked choices on narrow screens, with accessible selection and touch targets.
docs/account-migration.md Modified
diff --git a/docs/account-migration.md b/docs/account-migration.mdnew file mode 100644index 00000000..395d9468--- /dev/null+++ b/docs/account-migration.md@@ -0,0 +1,283 @@+# T-2485: local account and identifier preparation++This worktree prepares local configuration only. It does not transfer an Apple+app, register capabilities, provision, deploy, or migrate the reader's library.+The selected team is `4PJS97G236`; Development and Personal remain separate.++## Identifier mapping++The namespace insertion preserves the existing case and suffix hierarchy.+Project-level `ASTERISM_IDENTITY` remains the single declaration from which+App Group, CloudKit and background-task values derive. Source entitlements and+Info.plist files already reference these settings; they need no literal IDs.++| Purpose | Previous | Prepared |+| --- | --- | --- |+| Development app/token | `me.nore.ig.Asterism.dev` | `me.nore.ig.apps.Asterism.dev` |+| Personal app/token | `me.nore.ig.Asterism` | `me.nore.ig.apps.Asterism` |+| Development iOS share extension | `me.nore.ig.Asterism.dev.ShareExtension` | `me.nore.ig.apps.Asterism.dev.ShareExtension` |+| Personal iOS share extension | `me.nore.ig.Asterism.ShareExtension` | `me.nore.ig.apps.Asterism.ShareExtension` |+| Development Mac share extension | `me.nore.ig.Asterism.dev.ShareExtensionMac` | `me.nore.ig.apps.Asterism.dev.ShareExtensionMac` |+| Personal Mac share extension | `me.nore.ig.Asterism.ShareExtensionMac` | `me.nore.ig.apps.Asterism.ShareExtensionMac` |+| Unit tests, both configurations | `me.nore.ig.AsterismTests` | `me.nore.ig.apps.AsterismTests` |+| UI tests, both configurations | `me.nore.ig.AsterismUITests` | `me.nore.ig.apps.AsterismUITests` |+| Development App Group | `group.me.nore.ig.Asterism.dev` | `group.me.nore.ig.apps.Asterism.dev` |+| Personal App Group | `group.me.nore.ig.Asterism` | `group.me.nore.ig.apps.Asterism` |+| Development CloudKit | `iCloud.me.nore.ig.Asterism.dev` | `iCloud.me.nore.ig.apps.Asterism.dev` |+| Personal CloudKit | `iCloud.me.nore.ig.Asterism` | `iCloud.me.nore.ig.apps.Asterism` |+| Development background task | `me.nore.ig.Asterism.dev.backgroundExport` | `me.nore.ig.apps.Asterism.dev.backgroundExport` |+| Personal background task | `me.nore.ig.Asterism.backgroundExport` | `me.nore.ig.apps.Asterism.backgroundExport` |++All twelve project/target configuration team assignments retain `4PJS97G236`.+The app still depends on the iOS share extension for iOS and the Mac share+extension for macOS. Extensions share only their configuration's App Group;+they do not acquire CloudKit entitlements or start mirroring.++The owner-requested temporary migration-test names are Development **Devsterism New**+and Personal **Asterism New**. Product filenames and bundle suffixes are unchanged.+The incoming project snapshot for this identifier step had both names set to+Devsterism. Identity lint detected this. The first correction command was denied+by automatic approval review citing superseded spec-only scope and did not run.+After current T-2485 authority was clarified, one exact retry restored Personal+to Asterism; the identity lint passed. No guard was weakened to hide the defect.++## Data implications before any signed use++- A new bundle ID is a separate application identity, not an in-place update of+  the old bundle. Its sandbox/defaults do not automatically inherit the old app's.+- A new App Group selects a different shared root. The frozen store filename+  `Library/Application Support/AsterismV3.sqlite`, readiness/lock filenames,+  pending captures, backups and sidecars are not renamed or copied. Keeping a+  filename does not make the old group's contents appear in the new group.+- The new CloudKit container is a separate selection. This change neither moves+  old private records nor proves that the destination container exists, belongs+  to the new team, or is accessible. Both configurations retain their current+  mirroring flags and development push environment.+- The owner confirmed that existing export/import is the intended data-transfer+  approach. No separate data-migration mechanism is required or implemented.+  The user can export from the old app and import into the new app later. No+  export, import, cloud query, reset, deletion or old-library open occurred here.+- Old and new Personal apps can coexist with the same display name. Identify+  the intended bundle before any future manual data handoff; do not uninstall+  the old app as part of this preparation.++## Account and provisioning gates++Before signed use, the owner must verify the new app/extension identifiers,+both App Groups, the app's CloudKit containers and push capability under the+destination team, plus appropriate iOS/macOS profiles and group associations.+Availability and ownership are not established by a project-file team value.+Any registration, transfer, credential or new security grant is a separate+approved action. No such action is performed by this local preparation.++Safe validation must not use `-allowProvisioningUpdates` or+`-allowProvisioningDeviceRegistration`, install/launch on physical devices, or+run the Personal Mac app. The existing `make archive` target enables provisioning+updates and is therefore **not** a validation command for this preparation.+The physical install/performance targets also enable provisioning updates; they+were not invoked. Requested future phone installation must use Xcode MCP and+separate any new portal/security grant from the installation approval.+The signed Mac build remains a separate gate; an unsigned build or missing+processed entitlements must not be presented as a passed signed identity check.++## Local validation and scope++The source audit verified the twelve identifier declarations, unchanged team+assignments, derived entitlement/plist references, and Development/Personal+separation. The first `make verify-identity` run failed on the incoming duplicate+display name; after the approved correction it passed. The affected host selection+`ConfigurationShellTests|FrozenLibraryPathTests` passed 31 tests in two suites.+Native App Group and background-task suites passed 13/13 annotated methods,+verified against public xcresult case identifiers. They used a synthetic temporary+library on simulator E8A, ad hoc signing and no provisioning-update flags. The+initial two destination selections ran zero tests; UUID-only selection succeeded.+The current local compile/test display names are the owner-requested New names.+No destination-team signing or CloudKit account acceptance is claimed.++Both generic iOS device builds were attempted using existing signing assets only,+without `-allowProvisioningUpdates` or device registration. Development and Personal+both failed: the selected `iOS Team Provisioning Profile: *` lacks App Groups,+iCloud and Push Notifications for the app, including the prepared group/container+IDs; the iOS share extension profile lacks App Groups. No signed phone artifact is+ready. This establishes a local profile limitation, not proof that the IDs are+absent from the Apple portal. Personal simulator compilation also passed. Both simulator products carry the+requested New display names, matching new bundle IDs, App Groups, CloudKit and+background-task values in their processed Info.plists and simulated entitlements.+The iOS share extensions carry the matching new bundle and App Group values,+without CloudKit keys. These are ad hoc simulator artifacts, not signed phone+artifacts.++No device build used a physical-device UDID, installed or launched anything.+Before putting either build on the phone, destination-team profiles/capabilities+must be supplied or separately approved provisioning performed. Personal+installation and normal launch additionally require the action-time warning and+approval in `AGENTS.md`; the request for builds alone is not that approval.++The Makefile's simulator build now accepts its existing `XCODE_BUILD_FLAGS`+variable, allowing explicit safe local build flags without editing account+settings. Runtime readers still consume bundle declarations; no fallback to an+old App Group/container was introduced. Identity-lint pins and device warning+text are updated with the new namespace, not disabled.++Log/signpost subsystem and queue labels are intentionally unchanged: these are+operational diagnostics, not bundle, storage, capability or credential selectors.+Historical specs and captured receipts retain their original identifiers; this+document supersedes their old identity values for this worktree only.+++## Initial local results and signing blocker (superseded below)++- Identity lint passed after the approved display-name correction and again with+  the temporary New names.+- Host configuration/frozen-path tests: 31/31 in two suites.+- Native App Group/background-task methods: 13/13, exact ID audit, no skips.+- Phone save/cancel/relaunch journey: 1/1, 116.266 seconds.+- iPad diagnosed-capture entry journey: 1/1, 27.531 seconds.+- All 1,050 frozen tracked runtime/config/test/resource inputs remained unchanged+  through final validation. Full pre-push UI acceptance and a signed Mac build+  were not run; no commit or publication is requested by this step.+- Both generic-device builds failed on the existing wildcard-profile grants;+  neither configuration has an installable signed phone artifact.++For the phone, under team `4PJS97G236`, the owner needs to check the two explicit+app IDs and two iOS share-extension IDs in the mapping above. The app IDs need+App Groups, iCloud/CloudKit and Push Notifications, associated with each+configuration's corresponding group/container. The iOS extensions need only the+matching App Group. Obtain matching explicit profiles with the required grants+and an available signing certificate/device as appropriate. Do not add CloudKit+to the share extensions. Mac extension/profile readiness is separately untested.++The source already declares these capabilities and automatic signing, so this+is not a missing local entitlement declaration. If registrations/associations+already exist and the account has permission, authorised automatic provisioning+may refresh/generate the profiles. If they do not exist, registration/association+work is needed first. Portal state was not queried, so neither case is assumed.+`-allowProvisioningUpdates` can also create/update App IDs and certificates;+this requires separate explicit approval and was not enabled here.++After usable profiles exist, retry the two generic-device builds without any+real-library operation. Phone installation must use Xcode MCP. Obtain fresh+Personal install/launch approval at that time; the current request was for+builds, not installation. The owner will use existing export/import for data.++Artifacts and exact command/result receipts are in `/tmp/asterism-T2485/`:+`completion-receipt.json`, `simulator-artifact-receipts.json`,+`native-id-audit.json`, the native/UI result bundles and build logs. The simulator+apps are `DerivedData/Build/Products/Development-iphonesimulator/Asterism.app`+and `DerivedData/Build/Products/Personal-iphonesimulator/Asterism.app`.+++## Approved managed-signing builds — passed++After explicit owner approval, both generic iOS Makefile builds succeeded with+Xcode-managed provisioning (`-allowProvisioningUpdates`). No physical destination,+installation or launch was used. Both apps and embedded iOS extensions pass+strict signature verification under team `4PJS97G236`. Embedded explicit profiles+grant the exact `.apps` IDs and App Groups; app signatures additionally contain+their respective CloudKit containers, CloudKit service and development Push.+Extensions retain App Group only. This proves signed artifact readiness, not+which remote registrations were created versus reused or runtime data/sync.++- **Devsterism New**, 0.7.0 (1):+  `/tmp/asterism-T2485/DerivedData/Build/Products/Development-iphoneos/Asterism.app`.+- **Asterism New**, 0.7.0 (1):+  `/tmp/asterism-T2485/DerivedData/Build/Products/Personal-iphoneos/Asterism.app`.++Final source check caught Personal's stored name reverting to Devsterism New;+its built artifact correctly says Asterism New. The unexpected project was+preserved and only the explicitly authorised name restored, recovering its+exact pre-build hash. A concurrent catalog change was preserved: key reordering+and removal of `Remove %@ from this chapter`, with no added or modified values.+The owner reported concurrently building macOS; causation is not assumed.+All other 1,049 validation inputs match. Identity lint and diff checks pass;+unchanged tests are reused. Mac build success is owner-reported, not independently+verified here.++`/tmp/asterism-T2485/managed-artifact-receipts.json` records signatures, bounded+profile grants and executable hashes without credentials; `managed-build-receipt.json`+records outcomes. Both owned builds ended. No install/launch, real-library access,+import/export, commit, push or merge occurred. Installation must use Xcode MCP;+Personal requires fresh action-time approval. Existing export/import is the+owner's intended transfer path.+++## Build-warning cleanup++The owner requested current warning cleanup before tonight's installation.+Removed two unnecessary `try` markers; adopted the SDK's renamed, back-deployed+`samplingMode` initializer in both model clients and existing assertions;+explicitly weak-captured the coordinator in its nested MainActor Task; moved+three fixture success logs into their existing debug branches. Deployment+targets, greedy sampling, cancellation semantics and fixture availability remain+unchanged. Concurrent user catalogue changes remain preserved.++Focused checks passed: 17 repository tests, 25 model-client tests and 31 exact+coordinator integration cases with no skips. Both signed generic iOS builds+passed with **zero Swift compiler warnings**. Each retains one Xcode tool notice:+`Metadata extraction skipped, no AppIntents.framework dependency found` for the+share extension, which deliberately has no App Intents dependency. No unused+framework was added and no warnings were suppressed. Existing Mac logs showed+the shared source warnings; no independent Mac rebuild or Xcode scheme changes+were made during the owner's concurrent Mac work.++Both final app/extension signatures, IDs, profile grants and temporary names+verify; artifact paths/version remain as above. Final executable hashes are in+`managed-artifact-receipts.json`; `warning-cleanup-receipt.json` records checks.+All 1,050 tracked inputs match `warning-source-manifest.json`. Both owned build+processes ended. Artifacts are retained for installation tonight; no installation,+launch, real-library access, commit or publication was performed.+++## iOS 27 and Swift 6 — final verification++This section supersedes the earlier artifact/check summaries. Xcode 27.0+(27A266a) supplies Swift compiler 6.4; its latest stable language mode is **6**,+represented by `SWIFT_VERSION = 6.0`, not 6.4. All ten target/configuration pairs+use it. All eight applicable iOS target/configuration pairs and the package now+require iOS 27. App/Mac-extension/test macOS minimums remain 26.5 and the package+Mac minimum remains 26.0. The package tools-version remains 6.2; it already uses+Swift 6 language mode and accepts the iOS minimum via `.iOS("27.0")`.++Both final signed phone builds passed: **Devsterism New**+(`me.nore.ig.apps.Asterism.dev`) and **Asterism New**+(`me.nore.ig.apps.Asterism`), version 0.7.0 (1), minimum iOS 27. App and embedded+iOS extension signatures and scoped profile grants verify under team4PJS97G236.+The Development Mac build also passed through Xcode MCP with its existing+scheme/My Mac selection unchanged; app and Mac extension signatures verify.++Checks: 94 unique host cases (including concrete Foundation providers and modern+SDK errors), 370 unique native cases with no unexpected skips, phone+Save/Cancel/relaunch 1/1 in117.781s and iPad capture journey1/1 in28.876s. All UI+method names and XCTest assertion calls were preserved during actor migration.+XCTest lifecycle work now awaits MainActor; native fixture captures are explicit+immutable snapshots or isolated state. Nil requirements converted to guards+still fail explicitly through Issue.record; no assertions were weakened.+A new SDK error regression failed four assertions before the fix. Modern and+legacy model-client/classification coverage then passed29 cases: both clients+now recognize iOS27 contextSizeExceeded and keep diagnostic case names.++Warnings remain visible: four legacy share/drop loading sites and three legacy+GenerationError compatibility sites. Replacement attempts for concrete legacy+text/Safari providers failed the host Foundation tests, so compatibility was+preserved; older errors and macOS26.5 also remain supported. The extension's+no-AppIntents metadata tool notice remains known; incremental builds may not+re-emit it. Legacy provider constructor warnings in compatibility tests remain+intentional. No global suppression or unused framework was added. Two immutable+App Intents SDK builders require narrowly documented nonisolated(unsafe)+declarations because computed factories fail the real metadata extractor.++Final receipts and retained artifacts: `/tmp/asterism-T2485/ios27-swift6-completion-receipt.json`,+`managed-artifact-receipts.json`, `mac-mcp-result.json`, and the existing+`DerivedData/Build/Products/{Development,Personal}-iphoneos/Asterism.app` paths.+All1,051 final manifest inputs match. No full pre-push gate is claimed; no commit,+push, merge, installation, launch, real import/export or library access occurred.+Both owned build/test streams ended. Retain these artifacts for the owner's+later installation request; Personal still needs fresh action-time approval.++## Final display names after owner transfer++The owner confirmed switching to both new apps and deleting the old apps, then+requested the ordinary names back. Development is now **Devsterism** and Personal+is **Asterism**. The `.apps` bundle IDs, team, App Groups and CloudKit containers+are unchanged, so renaming does not select a different store. Earlier New names+and build receipts above describe the temporary transfer builds.
docs/agent-notes/linting.md Modified
diff --git a/docs/agent-notes/linting.md b/docs/agent-notes/linting.mdnew file mode 100644index 00000000..fcd97dff--- /dev/null+++ b/docs/agent-notes/linting.md@@ -0,0 +1,119 @@+# SwiftLint verification and known debt++SwiftLint **0.65.1** is pinned in `.swiftlint-version`. The installed tool is+checked before every command; verification never installs/updates it.++## Commands and enforcement++```sh+make lint                         # strict no-new-violations gate+make lint-debt                    # all known/new debt; currently exits 2+make verify                       # identity checks + lint ratchet+make lint-debt LINT_FLAGS='--reporter json --quiet'+```++Rules live in `.swiftlint.yml`. The gate explicitly applies the reviewed+`.swiftlint-baseline.json`; the full-debt command applies no baseline. Both use+`--strict --no-cache`. Only reporting options are accepted. Neither command+changes source, refreshes the baseline or permits lenient/filtered checks.++The ratchet is required by `test-core`, `test-fast` and `test-quick`, covering+Core/pre-commit and unit/pre-push entry points. Existing native/UI phase policy+still applies. No Xcode build phase, Git hook or CI workflow was added.+Baseline growth requires explicit review; fixes should remove corresponding+entries rather than regenerate/expand the debt silently.++## Scope and rule policy++Adapted from Prism's actual configuration and strict Makefile integration.+Included: app/iOS/Mac extensions, shared UI, native/UI tests, package manifest,+and every local package Sources/Tests directory. Packages and frozen schemas+are not excluded. Exclusions cover build products and generated code only.+Prism's five style choices and its opt-in rules/thresholds are retained; no+blanket disable or source exclusion was added to make adoption pass.++## Reviewed autocorrection and retained contracts++- Original full strict profile: **1,685** findings across 403 files.+- Existing per-rule findings reduced by **420**; layout normalization exposed+  **27** more line/body-length findings. Net reduction: **393**.+- Remaining reviewed baseline: **1,292** findings across **346** files, **28** rules.+- Frozen V16–V21 files and live Models.swift are byte-for-byte pre-correction.+  Explicit model defaults and nested optional-flattening expressions were+  preserved; their findings remain visible in the debt report.+- Synthesized-initializer changes, implicit returns, nil-default removals in+  ordinary values and modifier/layout corrections were reviewed and regressed.+  The two discarded model initializations are ordinary test functions, not+  SwiftUI ViewBuilders. Do not apply result-builder discard rewrites blindly.++A temporary included file with a new identifier-name violation failed the gate.+Removing it restored zero new violations. The probe was removed; it is neither+source nor baseline debt. The raw full report still fails on all known findings.++## Remaining cleanup — Transit T-2498++**Reduce baselined SwiftLint debt** is an Asterism Chore in Idea state. Adoption+has not completed that future cleanup task. Categories reconcile to 1,292:++| Category | Findings |+| --- | ---: |+| Mechanical layout/formatting | 684 |+| Naming, documentation and idioms | 247 |+| Structural size/complexity | 234 |+| Potential correctness/safety review | 127 |++| Rule | Findings |+| --- | ---: |+| `array_init` | 10 |+| `closure_parameter_position` | 45 |+| `collection_alignment` | 47 |+| `contains_over_filter_is_empty` | 3 |+| `contains_over_first_not_nil` | 6 |+| `cyclomatic_complexity` | 40 |+| `empty_collection_literal` | 21 |+| `file_length` | 32 |+| `force_try` | 108 |+| `function_body_length` | 52 |+| `function_parameter_count` | 50 |+| `generic_type_name` | 1 |+| `identical_operands` | 6 |+| `identifier_name` | 148 |+| `implicit_getter` | 1 |+| `implicit_optional_initialization` | 16 |+| `large_tuple` | 23 |+| `line_length` | 517 |+| `multiple_closures_with_trailing_closure` | 8 |+| `optional_data_string_conversion` | 13 |+| `orphaned_doc_comment` | 13 |+| `redundant_nil_coalescing` | 7 |+| `sorted_first_last` | 5 |+| `static_over_final_class` | 7 |+| `switch_case_alignment` | 30 |+| `type_body_length` | 37 |+| `vertical_parameter_alignment` | 45 |+| `void_function_in_ternary` | 1 |++Acceptance criteria: audit safety findings without assuming every flag is a bug;+fix small reviewed batches without changing public/data contracts or weakening+assertions; preserve frozen snapshots unless the schema policy explicitly+permits a change; reduce the baseline alongside fixes; keep the unfiltered debt+report visible. Run consumer-based package/native/rendered regressions and the+required commit/pre-push gates. Remove the baseline only when full lint passes.+No real-library/account migration work belongs to that cleanup ticket.++## Verification and artifact relationship++Full unfiltered package runs passed: 43 + 304 + 257 + 3,646 = **4,250** tests.+Full simulator units passed: **1,882 Swift Testing + 11 XCTest** cases. Development+Mac compile and app/extension signatures passed through Xcode MCP. Targeted+phone Save/Cancel/relaunch and iPad capture journeys passed; full pre-push UI+acceptance is not claimed. Known Core compiler diagnostics occur in exact+unchanged pre-correction test files; no new warning is attributed to this pass.++Receipts/reports are in `/tmp/asterism-T2485/`, including+`lint-baseline-proof.json`, `lint-debt-ticket-data.json` and `lint-mac-result.json`.+The signed phone products still have their original executable hashes and+**predate the lint source corrections**. Simulator checks do not overwrite+iphoneos products. The old Mac app was copied and signature/hash-verified at+`pre-lint-signed/Asterism-Development-Mac.app` before the new Mac compile.+No installation, launch, real import/export, merge or push occurred.