refactor(Logging): migrate app events to classified logging - #269
Open
kyleve wants to merge 3 commits into
Open
Conversation
kyleve
force-pushed
the
codex/periscope-classified-events
branch
from
August 14, 2026 18:32
ef2f723 to
61b6c0f
Compare
kyleve
changed the base branch from
main
to
codex/periscope-classified-events-base
August 14, 2026 18:32
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.
Summary
Problem
PR #273 adds the classified event foundation but leaves app events on the transitional model. This PR completes the repository-wide migration as one atomic slice.
Architecture
Each old enum case becomes one nested event struct. Stable scope IDs preserve former family names. Stable event IDs preserve approved remote kinds or use deterministic kebab-case names.
Each field has an exposure and semantic kind. Existing approved fields remain shareable. Identifiers, locations, errors, dates, URLs, user content, and internal state remain restricted.
Baseline Bitdrift export uses the stable event name. It emits only shareable classified fields. It excludes rendered messages, restricted values, payloads, dynamic scopes, tags, ambient state, external IDs, and attachments.
Debug-full export keeps complete payloads and contextual metadata. It never exports attachment bytes.
Design decisions
kindfields.Privacy boundary
Shareable classification is explicit author approval at declaration and emission. It does not prove that a string or JSON value contains no personal data.
Baseline export receives only the generated shareable projection. Debug-full export remains an explicit opt-in mode with its existing warning.
Breaking changes
remoteMessage,remoteFields, and allRemoteLogField*types are removed.Compatibility
There is no in-app migration or decode fallback. Old rows remain available as raw historical records.
Old unmatched
span-beganrows cannot pair with the new span event name. The development Periscope store must be removed before validation.Review focus
Testing
./swiftformat./test --all— 21 architecture tests, 10 macro tests, and 1,959 iOS tests passed./test --all— no architecture violations and all host regressions passed./test --everything— the unit suite passed and found the intentional Periscope viewer label difference./test --snapshots --review— the reviewedmessagetomessage.messagereference change passedmise exec -- tuist test Ledger-macOS-Tests --no-selective-testing -- -destination 'platform=macOS'— passedStack
This PR is 2 of 2 and depends on #273. It contains the app migration, reporting changes, legacy removal, and final enforcement.