Skip to content

[validation-only] isolate explicit SQLite URI from unrelated DATABASE_URL (#912) - #2

Closed
1932819331hy-debug wants to merge 16 commits into
masterfrom
audit/sqlite-912-env-isolation-20261019
Closed

1932819331hy-debug wants to merge 16 commits into
masterfrom
audit/sqlite-912-env-isolation-20261019

Conversation

@1932819331hy-debug

@1932819331hy-debug 1932819331hy-debug commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Fork-only red-team validation against existing upstream AndreaBozzo#990 / issue AndreaBozzo#912; do not merge or submit upstream automatically.

Issue: create_connector(DatabaseConfig { connection_string: "sqlite:///...?...", ..Default::default() }) invokes DatabaseCredentials::from_environment("sqlite"). With a PostgreSQL DATABASE_URL, the default env-loading branch can rewrite an explicitly supplied SQLite target through to_original_string, violating the promise to preserve the SQLite URI and mode=rwc behavior.

Minimal guarded change: do not inject generic environment credentials into explicit SQLite URLs. Adds an isolated subprocess integration regression that sets an unrelated PostgreSQL DATABASE_URL, uses the public default config and asserts that mode=rwc creates the specifically requested SQLite database. Isolation prevents pollution of concurrent tests.

Verification pending: GitHub-hosted SQLite-feature suite and full CI. This is not a claim of passing tests or a request to merge into the active upstream PR yet. Check interaction with existing upstream PR AndreaBozzo#897, which independently includes the same SQLite env-credential guard.

Archived verification record

Closed after verifying the original work is covered by merged upstream contribution. Upstream merged AndreaBozzo#990 now includes the explicit SQLite-URL environment credential guard plus the subprocess regression. This earlier fork red-team draft was never delivered upstream. This was a validation-only fork PR, not a separate cash claim. No source branch or commit was deleted or rewritten; all tests and review receipts remain accessible.

majidninja and others added 14 commits October 17, 2026 09:10
…ozzo#942) (AndreaBozzo#968)

* feat(metrics): declare timeliness start/end pairs explicitly (AndreaBozzo#942)

Timeliness paired columns only by role words in their names, so
valid_from/valid_until, checkin/checkout or names in another language were
never compared, and an ambiguous set had no way to say which pair was meant.

temporal_pairs sits next to temporal_columns in Rust and Python. Declared
pairs are compared as given; the other temporal columns still pair by name.
An unknown column in a pair is reported like other unknown hint names.

* feat(metrics): bind declared pair columns as temporal_pairs hints

A pair over columns with no dates profiled fine and reported no pair checked. Each pair column now records a temporal_pair binding, so a pair proven inert raises naming temporal_pairs, as temporal_columns does. Regenerates the report schema for the new binding kind.
…ndreaBozzo#975)

* fix(streaming): await channel capacity when emitting finished progress event

Intermediate progress events (such as ProgressEvent::ChunkProcessed) are
best-effort and dropped via try_send when a progress channel is full to prevent
blocking ingestion. However, when profiling ends, dropping ProgressEvent::Finished
on a full channel causes consumers draining the channel to never learn the profile
completed or how many rows were counted.

This change:
- Adds ProgressSink::emit_async to await channel capacity via tx.send(event).await.
- Adds ProgressTracker::emit_finished_async and calls it at the end of AsyncStreamingProfiler::profile_stream.
- Updates Profiler::progress_channel documentation explaining intermediate best-effort dropping versus terminal event delivery.
- Adds regression test test_progress_channel_capacity_one_receives_finished_event verifying that a capacity-1 channel on a current-thread runtime reliably receives Finished with no stop condition, MaxRows, and MaxBytes.

Fixes AndreaBozzo#974.

* fix(streaming): emit finished progress event only after reader checks succeed

* style: apply rustfmt formatting to async reader and test suite

* fix(streaming): reserve Finished event permit up front with try_reserve_owned

* fix(core): flatten finished permit extraction to satisfy clippy collapsible_if

* fix(streaming): reserve terminal capacity per profile run
…ity in from_dict (AndreaBozzo#980)

* fix(python): refuse malformed values inside quality and type_homogeneity in from_dict (AndreaBozzo#950)

* fix(python): handle overflowing ints in score validation and allow additive homogeneity properties

* fix(python): add _LEXICAL_CLASS_ORDER to stub and narrow report.quality in tests
… Arrow errors (AndreaBozzo#979)

* fix(python): handle mixed object columns in pandas DataFrames without Arrow errors

* style: format test_pandas_mixed_columns and wrap long lines in _inputs

* fix(python): narrow Arrow conversion exception handling and support MultiIndex columns

* fix(python): preserve pd.NA and pd.NaT as Arrow nulls in mixed object fallback

* fix(python): address review feedback on mixed columns

* fix(python): include mixed categorical columns in fallback
…) (AndreaBozzo#981)

* feat: compute compare() with a typed Rust report delta (AndreaBozzo#713)

ReportDelta compares two reports in Rust, and ProfileReport.compare()
returns its document. The keys compare() already returned keep their
names and values; each score gains per-side evidence and the result
gains report references. ReportSide reads a flat summary, so reports
loaded from to_dict() output or pre-0.12 files still compare.

* fix: compare legacy summaries and repeated column names in the report delta (AndreaBozzo#713)

A flat summary that does not record its scan, or the weights behind its
overall score, reads as coverage_unrecorded instead of failing or being
certified. A repeated column name is listed once with its first profile,
as the quality gate reads it.

* fix: leave an overall score with an unknown sampled component unrecorded (AndreaBozzo#713)

A dimension a later release added carries weight in the stored overall
score; when its component was sampled, the delta no longer certifies the
score as complete on either the native or the flat-summary route.
* fix: make report saves atomic

* fix: preserve permissions and symlinks on atomic save

* fix: address atomic save platform edge cases

---------

Co-authored-by: Andrea Bozzo <andreabozzo92@gmail.com>
…zzo#829) (AndreaBozzo#984)

* test: check every input route against an independent oracle (AndreaBozzo#829)

tests/fixtures/oracle-v1.json holds 20 cases whose expected values were
computed with exact rational arithmetic, without dataprof. The Python test
runs each through every route that carries it, the Rust twin through the
file engines, and both compare at the serialized precision. A strict table
lists the disagreements open issues own (AndreaBozzo#877, AndreaBozzo#982, AndreaBozzo#983).

* test: bound wide order statistics by an ulp and check known entries per route (AndreaBozzo#829)

Medians, modes and quartiles past 2^53 are compared within half an ulp of
the exact value, as the mean was, instead of a relative tolerance that
accepted errors of millions. A wildcard known entry must still disagree on
every route it covers. The Rust twin reads JSON integers exactly.
…eaBozzo#983) (AndreaBozzo#985)

An all-null text column reported text lengths of 0, the same as a column
of real values, where an all-null numeric column reported none. One rule,
stats_over_values, now gives every column without a value no statistics,
on the profile builder and on column analysis.
@1932819331hy-debug
1932819331hy-debug changed the base branch from fix/sqlite-url-options-912 to master October 19, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants