Skip to content

Comments and coherence: app-logic (events … logging) #1689

Backlog

Description

@smart-ssh-planner

Goal

Every comment in the files listed below describes what the code does today, and the code in them reads as if it had been designed for its current behaviour from the start, not extended piece by piece.

Context

Part of a pass over the whole codebase, area by area (see the parent issue for the shared rules). This issue covers about 7626 lines in 17 files (tests excluded). Comments drift when the code around them changes; code that was extended several times can carry special cases, duplicated branches and names that no longer fit.

Requirements

  • Read every listed file in full.
  • Comments: check every doc comment (module, type, function) and every inline comment against the code: parameters, return values, error cases, side effects, ordering, limits, named callers, files and specs. Correct what is wrong; remove what is obsolete or only narrates history ("added in #…", "after review"); keep and sharpen the "why".
  • Public functions and types without a doc comment, where the surrounding module documents its items: add a short one.
  • Bolted-on code (special-case flags threaded through several layers, a second near-identical branch or function, a function that now does two things, data living in the wrong type, a second pattern next to an existing one, names that no longer fit, workaround comments without an issue): rework it where the clean shape fits within the listed files (plus the direct callers the rework needs, named in the PR). Larger reworks go under "Follow-ups" in the PR, one entry per finding with the clean shape in a few sentences.
  • No change in behaviour. Every rework is covered by existing tests or a new one.

Acceptance Criteria

  • The PR lists every file of this issue with "comments fixed: n", "reworked: …" or "no change"
  • No comment in the listed files contradicts the code
  • Every rework keeps the behaviour; the PR names the tests that cover it
  • Bolted-on code that needs more than this area is listed under "Follow-ups" with its clean shape
  • Relevant automated tests pass

Technical Notes

  • No security-critical files in this area.
  • Other issues of this pass cover the neighbouring files; do not edit files outside this list beyond the direct callers of a rework.

Files: crates/app-logic/src/events.rs, crates/app-logic/src/events/connect_warnings.rs, crates/app-logic/src/events/host_key.rs, crates/app-logic/src/events/payload_shape.rs, crates/app-logic/src/ext.rs, crates/app-logic/src/field_content_decryption.rs, crates/app-logic/src/file_browser.rs, crates/app-logic/src/filter_rules.rs, crates/app-logic/src/folder_upload.rs, crates/app-logic/src/groups.rs, crates/app-logic/src/host_key_store.rs, crates/app-logic/src/identity_file.rs, crates/app-logic/src/ids.rs, crates/app-logic/src/key_files.rs, crates/app-logic/src/lib.rs, crates/app-logic/src/local_path_grants.rs, crates/app-logic/src/logging.rs

Spec impact: none

Activity

  1. added this to the 0.9.0 milestone on Dec 4, 2026
  2. added
    documentation
    low-priority
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationlow-priority

    Type

    Fields

    Priority

    P3 - Low

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions