Repository navigation
After 1.1.0: hooks run once across a daemon restart, no Gatekeeper kill from the menu bar app, steadier tests - #87
Merged
Merged
Conversation
The first start's question about the agent was "Who answers the connections that wait?". It now uses the words of the mode it follows, "Hold what no rule allows until an agent or you answer".
Five tests failed on CI's runners in the last two weeks for the time a step took, not for what it did: 7.4 s over a hook with a 1 s timeout, a deadline that had passed before the runner took the hook, a waiting hook given up later than 1.8 s in. The upper bounds that stand against a 30 s sleep or a longer timeout are now 15 s (slowRunnerBound). The test of an event's deadline runs once more with more room when its hook was dropped before it started, as the daemon's already did. The busy hook of the waiting test sleeps 4 s, so that giving up before the deadline can take up to 3 s and still not be the slot coming free. With SIP off, where the kernel checks no launch requirement, a refused program may have made its file before the check by PID killed it: the file is checked only where the kernel checks.
Since 1.1.0 the extension sends a daemon that registers every event still waiting. Among them are events whose hook had ended with no answer: on 16 November a daemon that started again got four and ran the hook a second time for each (P5-24, result 9). A daemon reads the end of the event log as it starts (EndedEvents) and skips those events, told by ID and deadline: hooks_skipped, already_ran. It still runs the hooks of an event when the daemon's own end stopped one, when one has no end in the log, when an answer did not reach the extension (the extension resends only events whose token no answer presented, so that answer was lost), and when no hook ran.
After an upgrade the menu bar app opened the app on disk at its next check. Homebrew leaves the app in quarantine, macOS asks before the first opening of such an app, and it cannot ask for one opened in the background: after brew upgrade to 1.1.0 it killed the app 1.0.8's menu bar app had opened and the blackice status started in the same moment (P5-24, result 11). The menu bar app now quits instead, and blackice start, which every upgrade needs, opens it. The check is the running build's, so an upgrade from 1.1.0 or earlier is as before; the install guide says to run the command again. No run has this yet: it takes a brew upgrade from a build that has it.
The system log of 16 November has the menu bar app of 1.0.8 opening the new app 0.3 s before the rejection, and step 3's upgrade with the command first and no rejection.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The four follow-ups left after 1.1.0. Code, tests and words only: no version change, no build, nothing released.
1. A daemon that starts again runs no hook a second time (
92a7235)Since 1.1.0 the extension sends a daemon that registers every event still waiting, and that includes events whose hook had already exited with no answer (P5-24, result 9: four events, the hook ran twice for each). A daemon now reads the end of the event log as it starts (
EndedEvents) and skips those:hooks_skipped,already_ran. An event is told by its ID and its deadline.It still runs the hooks when the daemon's own end stopped one (
daemon_stopping), when one has no end in the log, when no hook ran, and when a hook answered but the answer did not reach the extension (answer_refusedwithunreachableorreply_timeout). The extension resends only events whose token no answer presented, so an answer in the log of a resent event was lost; skipping it would drop a connection an agent had approved.2. The menu bar app does not open a new build in quarantine (
8ac4044,dbeda11)The cause of the
Killed: 9afterbrew upgradeto 1.1.0 is in the system log: 1.0.8's menu bar app opened the new app 0.3 s before the rejection (LaunchServices.launchViaCSUAfrom its pid), macOS could not show its first-opening question for an app opened in the background, and killed that app and theblackice statusstarted in the same moment. P5-24 has the lines now, next to step 3's upgrade, where the command came first and nothing was rejected.MenuUpgrade.decidequits instead of reopening when the app on disk is another build and hascom.apple.quarantine;blackice start, which every upgrade needs, opens the menu bar app as it already does. Script installs are unchanged (no quarantine).Not shown by any run: it needs a
brew upgradefrom a build that has the change, so the upgrade from 1.1.0 to the next version still has the old menu bar app.docs/install.mdsays to run the command again if it ends withKilled: 9.3. Tests that failed on slow CI runners (
1e15da2)Five tests failed in the last two weeks for how long a step took. Bounds that stand against a 30 s sleep or a longer timeout go from 3 to 5 s up to 15 s; the event-deadline test repeats with more room when its hook was dropped before it started; the waiting-hook test has a 4 s busy hook so the window for giving up can be 0.7 to 3 s; and the marker file of a refused program is checked only where the kernel checks launch requirements (with SIP off the program runs until the check by PID kills it).
4. The first start's question (
1d726be)"Who answers when blackice holds a connection?", in the words of the mode option before it. It was "Who answers the connections that wait?".
Checked
macos/test.sh: 662 tests pass (658 before), four runs in a row.ev-1).bash -n, and the dry runs ofsign.sh,package.shandfault-test.sh.Not checked