feat(observability): OS signposts for pressure / pageout / freeze-tier - #51
Conversation
Time-correlated signposts in the three places that produce the clearest "pressure → freeze decision → pageout outcome" timeline in Instruments: * `MemoryPressureSource` — an event per level change (.normal / .warning / .critical), with a PointsOfInterest twin so the standard PoI track shows pressure changes next to other components' events. * `PageoutChain.pageout` — an interval per strategy attempt carrying the strategy and its outcome (success / skipped / failed), which answers the ADR-0007 / 0011 validation-gate question of which strategy actually fires on a given machine. ADR-0018 has since answered it for unprivileged runs; the interval still shows the per-attempt cost. * `VortexCoordinator.freezeTier` — an interval per tier traversal with the tier, the reason, how many candidates were seen and how many were actually frozen (the rest being vetoes, already-frozen pids and reverts). No behavior change: the existing `os.Logger` lines stay, signposts are observability-only. Rebased onto the current main: the original branch predates the per-bundleId traversal, the audit log, frontmost veto and the policy generation checks, so the freeze-tier interval was re-applied to the traversal as it exists now rather than to its May shape. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Ei5xAcQz8FiwdHNMjJYF
284bdf1 to
2dbaefb
Compare
|
Ветка пересажена на текущий main ( Что изменилось при пересадке: Проверка: @codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds time-correlated signposts in three places that produce the clearest pressure → freeze decision → pageout outcome timeline in Instruments:
MemoryPressureSource— signpost event on each level change (.normal/.warning/.critical), withPointsOfInteresttwin so the standard PoI track shows pressure changes alongside any other component's events.PageoutChain.pageout— interval per strategy attempt, withstrategy+ outcome (success/skipped/failed). Closes the validation-gate question from ADR-0007 / 0011: "which pageout strategy actually fires on this machine".VortexCoordinator.freezeTier— interval per freeze cycle, withtier+ candidate count + final frozen count.Why
Today's live session showed the three biggest gaps in current observability:
mach_vm_behavior_setwas actually fired or skipped under fallback to jetsam..warningdispatch event and the actualfreezeTiercall.All three are now visible as a single Instruments timeline.
How to use
Behavior change
None. Existing
os.Loggerlines preserved. Signposts are observability-only.Test plan
make buildclean.warningand.critical, verify Instruments shows correlatedpressure-levelevents +freeze-tierintervals +pageout-attemptintervalsmake test)Follow-ups (not in this PR)
VortexActor.thawProcess/thawAll(thaw timeline)VisionActorOCR cyclesMLXSupervisor(partial coverage exists)Related