Repository navigation
feat(profile): release a tracked column's history count by count - #1183
Merged
Merged
Conversation
A tracked column whose version table holds a small count no longer has its initial and transitions withheld whole. A table every count of which passes is still published whole. Any other is released one count at a time in a fixed order: each level's first versions, each change between two levels, and each member's sampleSize band. Each decision reads only a model of what a reader holds (what the document already publishes, the counts released so far, and that the table fails: every table of the model that fails, a union of models) and the count's own value, and the value decides alone only where every value the rule leaves unprotected could be published. So a withheld count is one the rule protects, or one withheld whatever it holds, and every table of the model takes the same decisions: a reader who knows how the release works learns no more than that. No publication lets a reader of the published counts alone bound a count below minimumCell where it could not before. The model is solved exactly as integer programs with scipy's milp (HiGHS), in the profile extra and imported only when a release runs. The moves out of a declared endMarker level are published as the zeros the contract states. The exhaustive oracle also fails a protected count that a reader of the baseline document and the members' published counts can bound below minimumCell, and a planted mutant shows the check is live. A count the rule protects includes a positive count that rounds to zero. The audits before the first count and the release share one budget of integer programs and stop at it, each program has a node limit, and a table whose audit runs out is withheld whole. The reader of the published counts is modelled from what the document says; a column with another statistic between its edges is withheld whole when a level cell of it is withheld. A level's records, with the rows outside the history, are counts the release keeps too. Two oracle universes cover counts that round to zero and rows outside the history, and a third covers a second tracked column beside a column of three levels. Whether a table is published whole does not tell one that passes from one that fails: where the tables of the model that fail pin a count the rule protects, every table of the model is withheld whole, read from the model alone. The reader's model holds the entities only as far as the history's versionsPerEntity publishes them. The oracle reads each planted mutant's documents beside the counts that mutant would write. The model holds of a withheld level cell only that one of the withheld cells is one the rule protects, never which. Where no model can be built, or the withheld level cells hold none the rule protects, the column is withheld whole whether its table passes or not. The budget weighs each integer program by the size of its model, read from the longest history versionsPerEntity publishes, never from the records. Where versionsPerEntity bounds no history (its top bin coded to the ladder's end, or withheld), the release holds each entity to at most 20 versions, a public cap, and a column with an entity past it is withheld whole. A release with no model of the table withholds every count. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
📄 Documentation ReminderThis PR appears to be missing a documentation reference. Our docs live in a separate repo. Please update the PR description with one of:
See the Contributing Guide for details. |
The tracked-column release adds integer-program audits and the default universes of its oracle to tests/profiler, which this job runs serially; it stopped at its 25-minute limit with a fifth of the tests left. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…re read The library's tracked column fails the rule, so each of its profiles read the audits' whole budget before withholding it whole, and the reference tests profile it hundreds of times. They now stop the audits at once, with the same outcome. Also drop a list the version model no longer reads, and spell a chained comparison in a test as two. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…all exponent Reading 1e12345678 exactly built an integer of twelve million digits, so a level spelled that way never returned. A number is now a decimal with an exponent of at most 64, or a ratio of two integers, in at most 64 characters; anything else is no number. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…ers whole Pin the release's two ways out before the first count through the profiler: an integer program that ends unsolved, and audits that use up their budget, each withhold initial and transitions whole on a table that would otherwise publish whole. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…wn job Each of these tests reads a whole budget of integer programs. The default test run skips them; the profiler's CI job sets FLUID_PROFILE_AUDITS=1 and the oracle job's full run counts too, so they still run on every pull request that touches the profiler. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The secret scan read the spelled number as a high-entropy string. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…ease-3 Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The single-branch and four-row universes of the followed-key oracle and two history-member tests each read a whole audit budget; they now run in the profiler's own job. The reference tests withhold the library's tracked column without its audits, as the audits do. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
Tests that the history release slowed by more than a few seconds run in the profiler's own job; the policy and relationship tests withhold the tracked column without its audits, as the audits do; and the profiler's job runs a module to a worker, one per core. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…ease-3 Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
… audits in the profiler's job The default test run still withholds the tracked column without its audits there; the profiler's own job now runs the release in full. The reference tests keep the shortcut in every job, as each profiles the library well over a hundred times; a followed key's history is released through its audits in the follow tests and the followed-key oracle. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…ase in full The policy and relationship modules withhold the tracked column without its audits again in every job; one test in each, run in the profiler's own job, puts the release back and checks that the column went through it: a raised minimumCell beside a followed key's history, and children counted per entity beside the stations' tracked columns. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The five universes the default run used to hold (two of the followed key, three of the tracked column) run with the full oracle, which runs every universe on each pull request that touches the profiler. The profiler's job hands out its tests one at a time, and the policy and relationship tests run the release in full there again. A new push to a pull request cancels the oracle run on its old head. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
One test in each runs the release in full and checks that the column went through it; the rest withhold the tracked column without its audits, as the audits do. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
The integer-program audit makes each oracle universe several times slower, and the full set no longer fits one runner's two hours. Each shard now runs on its own runner with four workers, balanced by the tests' own timeout marks, and reports every test's time. A first step checks that tests/profiler/oracle_shards.txt names each collected oracle test once, so a new universe fails the job until it is placed in a shard. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
…llowed-key universes The four-shard run measured each oracle test, and the followed-key universes o1 to o4 each passed their own timeout mark. Each now runs on a runner of its own under a four-hour mark, with light tests beside it; the column universes and the seeded draws fill the other two shards. Every shard lists its longest test first. f2's mark rises to 4200 s and o5's to 2700 s, half again above their measured times. Signed-off-by: Speculator55005 <50082482+fas89@users.noreply.github.com>
fas89
marked this pull request as ready for review
December 4, 2026 19:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
fluid profilenow releases a tracked column'sinitialandtransitionscount by count when its version table holds a small count, instead of withholding both members whole.sampleSizeband.versionsPerEntitypublishes them.versionsPerEntitybounds, or a model pastMOST_CELLS), or where the withheld level cells hold none the rule protects, the column is withheld whole whether its table passes or not.versionsPerEntitypublishes, within a fixed budget (MOST_SOLVESprograms,MOST_WORKunits). WhereversionsPerEntitybounds no history (its top bin coded to the ladder's end, or withheld), the public capMOST_VERSIONS = 20bounds it, and a column with an entity past 20 versions is withheld whole. 20 is the top finite edge of the ladder ofversionsPerEntity, so a release that tells a reader no entity holds more pins no bin of it; a test holds the cap at or above that edge.fluid_build/profiler/cell_suppression.py: the model (linear facts over nonnegative whole-number cells), the exact audit (scipymilp, HiGHS) and the release. The version table's model follows each entity's versions position by position, so it holds no pair that no entity makes.endMarkernames is now published: no version follows the marked level, so its row of changes is written as the zeros the contract states. Records that break the marker withhold the column whole. A marker value is matched to a level by its text, as a number or as a boolean; one that matches no level, and acurrentFlag, still withhold the column whole with a note.scipy>=1.10joins theprofileextra (never the base install); it is imported only when a release runs.Scope
Levels are never merged.
Borrow before build
Checked locally:
profiler/disclosure.py(suppress_secondarywithholds every group beside a withheld one;suppress_differencing;pinned_children_cells), flux-statsedge_counts.check_edge_counts(cell-level checks within one column's statistics). Nothing that releases counts across linked tables with an audit.profileextra.Searched:
milptakesintegrality, andmip_rel_gapthroughoptions.SuppressSmallCounts(protectionIntervals=),IntervalLimits, protection levels after the SDC Handbook (2nd ed., ch. 4.2.2).lpPackage: lpSolve or highs).Prior art found:
Kenthapadi, Mishra and Nissim, "Simulatable auditing", PODS 2005: a denial must be one the reader could compute alone, from earlier answers and the query, never from the data. The release follows it: a value decides only where every value it could hold decides alike or is protected. https://doi.org/10.1145/1065167.1065183
GaussSuppression 1.3.4, MIT, Statistics Norway, R: Gaussian-elimination secondary suppression, protection intervals by LP. https://github.com/statisticsnorway/ssb-gausssuppression
sdcTable 0.34.1, GPL-2+, R: OPT, HITAS, hypercube,
attack(). https://cran.r-project.org/package=sdcTableTau-Argus 4.2.x, EUPL, Java. https://github.com/sdcTools/tauargus
piargus 1.0.3, Apache-2.0, needs the Tau-Argus binary. https://github.com/lverweijen/piargus
ACRO 1.1.0, MIT, output checking without secondary suppression. https://github.com/AI-SDC/ACRO
scipy
milp(BSD-3-Clause) over HiGHS (MIT). https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.milp.htmlPer-entity contribution bounds in differential privacy (a public cap on what one entity contributes, never read from the data): Wilson et al., "Differentially Private SQL with Bounded User Contribution", 2019, https://arxiv.org/abs/1909.01917; Google's differential-privacy library, Apache-2.0, https://github.com/google/differential-privacy. The cap on versions follows it, withholding a column past the cap instead of clamping, as clamping would change the published counts.
Verdict: adapt, no dependency beyond scipy. Reuse strategy: adapt the pattern (simulatable auditing's decision rule; GaussSuppression's idea that a withheld count is safe only when what is published does not determine it, cited in the module docstring) and depend on scipy for the integer programs.
Rationale: no Python engine exists; the R tools are GPL or EUPL or need R, piargus needs a Java binary, and no suppression tool models a reader who knows how the suppression decides. The code copies nothing from any of them.
Tests
tests/profiler/test_history_cell_suppression.py: the module's release over every 2 by 2 table with cells up to 5, its margins known, under two rules: grouped by document, a reader who knows the release pins no protected cell the margins alone do not. A gym and a library through the profiler, with the test's own reader (its own integer programs over the document). A library whose CLOSED ends a membership publishes the CLOSED row as zeros; records that break the marker, and acurrentFlag, withhold whole.tests/profiler/test_history_column_oracle.py: every world of each universe profiled, grouped by document; a document fails when its worlds pin a protected count, or bound one belowminimumCell, that its baseline does not. Fifteen universes (two and three levels, chains up to three, nullable and required columns, anendMarkerunder several spellings, acurrentFlag, counts that round to zero, rows outside the history, a second tracked column beside two and three levels). Planted mutants (per cell, no walks, a small band, no null gate, a trusted required column, a joint check on the marker, an exempt structural zero, a spelled marker) each pin a count, so every check is live. Each mutant's documents are read beside the counts that mutant would write.endMarkeruniverse fails with 30 pinned counts (a level's changes out, a change between two levels, a level's first versions).test_whether_a_column_is_withheld_whole_does_not_tell_a_passing_table_from_a_failing_one: before, the passing table was published whole and the failing one withheld.test_a_reader_knows_the_entities_only_as_far_as_the_document_publishes_them: before, the reader held an entity band the document does not publish.test_which_withheld_level_cell_is_the_small_one_decides_nothing: before, which withheld level cell was small changed a status.test_a_column_too_large_to_model_is_withheld_whole_whether_its_table_passes_or_not: before, a passing table pastMOST_CELLSwas published whole.test_withheld_level_cells_none_of_which_the_rule_protects_withhold_the_column_whole: before, the column was released against a model that did not hold its records.test_a_solve_of_a_larger_model_takes_more_of_the_budget: before, a program over a large model cost as much as one over a small one.test_two_tables_a_document_tells_alike_are_decided_alike_whatever_their_longest_walk: before, the size gate and the weight read the records' longest history.test_a_walk_past_the_bound_withholds_the_table_whole_and_the_public_cap_bounds_the_rest: before, a column whoseversionsPerEntitybounds no history was withheld whole.test_a_release_with_no_model_of_the_table_withholds_every_item: before, it raisedIndexError.test_one_entity_at_twenty_versions_or_twenty_one_is_what_the_cap_decides: two tables alike but for one entity's last version; at 20 versions released, at 21 withheld whole.endMarkeruniverse.The
endMarkerruleBefore: a tracked column a declared
endMarkernames was withheld whole, with a note. Now: no version follows the marked level, so the column is released, its row of changes out of that level published as the zeros the contract states; records that break the marker still withhold it whole. AcurrentFlag, and a marker value that matches no level, still withhold it whole with a note.What a reader still learns
A reader who knows the rule learns that a count withheld for its own value is one the rule protects, and a column withheld whole after a passing certificate tells a reader that some count of the table fails, which can bound a count where only one count can fail. Primary suppression tells as much.
A column is withheld whole when a reader of what the release fixes already bounds a count that a reader of the document alone could not.
A table that fails the rule runs more integer programs than one that passes, so near the budget it is withheld whole sooner. A failing table already shows as released count by count or withheld, never as whole, so this tells nothing more.
A released column tells a reader that no entity holds more versions than
versionsPerEntitybounds, or than 20 where it bounds none (also whereversionsPerEntityis withheld). That is a zero past a public bound, like the outer edge a coded histogram writes, not a cell the rule protects.How long the audits run is the records': the budget is a count of weighted programs, but the release's own model follows each history to its end.
The budget is a loss of detail, never of protection. A column whose audits use it up before the first count is withheld whole. Time per followed key, at the budget (seconds, one key column, most of it in the solver): 4 keys of 300 members 29, 6 of 600 50, 8 of 1,000 46, 10 of 2,000 48, 12 of 1,500 51 (272 at 10 of 2,000 before the weights).
Utility where
versionsPerEntitybounds no historyGeometric histories (each further version with probability p), the release run as the profiler runs it,
minimumCell10, zeros disclosive. Withholding whole there is what this change replaces; a cap at the most versions the model's cells allow was measured beside the one chosen.On the oracle's universes, withholding whole there left five universes below their publish floors (one published 30 of a floor of 40, and four planted mutants gave nothing away); with the cap of 20 every floor holds.
Where
versionsPerEntitypublishes a bound (minimumCell10, geometric versions): 200 entities, p 0.6 (largest 6) and 1,000, p 0.5 (largest 11) and 5,000, p 0.6 (largest 12) code their tail and now take the cap; 100,000, p 0.5 (largest 17) bounds at 19 and publishes; 95 entities as 50, 30, 15 bound at 4 and publish; 89 as 50, 30, 9 code their tail and take the cap.Gates
ruff checkandblack --checkonfluid_build/profilerandtests/profiler: clean.tests/profilerandtests/perf/test_startup_budget.py(-n 3): 3067 passed, 73 skipped.fluid --helpimports neither scipy nor the new module.The exhaustive history oracle in full (
FLUID_PROFILE_ORACLE=full,-n 3) on a loaded machine: 15 of 16 universes pass with no pinned count, and every publish floor holds. f2 ran past its 3600 s mark there, so it runs in this pull request's oracle job. Under the old behaviour (withheld whole whereverversionsPerEntitybounds no history) f2 took 514 s; its time on a clean runner under the cap is in the oracle job below. Floors and mutants:The followed-key oracle and the draws run in this pull request's oracle job; the planted leak (per-cell primary suppression only) fails the sibling and all eight draws.
A diff review and an independent review of the release's disclosure (the cap, the gate on a history past it, the empty-state guard and the oracle changes): no open finding above low. The low ones are fixed or listed above.
Defect scan (diff mode, one round) and a security review of the release: no open finding above low; the three low ones (an unbounded program read by its status code, a solver failure mid-release caught like a budget run out, and a missing solver found before any table is read) follow in the next pull request.
ripwire --quality-deltaon main plus this diff: the gating rows are dead code and churn in files this change does not touch, plus two oracle helpers that grew (_Audit,_run); the new release code's complexity is inrelease,_smallandevery_value_safe, each one decision procedure.Public text checks on the diff, the commit message and this body: clean.
Oracle job
The audit runs for every world the exhaustive oracles profile, so their universes take longer than on main and one job no longer fits in two hours.
profile-oracle.ymlnow runs six shards (fail-fast: false,-n 4 -v --durations=0).tests/profiler/oracle_shards.txtlists each shard's tests, longest first, and a first step diffs that list against--collect-onlyso a universe added or renamed without a shard fails the job. The four followed-key universes o1 to o4 run on a shard each, with marks of 14400 s for now.Borrow before build: pytest-split 0.11.0 (MIT, https://github.com/jerry-git/pytest-split) and pytest-balance were checked. Both split by stored durations, none existed for these tests, and a split by test count is blind to a test of two and a half hours. Explicit lists balanced by the measured durations below, plus the cover check.
Shard times at 37845ac (run 47380513173, all green):
The followed-key universes, main (6d0e7ba, local, one test at a time, one thread) beside this branch (CI runner, the shard above):
The two columns come from different machines; on the same machine o1 went from 143 s to 1748 s (12x). Other pairs measured that way: f1 100 s to 543 s (5.4x), m1 30 s to 223 s (7.4x), d2 32 s to 124 s (3.9x), f4 178 s to 344 s (1.9x). f2 took 2372 s on its shard. The audit's cost per profile is the next step for these universes; once it drops, each mark goes to 1.5 times its new measured time.
The rest of CI beside the last green run on main (528822e): Test 3.10 21.9 min (main 21.9), 3.11 17.7 (17.5), 3.12 19.4 (19.2), 3.13 24.7 (19.1), 3.14 16.3 (15.4); Coverage & Audit 26.3 (23.4); the differential privacy job 21.0 (14.4). Per-test times were compared from both runs' junit reports, and the tests that grew by more than a few seconds now run their full audit only in the oracle job.