Skip to content

Completion moves finished issues off the release, and three smaller problems #138

Closed

Description

@virafb

What we run

  • linear-release v0.15.0, pinned by digest.
  • A scheduled pipeline. One open release collects builds. It gets a version
    and is completed when the build reaches production.
  • The pipeline setting "Move open issues to the next release" is on.
  • A release-completion automation moves issues to a Done status.
  • Issues sit in a status called "Merged" between merge and release. "Merged"
    is a started status, not a closed one.

All timestamps below are UTC. All ids are copied from the API, not retyped.


1. Completion moves finished issues off the release

At completion, two things happen: the "move open issues" step runs, and the
release-completion automation sets issues to Done. They are not ordered. The
move step reads each issue's status before the automation has written it. An
issue in "Merged" is a started status, so the move step treats it as open and
moves it to the next release.

The result is that work which did ship is taken off the release that shipped
it.

Measured on release c055d672-f851-4fee-85d7-d27fcdf061c6, version
raochra-marketing-83d723f, 23 members:

  • Completed at 2026-08-28T18:27:14.425Z.
  • 11 members were set Done by the automation between 18:27:17.126Z and
    18:27:17.594Z. They stayed.
  • The other 12 were moved to the next started release. A person moved them
    back and set them Done by hand between 18:28:39.259Z and
    18:29:12.690Z.

Same pipeline, same shape, two earlier times:

  • 2026-08-17T00:58:14.680Z, after release 97a64fc5-e2c0-4a78-868c-5fc5a6a39b4d
    completed at 00:58:13.281Z.
  • 2026-08-20T22:29:42.478Z, after release 7dd613f5-6d57-4db1-b23e-4852ebab1a24
    completed at 22:29:40.288Z.

In issue #110 the answer was that the move step is meant to be paired with a
release-completion automation, and that shipped issues "then stay". We have
that automation. It fires. It is in scope for these releases, and it did set
11 issues Done. The pairing still does not hold, because nothing makes the
automation run first.

Ask: either run the completion automation before the move step, or have
the move step leave an issue alone when a completion automation is going to
close it.


2. A way to say which issue states may join a release

sync attaches every issue it finds. There is no way to say "only attach
work that is finished".

Measured on release 7ea4ada5-91ad-42f1-ac14-489ced202d87, read
2026-08-29. It has 36 members. Five of them are In Progress: RAO-895,
ENG-80, ENG-81, ENG-67, ENG-68. None of that work has shipped.

The filter has to be server-side to be useful. Two of those five, ENG-67
and ENG-68, were never named by the CLI. Its own log for that run lists 13
issues and 65 pull request numbers. Those two issues arrived because the
server resolved a pull request number to them. A CLI flag alone cannot see
them.

Ask: a pipeline setting that names the workflow states allowed to attach
at sync — for example "closed states only", or "Merged and later". A CLI flag
would be a useful second form, but the setting is the one that covers pull
request resolution.

Related: #129 asks for the link type to be respected during that same
resolution step. Both are about the same thing — unfinished work joining a
release record.


3. sync overwrites a release's commit, and moves the scan baseline with it

syncRelease always sends commitSha: <current HEAD> (v0.15.0,
src/index.ts). When --release-version names a release that already
exists, that release's commit is replaced. There is no way to keep it.

This bites on a rollback, where HEAD is an older commit.

Measured, run 33194595959, step at 2026-08-28T17:37:57Z:

{"msg":"Using custom release version: raochra-marketing-83d723f"}
{"msg":"Using --base-ref a8d844d09c9c4b0158c90abc501a48052261e295 (a8d844d); skipping automatic baseline selection"}
{"msg":"Found 0 commits in requested range"}
{"msg":"No commits found in the requested range. Syncing release anyway because --base-ref was provided to establish the baseline."}
{"msg":"Stored release baseline: a8d844d"}

Two results:

  • The release named raochra-marketing-83d723f now records commit
    a8d844d09c9c4b0158c90abc501a48052261e295. Its version names one commit and
    its commit field names another. Nothing warned about this.
  • The baseline moved backwards with it. The next sync, at
    2026-08-29T17:12:57Z, logged Found 64 commits between a8d844d and 2747721 and swept up work that had already shipped. Its log names 13
    issues; the release holds 36. The extra 23 are already-shipped issues,
    reached again through the pull request references.

Ask: leave commitSha alone when the release already exists, or add a
flag to keep it. A warning when the version and the commit disagree would
also help.

One more question in the same area, which we have not tested: should sync
refuse to write to a release that is already completed? Completion is the
event that closes issues, so anything attached afterwards can never be
closed by it.


4. The access key cannot read what a CI gate needs

We want a CI step that checks a release before completing it: are all its
issues merged, and is the release still open? The pipeline access key cannot
answer either question.

From the published schema (packages/sdk/src/schema.graphql):

  • type AccessKeyRelease has archivedAt, commitSha, completedAt,
    createdAt, id, name, stage, url, version. There is no issues
    field.
  • type AccessKeyReleaseStage has one field, name. There is no type, so
    a stage name has to be matched as text to guess whether it means completed.

completedAt does help, and we will use it. The members do not.

Ask: add an issues connection to AccessKeyRelease, and type to
AccessKeyReleaseStage. Then a release gate can run on the pipeline key
alone, with no second credential.

Activity

  1. linear-code commented on Aug 29, 2026

    @linear-code
    Contributor
  2. added
    bug
    on Aug 29, 2026
  3. virafb commented on Aug 29, 2026

    @virafb
    Author

    Correction to one detail in section 3, so the issue matches what you would see.

    The release named raochra-marketing-83d723f no longer records commit a8d844d09c9c4b0158c90abc501a48052261e295. Its commit field was put back to 83d723f1b2df716ebbedfb623c9afb1acdfc4205 on our side after we filed. We read that at 2026-08-29T19:04Z.

    The report itself stands. The run log quoted in section 3 is unchanged: sync wrote the CI checkout's commit onto a release that already existed, found no commits in the range, and moved the stored baseline to that older commit. The next sync then scanned from there and swept up work that had already shipped. Repairing the field by hand does not change any of that, and there is still no way to tell sync to leave an existing release's commit alone.

  4. axelniklasson commented on Sep 1, 2026

    @axelniklasson
    Collaborator

    Thanks for the detailed write up @virafb!

    1. From what I can see on my side the issues that were rolled over were rolled over due to a missing release automation for that team. There is an automation but it seems to be mapped to another pipeline. Updating the filter for the release automation to point to the right pipeline should resolve this. Also note that issues that are only linked to PRs via contributing links (eg non closing PRs) will roll over as well.
    2. As mentioned in Release sync imports issues linked via non-closing magic words, attaching unfinished parents #129, this is by design: even if the issue is still in progress, some of its work has shipped as part of the PRs that close or contribute to it.
    3. Thanks for flagging this, I just released a new version of the CLI (v0.17.2) that won’t update the stored commitSha if sync is being run on an ancestor of the stored commitSha.
    4. We are unable to share detailed issue information through access key authentication, but I have pushed a change that at least surfaces the stage type too. I filed a feature request linking to this issue for surfacing anonymous data about issues in the release, such as a breakdown of all issues and their respective status.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GitHubRelease CLIbug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions