Skip to content

Docs: harden #17 — merged-manifest permission, captureBodies default, TimingPhase labels#23

Merged
mibrahimdev merged 1 commit into
mainfrom
docs/17-hardening
Jun 14, 2026
Merged

Docs: harden #17 — merged-manifest permission, captureBodies default, TimingPhase labels#23
mibrahimdev merged 1 commit into
mainfrom
docs/17-hardening

Conversation

@mibrahimdev

Copy link
Copy Markdown
Owner

Closes #17. Docs-only pass bundling the three documentation gaps from launch review. No code behavior change.

Acceptance criteria → what was written

1. POST_NOTIFICATIONS appears in the consumer's merged manifest

README.md (Android section) now states explicitly that sharingan/src/androidMain/AndroidManifest.xml declares <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />, so manifest merger surfaces it in the consumer's merged manifest. It also documents the verified guarantee that the library never requests the permission at runtime — your app decides whether to ask — and that the sharingan-noop release artifact declares nothing, so the permission doesn't reach release builds.

Verification: grepped the whole :sharingan source tree for requestPermissions / ActivityCompat.request / registerForActivityResult / RequestPermission — zero hits. The only runtime request lives in the sample app (MainActivity), not the library.

2. captureBodies default + start-paused / opt-out

README.md (HTTP section) now documents that body capture is ON by default (captureBodies = true, confirmed at SharinganKtor.kt:30), that captureBodies = false keeps metadata but drops body text, and that Sharingan.setRecording(false) at startup lets a team start paused and capture nothing until they flip it on (or use the Android notification's Pause/Resume). Noted that pause spans every protocol, not just HTTP.

3. TimingPhase.label vocabulary

Added KDoc on TimingPhase (HttpEvent.kt) spelling out the conventional waterfall vocabulary in occurrence order — DNS, Connect, TLS, TTFB, Download — and noting label is a free-form String (any text renders), with the SharinganKtor plugin emitting the TTFB/Download split automatically. Real labels derived from code: the Ktor plugin emits "TTFB"/"Download" (SharinganKtor.kt:104-105); PreviewData exercises the full DNS/Connect/TLS/TTFB/Download set.

Discrepancies between the issue and the real code

  • None material. All three issue assumptions matched reality. Two refinements worth noting:
    • The README already mentioned POST_NOTIFICATIONS and the TTFB/Download split; the gaps were precision (merged-manifest wording, the "never requested by the library" guarantee) and discoverability (the free-form label vocabulary), so this PR sharpens existing prose rather than adding net-new claims.
    • The issue framed (2) as "captureBodies … start paused / opt out" as if one knob. In the code these are two distinct mechanisms: captureBodies = false (per-plugin, body-text only) vs. Sharingan.setRecording(false) (global pause, all protocols). Documented both and the distinction.

🤖 Generated with Claude Code

…use, TimingPhase labels

After this commit, the README + KDoc document the merged-manifest POST_NOTIFICATIONS
permission, the captureBodies default + opt-out/start-paused mechanism, and the
TimingPhase label vocabulary. Closes #17.

- POST_NOTIFICATIONS: README now states the library declares the permission and it
  surfaces in the consumer's merged manifest, while the library never requests it at
  runtime (verified: no requestPermissions call anywhere in :sharingan).
- captureBodies: documented that body capture defaults to ON, that captureBodies = false
  drops body text, and that Sharingan.setRecording(false) starts paused across all protocols.
- TimingPhase: KDoc on the type spells out the conventional DNS/Connect/TLS/TTFB/Download
  vocabulary and notes label is free-form, with the Ktor plugin emitting the TTFB/Download split.

Docs only — no code behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mibrahimdev mibrahimdev merged commit d1748cd into main Jun 14, 2026
1 check passed
@mibrahimdev mibrahimdev deleted the docs/17-hardening branch June 14, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs hardening: POST_NOTIFICATIONS merge, captureBodies default, TimingPhase vocabulary

1 participant