Skip to content

Fix crash on missing config directory#2

Merged
abienkowski merged 1 commit into
mainfrom
fix/missing-config-dir-crash
Jul 20, 2026
Merged

Fix crash on missing config directory#2
abienkowski merged 1 commit into
mainfrom
fix/missing-config-dir-crash

Conversation

@abienkowski

Copy link
Copy Markdown
Collaborator

Summary

  • Rust (rs/src/policy.rs): handle NotFound from read_dir — log warning, return empty policy set
  • Go (go/internal/policy/manager.go): handle os.IsNotExist — log warning via slog, return empty Manager
  • TypeScript (ts/src/policy.ts): handle ENOENT from readdirSync — log warning, continue with empty array

On all three: missing config dir → empty policies → default-deny (no services allowed). Permission errors still propagate.

Test Plan

  • Go 58 tests pass
  • Rust 104 tests pass (build with --release too)
  • TypeScript 80 tests pass

@abienkowski abienkowski self-assigned this Jul 20, 2026
@abienkowski
abienkowski merged commit 8b610bc into main Jul 20, 2026
6 checks passed
@abienkowski
abienkowski deleted the fix/missing-config-dir-crash branch July 20, 2026 16:38
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