Skip to content

Refactor: consolidate-banner-prefix-constants #664

Description

@drmoisan
  • Work Mode: full-feature

Problem / Why

The same banner prefix is currently declared in multiple places with at least two different arities. UtilitiesCS/OutlookObjects/Folder/BreadcrumbRowBuilder.cs:19 and UtilitiesCS/OutlookObjects/Folder/FolderSuggestionTree.cs:16 both produce rows using a four-character prefix, while QuickFiler/Controllers/EfcSelectionGuard.cs classifies using a three-character prefix. A duplicated magic constant with divergent arity is the root cause behind issue #465 D, and feature #464 was able to fix only its own consumer additively.

Proposed Behavior

Establish a single owning declaration for the banner prefix and have every producer and every classifier reference it by symbol rather than by literal. Removing the duplication removes the possibility of the arities drifting apart again.

Acceptance Criteria

  • Exactly one declaration of the banner prefix remains in the repository.
  • Every producer and every classifier references it by symbol; no string literal spelling of the prefix remains.
  • A named test asserts that a row emitted by each producer is classified as a banner by each classifier.
  • Behavior at the filing boundary is unchanged for every row shape a producer can actually emit.

Constraints & Risks

The consumers do not currently agree, so consolidation is a behavior change for at least one of them and must be made deliberately rather than incidentally. In particular, widening EfcSelectionGuard's prefix from three characters to four would relax a filing guard that feature #614 deliberately tightened, making a three-character row filable. That direction must not be taken without an explicit product decision, and existing tests would not catch it because EfcSelectionGuardTests.cs asserts only on four-character banners.

Test Conditions

  • Round-trip test per producer/classifier pair
  • Boundary tests for the three-character and four-character row shapes at every classification site
  • Null and short-row inputs at every classifier

Source

From: docs/features/potential/2026-08-27-consolidate-banner-prefix-constants.md

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions