Skip to content

chore(audit): clear lib+test warnings, fix prober dispatch bug, sync GraphQL ProverKind#41

Merged
hyperpolymath merged 1 commit intomainfrom
claude/audit-and-test-systems-G3K5K
May 2, 2026
Merged

chore(audit): clear lib+test warnings, fix prober dispatch bug, sync GraphQL ProverKind#41
hyperpolymath merged 1 commit intomainfrom
claude/audit-and-test-systems-G3K5K

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Cargo --lib --tests and cargo clippy --lib --tests now run clean (0
warnings, 0 errors). 1460 unit + integration tests pass.

Real bugs found and fixed:

  • provers::mod::from_str: "prob" alias was double-claimed. Line 525
    routes it to ProverKind::ProB (B-method model checker); a later arm
    also tried to claim it for ProverKind::ProbabilisticTypeChecker
    (unreachable). Removed the dead alias — prob-types and
    probabilistic still reach the type-checker.
  • gnn::fallback_monitor::record_fallback: comment claimed
    "exponential moving average" with an unused ema_weight = 0.2 local,
    but the formula is a cumulative arithmetic mean (and tests assert
    cumulative-mean values). Updated the comment to reflect actual
    behaviour and dropped the dead variable; SLA semantics unchanged.
  • dispatch::cross_check_dispatch: the cross-checker filter held the
    health_status MutexGuard across an await (clippy
    await_holding_lock). Restructured into an explicit scope so the
    guard is released before any await.
  • GraphQL workspace member did not compile: cargo check -p echidna-graphql reported 28 missing ProverKind variants. Synced
    schema.rs enum + core_to_gql + gql_to_core, resolvers.rs
    ProverKindExt::{from_core,to_core}, and ffi_wrapper.rs ordinals
    113-140 with the core enum. (Mizar/MizAR are intentionally distinct.)

Compliance fix:

  • deno.json license was MIT OR AGPL-3.0-or-later — project policy
    per CLAUDE.md is PMPL-1.0-or-later (explicitly "not AGPL").

Diagnostics fields preserved as ML acronyms:

  • ModelHealth.{last_validation_nDCG, last_validation_MRR, nDCG_meets_threshold} and GnnTrainingMetrics.{nDCG, MRR} now
    carry an #[allow(non_snake_case)] with a comment explaining that
    these field names match the JSON keys emitted by the Julia training
    pipeline (src/julia/train_and_evaluate.jl). Renaming would have
    silently broken the cross-language contract.

Resilience accessors:

  • Exposed CircuitBreaker::name(&self) -> &str and
    Bulkhead::config(&self) -> &BulkheadConfig so the previously
    dead-but-stored fields are usable for diagnostics output.

Remaining clippy items (mechanical): unused imports, doc list
indentation, a few field_reassign_with_default cases (kept as-is
with #[allow(...)] where the alternative is uglier), and type
aliases for two complex closure-box types.

Out of scope (left untouched): pre-existing cargo fmt drift across
~820 files, cargo test --workspace requires protoc (gRPC build),
docs/* license-string drift in historical release notes, ROADMAP-
acknowledged ReScript→AffineScript migration.

https://claude.ai/code/session_01F6HnUof5QEwmf9nzbM8nc8

…GraphQL ProverKind

Cargo `--lib --tests` and `cargo clippy --lib --tests` now run clean (0
warnings, 0 errors). 1460 unit + integration tests pass.

Real bugs found and fixed:

* `provers::mod::from_str`: `"prob"` alias was double-claimed. Line 525
  routes it to `ProverKind::ProB` (B-method model checker); a later arm
  also tried to claim it for `ProverKind::ProbabilisticTypeChecker`
  (unreachable). Removed the dead alias — `prob-types` and
  `probabilistic` still reach the type-checker.
* `gnn::fallback_monitor::record_fallback`: comment claimed
  "exponential moving average" with an unused `ema_weight = 0.2` local,
  but the formula is a cumulative arithmetic mean (and tests assert
  cumulative-mean values). Updated the comment to reflect actual
  behaviour and dropped the dead variable; SLA semantics unchanged.
* `dispatch::cross_check_dispatch`: the cross-checker filter held the
  `health_status` `MutexGuard` across an `await` (clippy
  `await_holding_lock`). Restructured into an explicit scope so the
  guard is released before any await.
* GraphQL workspace member did not compile: `cargo check -p
  echidna-graphql` reported 28 missing `ProverKind` variants. Synced
  `schema.rs` enum + `core_to_gql` + `gql_to_core`, `resolvers.rs`
  `ProverKindExt::{from_core,to_core}`, and `ffi_wrapper.rs` ordinals
  113-140 with the core enum. (Mizar/MizAR are intentionally distinct.)

Compliance fix:

* `deno.json` license was `MIT OR AGPL-3.0-or-later` — project policy
  per CLAUDE.md is `PMPL-1.0-or-later` (explicitly "not AGPL").

Diagnostics fields preserved as ML acronyms:

* `ModelHealth.{last_validation_nDCG, last_validation_MRR,
  nDCG_meets_threshold}` and `GnnTrainingMetrics.{nDCG, MRR}` now
  carry an `#[allow(non_snake_case)]` with a comment explaining that
  these field names match the JSON keys emitted by the Julia training
  pipeline (`src/julia/train_and_evaluate.jl`). Renaming would have
  silently broken the cross-language contract.

Resilience accessors:

* Exposed `CircuitBreaker::name(&self) -> &str` and
  `Bulkhead::config(&self) -> &BulkheadConfig` so the previously
  dead-but-stored fields are usable for diagnostics output.

Remaining clippy items (mechanical): unused imports, doc list
indentation, a few `field_reassign_with_default` cases (kept as-is
with `#[allow(...)]` where the alternative is uglier), and type
aliases for two complex closure-box types.

Out of scope (left untouched): pre-existing `cargo fmt` drift across
~820 files, `cargo test --workspace` requires `protoc` (gRPC build),
docs/* license-string drift in historical release notes, ROADMAP-
acknowledged ReScript→AffineScript migration.

https://claude.ai/code/session_01F6HnUof5QEwmf9nzbM8nc8
@hyperpolymath hyperpolymath merged commit 41c6f00 into main May 2, 2026
32 of 48 checks passed
@hyperpolymath hyperpolymath deleted the claude/audit-and-test-systems-G3K5K branch May 2, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants