Skip to content

test(executor-e2e): stage upload artifact fixtures#1424

Merged
jamesadevine merged 5 commits into
mainfrom
copilot/fix-executor-e2e-upload-attachments
Jul 8, 2026
Merged

test(executor-e2e): stage upload artifact fixtures#1424
jamesadevine merged 5 commits into
mainfrom
copilot/fix-executor-e2e-upload-attachments

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The executor E2E harness emitted raw agent params for upload-build-attachment and upload-pipeline-artifact, but both executors consume the post-MCP staged Result shape. As a result, the scenarios failed during NDJSON parsing on missing staged_file and never exercised the upload paths.

  • Staging helper

    • Added stagedSafeOutputFile() to mirror MCP staging metadata:
      • staged_file
      • file_size
      • staged_sha256
      • staged file contents
  • Scenario updates

    • Updated both build upload scenarios to emit staged Result fields instead of params-only NDJSON.
    • Kept upload-workitem-attachment unchanged; it still reads file_path directly.
  • Coverage

    • Added focused Vitest coverage for staged filename generation, UTF-8 byte sizing, and SHA-256 metadata.
ndjson: async (_ctx, state) => ({
  artifact_name: state.artifactName,
  ...state.staged.result,
})

Test plan

  • cargo build
  • npm test
  • npm run typecheck
  • npm run build:executor-e2e

Copilot AI and others added 2 commits July 8, 2026 15:36
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix executor E2E test for upload-build-attachment and upload-pipeline-artifact test(executor-e2e): stage upload artifact fixtures Jul 8, 2026
Copilot AI requested a review from jamesadevine July 8, 2026 15:40
@jamesadevine

Copy link
Copy Markdown
Collaborator

@copilot can you add tests for the negatives here e.g. incorrect sha256 is rejected

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot can you add tests for the negatives here e.g. incorrect sha256 is rejected

Added negative coverage in 90b70ce: upload-pipeline-artifact now has a test that records the correct file size but an incorrect SHA-256 and asserts the executor rejects it with a SHA-256 mismatch.

@jamesadevine

Copy link
Copy Markdown
Collaborator

@copilot not a rust test, a test in the executor-e2e bundle!

@jamesadevine jamesadevine marked this pull request as ready for review July 8, 2026 16:13
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot not a rust test, a test in the executor-e2e bundle!

Addressed in bc1e672: removed the Rust-only negative and added executor-e2e bundle coverage for upload-pipeline-artifact rejecting an incorrect staged_sha256.

@jamesadevine jamesadevine merged commit 48b6727 into main Jul 8, 2026
2 checks passed
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.

test(executor-e2e): upload-build-attachment & upload-pipeline-artifact never exercised — harness emits un-staged NDJSON (missing staged_file)

2 participants