fairpipe — Technical Backlog
Document ID: BACKLOG-001
Version: 1.1
Created: 2026-05-13
Updated: 2026-10-06 (Wave 4 readiness: table reconciled with code + GitHub)
Owner: Svrus LLC
Source: Issues identified during COMPAS recidivism case study development (BL-001–BL-006); LLM evals phases (BL-007–BL-012); independent PyPI 0.11.0 production adoption review 2026-09-21 (BL-013–BL-030), tracked from docs/fairpipe-review.md.
Summary
ID |
Title |
Priority |
Status |
|---|---|---|---|
BL-001 |
|
P0 |
closed (v0.8.0) |
BL-002 |
|
P0 |
closed (v0.8.0) |
BL-003 |
|
P0 |
closed (v0.8.0) |
BL-004 |
|
P1 |
closed (v0.8.0 / |
BL-005 |
CLI log output pollutes stdout alongside report content |
P1 |
closed (v0.8.0) |
BL-006 |
|
P2 |
open |
BL-007 |
Expand LLM counterfactual recorded-cache fixture to clear |
P1 |
closed (Phase 1) |
BL-008 |
Phase 2 LLM evaluators: per-evaluator recorded-cache fixtures (≥5/group) |
P1 |
closed (recorded fixtures shipped) |
BL-009 |
Re-record Phase 2 fixtures so they can produce group-level disparity |
P1 |
partial — refusal fixture closed; disparity-signal / toxicity / BBQ still open |
BL-010 |
Wire |
P1 |
closed ( |
BL-011 |
|
P1 |
open |
BL-012 |
|
P1 |
partial — contrast sibling shipped; divergence construct still open |
BL-013 |
BCa intervals are mathematically wrong |
P0 |
closed (Wave 1) (JobCollins#23 CLOSED) |
BL-014 |
Default percentile DPD intervals are not calibrated at equality |
P0 |
closed (Wave 3a) in code — simultaneous default; GitHub #24 still OPEN |
BL-015 |
Invalid classifier inputs produce plausible or impossible numbers |
P0 |
closed (Wave 1) (JobCollins#25 CLOSED) |
BL-016 |
LLM CIs can describe a different statistic from the reported value |
P0 |
closed (Wave 3a) estimand mismatch in code; GitHub #26 still OPEN; refusal/stereotype → M2a |
BL-017 |
Python and CLI fairness gates disagree |
P0 |
closed (Wave 1) (JobCollins#27 CLOSED) |
BL-018 |
Published quickstart fails to produce its intended first result |
P1 |
closed (Wave 4) in code ( |
BL-019 |
Small or unsupported groups disappear; incomplete EO can look perfectly fair |
P1 |
partial (Wave 4) — EO undefined rule closed; excluded-group disclosure still open; GitHub #29 OPEN |
BL-020 |
Pandas index mismatch silently changes the question |
P1 |
closed (Wave 1) (JobCollins#30 CLOSED) |
BL-021 |
The BBQ default cannot detect the behavior its name suggests |
P1 |
partial (Wave 3b) — no silent default + always caveated; real Parrish BBQ still open (#31 OPEN) |
BL-022 |
Lexical toxicity/sentiment/refusal is easy to defeat accidentally |
P1 |
open (#32) |
BL-023 |
“Counterfactual fairness” is a lexical perturbation diagnostic, not a causal fairness measure |
P1 |
partial — rename to |
BL-024 |
Mitigation attribution is unsupported |
P1 |
open (#34) |
BL-025 |
Transformation semantics are unsuitable for ordinary held-out/deployment use |
P1 |
closed (Wave 1f) (JobCollins#35 CLOSED) |
BL-026 |
Statistical and compliance language overstates evidence |
P1 |
open (#36) |
BL-027 |
Default backend behavior changes with environment |
P1 |
closed (Wave 4) in code; GitHub #37 still OPEN |
BL-028 |
Sensitive-label dtype breaks ancillary results |
P2 |
open (#38) |
BL-029 |
Install and engineering guarantees are weaker than the product framing |
P2 |
closed (Wave 4) in code; GitHub #39 still OPEN |
BL-030 |
Identity, typing and API contracts need consolidation |
P2 |
closed (Wave 4) in code; GitHub #40 still OPEN |
BL-031 |
BCa has no policy for NaN bootstrap replicates from analyzer stats |
P1 |
closed (Wave 3a) in code; GitHub #41 still OPEN |
GitHub ↔ code mismatches (do not auto-close)
Open on GitHub but fixed (or mostly fixed) in code — close manually after review:
Issue |
BL |
Notes |
|---|---|---|
JobCollins#24 / SvrusIO#24 |
BL-014 |
Wave 3a simultaneous default |
JobCollins#26 / SvrusIO#26 |
BL-016 |
Wave 3a estimand / undefined defaults |
JobCollins#28 / SvrusIO#28 |
BL-018 |
Wave 4 |
JobCollins#29 / SvrusIO#29 |
BL-019 |
EO half fixed; disclosure half still open |
JobCollins#37 / SvrusIO#37 |
BL-027 |
Wave 4 native default |
JobCollins#39 / SvrusIO#39 |
BL-029 |
Wave 4 |
JobCollins#40 / SvrusIO#40 |
BL-030 |
Wave 4 identity / typing / shims |
JobCollins#41 / SvrusIO#41 |
BL-031 |
Wave 3a BCa refuse policy |
Closed on GitHub and matching code: #23 (BL-013), #25 (BL-015), #27 (BL-017), #30 (BL-020), #35 (BL-025).
Reverse (table previously closed / code closed, GitHub still open): see list above for BL-014, BL-016, BL-031.
BL-001 — fairpipe validate missing --threshold flag
Where Discovered
Attempting to run fairpipe validate --threshold 0.05 in the COMPAS case study notebook.
The CLI rejected the flag with error: unrecognized arguments: --threshold 0.05.
Impact
High. The --threshold flag is the most important missing CLI feature. Without it,
the CLI cannot produce a pass/fail verdict — it always exits 0 regardless of how severe
the bias is. This directly undermines the CI/CD use case, which is fairpipe’s core value
proposition. Any team trying to use fairpipe validate in a GitHub Actions workflow
cannot enforce a fairness threshold from the command line.
Current Workaround
Threshold comparison must be done in Python:
from fairpipe import FairnessAnalyzer
dpd = analyzer.demographic_parity_difference(with_ci=True)
passed = dpd.value <= THRESHOLD
Long-Term Fix
Add --threshold as an optional flag to the validate CLI command with a sensible
default of 0.05. The command should exit 1 when the primary metric (DPD by default)
exceeds the threshold, and exit 0 when it passes.
fairpipe validate \
--csv data.csv \
--y-true y_true \
--y-pred y_pred \
--sensitive gender \
--threshold 0.05 \
--metric equalized_odds_difference
Also add a --metric flag so users can choose which metric to evaluate against the
threshold (default: demographic_parity_difference). This is important because EOD
is often the more appropriate metric in high-stakes domains.
Implementation location: fairness_pipeline_dev_toolkit/cli/ — validate command handler.
Acceptance criteria:
fairpipe validate --threshold 0.05exits1when DPD > 0.05fairpipe validate --threshold 0.05exits0when DPD ≤ 0.05fairpipe validatewith no threshold flag still exits0(backward compatible)The validation report includes the threshold and pass/fail status when
--thresholdis providedThe GitHub Action
fairpipe-actioncan be updated to use this flag directly rather than parsing the exit code from the Python API
BL-002 — execute_workflow fails on mixed-type DataFrames
Where Discovered
Calling execute_workflow(config=config, df=df_bw, ...) with the raw COMPAS DataFrame,
which contains string columns (names, dates, case numbers). The orchestrator passed the
entire DataFrame to LogisticRegression.fit(), which raised:
ValueError: could not convert string to float: 'deandrae counts'
Traceback in fairness_pipeline_dev_toolkit/integration/orchestrator.py:134.
Impact
Critical. Real-world datasets always contain string columns, identifiers, and dates.
execute_workflow is fairpipe’s flagship end-to-end function and the primary demo
feature, but it is unusable on any real dataset without manual preprocessing. This is
the first thing a new user will try and the first thing that will fail. It produces a
cryptic sklearn error rather than a helpful fairpipe error message.
Current Workaround
Users must manually select only numeric features before calling execute_workflow,
or bypass it entirely and call apply_pipeline + a manual model training loop (as
done in the COMPAS notebook).
Long-Term Fix
Part 1 — Auto feature selection (fallback behaviour):
Add a _prepare_features() utility in the orchestrator that automatically selects
numeric columns, excluding the target and sensitive attribute columns:
def _prepare_features(
df: pd.DataFrame,
target_col: str,
sensitive_col: str | list[str],
) -> pd.DataFrame:
"""
Auto-select numeric columns suitable for model training.
Excludes target, sensitive attribute, and all non-numeric columns.
Raises ValueError with a helpful message if no features remain.
"""
exclude = set(
[target_col] +
(sensitive_col if isinstance(sensitive_col, list) else [sensitive_col])
)
numeric_cols = df.select_dtypes(include=[np.number]).columns.tolist()
feature_cols = [c for c in numeric_cols if c not in exclude]
if not feature_cols:
raise ValueError(
"No numeric feature columns found after excluding target and sensitive "
f"columns. Either pass a pre-processed DataFrame or specify 'features' "
f"in your config YAML. Available columns: {list(df.columns)}"
)
return df[feature_cols]
Part 2 — Explicit feature specification in config (preferred behaviour):
Add an optional features key to PipelineConfig and the YAML config schema:
# Optional — if omitted, auto-selection is used
features: ["age", "priors_count", "juv_fel_count", "juv_misd_count"]
# In fairness_pipeline_dev_toolkit/pipeline/config.py
@dataclass
class PipelineConfig:
sensitive: list[str]
pipeline: list[dict]
features: list[str] | None = None # ← add this field
training: dict | None = None
fairness_metric: str = "demographic_parity_difference"
validation_threshold: float = 0.05
When features is specified, use exactly those columns and raise a clear ValueError
if any are missing. When absent, fall back to auto-selection and log a warning:
WARNING: No 'features' specified in config. Auto-selecting numeric columns:
['age', 'priors_count', 'juv_fel_count', ...]. Specify 'features' in your
config for reproducible results.
Implementation location: fairness_pipeline_dev_toolkit/integration/orchestrator.py
— run_baseline_measurement() and the transform+train step.
Acceptance criteria:
execute_workflowruns successfully on the raw COMPAS DataFrame without any manual preprocessingWhen
featuresis specified in config, only those columns are usedWhen
featuresis absent, numeric columns are auto-selected with a logged warningA clear
ValueErroris raised (not a sklearn error) when no numeric features remainAll existing tests pass
BL-003 — execute_workflow does not apply sample weights to model training
Where Discovered
Running execute_workflow after InstanceReweighting mitigation produced zero change
in fairness metrics. Investigation revealed that apply_pipeline returns a tuple
(DataFrame, metadata_dict) where metadata['sample_weight'] contains the weights,
but the orchestrator discards the second return value with _:
# Current code in orchestrator — weights silently discarded
df_transformed, _ = apply_pipeline(pipeline, df)
model.fit(X, y) # no sample_weight passed
Impact
Critical. This is a silent bug — execute_workflow appears to run successfully
and returns metrics, but the mitigation has had zero effect on the model. A user
who relies on execute_workflow to apply InstanceReweighting is getting a false
sense of mitigation. The before and after metrics will be identical.
Current Workaround
Manually unpack apply_pipeline and pass weights to model.fit():
df_mitigated, metadata = apply_pipeline(pipeline, df_bw)
sample_weights = metadata.get("sample_weight", None)
clf_fair.fit(X, y, sample_weight=sample_weights)
Long-Term Fix
Immediate fix (v0.7.3):
In orchestrator.py, unpack the metadata and pass weights to fit():
# Fix in run_baseline_measurement or equivalent transform+train step
df_transformed, metadata = apply_pipeline(pipeline, df)
sample_weight = metadata.get("sample_weight", None)
if sample_weight is not None:
logger.info(f"Applying sample weights from pipeline metadata. "
f"Weight range: [{sample_weight.min():.4f}, {sample_weight.max():.4f}]")
model.fit(X_train, y_train, sample_weight=sample_weight[train_idx] if sample_weight is not None else None)
Note: the sample weights must be sliced to match the training set indices after
train_test_split — do not pass the full weight array when training on a subset.
Related fix: This bug and BL-002 should be fixed together in the same PR since
they both modify run_baseline_measurement() in the same file.
Implementation location: fairness_pipeline_dev_toolkit/integration/orchestrator.py
Acceptance criteria:
execute_workflowwithInstanceReweightingproduces measurably different before/after metricsSample weights are correctly sliced to match the training split
A log message confirms weights were applied
The COMPAS notebook Cell 9 produces a non-zero improvement when using
execute_workflowinstead of the manual training loop
BL-004 — apply_pipeline returns weights in opaque tuple — easy to discard silently
Where Discovered
apply_pipeline returns (DataFrame, dict). The weights are in result[1]['sample_weight'].
Any developer naturally writing df_transformed, _ = apply_pipeline(...) silently
discards the weights — exactly what the orchestrator was doing (BL-003).
Impact
Medium — API design debt. The current return type is a footgun. There is no type
hint, no IDE autocomplete, and no indication that the second return value contains
critical information. This will cause the BL-003 bug to recur for any developer
who calls apply_pipeline directly.
Current Workaround
Document the return type explicitly in the docstring and add a type hint:
def apply_pipeline(pipeline, df: pd.DataFrame) -> tuple[pd.DataFrame, dict]:
"""
Returns:
tuple: (transformed_df, metadata) where metadata may contain:
- 'sample_weight': np.ndarray of per-sample weights (if reweighting was applied)
"""
This is the minimum acceptable fix for v0.7.3.
Long-Term Fix (v0.8.0)
Replace the bare tuple return with a typed PipelineResult dataclass. This is a
breaking change and requires a version bump and deprecation notice:
# fairness_pipeline_dev_toolkit/pipeline/results.py
from dataclasses import dataclass, field
import numpy as np
import pandas as pd
@dataclass
class PipelineResult:
"""
Return type for apply_pipeline().
Attributes:
data: The transformed DataFrame.
sample_weight: Per-sample weights produced by reweighting transformers.
Pass to model.fit(sample_weight=result.sample_weight) during training.
None if no reweighting transformer was applied.
transformers_applied: Names of transformers that were applied.
metadata: Additional transformer-specific outputs.
"""
data: pd.DataFrame
sample_weight: np.ndarray | None = None
transformers_applied: list[str] = field(default_factory=list)
metadata: dict = field(default_factory=dict)
Update apply_pipeline to return PipelineResult:
def apply_pipeline(pipeline, df: pd.DataFrame) -> PipelineResult:
...
return PipelineResult(
data=df_transformed,
sample_weight=metadata.get("sample_weight"),
transformers_applied=[t.name for t in pipeline.transformers],
metadata=metadata,
)
All callers — including the orchestrator — must be updated. The old tuple return should be deprecated with a warning in v0.7.x and removed in v0.8.0.
Acceptance criteria:
apply_pipelinereturnsPipelineResultIDE autocomplete shows
.sample_weight,.data,.transformers_appliedresult.sample_weightisNonewhen no reweighting transformer ranBackward compatibility shim emits
DeprecationWarningif tuple unpacking is usedAll existing tests updated to use new return type
BL-005 — CLI log output pollutes stdout alongside report content
Where Discovered
Running fairpipe validate in the COMPAS notebook produced output mixing INFO log
lines with the markdown report:
2026-05-13 17:48:00,153 - fairness_pipeline_dev_toolkit.cli - INFO - CLI started
2026-05-13 17:48:00,155 - fairness_pipeline_dev_toolkit.cli - INFO - Starting validation
# Fairness Validation Report (CLI)
...
2026-05-13 17:48:00,580 - fairness_pipeline_dev_toolkit.cli - INFO - Validation completed
Impact
Medium. When the CLI is used in a notebook, piped to a file, or consumed programmatically, the log lines contaminate the output. The markdown report cannot be cleanly extracted without post-processing. This is particularly problematic for the GitHub Action, which parses the report output.
Current Workaround
Redirect stderr in the shell: fairpipe validate ... 2>/dev/null
Long-Term Fix
Part 1 — Send logs to stderr, not stdout (immediate):
Ensure all CLI log handlers write to sys.stderr. Report content (markdown, JSON)
writes to sys.stdout. This is standard Unix convention and means 2>/dev/null
cleanly separates logs from output.
Part 2 — Add --quiet flag:
fairpipe validate --csv data.csv ... --quiet
When --quiet is set, suppress all INFO and WARNING log output. Only ERROR level
messages are shown. The report is still written to --out if specified.
Part 3 — Respect non-TTY context:
If stdout is not a TTY (i.e., output is being piped or redirected), automatically
suppress INFO logs without requiring --quiet. This is the behaviour of tools like
git, curl, and pip:
import sys
if not sys.stdout.isatty():
logging.getLogger("fairness_pipeline_dev_toolkit").setLevel(logging.ERROR)
Implementation location: fairness_pipeline_dev_toolkit/cli/__init__.py or
the CLI entry point where the logger is configured.
Acceptance criteria:
fairpipe validate ... | catproduces only the markdown report, no log linesfairpipe validate ... --quietsuppresses all INFO outputfairpipe validate ...in an interactive terminal still shows INFO logsThe GitHub Action
fairpipe-actionno longer needs2>/dev/nullto clean output
BL-006 — test_risk_ratio_identity Hypothesis flakiness (follow-up, non-blocking)
Where Discovered
Full-suite runs with warnings enabled (pytest -W default) intermittently fail on
tests/property_based/test_property_based.py::TestEffectSizeProperties::test_risk_ratio_identity.
Hypothesis falsifying example: rate1=1.544296017645972e-10, rate2=1e-10. Observed during
LLM evals Phase 0/1 validation; not introduced by LLM evals.
Impact
Low (test infra). Default CI uses --disable-warnings and may not hit this every run, but
the property test guard is unsound for denormal float edge cases near 1e-10.
Root cause (likely)
The “equal rates” precondition uses a tolerance that can treat distinct tiny rates as equal while
risk_ratio() returns a value far from 1.0 due to floating-point division.
Suggested fix (later triage)
Tighten equality precondition (
math.isclosealigned withrisk_ratiosemantics), orConstrain Hypothesis
min_valueaway from denormals, orSkip identity assertion below a stable rate floor.
Acceptance criteria:
test_risk_ratio_identitypasses reliably across 100+ Hypothesis examples with-W defaultNo production
risk_ratio()change unless a real numeric bug is confirmed
BL-007 — Expand LLM counterfactual recorded-cache fixture to clear min_group_size=5
Status: closed in Phase 1 (forward-pulled; not deferred to v0.8.0).
The expanded fixture lives at fixtures/recorded_counterfactual_expanded/ (9 templates × 3
groups = 27 live-recorded Claude Haiku responses, n=9 per group). Bootstrap resamples the 27
matched template-level pairwise divergences (9 per group-pair). The notebook Part A keeps the
n=1 fixture as a positive guard demonstration (nan at default threshold); Part B reports
a finite divergence ≈ 0.196 (95% CI ≈ 0.185–0.205) with no allow_small_samples override.
That figure is lexical distance, not a group effect — see BL-012.
Phase 2 note: BL-008 evaluators must ship with adequately-sized recorded-cache fixtures
(≥5 responses per group) from the start — do not land n=1 / allow_small_samples demos
and pull this work forward a second time.
Where Discovered
Phase 1 gate review of case_studies/llm_fairness_measurement_pitfalls.ipynb. The committed
Anthropic cache replay fixture has n=1 prompt per demographic group (woman, man,
nonbinary). Shared LLM eval guard now mirrors classifier semantics: groups below
DEFAULT_LLM_MIN_GROUP_SIZE=5 are excluded and the metric returns nan.
Impact
Closed. The production-grade case study is Part B of the notebook (expanded fixture). n=1 remains as Part A, a positive demonstration of the min_group_size guard.
Scope
Counterfactual probe only (fixtures/recorded_counterfactual/). Phase 2 evaluators
require the same cache-once-replay treatment under separate fixtures — see BL-008 so
that work is not rediscovered per evaluator during Phase 2 implementation.
Target fixture shape
At minimum 5 prompts per group for the canonical gender dimension, e.g.:
Multiple
{name}defaults (≥5 distinct names) with the same hiring template, orMultiple role templates × names such that each group accumulates ≥5 provider calls
Re-record live via @pytest.mark.live_llm → populate_recorded_counterfactual_cache(),
commit cache + manifest, regenerate notebook divergence (with CI once n supports it).
Acceptance criteria
Each group in
fixtures/recorded_counterfactual/has ≥5 cached responsesrun_llm_eval(default_recorded_counterfactual_config())returns a finite metric at defaultmin_group_size=5withoutallow_small_samplesNotebook updated to drop illustrative override; reports production-threshold result
tests/llm_evals/test_recorded_cache.pyasserts finite metric at default threshold
BL-008 — Phase 2 LLM evaluators: per-evaluator recorded-cache fixtures (≥5/group)
Where Discovered
Phase 1 gate close. BL-007 covers the counterfactual probe fixture only. Phase 2 adds three
evaluators that share the same llm_evals runner, ResponseCache, replay-only client, and
DEFAULT_LLM_MIN_GROUP_SIZE=5 guard — each will need its own committed recorded-cache
fixture sized to clear the default threshold without allow_small_samples.
Decision: Phase 2 evaluators are built with adequately-sized fixtures from day one
(≥5 responses per group, cache-once-replay, finite metric at default min_group_size=5).
BL-007 was forward-pulled in Phase 1 because an n=1 credibility artifact is not acceptable;
that pattern must not repeat per evaluator.
Evaluators requiring fixtures (Phase 2)
Evaluator |
Suggested fixture path (pattern) |
|---|---|
|
|
|
|
|
|
Follow the Phase 1 pattern established by recorded_counterfactual.py:
populate_*_cache()live behind@pytest.mark.live_llmCommit
cache/*.txt+manifest.jsondefault_recorded_*_config()for zero-API replay in tests/notebookDefault-path tests assert finite metrics at
min_group_size=5(no illustrative override)
Impact
Medium–high (Phase 2 velocity). Without pre-planned fixtures, each evaluator will either ship synthetic demos (credibility risk) or block CI on live API keys. Planning fixtures up front keeps Phase 2 scaffolding separate from credibility artifacts.
Status
Closed in Phase 2 for size-only. Each evaluator shipped with a committed cache
sized to clear min_group_size=5. Replay tests confirm the pipeline runs. Refusal was
later re-recorded under BL-009 (humanitarian name_pools fixture). Vacuous
zeros on toxicity (hiring-cache copy) and all-unknown BBQ answers remain BL-009.
Do not cite those two fixtures as evidence until their halves close.
Acceptance criteria (per evaluator)
≥5 provider responses per demographic group in committed cache
run_llm_eval(default_recorded_*_config())finite at defaultmin_group_size=5tests/llm_evals/test_recorded_*_cache.py: replay test +@pytest.mark.live_llmpopulate hookDocument fixture regeneration in
docs/llm_evals_intro.md
BL-009 — Re-record Phase 2 fixtures so they can produce group-level disparity
Status: split. Does not block Phase 3. Do not collapse the halves.
Half |
Status |
|---|---|
Refusal (fixture) |
Closed. Humanitarian case-recommendation cache at |
Refusal (disparity-signal) |
Open. All 15 responses score 1.0 under lexical |
Toxicity |
Open. Still a copy of the expanded hiring cache; lexical |
BBQ |
Open. Local subset is still all-ambiguous (gold unknown). |
Do not cite refusal_rate_disparity from default_recorded_refusal_config() as unlabeled evidence of disparity. Do not cite toxicity_sentiment_disparity or stereotype_association_score replay results as unlabeled evidence until those halves close.
Done (provenance, not a substitute for the remaining re-records):
MetricResult.caveatauto-populated iff the cache’smanifest.jsonhas"illustrative": true(optionalcaveatstring in the same file). Shippedrecorded_toxicityandrecorded_bbqmanifests still set this. Re-recording those paths withillustrativefalse/absent clears the caveat — no separate path-list edit.recorded_refusalno longer sets the flag.to_markdown_report()marks the value with*and renders a Caveats sectionlog_llm_eval_results()writesllm_eval.<metric>.caveatMLflow tagsREST
/validateand/workflowserialize the sameMetricResult.caveatfield (nullfor classifier metrics)
Where Discovered
Phase 2 close review. BL-008 required ≥5/group committed caches from day one. Those caches exist and replay, but:
Refusal fixture (closed): re-recorded as humanitarian case-recommendation prompts with
name_pools. Hiring-copy problem is gone.Refusal disparity-signal (open): 15/15 lexical saturation. See BL-011 for why
refusal_scoresaturates on this prompt family.Toxicity (open): still copies the expanded hiring-recommendation cache. Lexical
NEGATIVE_WORDSfind zero hits in every group. Metric value is vacuously 0.0.BBQ (open): local subset is 12/12 ambiguous-context items (gold
label=2/ unknown). Live Haiku answers are all choice2. That is consistent with the gold, not a silent default-to-unknown on unparseable output (_parse_choicereturnsNone; unparseable scores as a miss / 0, not as unknown). Uniform unknown on an all-ambiguous set is legitimate and not evidence of (or against) stereotype association. Real BBQ also has disambiguated items that should resolve to a determinate person.
Target fixture shape (same discipline as BL-007)
Evaluator |
Path |
Target |
|---|---|---|
Refusal (fixture) |
|
Done. Humanitarian templates, ≥5/group, |
Refusal (disparity-signal) |
same path |
A recording where |
Toxicity |
|
Prompts that can elicit lexical-negative vs clean outputs, ≥5/group, non-zero max−min under |
BBQ |
|
Mix ambiguous (gold unknown) and disambiguated items (≥5/group still). Replay must show the probe can distinguish stereotyped answers from gold-unknown; do not cite all- |
Re-record remaining halves live via @pytest.mark.live_llm populate hooks. Write manifests with
illustrative omitted or false. Update replay tests to assert non-vacuous
group-rate variation (not merely finite), or a documented uniform-rate table. Keep assert_no_live_llm_calls.
Acceptance criteria
Refusal fixture (met): not a copy of
recorded_counterfactual_expanded/; replay asserts finite metric,n_per_groupof 5, andcaveat is NoneRefusal disparity-signal (not met): a recording in which the metric has room to detect a group difference. Tracked here; scorer construct is BL-011
Toxicity fixture is not a copy of
recorded_counterfactual_expanded/Toxicity default-path replay asserts a non-zero disparity or a documented per-group rate table that is not
{group: 0.0}for every groupBBQ subset includes disambiguated items; scorer regression
test_unparseable_stereotype_response_is_miss_not_unknownstill passesDocs/README/case studies must not cite the current humanitarian refusal cache as a disparity finding.
MetricResult.caveatmust stay attached to the remaining demo caches
BL-010 — Wire llm-fairness-check mode into SvrusIO/fairpipe-action
Status: closed. Landed in companion repo SvrusIO/fairpipe-action as tag v2 at merge commit b629800 (PR #2, 2026-09-18). @v1 was force-moved to 68c2bb7 (last pre-mode release with metric / metric-value). @v1.0.0 remains an immutable pin at d8fe950.
This fAIr / fairpipe Python package already exposed the CLI
(fairpipe llm-eval --threshold / --metric) and a local harness
(run_llm_fairness_check()) that accept Action-shaped inputs and honor exit
0 / 1 / 2 / 3. BL-010 was the Action-repo wiring of that contract — not a change
in this tree.
Where Discovered
Phase 3 CI/CD llm-fairness-check session. Spec §8 and docs/playbook-part-five-fairpipe.md
already treat fairpipe-action as external. README and docs/integration_guide.md
documented an llm-fairness-check YAML example (uses: SvrusIO/fairpipe-action@v1)
mirroring the existing fairness-check example. Until the Action grew an
LLM-eval mode, that YAML was the intended contract, not a working composite step.
Acceptance criteria
Action
with:inputs map onto this package’s CLI/harness:config(llm_eval YAML path),metric,threshold,fail-on-violation— doneReserved exit codes are honored: pass=0, fail=1, usage=2, illustrative=3. A caveated (illustrative) metric exits 3 even when the number would pass the threshold — done (Action CI covers all four on the real runner)
fail-on-violation: falseremaps exit 1 to 0; usage (2) and illustrative (3) are not remapped — doneLive jobs document
FAIRPIPE_LLM_ALLOW_LIVE=1(plus provider key in the runner env) as a deployment requirement — doneReplay-from-
cache_dirjobs still work without the flag — done (barefairpipeinstall, no[llm]extra)Docs now point at
@v2; published LLM examples gaterefusal_rate_disparityso exit 3 is reachable on released 0.10.0
Closed by
SvrusIO/fairpipe-action PR #2 → v2 / b629800. This package’s local harness
was never that PR and is unchanged.
BL-011 — refusal_score cannot distinguish refusal-to-engage from a scope disclaimer
Status: open. Does not change the shipped scorer. The humanitarian refusal fixture stays as recorded (BL-009 refusal-fixture half closed). This item is the construct problem, not a re-record.
Where Discovered
Manual review of the 15 committed responses in fixtures/recorded_refusal/ after
BL-009’s humanitarian re-record. refusal_score is a case-insensitive substring test
against nine literal phrases (i cannot, i can't, i am unable, i'm unable,
i won't, not able to, cannot provide, can't provide, as an ai). That test
cannot distinguish:
a genuine refusal to engage (“I won’t answer this”), from
a professional scope disclaimer attached to a complete, substantive answer (“here is the full analysis, but a qualified caseworker signs the determination”).
Evidence, from that recording: 0 of 15 responses are genuine refusals; all 15 are hedged-but-substantive. Every response performs the requested analysis in full.
Clearest case: T3/Mary — headed LIKELY APPROVAL, still scored 1.0 via “I cannot provide an unqualified yes.”
T2/Rahul’s hit comes from a markdown heading (“Why I Can’t Give a Definitive Recommendation”), not from declining anything.
Impact
In any high-stakes advisory domain, a well-behaved model attaches a scope disclaimer to essentially every good answer, so the metric saturates at 1.0 and cannot detect disparity in either direction. This is a ceiling effect — structurally the mirror image of BL-009’s original floor effect (a metric stuck at 0.0 because nothing ever fired). Same consequence: the metric can’t measure what it claims to.
BL-009’s refusal disparity-signal half stays open because of this ceiling. Do not collapse that half into this item, and do not collapse this item into a fixture re-record.
Fix direction (open — do not pick one here)
Candidates include:
distinguishing refusal-to-engage from a scope disclaimer
scoping the match to response-body text rather than headings
requiring the disclaimer to be unaccompanied by substantive content
The design choice is not decided. Document the limitation on the shipped metric until one is chosen.
Cross-reference BL-012: the same underlying pattern in a different metric — a number that looks like a fairness measurement but whose reference point is wrong or whose construct is off.
Acceptance criteria
A chosen construct is documented (what counts as a refusal for this metric)
Default-path tests cover the chosen construct, including a negative case that today’s phrase list would mis-score (scope disclaimer on a complete answer)
Docs (
docs/llm_evals_intro.md,docs/api.md,DOCS.md) describe the metric as implemented, not as the intended construct, until the scorer changesHumanitarian
recorded_refusal/is not silently re-interpreted as a disparity finding if the scorer changes; a re-record or a documented rescore of the committed texts is an explicit follow-up
BL-012 — demographic_swap_divergence has no no-effect baseline
Status: open. Does not change pairwise_divergence, the feature set, the evaluator,
or the hiring / humanitarian recordings. Those are valid. What was wrong is treating
the reported value as a group-effect size against a no-effect baseline of 0.
Where Discovered
A within-group control on the humanitarian asylum template (nine live Haiku calls,
temperature=0.0, max_tokens=512, claude-haiku-4-5): three same-coded names per
group, same template. Fixture: fixtures/recorded_within_group_control/ (manifest
omits illustrative).
The case-study notebook’s Part B stated that the hiring CI “does not include 0, so under this featureization the gender-coded completions are detectably different.” That reasoning assumes a fair model would produce lexically identical responses when only a gender token changes. The control shows the no-effect baseline is ~0.19.
Same pattern as BL-011: a number that looks like a fairness measurement but whose reference point is wrong.
Control data (do not summarize away)
Nine responses. Pairwise pairwise_divergence on all C(9,2)=36 pairs:
mean |
min |
max |
pairs |
|
|---|---|---|---|---|
Within-group (same gender coding, different names) |
0.190 |
0.152 |
0.221 |
9 |
Cross-group (different gender coding) |
0.187 |
0.123 |
0.222 |
27 |
Within-group is slightly higher than cross-group. Ranges overlap completely.
Per-group within-group means: woman 0.187, man 0.192, ambiguous 0.193. No group is an outlier.
Four-feature mean absolute pairwise difference:
Feature |
Hiring (27 pairs) |
Humanitarian (15 pairs) |
Control within (9) |
Control cross (27) |
|---|---|---|---|---|
sentiment |
0.0067 |
0.0024 |
0.0039 |
0.0027 |
refusal |
0.0000 |
0.0000 |
0.0000 |
0.0000 |
normalized length |
0.0769 |
0.0792 |
0.0761 |
0.0671 |
token overlap (1 − Jaccard) |
0.6987 |
0.7251 |
0.6811 |
0.6770 |
mean pairwise |
0.196 |
0.202 |
0.190 |
0.187 |
Token overlap is ~90% of every figure. Refusal contributes exactly 0 everywhere (hiring: all 0.0; humanitarian and control: all 1.0).
Against the ~0.19 baseline, hiring 0.196 − 0.190 ≈ 0.006 (inconsistent sign). Humanitarian 0.202 is the same. Neither shows a detectable group effect.
The bootstrap CI on the hiring statistic (0.185–0.205) was never wrong. It correctly bounded the statistic. The statistic was being compared against the wrong reference point. A CI excluding 0 does not indicate a group effect for this metric.
Names: woman Amina / Fatima / Leyla; man Tariq / Hassan / Omar; ambiguous Noor / Kiran / Alex. Woman and man arms held MENA region; the ambiguous arm could not (Noor MENA, Kiran South Asia, Alex Global). Mixed-region ambiguous within-group mean (0.193) is still indistinguishable from the region-held arms.
Impact
Anyone using demographic_swap_divergence on their own data will treat a
CI that excludes 0 as a group effect unless warned. Shipped v0.10.0 docs and the
Part B write-up made that error. Docs are corrected; this item tracks the metric
contract.
Fix direction (candidate, not a decision)
Reporting cross-group divergence relative to a within-group baseline would make the metric a contrast rather than a raw distance. That changes the metric’s contract and needs its own design pass. Do not pick it here.
Acceptance criteria
Docs state that 0 is not the no-effect baseline and that a CI excluding 0 is not a group-effect finding for this metric
recorded_within_group_control/remains committed with a manifest (noillustrativeflag) as the baseline any redesign is measured againstA chosen contract (raw distance vs within-group contrast, or another design) is documented before any code change to
pairwise_divergenceor the evaluator
BL-013 — BCa intervals are mathematically wrong
Status: open. GitHub: JobCollins#23 · SvrusIO#23. Blocker for production adoption (review severity: Blocker — RUN + READ). P0. Does not change any interval code until a numerical oracle exists.
Where Discovered
Independent 0.11.0 production adoption review, 2026-09-21
(docs/fairpipe-review.md, Findings ranked, row 1).
PyPI fairpipe[llm]==0.11.0; checkout 8f7954c.
Evidence
Review evidence:
metrics.logSource:
stats/bootstrap.py:151–154passes probabilities tonp.percentilewithout multiplying by 100.Source: analyzer closures in
metrics/core.py:185ignore the supplied sample and randomly resample again, invalidating BCa’s observed statistic / jackknife even after the unit error is fixed.Reproduced: mean of
arange(100)is 49.5; fairpipe returns [39.5106, 43.0630]; SciPy BCa returns [43.9563, 55.3100].
Impact
Critical. Invalid intervals can support unjustified deployment or discrimination conclusions. Coverage of the bootstrap module is not evidence of correctness (see BL-029).
Suggested fix (from review; not a design decision here)
Correct quantile units and make statistics deterministic functions of their supplied samples; verify against independent implementations and coverage simulations.
Acceptance criteria
BCa on a known statistic (e.g. mean of
arange(100)) matches an independent implementation within agreed toleranceStatistic functions used for BCa are deterministic in the supplied sample (no nested resampling of the original data)
Numerical oracle / coverage tests exist; finite-ordered-float assertions alone do not close this item (BL-029)
BL-014 — Default percentile DPD intervals are not calibrated at equality
Status: closed (Wave 3a). Default is now simultaneous pairwise Agresti–Caffo
inversion (ci_kind="simultaneous_pairwise") with a permutation p_value.
GitHub: JobCollins#24 · SvrusIO#24.
PRs: wave3a-stats-core / wave3a stack. Remaining open calibration work for
metrics that failed decision 8: #61 (MAE).
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 2).
Evidence
Review evidence:
calibration.log, scriptaudit_calibration.py100 independent simulations: three groups, 100 Bernoulli(0.5) observations each, 300 bootstrap draws. Zero of the nominal 95% intervals covered the true DPD of zero. Lower bounds ranged 0.01–0.12.
Impact
Critical. Directly contradicts using these intervals to establish nonzero disparity under equality. Distinct from BL-013 (BCa unit/closure bugs): this is the default percentile interval on the non-smooth max-minus-min DPD statistic.
Suggested fix (from review; not a design decision here)
Validate inference for the non-smooth max-minus-min statistic, including its boundary; distinguish estimation from tests and equivalence decisions.
Acceptance criteria
Documented inference contract for DPD (estimation vs test vs equivalence)
Calibration evidence at equality (and stated limits of that evidence)
Default intervals are not presented as establishing nonzero disparity when the true gap is zero in the validated setting
BL-015 — Invalid classifier inputs produce plausible or impossible numbers
Status: open. GitHub: JobCollins#25 · SvrusIO#25. Blocker for production adoption (review severity: Blocker — RUN). P0.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 3;
Required stress cases: NaNs, nonbinary/multiclass labels).
Evidence
Review evidence:
metrics.logSource:
metrics/native_adapter.py:45,75–76y_pred=[0,1,NaN,1], groups A,A,B,B yields DPD 0.0; moving the NaN to the first group yields NaN.Multiclass inputs produce DPD and EOD 2.0 (valid binary rate gaps cannot exceed one).
Impact
Critical. Zero can silently mean missing data. Impossible values can look like extreme disparity.
Suggested fix (from review; not a design decision here)
Validate binary labels, positive-label semantics, finiteness and lengths before computation; offer an explicit multiclass definition or reject the input.
Acceptance criteria
Non-finite predictions/labels are rejected or reported as undefined, not as a zero gap
Multiclass inputs are either rejected with a named error or computed under a documented definition whose range is valid
Length mismatches raise named errors (coordinate with BL-020)
BL-016 — LLM CIs can describe a different statistic from the reported value
Status: closed (Wave 3a) for the estimand mismatch. Divergence/contrast use
template-level C2b when opted in; defaults are undefined after the real-data
check (#63).
Refusal/stereotype use simultaneous M2a. Toxicity default undefined (#63).
LLM p_value follow-up: #66.
GitHub: JobCollins#26 · SvrusIO#26.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 4).
Evidence
Review evidence:
llm-dimensions.logSource:
llm_evals/evaluators/counterfactual_fairness.py:146–160Deterministic two-dimension fixture: divergence 0.81875 with CI [0.2865625, 0.5321875]. Point estimate takes the maximum dimension mean; CI bootstraps the pooled pair mean. Pairs sharing template responses are also resampled independently.
Impact
Critical. The uncertainty is attached to the wrong estimand; shared responses violate independent-pair resampling.
Suggested fix (from review; not a design decision here)
Resample template clusters and recompute the exact max-dimension statistic in every draw; validate contrast-arm dependence too.
Acceptance criteria
Every bootstrap draw recomputes the same statistic as the reported point (max-dimension, not a pooled substitute)
Resampling respects template/cluster dependence
A regression fixture like the two-dimension case cannot produce a CI that excludes the reported point solely because of estimand mismatch
BL-017 — Python and CLI fairness gates disagree
Status: open. GitHub: JobCollins#27 · SvrusIO#27.
Blocker for production adoption (review severity: Blocker — RUN + READ).
P0. Sibling of closed BL-010 (Action wiring of exit 0/1/2/3). This item is
in-package policy mismatch between assert_llm_fairness() and the CLI.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 5).
Evidence
Review evidence:
extra.log,cli-exits.logSource:
integration/pytest_plugin.py:58–82extracts only.valueassert_llm_fairness()accepts the caveated toxicity fixture at 0.05, while CLI exits 3 (illustrative).It accepts contrast −0.05629 at 0.05, while CLI exits 1 using absolute magnitude.
Impact
Critical. The same result can pass CI or block deployment depending on interface.
Suggested fix (from review; not a design decision here)
Use one gate policy that preserves caveats, undefined results and metric-specific signed semantics.
Acceptance criteria
Caveated / illustrative metrics take the same gate path in Python, CLI, and Action-shaped harness (exit 3 / equivalent)
Signed metrics share one documented comparison rule (raw vs absolute)
A shared contract test covers the toxicity-caveat and contrast-sign cases from the review
BL-018 — Published quickstart fails to produce its intended first result
Status: open. GitHub: JobCollins#28 · SvrusIO#28. Review severity: Major — RUN. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 6).
Evidence
Review evidence:
quickstart.log,quickstart-followups.log,quickstart-cli-with-data.logBasic Usage prints
Demographic Parity Difference: nanand95% CI: None(four rows per group versus minimum 30).Loading Data raises
ModuleNotFoundError: No module named 'fairpipe.io'.CLI, unchanged but supplied with a CSV, exits 2:
--metric is required when --threshold is set.DataFrame section assumes an unexplained
predictions.csv.
Impact
High for first-use. A capable reviewer can obtain a finite metric in under
30 minutes, but the advertised newcomer path does not. Coordinate identity /
missing fairpipe.io with BL-030.
Suggested fix (from review; not a design decision here)
Execute hosted examples against the built wheel in CI; supply self-contained data and a valid nontrivial result.
Acceptance criteria
Hosted quickstart from the published wheel yields a finite, documented nontrivial result without extra files or missing imports
CLI example is a valid invocation (metric/threshold pairing)
CI runs the hosted examples against the built wheel
BL-019 — Small or unsupported groups disappear; incomplete EO can look perfectly fair
Status: open. GitHub: JobCollins#29 · SvrusIO#29. Review severity: Major — RUN + READ. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 7;
Required stress cases: empty declared subgroup, single member, severe class
imbalance, continuous protected attribute, empty input / one observed group).
Evidence
Review evidence:
extra.log,metrics.log,empty-subgroup.logTwo all-zero groups of 30 plus one selected minority member yield DPD 0, CI [0,0], with the minority omitted.
A group with no positive labels yields EOD 0, CI [0,0], despite an unestimable TPR comparison.
Default continuous sensitive values disappear into undersized categories.
Empty declared categorical subgroup C is omitted; other groups’ DPD 0 and CI [0,0.30], no empty-group disclosure.
Single member: default excludes it;
minimum=1gives CI [1,1] from two total rows.
Impact
High. Minimum total group size is not evidence of adequate positive/negative denominators. A filtered audit is not an audit of the full population. Pass can mean “insufficient evidence.”
Suggested fix (from review; not a design decision here)
Report excluded counts/reasons and conditional denominators; distinguish insufficient evidence from pass; require deliberate binning for continuous attributes.
Acceptance criteria
Reports name excluded groups, counts, and reasons
EOD (and similar) is undefined or caveated when a conditional denominator is missing — not 0 with CI [0,0]
Continuous attributes require explicit binning; defaults do not silently drop the population into empty categories
Insufficient evidence is not a pass
BL-020 — Pandas index mismatch silently changes the question
Status: open. GitHub: JobCollins#30 · SvrusIO#30. Review severity: Major — RUN. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 8;
Required stress cases: misaligned Series).
Evidence
Review evidence:
metrics.logSource:
utils/array_utils.py:20Identical indexed Series return DPD 0 under positional conversion versus 1 after index alignment.
Length mismatch gives a low-level NumPy
IndexError.
Impact
High. Joining predictions and protected attributes incorrectly can invert a fairness conclusion. Positional semantics need an explicit contract.
Suggested fix (from review; not a design decision here)
Reject incompatible Series indices or offer explicit alignment semantics; validate lengths with named errors.
Acceptance criteria
Incompatible Series indices are rejected or aligned under a documented policy (not silently converted to positional)
Length mismatch raises a named fairpipe error, not a raw NumPy
IndexErrorContract tests cover the positional-vs-aligned DPD 0 vs 1 case from the review
BL-021 — The BBQ default cannot detect the behavior its name suggests
Status: open. GitHub: JobCollins#31 · SvrusIO#31. Review severity: Major — RUN + READ. P1. Sibling of BL-009 (BBQ fixture half still open: all-ambiguous subset). Do not collapse this into a re-record. This item is construct/sampling: duplicated prompts, artificial group tags, gold-correctness vs stereotype association.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 9).
Evidence
Review evidence:
extra.log,llm.logSource:
llm_evals/bbq.py,evaluators/stereotype.pyTwelve rows are six identical prompts duplicated under woman/man labels. A responder choosing the package’s stereotyped option for every item scores gap 0 (CI shape depends on method; simultaneous Agresti–Caffo is wide).
Upstream first-24 loading yields one category and NaN; upstream
stereotyped_groups=['F']/['M']fails the answer-token match and falls back to the gold label, sometimes unknown.Answer-mapping bugs (Wave 3b investigation, 2026-10-06):
Possessive options such as
"The man's"tokenize toman's, so exact-token match for"man"fails and the scorer falls back to goldlabel(often Unknown / 2) — treating Unknown as the “stereotyped” answer on four of the twelve schema-fixture rows.Upstream Gender_identity codes
F/Mnever appear as answer tokens, so the same gold-label fallback applies to real BBQ JSONL.
Wave 3b mitigation (not a fix): no silent default
load_bbq_items()path; everystereotype_association_scoreis caveated as experimental and gates as illustrative. Real scoring remains this issue.
Impact
High. Duplicated artificial group tags force equality under replay. Gold correctness is not stereotype association. Attribution is present, but this is not a valid evaluation of the published benchmark.
Suggested fix (from review; not a design decision here)
Use genuine BBQ metadata/polarity and defined bias/accuracy statistics; stratify and balance sampling; count invalid answers separately; call original schema-only prompts a toy fixture.
Acceptance criteria
Default BBQ path uses genuine metadata/polarity (or is explicitly documented as a toy fixture, not the benchmark)
A model that always picks the stereotyped option does not score 0 with CI [0,0]
Invalid / unmatched answers are counted separately from gold-unknown
BL-009’s BBQ re-record remains a fixture-size/mix task; this item owns scoring and sampling construct
BL-022 — Lexical toxicity/sentiment/refusal is easy to defeat accidentally
Status: open. GitHub: JobCollins#32 · SvrusIO#32. Review severity: Major — RUN + READ. P1. Sibling of BL-011 (refusal vs scope disclaimer). Do not collapse. This item is the broader lexical-scorer defeatability across toxicity, sentiment, and refusal.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 10).
Evidence
Review evidence:
llm.logSource:
llm_evals/scoring.py:13–24,probes/counterfactual.py:186–200poorscores toxicity 1,poor.0;not poor0.5;not recommendscores positive sentiment +0.5;You are worthless and disgusting.scores toxicity 0.A helpful medical scope disclaimer scores refusal 1 (overlaps BL-011).
Impact
High. Punctuation and negation dominate the result; toxicity and refusal labels exceed what is measured. Unsuitable as a consequential gate.
Suggested fix (from review; not a design decision here)
Require a validated scorer for consequential gates and retain lexical scoring as an explicitly illustrative diagnostic.
Acceptance criteria
Docs and gate policy treat default lexical scores as illustrative, not as consequential evidence (coordinate with BL-017)
Punctuation/negation cases from the review are either scored under a documented lexical contract or rejected as out of scope for gates
A validated scorer, if added, has its own contract tests; lexical path remains explicitly named
BL-023 — “Counterfactual fairness” is a lexical perturbation diagnostic, not a causal fairness measure
Status: open. GitHub: JobCollins#33 · SvrusIO#33. Review severity: Major — READ + RUN. P1. Sibling of BL-012 (no-effect baseline for the distance statistic). Do not collapse. This item is the name/construct vs Kusner et al. causal criterion.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 11).
Evidence
Review evidence:
llm.logSource:
llm_evals/probes/counterfactual.py:186–224Features are token-set overlap, normalized length, a word-list sentiment score and phrase refusal.
Recorded expanded fixture: 0.195592 with CI [0.185068, 0.205139]; matched-control contrast: −0.056291 with CI crossing zero.
Current docs admit the nonzero baseline and name confounding.
Reviewer’s methodological judgment: neither string substitution nor a significant lexical distance establishes discriminatory decisions or the causal criterion in Counterfactual Fairness.
Impact
High (construct). The name implies more than lexical perturbation distance establishes.
Suggested fix (from review; not a design decision here)
Name the construct precisely and validate it against decision/task outcomes, human judgments and per-run controls.
Acceptance criteria
Public name and docs describe the implemented construct (lexical perturbation / matched-prompt distance), not demonstrated causal CF
BL-012 remains the no-effect-baseline contract for the numeric statistic
Any claim beyond lexical distance requires independent outcome/human validation; default fixtures cannot close that claim (review: What remains unverified)
BL-024 — Mitigation attribution is unsupported
Status: open. GitHub: JobCollins#34 · SvrusIO#34. Review severity: Major — RUN + READ. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 12;
Mitigation control details).
Evidence
Review evidence:
mitigation.log,mitigation-control.log,workflow.logSource:
pipeline/transformers/instance_reweighting.py:34–81InstanceReweighting.fitignores y and balances group frequency, not group-label cells.Balanced groups return all-one weights and an identical logistic model.
Fixed-threshold synthetic gains largely match a validation-tuned baseline threshold. Independent 6k/12k split, 15% minority: at threshold 0.5, weighting lowered EOD in all five seeds (~0.016–0.056) while accuracy fell ~0.069–0.081; at 0.3 and 0.7, weighting increased EOD in every seed. Unweighted threshold matched to weighted selection rate: test decisions agreed 98.48–99.86%; EOD differed by less than 0.004.
On COMPAS, reweighting plus reductions yields EOD 0.12105; reductions alone 0.10858 from the same 0.24431 baseline. Notebook 0.2083→0.0960 was not reproduced (library versions / randomized reductions not isolated).
README attribution to Instance Reweighting and the notebook’s group/label description are not supported by this implementation or ablation.
Impact
High. Users may credit the wrong component. One run does not establish that weighting always hurts; the paired ablation shows README attribution needs evidence beyond before/after measurements.
Suggested fix (from review; not a design decision here)
Separate population balancing from joint group-label reweighing; report ablations, held-out utility, fixed/tuned thresholds, constraints and seeds.
Acceptance criteria
InstanceReweightingis documented as implemented (group-frequency vs group-label cells); README/notebook do not describe the other algorithmAttributed gains require a component ablation (reweighting vs reductions vs threshold) on held-out data
Docs do not present a single before/after as evidence of the named transformer
BL-025 — Transformation semantics are unsuitable for ordinary held-out/deployment use
Status: closed (Wave 1f). GitHub: JobCollins#35 · SvrusIO#35. Review severity: Major — RUN + READ. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 13).
Evidence
Review evidence:
transform.logSource:
integration/orchestrator.py:442–443,pipeline/orchestration/engine.py:136Workflow calls
apply_pipelineon train and test; it callsfit_transformboth times.A quantile repair pool changes from [0,39] to [100,139].
The same test row maps to 0.5 in a batch and remains 100 alone at default minimum group size.
Impact
High. Test-set refitting changes preprocessing, while batch-dependent repairs change an individual’s features with batch composition. This is not conventional train-once inference.
Suggested fix (from review; not a design decision here)
Fit on training data only, retain the trained transformation and specify/test batch and single-row deployment semantics.
Acceptance criteria
Train/test workflow fits transformers on training data only
A held-out row’s transform is specified for batch vs single-row (and tested)
Quantile-repair (and similar) deployment semantics are documented, including minimum group size effects
Resolution (Wave 1f)
Transformers already separated
fit/transform; bug was plumbing plus DIR within-batch ranks and reweighing auto-refit on transform.apply_pipeline(..., fit=True|False); orchestrator fits train, transforms test.DIR uses fitted train group CDFs + pool (single-row == batch);
min_group_sizegated at fit. Reweighing/InstanceReweightingkeep train-sizedsample_weight_without refitting.Persistence: pickle/joblib the sklearn
Pipeline; no separate fairpipe API.
BL-026 — Statistical and compliance language overstates evidence
Status: open. GitHub: JobCollins#36 · SvrusIO#36. Review severity: Major — READ. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 14).
Evidence
Source:
pipeline/detectors/core.py:169,178— disparity detector flags every raw p<alpha; correction helpers exist but have no callers in package code.Review evidence: COMPAS cells (
compas_racial_bias-cells.txt), ACS cells (acs_employment-cells.txt)COMPAS calls a rate ratio “large by Cohen’s conventions”; ACS calls 0.05 a regulatory threshold.
Cohen’s d conventions do not classify a rate ratio.
NYC’s actual bias-audit rule specifies selection/scoring rates and impact ratios, not a universal EOD≤0.05 deployment test.
Impact
High (claim accuracy). Multiple feature flags need family-level handling. Engineering thresholds can be misread as legal requirements.
Suggested fix (from review; not a design decision here)
Wire corrections into scanning; label effect sizes correctly; distinguish chosen engineering thresholds from legal requirements.
Acceptance criteria
Multiple comparisons in the detector use a documented correction (or docs state that raw p<alpha flags are uncorrected)
Effect-size language matches the statistic (no Cohen-d label on a rate ratio)
Notebooks/docs distinguish chosen engineering thresholds from cited legal rules
BL-027 — Default backend behavior changes with environment
Status: open. GitHub: JobCollins#37 · SvrusIO#37. Review severity: Major — RUN + READ. P1.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 15).
Evidence
Review evidence:
calibration.logSource:
metrics/core.py:47–54,metrics/fairlearn_adapter.py:34–95Native gives EOD 0 on the missing-positive test; fairlearn backend gives NaN; after installing Fairlearn,
backend=Noneswitches to the latter.The Fairlearn adapter imports Fairlearn but manually computes these metrics.
Impact
High. Adding an optional dependency changes audit decisions. A backend name is not proof of delegated, independently validated computations. Coordinate EOD-on-missing-positive with BL-019.
Suggested fix (from review; not a design decision here)
Stabilize default semantics and run shared contract/oracle tests across adapters.
Acceptance criteria
Default backend does not silently change when an optional extra is installed (or the change is an explicit, documented opt-in)
Shared contract tests cover native vs fairlearn adapters on the missing-positive EOD case
Adapter names that do not delegate computation are documented as such
BL-028 — Sensitive-label dtype breaks ancillary results
Status: open. GitHub: JobCollins#38 · SvrusIO#38. Review severity: Minor — RUN. P2.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 16).
Evidence
Review evidence:
metrics.logNumeric groups produce a NaN effect size and empty-mean warnings; object-dtype numeric groups preserve the point value but return CI [NaN,NaN].
Impact
Medium. Equivalent group encodings should produce equivalent reports.
Suggested fix (from review; not a design decision here)
Keep original group keys for masks and stringify only for display.
Acceptance criteria
Numeric vs object-encoded equivalent group labels yield the same point, CI, and effect size (or a named error, not a silent NaN)
Empty-mean warnings are not the user-visible contract for this case
BL-029 — Install and engineering guarantees are weaker than the product framing
Status: open. GitHub: JobCollins#39 · SvrusIO#39. Review severity: Minor — RUN + READ. P2.
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 17).
Evidence
Review evidence:
tests.log,install.log,freeze.txt,environment.txt,pip-check.logMandatory MLflow contributes to a 756 MB environment (105 distributions on the review install).
Test subset passed 249 cases; bootstrap 93% line coverage misses incorrect intervals (BL-013).
BCa tests assert finite ordered floats, not numerical correctness:
tests/stats/test_bootstrap_comprehensive.py:182–191,303–317.CI declares an 85% full-suite coverage gate and a 3-OS/3-Python matrix; the review did not verify the whole matrix. Selected run: 47% whole-package coverage from the subset; six live tests deselected.
Impact
Medium (adoption cost and verification). Coverage is not correctness evidence; dependency cost expands for a basic metric calculation.
Suggested fix (from review; not a design decision here)
Make tracking optional; prioritize oracle/property/coverage tests; test the published artifact and supported dependency boundaries.
Acceptance criteria
Tracking/MLflow is optional for a metrics-only install (or the mandatory cost is an explicit documented product choice)
BCa/DPD tests include numerical oracles, not only finite-ordered-float checks (closes the test-gap half; BL-013/BL-014 own the math)
Published coverage claims match what the suite actually measures; the published wheel is in the test surface
BL-030 — Identity, typing and API contracts need consolidation
Status: open. GitHub: JobCollins#40 · SvrusIO#40.
Review severity: Minor — READ. P2.
Missing fairpipe.io also fails the quickstart (BL-018).
Where Discovered
Same review (docs/fairpipe-review.md, Findings ranked, row 18).
Evidence
READ: PyPI name
fairpipe; two import namespaces; supplied JobCollins repo; SvrusIO/fAIr metadata/docs;fairpipe.iois missing despite documentation.Versioning text promises within-major stability and also permits 0.x minor breaking changes.
349/435 definitions are fully annotated syntactically, including private functions; no
py.typedwas found and the inspected CI does not run mypy.Classifier
Resultlackscaveatdespite the LLM docs’ common-result claim.
Impact
Medium (discoverability / integration). Annotations are not a verified typed API. Pre-1.0 policy is ambiguous.
Suggested fix (from review; not a design decision here)
Publish one canonical identity/API map, accurate return contracts and an unambiguous pre-1.0 policy; check and distribute typing deliberately.
Acceptance criteria
One canonical package/import/docs identity map; documented modules exist (
fairpipe.ioimplemented or removed from docs — with BL-018)Versioning policy is a single rule for 0.x
If typing is advertised,
py.typedis shipped and CI checks the public APIClassifier and LLM result types match the documented common contract (
caveatpresent or the common-result claim is withdrawn)
BL-031 — BCa has no policy for NaN bootstrap replicates from analyzer stats
Status: closed (Wave 3a). Gap metrics refuse BCa when unsafe
(ci=None + ci_note); stats.bca_ci raises BootstrapUndefinedError.
BCa is deprecated for gap metrics. GitHub:
JobCollins#41 · SvrusIO#41.
Where Discovered
Wave 1b BCa units fix (branch fix/bl-013-bca-percentile-units), after Wave 1a
made analyzer statistics return nan for incomplete group membership in a
resample.
Evidence
Wave 1a:
dpd_stat_from_indices/ EOD / MAE helpers returnnanwhen any analysis group is absent from the index sample;_percentile_ciusesnp.nanpercentile.Wave 1b:
bca_ciscales quantiles withq * 100but still usesnp.percentileonboot_statsand computesz0/ jackknife assuming finite replicates. No fallback, filter, or refuse path when replicates arenan.
Impact
Medium–high for the opt-in BCa path. ci_method="bca" on analyzer metrics
can feed non-finite bootstrap replicates into bias/acceleration estimates with
no documented policy. Easy to forget once Wave 1b units look “fixed.”
Suggested directions (pick one; do not paper over)
Fall back to percentile when any replicate is non-finite
Drop non-finite replicates and recompute BCa only above a documented floor
Refuse BCa (raise / undefined CI) when the statistic can emit
nan
Acceptance criteria
Documented policy for non-finite replicates under
method="bca"Analyzer
ci_method="bca"regression covers at least one Wave 1a empty-groupnandrawz0/ jackknife are not silently computed on arrays containingnan
Implementation Order
Given the conference deadline (May 19) and the importance of a working end-to-end demo, the recommended implementation order is:
Order |
Issues |
Rationale |
|---|---|---|
1st |
BL-002 + BL-003 |
Fix together — same file, same function. Makes |
2nd |
BL-001 |
Adds |
3rd |
BL-005 |
Cleans up output. Low risk, high polish. |
Post-conference |
BL-004 |
Breaking API change. Needs deprecation cycle. Target v0.8.0. |
0.11.0 review — recommended order
From the review’s “Five changes most likely to increase adoption,” mapped onto BL-013–BL-030. Diagnoses and priorities only; no rewrite implied.
Order |
Issues |
Rationale |
|---|---|---|
1st |
BL-013, BL-014, BL-015, BL-016, BL-017, BL-019, BL-020 |
Trustworthy measurement contract: BCa, DPD inference, invalid labels/NaNs, LLM CI estimand, unified gates, excluded groups, index alignment. |
2nd |
BL-024, BL-025, BL-026 |
Honest mitigation: attribution/ablations, train-only transforms, effect-size and compliance language. |
3rd |
BL-018, BL-030 |
First 10 minutes from the wheel; canonical identity/API. |
4th |
BL-021, BL-022, BL-023 |
Narrow or validate LLM claims (BBQ, lexical scorers, CF name). Keep BL-009 / BL-011 / BL-012 as siblings. |
5th |
BL-027, BL-028, BL-029 |
Stable backends, dtype-robust reports, optional tracking, oracle tests, honest coverage. |
GitHub Issues
BL-013–BL-030 are filed on both
JobCollins/fairness_pipeline_dev_toolkit
and the SvrusIO/fAIr mirror (#23–#40 on each).
BL-031 (BCa NaN policy) is #41 on each.
BL-001 exists as closed #19 on origin only.
BL-002–BL-012 are not yet filed as GitHub issues.
Issue |
Labels |
GitHub |
|---|---|---|
BL-001 |
|
#19 (closed) |
BL-002 |
|
— |
BL-003 |
|
— |
BL-004 |
|
— |
BL-005 |
|
— |
BL-006 |
|
— |
BL-007 |
|
— |
BL-008 |
|
— |
BL-009 |
|
— |
BL-010 |
|
— |
BL-011 |
|
— |
BL-012 |
|
— |
BL-013 |
|
|
BL-014 |
|
|
BL-015 |
|
|
BL-016 |
|
|
BL-017 |
|
|
BL-018 |
|
|
BL-019 |
|
|
BL-020 |
|
|
BL-021 |
|
|
BL-022 |
|
|
BL-023 |
|
|
BL-024 |
|
|
BL-025 |
|
|
BL-026 |
|
|
BL-027 |
|
|
BL-028 |
|
|
BL-029 |
|
|
BL-030 |
|
|
BL-031 |
|
Not filed as numbered items
From the same review (docs/fairpipe-review.md). Recorded so
the ranked table is fully accounted for; these are not defects to open.
Review row |
Why not a BL item |
|---|---|
Verified strength — ordinary binary point metrics and scale |
Preserve as regression oracles under BL-013/BL-029 work; not a defect. Evidence: |
Verified strength — safe LLM replay and default call blocking |
Retain; extend caveat semantics via BL-017. Evidence: |
Required stress cases table |
Mapped into BL-015, BL-019, BL-020 rather than duplicated. Evidence: |
What remains unverified |
Review-scope gaps (full CI matrix, live provider quality, generalized mitigation ranking, etc.), not package findings. |
Document ID: BACKLOG-001 | Version: 1.1 | Created: 2026-05-13 | Updated: 2026-09-21 | Owner: Svrus LLC
BL-001–BL-006: COMPAS case study development, May 13, 2026. BL-007–BL-012: LLM evals phases. BL-013–BL-030: independent PyPI 0.11.0 production adoption review, September 21, 2026 (docs/fairpipe-review.md).