Post

Replies

Boosts

Views

Activity

AppKit: identifying the completion of an input operation that started before Save
Suppose a macOS app uses the public AppKit text input system (NSTextInputContext and NSTextInputClient). Consider a hypothetical sequence within the same text input context and client: An IME input operation B starts before the app receives a Save action. Save is received before B has a known completion. Text input callbacks for B may be delivered after Save, and the user may initiate a separate input operation C after Save. Is there a supported public API or documented contract that lets the app identify the completion boundary and result of B, associate them with the pre-Save operation, and obtain the completed text for that Save without including independent post-Save input C? If such a guarantee exists, which public API or contract provides it, and under what conditions and macOS versions? If it does not, is this distinction and snapshot boundary not guaranteed by the public AppKit text input contract? This is a question about causal attribution and completion boundaries, not simply about committing or cancelling the current composition. It is a hypothetical API-contract question, not a report of a reproduced defect. I am not asking about private APIs.
Topic: UI Frameworks SubTopic: AppKit
0
0
52
23h
APFS directory-entry durability after creating an Application Support subdirectory
On macOS 15.7.2 with a local APFS volume and App Sandbox, which supported filesystem operations and synchronization order make a newly created directory entry and a new database filename durable after an OS crash or sudden power loss? DTS asked me to post this question here for review. This is a design-stage API-contract question, not a report of a reproduced failure. The proposed sequence has not been implemented or tested. I have no focused reproducer, crash report, or power-loss test results for this question. The platform in question is macOS, not iOS. Context The proposed initialization sequence is: Obtain the Application Support directory using Foundation. Call this directory P. Create a new app-specific directory R directly under P, without replacing an existing object. Create a SQLite catalog at R/start.sqlite and commit its initial record. The proposed SQLite configuration is SQLite 3.47.2, the standard Unix VFS, journal_mode=DELETE, and synchronous=EXTRA. These are design assumptions, not verified runtime settings. The filesystem synchronization operations and their ordering relative to directory creation, database-file creation, and the initial transaction are what I need to establish. The specific concern is the durability of the directory entries needed to resolve P/R/start.sqlite. I need to distinguish the persistence of the database contents from the persistence of the names used to reach that database. I am not assuming that a successful SQLite commit, by itself, establishes every parent-directory durability requirement. Questions Is fsync supported on APFS directory file descriptors on macOS 15.7.2? If so, what does successful return guarantee about directory entries created before the call? Does fcntl(fd, F_FULLFSYNC) apply to directory descriptors? If not, what supported operation, if any, should an application use to establish the required directory-entry durability? Which objects need to be synchronized, and in what order: the database file, R, P, or P's parent? Please distinguish the case where P already existed from the case where P was newly created during initialization. What guarantees differ between an OS crash and sudden power loss? What assumptions about the local storage device, write caches, or flush support are required? Is there authoritative documentation applicable to macOS 15.7.2 that describes this contract? If part of the requested guarantee is unspecified or unsupported, please identify that boundary. If the answer differs on later macOS versions, please distinguish that from the 15.7.2 contract. I am asking about supported public filesystem APIs and their documented guarantees, not validation of an application-specific recovery protocol or guarantees against arbitrary hardware failure. Thank you.
5
0
155
1w
AppKit: identifying the completion of an input operation that started before Save
Suppose a macOS app uses the public AppKit text input system (NSTextInputContext and NSTextInputClient). Consider a hypothetical sequence within the same text input context and client: An IME input operation B starts before the app receives a Save action. Save is received before B has a known completion. Text input callbacks for B may be delivered after Save, and the user may initiate a separate input operation C after Save. Is there a supported public API or documented contract that lets the app identify the completion boundary and result of B, associate them with the pre-Save operation, and obtain the completed text for that Save without including independent post-Save input C? If such a guarantee exists, which public API or contract provides it, and under what conditions and macOS versions? If it does not, is this distinction and snapshot boundary not guaranteed by the public AppKit text input contract? This is a question about causal attribution and completion boundaries, not simply about committing or cancelling the current composition. It is a hypothetical API-contract question, not a report of a reproduced defect. I am not asking about private APIs.
Topic: UI Frameworks SubTopic: AppKit
Replies
0
Boosts
0
Views
52
Activity
23h
APFS directory-entry durability after creating an Application Support subdirectory
On macOS 15.7.2 with a local APFS volume and App Sandbox, which supported filesystem operations and synchronization order make a newly created directory entry and a new database filename durable after an OS crash or sudden power loss? DTS asked me to post this question here for review. This is a design-stage API-contract question, not a report of a reproduced failure. The proposed sequence has not been implemented or tested. I have no focused reproducer, crash report, or power-loss test results for this question. The platform in question is macOS, not iOS. Context The proposed initialization sequence is: Obtain the Application Support directory using Foundation. Call this directory P. Create a new app-specific directory R directly under P, without replacing an existing object. Create a SQLite catalog at R/start.sqlite and commit its initial record. The proposed SQLite configuration is SQLite 3.47.2, the standard Unix VFS, journal_mode=DELETE, and synchronous=EXTRA. These are design assumptions, not verified runtime settings. The filesystem synchronization operations and their ordering relative to directory creation, database-file creation, and the initial transaction are what I need to establish. The specific concern is the durability of the directory entries needed to resolve P/R/start.sqlite. I need to distinguish the persistence of the database contents from the persistence of the names used to reach that database. I am not assuming that a successful SQLite commit, by itself, establishes every parent-directory durability requirement. Questions Is fsync supported on APFS directory file descriptors on macOS 15.7.2? If so, what does successful return guarantee about directory entries created before the call? Does fcntl(fd, F_FULLFSYNC) apply to directory descriptors? If not, what supported operation, if any, should an application use to establish the required directory-entry durability? Which objects need to be synchronized, and in what order: the database file, R, P, or P's parent? Please distinguish the case where P already existed from the case where P was newly created during initialization. What guarantees differ between an OS crash and sudden power loss? What assumptions about the local storage device, write caches, or flush support are required? Is there authoritative documentation applicable to macOS 15.7.2 that describes this contract? If part of the requested guarantee is unspecified or unsupported, please identify that boundary. If the answer differs on later macOS versions, please distinguish that from the 15.7.2 contract. I am asking about supported public filesystem APIs and their documented guarantees, not validation of an application-specific recovery protocol or guarantees against arbitrary hardware failure. Thank you.
Replies
5
Boosts
0
Views
155
Activity
1w