fix(tests): support npm tar 6 and tar 7 archive parsers - #712
Closed
kamilio wants to merge 3 commits into
Closed
Conversation
Import the tar Parse/Parser regression from the maintained integration entrypoint so normal test discovery executes both compatibility cases. Validation: maintained entrypoint discovers and passes both parser cases (2/2); guarded repository ESLint passes 10,528 files with zero errors or warnings. Tests: archive admission preserves safety with the Parse and Parser tar APIs; both verify exact archived bytes and archive safety checks.
Include the parser-test module beside the copied outer launcher so its startup-environment control reaches the synthetic verifier after parser regressions are registered by the maintained test entrypoint. ### Tests Updated | Test | Verifies | | --- | --- | | maintained outer launcher rejects inherited startup settings before the verifier starts | Both baseline and poisoned environments reach the verifier without executing inherited startup code. | Validation: exact missing-module reproduction failed before the fixture addition; launcher and actual Parse/Parser archive-safety controls pass 3/3.
Member
Author
|
Cherry-picked archive parser compatibility and discovery/fixture refinements as b7aafbf, d2e0f32 and 2edd270. Verified on remote main at 4da2a66 after local validation and final installed-package qualification. Closing after cherry-pick/reconciliation rather than merging obsolete branch history. Release is in progress: https://github.com/poe-platform/poe-code/actions/runs/34500155547 ; scoped packages: https://github.com/poe-platform/poe-code/actions/runs/34500155125 . |
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.
The committed-archive verifier currently fails before reading entries when the active npm installation bundles tar 6: that version exports
Parse, while tar 7 exportsParser. Node 22.22.0 with npm 10.9.4 reproducesTypeError: tar.Parser is not a constructoracross archive consumer checks.Select
Parserwhen available and otherwise useParse. Keep the same strict parser options, byte authentication, path admission, entry restrictions, duplicate checks, and size limits.Validation: the new in-memory regression fails for the Parse-only API before the change and passes for both constructor names afterward. It verifies admitted bytes and rejects mismatched hashes, unbound entries, traversal, symlinks, and duplicate entries. The existing archive admission control also passes. Guarded repository lint passed (10,528 files, zero errors/warnings, 25 boundary receipts). A separate exact-byte probe also passed with the actual installed tar 6.2.1 and tar 7.5.22 packages.
The wider archive-control suite passed 186 of 187 cases; its sole failure was a missing generated safe-fs declaration in the fresh checkout. After the maintained selected safe-fs build, that unchanged case passed. No fixture or policy was changed to resolve it.
This is a test-tool compatibility fix; it does not change shipped runtime code or relax archive policy. It is separate from the atomic resize feature in #711.
The follow-up wires both parser regressions into the maintained integration entrypoint. A discovery check found zero parser cases before that import; the same entrypoint now discovers and passes both cases (2/2). Guarded repository lint again passed with zero errors or warnings.
The isolated launcher fixture also registers the parser-test module so the clean and poisoned startup controls reach their synthetic verifier. The exact missing-module failure was reproduced before this fixture correction; the launcher and both real parser safety controls then passed together (3/3). Guarded lint passed again (10,528 files, zero errors/warnings, 25 receipts).
Screenshots
Recorded local test-tool verification: actual npm tar 6.2.1 Parse and workspace tar 7.5.22 Parser both passed exact-byte probes. Not production or product UI evidence.