Skip to content

Refuse to infer Linear when issueSource is unset #403

Description

@khaliqgant

Summary

Factory.#issueSource() currently probes ensureSubRoot('/linear/issues') when config.issueSource is unset and resolves the source as linear whenever that mount happens to be ready. This is a latent routing defect and contradicts the operating contract: an unset source must refuse to route, not assume Linear.

Current behavior

  1. The presence of a /linear/issues mount silently selects Linear, regardless of the intended issue surface.
  2. #resolvedIssueSource memoizes that probe result for the process lifetime, so a transient/startup mount state pins the wrong surface until Factory is restarted.
  3. Logging is asymmetric and backwards for diagnosis: Factory logs when it falls back to GitHub, but says nothing when it selects Linear. The dangerous, unintended outcome is therefore the silent one.

The operating manual explicitly says that when the active contract leaves issueSource unset Factory must refuse to route rather than assume Linear, and calls out that “assuming Linear is exactly the defect this replaced.”

Production status

This is not currently firing in production. The deployed factory-cloud config template explicitly sets issueSource: "github", so this probe is bypassed. This issue is intentionally framed as a latent defect, not a diagnosis of the current production incident. It will affect the first profile shipped without the field.

Expected behavior

When issueSource is unset, Factory should fail closed/refuse routing with a clear operator-facing error. It should not infer a provider from whichever mount happens to answer during startup. Any eventual fix should also remove lifetime pinning of an accidental probe result and make source resolution logging symmetric.

Scope

Track and fix separately from the silent-empty discovery observability work. Do not fold this behavior change into that PR.

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