Skip to content

[factory] Retire #deduplicateQueuedGithubLifecycleAliases now that the claim key is provider-neutral #330

Description

@khaliqgant

Follow-up from #329 (#211).

#deduplicateQueuedGithubLifecycleAliases in src/orchestrator/factory.ts is a
GitHub-only compensation for the surface-path claim key. #329 replaced that key
with the work-unit identity and added a provider-neutral rekey in both state
stores, which collapses aliases before this method ever sees them.

It was deliberately left in place rather than removed in the same PR:

  • it was not in the removal list the [factory] Key dispatch claims on work-unit identity, not surface path #211 ruling sequenced (that covered
    matchingGithubLifecycleEntry and the five claim.key ?? key sites);
  • it still covers the one case the load-time rekey declines to touch. That pass
    has no clock, so it never judges lease expiry and leaves any work unit with
    more than one leased row untouched for the claim path to refuse precisely;
  • removing a compensating mechanism in the same change that supersedes it, on
    the dispatch critical path, is how an outage happens.

What this issue should settle:

  1. Whether the remaining coverage is real or whether the claim path's
    fail-closed refusal already subsumes it. Note the two disagree on policy:
    this method picks a winner among queued aliases, while the [factory] Key dispatch claims on work-unit identity, not surface path #211 ruling is
    explicit that more than one live lease must refuse rather than guess.
  2. If it is redundant, remove it together with the
    dispatchLifecycleGithubAliasesCollapsed /
    dispatchLifecycleGithubAliasConflicts /
    dispatchLifecycleGithubAliasDedupeDeferred counters.

A compensating mechanism left standing after its cause is fixed becomes a
permanent source of confusion, which is why this is filed rather than left to be
noticed later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions