Repository navigation
fix(artifact): refuse file and directory ZIP collisions - #406
Merged
StepenkoAnatoli merged 1 commit intoOct 14, 2026
Merged
Conversation
what changed: ZIP inspection now detects a regular file used as another entry's parent directory, independent of entry order, before any inflation or materialization. Explicit file/directory name collisions also receive ZIP-PATH-COLLISION. Added two validator fixtures with stable FAIL results and diagnostics that contain no private temp path or raw filesystem error. why: A readable, self-contradictory archive should be FAIL; it previously threw EEXIST during materialization and became BLOCKED with a temporary path and a misleading kit-bug remedy (#362). This applies the existing structural ZIP refusal boundary. No alternative design was set aside. what it touched: artifact-zip inspection, artifact-validator fixtures, the artifact-zip architecture row, changelog and README test inventory. No schema, public option or exit-code mapping changed. what you verified: verified - red-first 45 passed and two expected collision failures; then 47 artifact-validator tests passed. The final strengthened diagnostics assertion passed in 35.2 seconds. Architecture-map 21 passed; handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, one warning, no blockers), doctor READY collector/firecrawl-cli. The issue's artifact-zip test group has no file in this tree; its ZIP regressions are in artifact-validator. The required full offline suite runs in the commit gate before acceptance. what you got wrong and fixed: mistake - the initial temp-path assertion searched for research-kit-artifact- instead of the actual rk-artifact- prefix. where - artifact-validator.test.mjs collision diagnostic assertion. impact - the assertion did not independently detect the real private extraction path; the FAIL/status and ZIP-PATH-COLLISION checks still caught the baseline defect, and no delivered PR was affected. cause - the prefix was written without checking materializeProject. fix - check the actual scratch directory and rk-artifact- prefix, plus EEXIST/ENOTDIR, in all diagnostic messages and remedies. verified - all 47 artifact-validator tests passed in 35.2 seconds.
StepenkoAnatoli
deleted the
fix/issue-362-directory-collision-diagnostic
branch
October 14, 2026 18:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #362.
what changed: ZIP inspection detects a regular file used as another entry's directory prefix, independent of entry order, before inflation or materialization. Explicit file/directory name collisions are refused with ZIP-PATH-COLLISION.
why: A readable, structurally contradictory package was reported as BLOCKED after a raw EEXIST during extraction, exposing a temporary path and suggesting a kit bug. It now receives a stable FAIL with a package-path diagnostic.
what it touched: artifact-zip, two artifact-validator collision fixtures, the architecture map, changelog and test inventory.
what you verified: verified — the two new fixtures reproduced the defect; all 47 artifact-validator tests passed after the fix, including diagnostics free of private paths and raw filesystem errors. Architecture-map passed 21 tests. Handoff, preflight and doctor passed. The normal full commit gate allowed 40f7f7f. All seven GitHub CI jobs passed on this exact head: offline-suite run.
what you got wrong and fixed: mistake — the initial diagnostic assertion used the wrong temporary-directory prefix. where — artifact-validator collision regression. impact — it did not independently catch the real extraction path; the status and collision-code assertions still caught the baseline defect, and no delivered PR was affected. cause — the prefix was assumed. fix — check the actual rk-artifact- prefix, scratch path and raw EEXIST/ENOTDIR wording. verified — all 47 validator tests passed.