[PR #394] [MERGED] fix(image): map zero-layer OCI manifest to 4xx #399

Closed
opened 2026-10-29 14:22:59 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/394
Author: @guozy18
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @yingdi-shan

Base: main ← Head: sync/empty-oci-manifest


📝 Commits (1)

  • 53ecdab fix(image): map zero-layer OCI manifest to 4xx

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 src/image/oci_image.rs (+14 -1)

📄 Description

What

Classify zero-layer OCI manifests as unsupported images so callers receive a client error instead of HTTP 500.

Why

Retrying a rejected empty filesystem manifest cannot fix the supplied image.

N/A — focused synchronization of an existing implementation.

Scope and non-goals

One image-classification change and its original regression test.

Design and behavior changes

Return ImageError::UnsupportedImage while preserving the existing message. Existing resolver error propagation maps the error to the client-error path.

Compatibility and operations

  • Public API or generated protocol: Invalid zero-layer images now produce 4xx instead of 500.
  • Configuration or defaults: No configuration changes.
  • Snapshot manifest, artifact layout, or storage format: unchanged.
  • Upgrade and rollback: ordinary code upgrade/revert; no data migration.
  • Host requirements, permissions, ports, or dependencies: unchanged.

Validation

Validated on upstream main 949cec2 plus this single commit, independently of the other synchronization PRs.

PASS: make fmt
PASS: cargo clippy --locked -p agentenv --all-targets --all-features -- -D warnings
PASS: cargo test --locked -p agentenv --lib classify_manifest_ (10 tests)
PASS: git diff --check

Clippy and the regression tests ran on Linux as a non-root user. Full VM E2E and the full workspace test suite were not run for this focused image-classification change.

Risks and reviewer notes

The rejection behavior is unchanged; only the error category changes. No VM, storage-layout or dependency changes are introduced.

The original author, author date and commit message are preserved. Main-branch adaptations are described above.

Checklist

  • One coherent change with no unrelated refactors.
  • Regression coverage included; execution limitations are stated.
  • No credentials or private deployment configuration included.
  • Generated code, where changed, was regenerated from the updated schema.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/394 **Author:** [@guozy18](https://github.com/guozy18) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@yingdi-shan](https://github.com/yingdi-shan) **Base:** `main` ← **Head:** `sync/empty-oci-manifest` --- ### 📝 Commits (1) - [`53ecdab`](https://github.com/kvcache-ai/AgentENV/commit/53ecdab9507affd9ca151ce70a40061e74086328) fix(image): map zero-layer OCI manifest to 4xx ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/image/oci_image.rs` (+14 -1) </details> ### 📄 Description ## What Classify zero-layer OCI manifests as unsupported images so callers receive a client error instead of HTTP 500. ## Why Retrying a rejected empty filesystem manifest cannot fix the supplied image. ## Related issue N/A — focused synchronization of an existing implementation. ## Scope and non-goals One image-classification change and its original regression test. ## Design and behavior changes Return ImageError::UnsupportedImage while preserving the existing message. Existing resolver error propagation maps the error to the client-error path. ## Compatibility and operations - Public API or generated protocol: Invalid zero-layer images now produce 4xx instead of 500. - Configuration or defaults: No configuration changes. - Snapshot manifest, artifact layout, or storage format: unchanged. - Upgrade and rollback: ordinary code upgrade/revert; no data migration. - Host requirements, permissions, ports, or dependencies: unchanged. ## Validation Validated on upstream main `949cec2` plus this single commit, independently of the other synchronization PRs. ```text PASS: make fmt PASS: cargo clippy --locked -p agentenv --all-targets --all-features -- -D warnings PASS: cargo test --locked -p agentenv --lib classify_manifest_ (10 tests) PASS: git diff --check ``` Clippy and the regression tests ran on Linux as a non-root user. Full VM E2E and the full workspace test suite were not run for this focused image-classification change. ## Risks and reviewer notes The rejection behavior is unchanged; only the error category changes. No VM, storage-layout or dependency changes are introduced. The original author, author date and commit message are preserved. Main-branch adaptations are described above. ## Checklist - [x] One coherent change with no unrelated refactors. - [x] Regression coverage included; execution limitations are stated. - [x] No credentials or private deployment configuration included. - [x] Generated code, where changed, was regenerated from the updated schema. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:22:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#399
No description provided.