Skip to content

[Backend][Proposals] Expiry-sweep transition dedupe lives on the DI-scoped AutomationProposalService and STATUS overstates it (from PR #2505 review) #2520

Description

@Chris0Jeky

From the fresh-context review of PR #2505 (#2209), non-blocking. (1) MEDIUM: AutomationProposalService._lastSkippedArchivedBoardCount (~:46, used ~:1247) implements only-on-transition logging, but the service is registered AddScoped (ApplicationServiceRegistration.cs:56, McpApplicationServiceRegistration.cs:33-35), so the field resets per scope; a future per-request caller of ExpireProposalsAsync would log the Information line on every call (the flood the change meant to prevent) and the Debug 'still skipping' branch is unreachable. Latent today: ExpireProposalsAsync has no production caller (worker/controller/CLI/MCP all absent). Options: drop the field from the service (the worker is the operator-reporting lane) or document the lifetime caveat like ProposalHousekeepingWorker.cs:14-19 does. (2) MEDIUM: docs/STATUS.md #2197 bullet says 'both expiry paths emit the non-secret skip count only on transitions' — true for the singleton worker, only per-instance for the scoped service; qualify it, and the inherited test counts in that sentence no longer match the head. (3) LOW: the service's zero-transition sentinel branch (AutomationProposalService.cs ~1257-1261) has no service-level test; ProposalHousekeepingWorkerTests 'nothing withheld' test lost the expirable-proposal scenario and now pins BeEmpty over all log lines; AutomationProposalRepository.cs ~324-325 comment lost the two-reads-can-disagree rationale. Refs #2209, #2197.

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

    Priority IVLater maturity/deepening; revisited at horizon planning.backendPrimary implementation impact in .NET API/domain/application/infrastructure.tech-debtDebt cleanup or deferred engineering quality work with limited product-surface change.

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions