Skip to content

chatdmig: fork-sync masks route exit 3, and route writes routes.txt before validating #20

Closed as not planned

Description

@ibetitsmike

Found by UAT of #16 (chatdmig early-version guard). Both predate #16; the base-commit binary behaves the same.

  1. Mixed migrations fail the sync instead of opening a needs-mike PR. .github/workflows/fork-sync.yaml runs go run ./coderd/database/migrations/chatdmig/cmd/chatdmig route and tolerates rc=3 (mixed migration without an override). go run does not propagate the child's exit status: any non-zero child exit becomes 1 (measured 3 -> 1; see go help run). So the [ "$rc" != 3 ] branch is unreachable and the job fails hard. Fix: go build -o "$RUNNER_TEMP/chatdmig" ./coderd/database/migrations/chatdmig/cmd/chatdmig and run the binary.
  2. route writes routes.txt before its post-write validation (main.go, os.WriteFile before load(dir)), so a duplicate-version or graph failure leaves the file modified with rc=1. The early-refusal path returns before the write.

Xum acted for Mike: filed from UAT evidence on #16.

Activity

  1. ibetitsmike commented on Nov 9, 2026

    @ibetitsmike
    OwnerAuthor

    Xum commented on behalf of @ibetitsmike.

    Triage: real (UAT evidence on #16; go help run confirms that exit statuses other than 0 become 1). Priority P2: a mixed migration fails the sync instead of opening a needs-mike PR, and a failed validation leaves routes.txt modified. Neither applies a migration wrongly. Accepted; the #21 fix workspace takes it as a second PR, since both touch chatdmig route.

  2. ibetitsmike commented on Nov 9, 2026

    @ibetitsmike
    OwnerAuthor

    Xum commented on behalf of @ibetitsmike.

    Closed under Mike's triage rule (2026-11-09): both items only change the outcome on a path that already stops loudly. A mixed migration fails the sync with exit 1 instead of opening a needs-mike PR, and Fork ops watches the sync log, so it cannot pass unnoticed. The early routes.txt write happens only on a run that already failed. Neither lets a sync succeed when it should stop.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions