22
33Thank you for your interest in contributing.
44
5- TRACER is a routing library with formal parity guarantees, and those guarantees
6- only mean something if they hold up under measurement. So for anything that can
7- change routing behavior, the most useful thing you can bring is evidence. The
8- standards below exist to keep contributions focused and to make the best use of
9- your time and ours. None of this is meant to gatekeep good ideas. it's meant to
10- help us evaluate them fairly.
5+ TRACER builds task-specific classifiers: classical or
6+ shallow neural classifiers make direct fixed-label decisions, while a learned
7+ policy leaves other requests to the caller's teacher. The final check bounds
8+ teacher agreement under stated sampling assumptions. It does not guarantee
9+ ground-truth accuracy, per-request correctness or robustness to distribution
10+ shift. Contributions should preserve those distinctions and provide evidence
11+ for changes in behavior.
1112
1213## Contribution standards (read first)
1314
@@ -24,8 +25,8 @@ for us to act on when they come with numbers. Three guidelines follow from that.
2425
25262 . ** Changing a core parameter, threshold, or gate: bring an ablation.** The
2627 acceptor threshold, the parity gate, the calibration logic, the default
27- ` FitConfig ` values, and the split strategy are load-bearing for the parity
28- guarantee. A change to any of them is much easier to accept with before/after
28+ ` FitConfig ` values, and the split strategy determine the statistical contract.
29+ A change to any of them is much easier to accept with before/after
2930 numbers on the eval showing the frontier does not regress (and, ideally,
3031 improves). If you think a parameter should be user-tunable, the most
3132 convincing case is one where a different value measurably wins.
@@ -45,14 +46,23 @@ Run against a fixed, public eval so results are reproducible by a maintainer:
4546- Use a known dataset (the repo's test fixtures, or a public set such as
4647 Banking77) and a fixed ` seed ` .
4748- Report the metric that matters: ** coverage at the target teacher agreement**
48- (how much traffic the surrogate can take while holding parity), plus the
49- realized teacher agreement on a held-out split (not the calibration split).
49+ together with accepted counts, realized agreement, the final lower bound and
50+ confidence level. Use an untouched evaluation split, not the examples used
51+ for classifier/threshold selection. Where ground truth exists, report its
52+ accuracy separately, including per-class or worst-group behavior.
53+ - Measure full-path latency and cost when claiming efficiency: embeddings,
54+ student inference, teacher deferrals and relevant serving overhead. A gate's
55+ score is not a calibrated per-request correctness probability.
56+ - Separate sessions/workflows/time where the dataset permits; random row splits
57+ do not establish independence. Preserve historical benchmark results and label
58+ new results with their exact implementation and evaluation protocol.
5059- Compare against the current behavior on ` main ` , so the delta is clear.
5160- Include the exact command and config you ran so the numbers can be checked.
5261
53- If a change does not move the frontier (or regresses it), we'll usually hold
54- off on merging even when the code itself is clean, since the numbers are what
55- we're optimizing for.
62+ Performance proposals should show their tradeoff. Correctness fixes, truthful
63+ contracts and reproducible failure handling are valuable even when they reduce
64+ previously overstated coverage; they do not need an invented benchmark win.
65+ Never retune a policy against its final certification outcomes to make it pass.
5666
5767## Setup
5868
@@ -68,6 +78,8 @@ pip install -e ".[dev]"
6878## Running tests
6979
7080``` bash
81+ TOKENIZERS_PARALLELISM=false RAYON_NUM_THREADS=1 OMP_NUM_THREADS=1 \
82+ OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 VECLIB_MAXIMUM_THREADS=1 \
7183pytest tests/ -v
7284```
7385
@@ -97,6 +109,8 @@ src/tracer/
97109 types.py <- TraceRecord, QualitativeReport, ArtifactManifest, ...
98110 fit/
99111 pipeline.py <- global / L2D / RSB pipeline construction + calibration
112+ certification.py <- untouched final-policy teacher-agreement check
113+ ood.py <- distance guard, included in final serving check
100114 surrogate.py <- model zoo (LogReg, SGD, MLP, RF, ET, DT, GBT, XGB) + selection
101115 analysis/
102116 qualitative.py <- XAI report: slices, boundary pairs, examples, deltas
@@ -134,17 +148,30 @@ further. It's usually quick to run, and it's the thing that lets us say yes.
134148
135149## Changing the gate, calibration, or default config
136150
137- These are the parts that back the parity guarantee. A PR here must include an
138- ablation: the frontier on ` main ` versus the frontier with your change, on the
139- same eval and seed. State clearly which guarantee you are strengthening and
140- show it does not regress coverage or realized agreement.
151+ These parts define selection and final certification. Performance changes need
152+ an ablation on the same external evaluation and seed. Contract/correctness fixes
153+ need focused regressions that demonstrate the broken behavior and its repair.
154+ Verify that no final outcomes influence training, threshold selection, OOD
155+ fitting or retries. Keep no-policy results, exceptions and legacy-artifact
156+ behavior explicit; a completed failed check and a failed write are different.
141157
142158## Adding a new pipeline family
143159
144160Implement a ` build_<name>(split, target_ta) -> dict ` function in
145161` src/tracer/fit/pipeline.py ` following the same structure as ` build_global ` ,
146162` build_l2d ` , and ` build_rsb ` . Register it in the ` builders ` dict inside
147- ` fit_frontier ` . Include a benchmark showing where the new family wins.
163+ ` fit_frontier ` , preserving the builders' keyword options. Include a benchmark
164+ showing where the new family wins. The full selected policy, including residual
165+ stages and OOD checks, must receive the final check and match runtime behavior.
166+
167+ ## Documentation and integration boundaries
168+
169+ Check examples against current function signatures and saved artifact fields.
170+ The bundled HTTP server takes vectors and does not call teachers. Generic
171+ embedding/export adapters do not imply a turnkey provider integration or
172+ standards-compliant OTLP transport. The current package exposes Python APIs,
173+ not a packaged CLI; hosted catalogs, credentials and Echo wallets are separate.
174+ Document proposed features as proposals rather than existing OSS capabilities.
148175
149176## Submitting a PR
150177
0 commit comments