Skip to content

Add a regression test for artifact name + content-type mismatches#472

Merged
danwkennedy merged 3 commits intomainfrom
danwkennedy/name-mismatch-regression
Mar 11, 2026
Merged

Add a regression test for artifact name + content-type mismatches#472
danwkennedy merged 3 commits intomainfrom
danwkennedy/name-mismatch-regression

Conversation

@danwkennedy
Copy link
Contributor

@danwkennedy danwkennedy commented Mar 11, 2026

Description

We have reports of older archive files being uploaded (with the v4 action) and the downloaded Content-Disposition returns a file without the .zip extension. This only happens when the artifact name has a file type extension (ie. report.txt). This adds tests for that scenario so we can know when we're green again.

@danwkennedy danwkennedy requested a review from a team as a code owner March 11, 2026 00:49
Copilot AI review requested due to automatic review settings March 11, 2026 00:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end workflow regression test to detect cases where an archived artifact’s Content-Disposition filename does not include the expected .zip suffix when the artifact name itself has a misleading extension (e.g. .txt).

Changes:

  • Upload an artifact named like report.txt-<runner> to simulate a name/content-type mismatch.
  • Download that artifact with skip-decompress: true and assert the saved filename ends in .zip.
Comments suppressed due to low confidence (1)

.github/workflows/test.yml:170

  • This actions/upload-artifact@v4 step is missing a name: field. Most steps in this workflow are named, and naming this one will make the job log much easier to read/debug when failures happen around this regression test.
    - uses: actions/upload-artifact@v4 # V4 is important here to ensure we're supporting older versions correctly
      with:
        name: report.txt-${{ matrix.runs-on }}
        path: path/to/extension-test/data.json

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +162 to +171
- name: Create and upload archived artifact with misleading extension
shell: bash
run: |
mkdir -p path/to/extension-test
echo '{"key": "value"}' > path/to/extension-test/data.json
- uses: actions/upload-artifact@v4 # V4 is important here to ensure we're supporting older versions correctly
with:
name: report.txt-${{ matrix.runs-on }}
path: path/to/extension-test/data.json

Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step name says "Create and upload..." but this step only creates the input file; the upload happens in the following actions/upload-artifact@v4 step. Consider splitting this into two clearly named steps (e.g., "Create artifact payload" and "Upload artifact with misleading extension") so the workflow logs accurately reflect what happened.

This issue also appears on line 167 of the same file.

Suggested change
- name: Create and upload archived artifact with misleading extension
shell: bash
run: |
mkdir -p path/to/extension-test
echo '{"key": "value"}' > path/to/extension-test/data.json
- uses: actions/upload-artifact@v4 # V4 is important here to ensure we're supporting older versions correctly
with:
name: report.txt-${{ matrix.runs-on }}
path: path/to/extension-test/data.json
- name: Create archived artifact payload with misleading extension
shell: bash
run: |
mkdir -p path/to/extension-test
echo '{"key": "value"}' > path/to/extension-test/data.json
- name: Upload archived artifact with misleading extension
uses: actions/upload-artifact@v4 # V4 is important here to ensure we're supporting older versions correctly
with:
name: report.txt-${{ matrix.runs-on }}
path: path/to/extension-test/data.json

Copilot uses AI. Check for mistakes.
@danwkennedy danwkennedy merged commit e6d03f6 into main Mar 11, 2026
11 of 17 checks passed
@danwkennedy danwkennedy deleted the danwkennedy/name-mismatch-regression branch March 11, 2026 12:57
mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request Mar 13, 2026
Bumps the github-actions group with 2 updates: [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) and [actions/download-artifact](https://github.com/actions/download-artifact).
Updates `anthropics/claude-code-action` from 1.0.70 to 1.0.71
Release notes

*Sourced from [anthropics/claude-code-action's releases](https://github.com/anthropics/claude-code-action/releases).*

> v1.0.71
> -------
>
> What's Changed
> --------------
>
> * docs: warn that allowed\_bots can expose the action to external triggers by [`@​an-dustin`](https://github.com/an-dustin) in [anthropics/claude-code-action#1039](https://redirect.github.com/anthropics/claude-code-action/pull/1039)
> * feat(inline-comment): add confirmed param + probe-pattern safety net by [`@​km-anthropic`](https://github.com/km-anthropic) in [anthropics/claude-code-action#1048](https://redirect.github.com/anthropics/claude-code-action/pull/1048)
>
> New Contributors
> ----------------
>
> * [`@​an-dustin`](https://github.com/an-dustin) made their first contribution in [anthropics/claude-code-action#1039](https://redirect.github.com/anthropics/claude-code-action/pull/1039)
>
> **Full Changelog**: <anthropics/claude-code-action@v1...v1.0.71>


Commits

* [`5d0cc74`](anthropics/claude-code-action@5d0cc74) feat(inline-comment): add confirmed param + probe-pattern safety net ([#1048](https://redirect.github.com/anthropics/claude-code-action/issues/1048))
* [`567be3d`](anthropics/claude-code-action@567be3d) chore: bump Claude Code to 2.1.73 and Agent SDK to 0.2.73
* [`eb99fb3`](anthropics/claude-code-action@eb99fb3) chore: bump Claude Code to 2.1.72 and Agent SDK to 0.2.72
* [`33fbb80`](anthropics/claude-code-action@33fbb80) docs: warn that allowed\_bots can expose the action to external triggers ([#1039](https://redirect.github.com/anthropics/claude-code-action/issues/1039))
* [`3428ca8`](anthropics/claude-code-action@3428ca8) chore: bump Claude Code to 2.1.71 and Agent SDK to 0.2.71
* See full diff in [compare view](anthropics/claude-code-action@26ec041...5d0cc74)
  
Updates `actions/download-artifact` from 8.0.0 to 8.0.1
Release notes

*Sourced from [actions/download-artifact's releases](https://github.com/actions/download-artifact/releases).*

> v8.0.1
> ------
>
> What's Changed
> --------------
>
> * Support for CJK characters in the artifact name by [`@​danwkennedy`](https://github.com/danwkennedy) in [actions/download-artifact#471](https://redirect.github.com/actions/download-artifact/pull/471)
> * Add a regression test for artifact name + content-type mismatches by [`@​danwkennedy`](https://github.com/danwkennedy) in [actions/download-artifact#472](https://redirect.github.com/actions/download-artifact/pull/472)
>
> **Full Changelog**: <actions/download-artifact@v8...v8.0.1>


Commits

* [`3e5f45b`](actions/download-artifact@3e5f45b) Add regression tests for CJK characters ([#471](https://redirect.github.com/actions/download-artifact/issues/471))
* [`e6d03f6`](actions/download-artifact@e6d03f6) Add a regression test for artifact name + content-type mismatches ([#472](https://redirect.github.com/actions/download-artifact/issues/472))
* See full diff in [compare view](actions/download-artifact@70fc10c...3e5f45b)
  
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore  major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore  minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore  ` will remove the ignore condition of the specified dependency and ignore conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants