Skip to main content

Crate fp_conformance

Crate fp_conformance 

Source
Expand description

Conformance harness for frankenpandas — mechanically verifies that frankenpandas matches pandas behavior across the supported API surface, by running parallel computations and diffing results.

§Architecture

Conformance verification uses two complementary modes:

  • Live oracle: spawn a Python subprocess running real pandas, feed it the same inputs as frankenpandas, then diff the outputs. Picks up version drift and the “everything pandas exposes” surface area without authors having to encode each contract by hand.
  • Fixture replay: load packet fixtures (DataFrame / Series inputs + expected outputs captured from a known-good reference run) and compare frankenpandas’s output to the captured expectation. Fast, deterministic, runs in CI without needing a Python install.

OracleMode selects between the two; the harness falls back to fixture mode when the live oracle isn’t reachable so the CI build still produces a green/red signal.

§Top-level entry points

  • HarnessConfig: harness setup — fixture-dir paths, oracle mode, suite-level options.
  • run_smoke: smoke-test entry point. Runs the smallest-possible packet set against both modes and emits a HarnessReport.
  • HarnessReport: aggregated suite verdict with per-case CaseResult entries.
  • SuiteOptions: per-suite knobs (parallelism, timeout, continue-on-fail vs fail-fast).

§Fixture format

Packet fixtures encode “operation X on inputs Y produces output Z” in a shape both modes can consume:

§Case verdicts

Per-case results carry rich diagnostic detail so failures map cleanly back to the offending input shape:

  • CaseResult: one operation’s verdict.
  • CaseStatus: pass / fail / xfail / skip.
  • DriftLevel: how big the divergence was (within-tolerance, numeric drift, structural mismatch).
  • ComparisonCategory: what the diff bucket was (dtype / value / index / column-order / metadata).
  • RequirementLevel: MUST / SHOULD / MAY tagging for the coverage matrix output (matches the testing-conformance-harnesses skill’s classification).

§Cross-crate relationships

Built on top of fp-frame, fp-io, fp-join, fp-groupby, fp-expr. Forwards the asupersync cargo feature down to fp-runtime. Test-only — no production callers should depend on this crate.

Structs§

ArtifactId
Deterministic artifact identifier for cross-referencing forensic artifacts.
AsupersyncCodecEvidence
CaseEvidenceEntry
CaseResult
CategoryCount
Per-category drift count in a summary.
CiForensicsReport
Machine-readable CI forensic report for G1..G8 gate failures.
CiGateForensicsEntry
Gate-level forensic result with stable identifiers and replay metadata.
CiGateResult
Result of a single CI gate evaluation.
CiPipelineConfig
Configuration for a CI pipeline run.
CiPipelineResult
Result of a full CI gate pipeline run.
CompatClosureAttestationSummary
CompatClosureCaseLog
CompatClosureCoverageReport
CompatClosureE2eScenarioReport
CompatClosureE2eScenarioStep
CompatClosureFinalEvidencePack
CompatClosureFinalEvidencePacket
CompatClosureFinalEvidencePaths
CompatClosureMigrationManifest
CompatClosureReproducibilityLedger
DecodeProofArtifact
Typed decode proof artifact matching decode_proof_artifact.schema.json.
DifferentialReport
Differential report: extends PacketParityReport with structured drift details.
DifferentialResult
Full differential comparison result for a single fixture case.
DifferentialValidationLogEntry
DriftRecord
A single drift observation from a differential comparison.
DriftSummary
Aggregate drift statistics across all differential results.
E2eConfig
Configuration for the E2E orchestrator.
E2eReport
Final result of an E2E orchestration run.
FailureDigest
A concise failure summary for a single test case.
FailureForensicsReport
Human-readable failure report for an E2E run.
FailureSurfaceEntry
Machine-readable per-case failure surface for packet/e2e assertion output.
FaultInjectionValidationEntry
FaultInjectionValidationReport
FixtureCategoricalColumn
FixtureColumnAssignment
FixtureColumnRename
FixtureDataFrame
FixtureExpectedAlignment
FixtureExpectedDataFrame
FixtureExpectedJoin
FixtureExpectedSeries
FixtureGenerationRequest
FixtureMultiIndex
FixtureProvenance
FixtureSeries
ForensicEvent
A single forensic log entry with timestamp.
ForensicLog
Accumulator for forensic events during an E2E run.
GeneratedFixtureBundle
HarnessConfig
HarnessReport
LiveOracleReport
Aggregate outcome for the dedicated live-oracle parity test slice.
NoopHooks
Default no-op hooks.
PacketDriftHistoryEntry
PacketFixture
PacketGateResult
PacketParityReport
RaptorQPacketRecord
RaptorQScrubReport
RaptorQSidecarArtifact
SidecarIntegrityResult
Result of verifying a single packet’s RaptorQ sidecar integrity (Rule T5).
SuiteOptions
WrittenPacketArtifacts

Enums§

CaseStatus
CiGate
CI gate identifiers matching the G1..G8 pipeline from COVERAGE_FLAKE_BUDGETS.md.
ComparisonCategory
Comparison dimension in the differential taxonomy.
CompatClosureScenarioKind
DecodeProofStatus
Outcome of a decode drill.
DriftLevel
Drift severity classification following frankenlibc fail-closed doctrine.
FaultInjectionClassification
FixtureJoinType
FixtureOperation
FixtureOracleSource
ForensicEventKind
Forensic event kinds emitted during E2E orchestration.
HarnessError
OracleMode
RequirementLevel
Per-fixture conformance requirement level, mirroring RFC 2119 conventions (MUST / SHOULD / MAY).

Traits§

LifecycleHooks
Lifecycle hooks for E2E orchestration. Default implementations are no-ops.

Functions§

append_phase2c_drift_history
build_case_evidence_entries
build_case_evidence_entries_for_report
build_ci_forensics_report
Build a deterministic, machine-readable forensic report from a CI pipeline run.
build_compat_closure_coverage_report
build_compat_closure_e2e_scenario_report
build_compat_closure_final_evidence_pack
build_differential_report
Build a DifferentialReport from pre-computed DifferentialResults.
build_differential_validation_log
build_failure_forensics
Build a failure forensics report from an E2E report.
build_failure_surface_entries
build_failure_surface_entries_for_report
enforce_packet_gates
evaluate_ci_gate
Evaluate a single CI gate using Rust-native checks where possible.
evaluate_parity_gate
fuzz_column_arith_bytes
Structure-aware fuzz entrypoint for Column::binary_numeric() invariants.
fuzz_common_dtype_bytes
Structure-aware fuzz entrypoint for the fp-types common-dtype lattice.
fuzz_csv_parse_bytes
Structure-aware fuzz entrypoint for the fp-io CSV reader.
fuzz_dataframe_eval_bytes
Structure-aware fuzz entrypoint for DataFrame.eval(...).
fuzz_dataframe_from_dict_bytes
Structure-aware fuzz entrypoint for DataFrame::from_dict(...).
fuzz_dataframe_from_records_bytes
Structure-aware fuzz entrypoint for DataFrame::from_records(...).
fuzz_dataframe_from_series_bytes
Structure-aware fuzz entrypoint for DataFrame::from_series(...).
fuzz_dataframe_merge_bytes
Structure-aware fuzz entrypoint for merge_dataframes(...).
fuzz_dataframe_op_chain_bytes
Stateful fuzz entrypoint: apply a sequence of DataFrame operations.
fuzz_excel_io_bytes
Structure-aware fuzz entrypoint for the fp-io Excel reader.
fuzz_feather_io_bytes
Structure-aware fuzz entrypoint for the fp-io Feather reader.
fuzz_fixture_parse_bytes
Structure-aware fuzz entrypoint for the PacketFixture JSON boundary.
fuzz_format_cross_round_trip_bytes
Structure-aware fuzz entrypoint for cross-format Arrow-backed IO parity.
fuzz_groupby_agg_bytes
Structure-aware fuzz entrypoint for DataFrameGroupBy aggregation dispatch.
fuzz_groupby_sum_bytes
Structure-aware fuzz entrypoint for groupby_sum() invariants.
fuzz_index_align_bytes
Structure-aware fuzz entrypoint for fp-index outer alignment semantics.
fuzz_ipc_stream_io_bytes
Structure-aware fuzz entrypoint for the fp-io Arrow IPC stream reader.
fuzz_join_series_bytes
Structure-aware fuzz entrypoint for join_series() invariants.
fuzz_json_io_bytes
Structure-aware fuzz entrypoint for the fp-io JSON and JSONL readers.
fuzz_parallel_dataframe_bytes
Concurrency-oriented fuzz entrypoint: exercise an Arc<DataFrame> shared across multiple reader threads.
fuzz_parquet_io_bytes
Structure-aware fuzz entrypoint for the fp-io Parquet reader.
fuzz_parse_expr_bytes
Structure-aware fuzz entrypoint for fp_expr::parse_expr(...).
fuzz_pivot_table_bytes
Structure-aware fuzz entrypoint for DataFrame::pivot_table(...).
fuzz_query_str_bytes
Structure-aware fuzz entrypoint for fp_expr::query_str(...).
fuzz_query_str_with_locals_bytes
Structure-aware fuzz entrypoint for fp_expr::query_str_with_locals(...).
fuzz_read_sql_bytes
Structure-aware fuzz entrypoint for SQL read APIs against an in-memory SQLite connection.
fuzz_rolling_window_bytes
Structure-aware fuzz entrypoint for Series::rolling(window, min_periods).
fuzz_scalar_cast_bytes
Structure-aware fuzz entrypoint for fp-types scalar casting semantics.
fuzz_semantic_eq_bytes
Structure-aware fuzz entrypoint for Scalar::semantic_eq(...) invariants.
fuzz_series_add_bytes
Structure-aware fuzz entrypoint for Series::add() alignment semantics.
generate_fixture_pilot_bundle
generate_raptorq_sidecar
optional_index_label_to_scalar
run_ci_pipeline
Run the full CI gate pipeline with fail-fast and forensics.
run_differential_by_id
Run a differential suite filtered by packet ID.
run_differential_suite
Run a differential suite over all matching fixtures with taxonomy-based comparison.
run_e2e_suite
Run the full E2E orchestration pipeline with lifecycle hooks and forensic logging.
run_fault_injection_validation_by_id
run_packet_by_id
run_packet_suite
run_packet_suite_with_options
run_packets_grouped
run_raptorq_decode_recovery_drill
run_smoke
verify_all_sidecars_ci
CI gate function: verify all packet sidecars under an artifact root directory. Returns Ok with results if all pass, Err with failures if any fail.
verify_packet_sidecar_integrity
Verify Rule T5 for a single packet directory: parity_report.json must have a corresponding raptorq sidecar and decode proof with matching hashes.
verify_raptorq_sidecar
write_case_evidence_jsonl
write_compat_closure_e2e_scenario_report
write_compat_closure_final_evidence_pack
write_differential_validation_log
write_failure_surface_jsonl
write_fault_injection_validation_report
write_grouped_artifacts
write_packet_artifacts