Skip to content

fix(oci)!: keep unobserved directory identity unknown - #15105

Closed
ShuaixinHuang wants to merge 3 commits into
morluto:mainfrom
ShuaixinHuang:fix/oci-evidence-subject-identity
Closed

ShuaixinHuang wants to merge 3 commits into
morluto:mainfrom
ShuaixinHuang:fix/oci-evidence-subject-identity

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #15093 at the same commit a03a24e1edcbbeffe0d6690198bc19545b21a8d6. The prior PR records the review history and validation for this commit.

Problem

OCI layout Evidence currently uses a digest of oci-layout and index.json as the identity of a file with format directory. Replacing one byte of a referenced layer in place leaves those two documents unchanged. The production service reports a different observed blob hash and a digest_mismatch, yet the original and modified layouts still assert the same immutable subject identity.

Change

Use the existing unknown subject with reason not-observed for OCI layout Evidence. This operation does not compute a complete directory tree digest. The normalized report still carries the selected path, layout-document snapshot digest, per-blob hashes, and findings. The change affects the Evidence subject returned by both CLI and MCP, including completed reports retained after cleanup failures.

Validation

  • Reproduced the identical subject digest on 4dafa3a58 using the production service and a one-byte local layer change. On the patched service both observations report an unknown subject, with the mismatch still visible.
  • The compiled CLI regression checks the subject and layout metadata before and after changing the layer. The CLI/MCP acceptance case verifies that the resulting Evidence remains available through the retained view and bundle.
  • The focused CLI, MCP, retained view, and service suites passed: 21 tests across four files. Normal pre-push typecheck, lint, and architecture guards also passed.
  • Verification uses a synthetic OCI layout on local storage.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Desktop Evidence follow-up

Commit c4a565ed1 addresses the same incomplete directory identity in desktop inspection. New Evidence declares the directory subject unknown and preserves the examined snapshot digest in the report. View projection accepts the explicit unknown and retains support for older directory subjects with matching snapshot digests. All 97 focused filesystem, CLI and MCP tests passed locally, as did the normal typecheck, lint and architecture gates.

Commit 7c5987a3a recognizes the historical file-kind subject with directory format when its digest matches the saved report. A saved-record regression exercises summary projection. All 85 filesystem boundary tests and the normal push gates passed.

BREAKING CHANGE: OCI layout Evidence now reports an unknown subject. The selected path and layout-document snapshot digest are available in normalized_result.artifact.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T03:27:39.665173Z 7c5987a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the saved desktop-view failure is fixed and no new blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the saved desktop-view failure is fixed and no new blocking issue was found.

Summary

Directory Evidence now reports an unknown subject instead of treating an incomplete snapshot as the directory’s full identity.

  • OCI inspections leave incomplete directory identity unknown.
  • Desktop inspections leave incomplete directory identity unknown.

Reviews (4) · Last reviewed commit: "fix(evidence): admit legacy desktop dire..." · Reviewed by Greptile

Comment thread src/domain/oci/imageLayoutEvidence.ts Resolved
@greptile-apps

greptile-apps Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

security Security Review

This PR appears safe to merge from a security standpoint; it replaces an overstated directory identity with an honest unknown subject, and the one gap it leaves is a pre-existing copy of the same pattern elsewhere.

What was checked
  • The reviewed head commit a03a24e is the same commit the replacement PR names and sits directly on the base, so this PR carries the change that supersedes the earlier one.
  • The new unknown subject drops no observed data: the selected path stays in locations and the layout snapshot digest, blob hashes, and findings stay in the normalized report.
  • Evidence IDs still distinguish two differently-modified layouts, because the report payload remains in the content the ID hashes.
  • The retained-evidence view and bundle read the layout from the report payload rather than the removed directory subject, so they keep working.
  • The same partial-digest-as-directory-identity pattern survives in desktop application Evidence; see the finding.

Findings

  • P2 Desktop evidence keeps incomplete identity ▶

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4a565ed16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant