Skip to content

fix(datasources): block queries through disabled sources - #36

Merged
xiaour merged 1 commit into
xiaour:mainfrom
BigDataDZ:codex/disabled-datasource-guard
Oct 16, 2026
Merged

xiaour merged 1 commit into
xiaour:mainfrom
BigDataDZ:codex/disabled-datasource-guard

Conversation

@BigDataDZ

Copy link
Copy Markdown
Collaborator

A persisted status=0 datasource could still create/reuse a pool and execute business queries. Check the current stored status before every shared pool lookup, including stale source objects and cached pools, and reject disabled sources with DATASOURCE_DISABLED/403. Normal dataset discovery now excludes datasets whose source is disabled; administrator discovery and explicit connection diagnostics remain available.

Profiling preserves the disabled error through both sample and range fallback paths, including when a source is disabled during an in-flight sample. Queries already running are not cancelled; subsequent guarded operations are denied. Re-enabling a source restores access. Extract the small pool guard/helper to keep the existing architecture size baseline unchanged.

Validation: initially reproduced 9 failures, then added/reproduced the in-flight profiling regression found during review; all 11 new regressions pass. Full npm test: 514 tests, 502 passed, 12 optional skips, 0 failures. npm run lint: 0 errors / 7 existing warnings; npm run eval: 8/8 fixtures, 2 L3 judgments pending. Independent task review and broad integration review approved. Parent independently reran the 11 regressions. Tests use real in-memory platform metadata and fake business pools without accessing an external business database; PR CI runs the real PostgreSQL/browser/Docker acceptance suites.

@xiaour
xiaour merged commit c6f3b14 into xiaour:main Oct 16, 2026
4 checks passed
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.

2 participants