Scope Map
| Workload gap | Surface | Primary implementation | Public API |
|---|---|---|---|
| Induced-rule audit | Generated rule provenance | crates/xlog-induce/src/provenance.rs | InducedRuleProvenance, InductionProvenanceRegistry |
| Rule origin audit | Source/generated rule provenance | crates/xlog-logic/src/diagnostics.rs | xlog explain, CompiledLogicProgram.rule_provenance(), LogicRelationSession.rule_provenance(), CompiledProgram.rule_provenance() |
| Delta replay audit | Relation delta debug summaries | crates/xlog-gpu/src/logic.rs, crates/pyxlog/src/logic.rs | LogicRelationSession.apply_relation_delta_debug(...), delta_stats() |
| Temporal/source audit | Temporal relation metadata | crates/pyxlog/python/pyxlog/__init__.py | LogicRelationSession.put_temporal_relation(...), temporal_provenance(...) |
| Query proof audit | Direct query proof traces | crates/xlog-logic/src/diagnostics.rs | xlog explain, proof_traces() on deterministic and probabilistic pyxlog programs |
| Neural hot-loop audit | Unified nn/4 diagnostics | crates/pyxlog/src/program.rs | CompiledProgram.neural_hot_loop_diagnostics() |
| Biomedical graph ingestion audit | Native streamed biomedical graph rows | crates/xlog-gpu/src/biokg.rs | StreamingGraphRelationLoader, GraphInputFormat |
| Generated-rule row audit | Accepted/rejected row decisions | crates/xlog-cli/src/main.rs | xlog explain --format json generated_rule_diagnostics |
| Relation evidence audit | Session and relation provenance APIs | crates/pyxlog/python/pyxlog/__init__.py | put_relation_with_provenance(...), evidence(...), RelationEvidence.provenance() |
| Neural lineage audit | Checkpoint/split/calibration/influence metadata | crates/pyxlog/python/pyxlog/__init__.py | register_network(...checkpoint_hash=...), nn4_lineage(), record_nn4_influence(...) |
| Delta planner audit | Cache/fallback/speedup telemetry | crates/xlog-gpu/src/logic.rs, crates/pyxlog/src/logic.rs | DeltaPlannerTelemetry, delta_stats()["planner_telemetry"] |
| Validation staging audit | Promote-only-on-PASS evidence staging | scripts/validation_staging.py | ValidationStagingRun |
Rule And Proof Diagnostics
xlog_logic::diagnostics is the shared source of truth for rule provenance and
query proof traces. It exports:
xlog explain. Text output prints compact
rule_provenance: and proof_traces: sections. JSON output emits full
rule_provenance and proof_traces arrays with stable snake-case keys.
For generated-rule candidates, JSON output also emits
generated_rule_diagnostics. Each entry includes row_decisions with:
row_keyacceptedfailed_predicatesthreshold_comparisonswith left/right values and pass/fail statusaggregate_inputs
xlog explain --format json resolves xlog_hypothesis_execution.json, reads
relation_input_columns plus relation_input_path, binds those rows to the
candidate input atom, and computes threshold decisions inside the CLI report
rather than relying on Python-only rejection sidecars.
pyxlog exposes the same records as Python dictionaries on:
CompiledLogicProgram.rule_provenance()and.proof_traces()LogicRelationSession.rule_provenance()and.proof_traces()CompiledProgram.rule_provenance()and.proof_traces()
Induction Provenance
xlog-induce has first-class provenance records for generated/mined rules:
InductionSupportRow keeps the relation name, row offset, and caller-supplied
row hash for retained positive support. InductionAlternative keeps the
candidate rule source, support count, and falsification count for rejected
alternatives. InductionProvenanceRegistry is an in-memory registration surface
for callers that promote generated rules and need to retain their audit records.
This does not replace the bounded exact-induction scorer. It adds the missing
audit layer for selected generated rules and their alternatives.
Biomedical Graph Streaming
xlog_gpu::biokg provides the native ingestion surface for large typed
biomedical graph streams:
relation_histogram, split provenance
through split_histogram, stable row_hashes, and bounded_memory chunk
telemetry. load_path_with_sink(...) emits typed edge rows without retaining the
full graph in memory; load_path(...) returns telemetry when the caller only
needs provenance and histograms.
Relation Delta Debugging
LogicDeltaReport carries the names of changed relations and a metadata-only
trace:
LogicRelationSession.apply_relation_delta_debug(updates, check_equivalence=False).
When check_equivalence=True, pyxlog re-runs a full recompute and compares query
stores through LogicProgram::relation_stores_query_equivalent(...); the returned
dictionary then sets equivalent_to_full_recompute to True or False. The
default is False because the equivalence check intentionally costs an extra
full evaluation.
Relation callbacks receive the same changed-relation names and debug trace inside
their metadata payload. The callback path remains metadata-only.
The nested planner_telemetry dictionary is the delta planner audit surface: it
reports affected SCCs, cache reuse, fallback decision, estimated/measured delta
speedup when available, and planner advice for incremental-vs-full recompute
tradeoffs.
Temporal Relation Metadata
LogicRelationSession.put_temporal_relation(...) wraps put_relation(...) and
stores temporal/source metadata beside the session id:
session.temporal_provenance() returns all stored records. Passing a relation
name returns only that relation’s metadata. The store is session-local and
in-memory; it is an audit companion for the relation store, not a persistence
format.
The general pyxlog evidence API is separate from temporal metadata:
Session.evidence() includes a program_hash and per-relation evidence.
RelationEvidence.provenance() exposes relation schema, source hashes, row
hashes, accepted/rejected counts, output hashes, and decision counts.
Neural Hot-Loop Diagnostics
CompiledProgram.neural_hot_loop_diagnostics() returns one dictionary for the
nn/4 hot loop:
post_load_dtoh_bytes,post_load_htod_bytes,post_load_dtoh_calls,post_load_htod_callscontrol_plane_bytes_per_iterationandcontrol_plane_statusscalar_sync_checksandscalar_sync_status- nested
cuda_graphcounters - nested
circuit_cachecounters
None and the matching status field explains that the counter is
unavailable. Unsupported probes must not be reported as fake zeroes.
The nn/4 lineage companion is exposed by the top-level pyxlog wrapper:
Validation Staging
scripts.validation_staging.ValidationStagingRun is the repo-level staging
helper for long-running evidence jobs. Writers put summaries and artifacts under
a fresh staging directory; promote_if_pass({"status": "PASS"}) copies staged
artifacts into the canonical evidence directory. Failed or canceled runs append
validation_events.jsonl records and leave canonical evidence untouched.
Verification
The diagnostics verification checks cover:- Python source tests for delta source behavior, delta coalescing, relation
callbacks, living-world source diagnostics, pyxlog evidence APIs,
nn/4training lineage, and validation staging; - CLI tests for explain output and generated-rule diagnostics;
- GPU tests for biomedical graph streaming and relation-delta planner telemetry;
- xlog-induce tests;
- pyxlog extension-crate checks with
extension-module,host-io; - git whitespace checks.
cargo test -p pyxlog --lib is not the gate for this cdylib extension crate in
this workspace because direct Rust test linking does not provide the Python
symbols required by PyO3. Use the pyxlog cargo check gate plus the Python
source tests for this surface.