---
id: change/al-go/2440
type: change
title: "#2440 Sort artifacts by creation time when determining latest artifacts for release"
summary: AL-Go now sorts artifacts by creation time when determining the latest artifacts for release in multi-project repositories, fixing cases where Create Release with app version latest could select artifacts from different CI/CD runs.
tier: official
language: en
tags:
  - fix
  - main
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-11-07T01:03:50.235Z"
  flags: []
generated:
  at: "2026-11-07T00:15:21.625Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3e18897fb39a50ed0d9c57e7755f23ed1601728d
evidence:
  - kind: code
    url: https://github.com/microsoft/AL-Go/pull/2440
    title: "microsoft/AL-Go#2440: Sort artifacts by creation time when determining latest artifacts for release"
    date: "2026-11-06"
    commit: 3e18897fb39a50ed0d9c57e7755f23ed1601728d
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 2440
repo: microsoft/AL-Go
source_id: al-go-prs
url: https://github.com/microsoft/AL-Go/pull/2440
kind: pr
base_branch: main
major: null
merged_at: "2026-11-06T12:35:10Z"
author: mazhelez
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 60
  deletions: 2
  al: 1
apps: []
objects_touched: []
objects_unjoined:
  - path: Actions/DetermineArtifactsForRelease/DetermineArtifactsForRelease.ps1
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - platform
quote: null
joined_against:
  major: null
  commit: null
---

# #2440 Sort artifacts by creation time when determining latest artifacts for release

> AL-Go now sorts artifacts by creation time when determining the latest artifacts for release in multi-project repositories, fixing cases where Create Release with app version latest could select artifacts from different CI/CD runs.

[Pull request](https://github.com/microsoft/AL-Go/pull/2440) · merged into `main` on 2026-11-06 by mazhelez · 3 files (+60 -2), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- After collecting non-expired artifacts, the script sorts them by created_at descending instead of trusting the endpoint order, which is by artifact id
- latest now resolves each project to its most recently created artifact, and explicit-version lookups also prefer the newest match
- The commit-mismatch error now names the artifact, the project and both commits
- Regression tests replay out-of-order artifact ids and check the new error message
- Behaviour changes for users or extensions.

## AL objects touched

- `Actions/DetermineArtifactsForRelease/DetermineArtifactsForRelease.ps1`: modified, not in the BC? snapshot

## Context

- Systems: platform

Source: metadata of a merged pull request in microsoft/AL-Go (al-go): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
