GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: correctness bug sweep + hardening tests across crawlers, patch, and vex by mikolalysenko · Pull Request #106 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

A broad sweep of correctness, security, and atomicity bug fixes surfaced by a line-by-line review of the codebase, each paired with regression tests (many RED-verified without the fix).

Crawlers

  • Single-quote TOML parsing (cargo crawler dropped name = 'serde')
  • Composer case canonicalization for PURLs / lookups
  • Vendor-before-project-gate ordering (cargo/nuget scanning non-matching trees)
  • Yarn PnP .pnp.js detection
  • NuGet legacy content-folder + local-mode gating
  • Maven skip-section prefix boundary handling
  • Python crawler layout/metadata fallbacks (bare python3, lib64, body-bleed)

Patch engine

  • Path-escape guards: cargo/go redirect coordinate traversal, rollback delete, cargo sidecar read
  • Atomic writes for user-owned manifests: go.mod, Cargo.toml, .cargo/config.toml, package.json, pyproject.toml/requirements.txt
  • bsdiff header validation (forged block-length panic, unbounded prealloc)
  • copy_tree symlink chmod, cow hardlink is_file guard
  • Lock acquire timeout overflow panic

VEX

  • Single-quote product detection
  • Schema / verify / conformance hardening

API client

  • fetch_binary auth error classification (401/403/429 → auth fallback)
  • Token shape + org slug validation

Misc

  • PURL subpath strip leak
  • Manifest deterministic (sorted) serialization + empty-setup omission
  • Severity color ordering (critical vs high)
  • cleanup_blobs orphan handling
  • pth_hook detection + non-atomic write fixes

Test plan

  • cargo test across feature combos
  • CI green

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Mikola Lysenko (mikolalysenko) and others added 4 commits June 7, 2026 18:12
@mikolalysenko @claude
fix: correctness bug sweep + hardening tests across crawlers, patch, …
6cceb9a
…and vex

Fixes a broad set of correctness, security, and atomicity bugs surfaced by
a line-by-line review, each paired with regression tests:

- crawlers: single-quote TOML parsing, case canonicalization, vendor/project
  gate ordering, PnP detection, NuGet legacy/local-mode gating, Maven skip-
  section boundaries, Python layout/metadata fallbacks
- patch: path-escape guards (cargo/go redirect, rollback, sidecars), atomic
  writes for user manifests (go.mod, Cargo.toml, .cargo/config.toml,
  package.json, pyproject/requirements), bsdiff header validation, copy_tree
  symlink chmod, cow hardlink is_file guard, lock timeout overflow
- vex: single-quote product detection, schema/verify hardening
- api/client: fetch_binary auth error classification, token/slug validation
- misc: purl subpath strip, manifest deterministic serialization, severity
  color ordering, cleanup_blobs orphan handling, pth_hook detection fixes

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mikolalysenko @claude
fix(ci): green the test/clippy jobs broken by the sweep
dfe7bbc
Three CI-blocking fixes surfaced by the failing checks (clippy + test on
all OSes + coverage + test-release):

- clippy: `map_or(true, ..)` -> `is_none_or(..)` in manifest/schema.rs
  (clippy 1.93 `unnecessary_map_or`, denied via `-D warnings`).

- rollback_dispatch_branch_golang: the sweep added a project-local go
  redirect rollback backend. In local mode go rolls back by dropping the
  `replace` redirect and leaves the module cache pristine, so it never
  restores cache bytes (verified: local mode reports success without
  touching the file; global mode genuinely restores). The dispatch test's
  byte-restore contract only holds on the in-place/global path — the go
  analog of the cargo test's `vendor/` in-place layout — so drive that one
  fixture in `--global` mode.

- output_helpers_e2e: the sweep's severity-colour-inversion fix flipped
  critical->bright-red(91)/high->red(31) and updated the in-crate unit
  tests, but this integration file still asserted the old swapped codes.
  cargo test is fail-fast, so it aborted on the golang failure before ever
  reaching this binary in CI; surfaced via a local `--no-fail-fast` run.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mikolalysenko @claude
fix(test): make manifest-unreadable list test cross-platform
d7deed9
`manifest_path_through_regular_file_reports_unreadable_via_binary` nested
the manifest under a regular file (`<file>/manifest.json`), assuming the OS
rejects the read with a non-absence error. That holds on Unix (ENOTDIR) but
NOT on Windows, where traversing through a file is `ERROR_PATH_NOT_FOUND`
(NotFound) — legitimately classified as `manifest_not_found`, failing the
assertion on windows-latest.

Point the manifest path at a directory instead: reading it fails with a
non-NotFound error on every platform (Unix `IsADirectory`, Windows
`PermissionDenied`), so the "present-but-unreadable → manifest_unreadable"
contract is exercised portably. Renamed accordingly.

This was masked on the first push: cargo test is fail-fast and the Windows
run aborted at this binary (sorts before the now-fixed golang/output tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mikolalysenko @claude
fix(test): windows path separator in nested-workspace find test
f968628
`test_find_recurses_into_nested_workspace` matched walked filesystem paths
with `str::ends_with("packages/inner/package.json")`, which fails on Windows
where `WalkDir` yields `\`-separated paths. Match on the `PathBuf` via
`Path::ends_with`, which compares whole components and accepts `/` in the
pattern on every platform (Windows treats both `/` and `\` as separators).

This is the only walked-real-path assertion that used a forward-slash string
literal; the CLI/manifest path assertions elsewhere operate on
forward-slash-normalized manifest keys (echoed verbatim) and are unaffected.

Surfaced by fail-fast: the Windows run aborted here (socket-patch-core --lib)
only after the previously-fixed cli_parse_list binary passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Jun 8, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 4d5ba3d into main Jun 8, 2026
54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the fixes/correctness-and-hardening-sweep branch June 8, 2026 20:04
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Jun 11, 2026
fix: second-pass bug sweep — crawler traversal guards, FIFO hangs, atomic writes, CLI contract #111
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Wenxin-Jiang Wenxin Jiang (Wenxin-Jiang) Wenxin-Jiang approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mikolalysenko @Wenxin-Jiang
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.