feat(logging)!: make C5 session logging opt-in #89
No Reviewers
Labels
Clear labels
Area/CI
Area/Completions
Area/Components
Area/Config
Area/Docs
Area/Functions
Area/Integrations
Area/Prompt & Theme
Area/Scripts
Area/Tests
Compat/Breaking
Kind/Bug
Kind/Chore
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Refactor
Kind/Security
Kind/Testing
good first issue
help wanted
.github/workflows and repository automation
completions/ - tab-completion scripts
The opinionated-component system (C1-C6)
config.fish and conf.d/ - startup and environment
docs/manual/ and the generated manual, man page, and site
functions/ - user-facing functions and helpers
integrations/ - third-party tool wiring
themes/ and prompt appearance
scripts/ - standalone helper scripts
tests/ - the syntax lint and functional suite
Breaking change that won't be backward compatible
Something is not working
Tooling, dependencies, and housekeeping
Documentation changes
Improve existing functionality
New functionality
Makes existing behavior faster or lighter
Restructures code without changing behavior
This is security issue
Issue or pull request related to testing
Well-scoped and self-contained; a good place to start
Maintainer is looking for someone to pick this up
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
No labels
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: rootiest/fish-config#89
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Session logging (C5) is the one opinionated category that writes a persistent record of terminal output to disk, and those logs can contain secrets. Silent-by-default is the wrong posture for it.
__fish_config_op_loggingnow defaults to off. Capture requires an explicit truthy value; the master switch (__fish_config_opinionated) cannot enable it on its own — it remains a master off switch only.Design spec:
docs/superpowers/specs/2026-07-27-c5-logging-default-off-design.mdImplementation
The behavioral change is one branch in
functions/__fish_config_op_enabled.fish, placed after the explicit-truthy / explicit-falsy early returns and before the master-switch fallthrough:All five capture components, the
.logging_disabledsentinel, theparu/yaywrappers, the Kitty watcher, and theconfig-settingsTUI already route through this guard, so nothing else needed code changes.Two consequences fall out for free:
conf.d/logging-events.fishalready runs__fish_config_sync_loggingat every shell start, so the first shell after upgrading creates the sentinel and removes the generated~/.local/bin/paru/~/.local/bin/yaywrappers. No migration code.conf.d/kitty-watcher-reminder.fishexits early when C5 is off, so fresh installs no longer nag about installing a watcher for a disabled feature. The reminder appears the first time someone opts in — when it's actually useful.Decisions
conf.d. Setting the variable at startup would make it look explicitly disabled inset -U/config-settings, would leave the TUI's three-state OFF/DEFAULT/ON model with no reachable DEFAULT, and would need ordering care againstlocal.fish.config-settingsUI change. DEFAULT still means "no variable set; built-in default applies" — that default is justofffor this row.Docs
docs/manual/index.md— CAUTION callout kept and retitled SESSION LOGGING IS OPT-IN; body now reads "this configuration can silently record…"; enable/disable bullets swapped. Verified it still renders as a Starlight<Aside>with all four bullets intact (Task #5 wrapped-list hazard avoided).docs/manual/07-customization.md— Minimal Mode preamble, category table, and the whole C5 section reframed to opt-in; sentinel section notes it is present on a fresh install.docs/manual/11-troubleshooting.md— §11.3 retitled Enable or Disable Session Logging, leads with enabling.README.md— overview bullet,> [!CAUTION]block, Session Logging section, and Minimal Mode table/preamble.docs/fish-config.index— retargeteddisable-logging, addedenable-logging.AGENTS.md— added a "C5 is opt-in (do not 'fix' this)" rule under Opinionated Component Guards so a future agent doesn't refactor the special case back out.docs/fish-config.mdregenerated.python3 docs/verify-manual.py→ 43/43 passed (the 8 missing-CATEGORYwarnings are pre-existing).⚠️ Breaking Change
Anyone relying on the previous default loses logging on their next shell start. Re-enable with:
Existing logs in
~/.terminal_historyare not touched — only capture stops, and the generated AUR wrappers are removed.Manual Verification
set -Ue __fish_config_op_logging; __fish_config_op_enabled __fish_config_op_logging; echo $status→1set -U __fish_config_opinionated 1→ still1set -U __fish_config_op_logging on→0, and~/.config/fish/.logging_disableddisappears immediatelyset -U __fish_config_op_logging off→1, sentinel presentset -U __fish_config_op_logging banana→10~/.local/bin/paruand~/.local/bin/yayare gone, sentinel exists,~/.terminal_historyuntouched~/.local/binandparu --versionstill workskitty-logging statusreportsC5 logging: disabledon defaults,enabledafter opting inconfig-settingsLogging row showsDEFAULTon a clean state and steps DEFAULT → ON → OFF correctly, with the sentinel tracking each stepset -U __fish_config_op_logging ontmux_*.logappears; toggling off stops the pipe-pane in every open shell<Aside>with all four bullets