Skip to content

Adopt narrow health and system-map exception handling#603

Merged
vibeforge1111 merged 1 commit into
masterfrom
codex/adopt-narrow-reader-exceptions
Jun 1, 2026
Merged

Adopt narrow health and system-map exception handling#603
vibeforge1111 merged 1 commit into
masterfrom
codex/adopt-narrow-reader-exceptions

Conversation

@vibeforge1111

Copy link
Copy Markdown
Owner

Summary

Maintainer adoption of four small Spark Compete source PRs that narrow broad exception handling in product-facing health/system-map readers.

Source PR credit:

No participant credit should be assigned to this maintainer adoption PR itself. Source PR points remain gated because their packet text currently is not clean fenced JSON for validator extraction; product adoption is still useful and safe.

Verification

  • python -m pytest tests\\test_cli.py -q -k spawner_health
  • python -m pytest tests\\test_system_map.py -q -k filesystem_readers_or_builder_db_readers
  • python -m pytest tests\\test_system_map.py -q
  • python -m pytest tests\\test_cli.py -q
  • python -m compileall src
  • git diff --check
  • python -m spark_cli.cli verify --registry-pins --json

Risk

Low. This narrows catches around expected network, filesystem, and SQLite failure boundaries and adds direct regression coverage. It does not change installer metadata, registry pins, scoring, secrets, auth, sandboxing, or runtime command execution.

@vibeforge1111 vibeforge1111 merged commit 70b1034 into master Jun 1, 2026
6 checks passed
@vibeforge1111 vibeforge1111 deleted the codex/adopt-narrow-reader-exceptions branch June 1, 2026 20:19
vibeforge1111 added a commit that referenced this pull request Jun 2, 2026
discover_repo_paths in system_map.py checked desktop.exists() then
iterated desktop.iterdir() with no error handling. On macOS the default
~/Desktop is TCC-protected: .exists() returns True but .iterdir() raises
PermissionError ([Errno 1] Operation not permitted). That uncaught error
crashed `spark os capabilities|compile|authority|trace|memory` with a raw
traceback (exit 1). A missing Desktop was already handled gracefully; an
unreadable one now is too.

Merged PR #603 hardened the sibling filesystem walkers in this file
against PermissionError but missed discover_repo_paths. This completes
that coverage with the same narrow OSError handling pattern.

Fix: snapshot desktop.iterdir() inside try/except OSError -> [] before
iterating, mirroring the surrounding narrow-exception style.

Adds a regression test that drives discover_repo_paths with a desktop
whose iterdir() raises PermissionError plus a non-empty installed dict,
asserting it returns the installed paths without raising.

Co-authored-by: His Dudeness <banse@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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