GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — Fix manifest read errors treated as absent (#998, #1063, #1123) by mikolalysenko · Pull Request #1776 · SocketDev/socket-patch Conversation
|
| Issue | Test | On main |
|---|---|---|
| #998 | manifest_load_error_matrix::socket_dir_as_file_is_manifest_unreadable_on_every_command (ENOTDIR, runs as root) |
FAILED (apply: noManifest, exit 0) |
| #998 | manifest_load_error_matrix::manifest_symlink_loop_is_manifest_unreadable_on_every_command (ELOOP) |
FAILED |
| #998 | apply_invariants::apply_with_unreadable_socket_dir_fails_closed un-ignored (chmod 000; self-skips as root) |
was #[ignore = "RED: …"] |
| #998 | core test_manifest_exists_* |
new API |
| #1063 | scan::gc::tests::apply_gc_reports_an_unloadable_manifest (invalid JSON + directory, wet + preview) |
FAILED (warnings: []), verified by reverting only the GC arms |
| #1123 | manifest_load_error_matrix::directory_manifest_verdict_does_not_depend_on_spelling (flag relative, flag absolute, env) |
FAILED (exit 2, no JSON) |
The matrix now covers rollback too. cli_parse_list and cli_path_flags_validated pinned the old exit-2 directory verdict and are updated to the new one.
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test --workspace --all-features --no-fail-fast: everything this PR touches passes (core lib, CLI lib 936, apply, repair, rollback, remove, matrix, cli_parse_list, cli_path_flags_validated). Remaining local failures are environmental and also fail on unmodified main in this container: chmod-based write/delete-failure tests that can't fail as root (repair_cleanup_failure_*, repair_*_lock_file_unremovable, three in_process_redirect write-failure tests, four core lib permission tests) and e2e_bun_lockb (Nightly e2e_bun_lockb red: offline takeover test predates #1648 #1770, fix in CI: update bun.lockb offline takeover test (#1770) #1771).npm/, pypi/, gem/ only dispatch the binary.Fixed: Windows ENOTDIR→NotFound (tests now Unix-only), stale exit-2 contract row, GC comment accuracy, try_exists reuse, apply --check message parity, repair telemetry, GC message cleanup.
Not fixed, by choice:
emit_error_envelope, emit_rollback_error, emit_eject_refusal, error_envelope, apply's refusal), and each call is the existing load-failure mapping, manifest_load_error, plus that emitter. A helper would save a line per site.scan GC's has_ledger probes --cwd instead of the manifest's project, and vendor-ledger presence probes use the same metadata().is_ok() pattern. Both predate this change and are about the vendor ledger, not the manifest. Left as follow-ups so this PR stays one root cause.https://claude.ai/code/session_011f9aeR3v4Q36DgE4agLMEK
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Adds regression tests: .socket as a plain file and a self-referencing manifest symlink must fail every command with manifest_unreadable (#998), and a directory at the manifest path must get the same verdict whether the path is the default, spelled with --manifest-path (relative or absolute) or set through SOCKET_MANIFEST_PATH (#1123). Adds rollback to the manifest load error matrix and a core manifest_exists probe that treats only NotFound as absence. Assisted-by: Claude Code:claude-opus-5-5
apply, apply --check and vendor treated any error stating .socket/manifest.json as "no manifest" and exited 0 with noManifest, so an unsearchable .socket/, .socket checked in as a file or a symlink loop silently skipped every patch. repair, remove and rollback said manifest_not_found. All six now ask core's manifest_exists, which keeps read_manifest's rule (only NotFound is absence), and refuse with manifest_unreadable before taking a lock (#998). scan's GC passes read an unloadable manifest as missing too. They now report the manifest_invalid / manifest_unreadable warning instead of a clean summary (#1063). A --manifest-path naming a directory exited 2 with no --json output when the path was spelled out, but 1 with manifest_unreadable under the default spelling. Argument validation no longer judges it, so every spelling gets manifest_unreadable (#1123). Un-ignores apply_with_unreadable_socket_dir_fails_closed. Assisted-by: Claude Code:claude-opus-5-5
The contract's manifest_unreadable row now says a path that cannot be stated is unreadable, never noManifest or manifest_not_found, and that the verdict does not depend on how the path is spelled. The ENOTDIR matrix case accepts vendor --check refusing the vendor ledger under the same unreadable .socket, which it reads first. Assisted-by: Claude Code:claude-opus-5-5
On Windows a path under a plain file reports as not found, so the .socket-as-a-file cases are Unix-only tests (read_manifest and manifest_exists agree there either way). manifest_exists now wraps tokio::fs::try_exists. The exit-2 contract row no longer lists a --manifest-path that names a directory. apply --check keeps its "treating it as drift" message whether the manifest fails to stat or to load, repair records failure telemetry for the early refusal like its load failure, and the GC warning skips a throwaway envelope. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1f3e0ba. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does. Several commands decided "no manifest" with their own loose probe ( Risk: low. Every change moves a fail-open path to fail-closed; a genuine Look here
Verified
Changes I made: none. Open questions: none that block merging. Auto-merge is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
A directory at .socket/manifest.json exits 2 with no --json output when --manifest-path spells the path, but exits 1 with manifest_unreadable under the default path scan reads a corrupt manifest as empty, so --prune skips GC and reports success apply, apply --check and vendor report noManifest (exit 0) when .socket/manifest.json exists but can't be stat'd
There was an error while loading. Please reload this page.