feat(estimator): refuse a checkpoint as the CPU f64 estimator - #140
Conversation
Keep support, contradiction, summary, and outcome_of out of the forward-transition vocabulary. Recovered kinds beat a collapse-to-support baseline with a computed match rate (ADR 0002/0003).
A model checkpoint remains an untrusted run artifact (ADR 0001/0014). It cannot replace the reference estimator or promote a scientific claim. Recovery is the computed share of artifact roles that match known truth versus collapsing every artifact to the estimator.
|
Warning Review limit reachedNext included review available in 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (24)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # CHANGELOG.md
|
Current head |
# Conflicts: # CHANGELOG.md
|
Current-head validation update (ce1879f): fixed the quality contract to derive the Rust crate count from scripts/check_workspace_contract.py instead of hard-coding 10. Local evidence: 89 quality tests passed; coverage 100% (991/991 statements, 442/442 branches); workspace, docstring, documentation, and diff checks passed. Please review and rerun Checks against this exact head; merge remains subject to the repository's two independent approvals and protected rules. |
…rity' into review/pr130-current # Conflicts: # ARCHITECTURE.md # CHANGELOG.md # Cargo.toml # docs/adr/README.md # scripts/check_workspace_contract.py # tests/quality/test_check_docstrings.py
|
Fixed the stale rename references at exact head Local evidence: checkpoint_authority tests (7 passed), fmt, clippy, documentation validation, workspace contract, Rust docstring contract, and diff checks passed. Exact-head GitHub checks are re-running after this push. |
|
@opencode-agent @cwl-noema-review Review-only request for exact current head `b321a315367016d2c844ab3056c7f7dc03f8fde8`. Re-review CPU f64 estimator versus checkpoint refusal, parameter-recovery tests, temporal/multilevel scientific semantics, docs/APA traceability, and protected-merge requirements. Do not merge or enable auto-merge. |
|
Queued @cwl-noema-review and @opencode-agent for PR #140 at head |
|
Current-head review refresh for b321a31:
|
|
Rebased current head 4feb427 onto origin/main. The changelog and ADR conflicts were resolved by retaining both feature and current-main decisions; inherited documentation trailing whitespace was removed. Local merge-tree, git diff --cached --check, and cargo fmt --all -- --check pass. Exact-head hosted checks and required independent approvals remain required before protected merge. |
|
Current-head disposition for the Devin findings on ec27241: these findings are resolved in the existing descendant commit b321a31, included in exact current HEAD 4feb427. The workspace, README, validation ledger, TRACEABILITY, ADRs, research register, and checkpoint documentation now consistently use checkpoint_authority; repository-wide search finds no support_edge reference. No duplicate patch is needed. Please refresh independent review for 4feb427 only; no approval or merge bypass is being issued. |
|
Current-head review request: exact head |
Maintainer exact-head disposition
|
…mator-authority # Conflicts: # CHANGELOG.md # docs/TRACEABILITY.md
| fn validate_sha256_hex(digest: &str) -> Result<(), CheckpointAuthorityError> { | ||
| if digest.is_empty() { | ||
| return Err(CheckpointAuthorityError::MissingDigest); | ||
| } | ||
| if digest.len() != 64 | ||
| || !digest | ||
| .bytes() | ||
| .all(|byte| byte.is_ascii_hexdigit() && !byte.is_ascii_uppercase()) | ||
| { | ||
| return Err(CheckpointAuthorityError::InvalidDigest); | ||
| } | ||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
📝 Info: checkpoint_authority estimator/recovery logic reviewed as correct
Reviewed authority.rs: refuse_checkpoint_as_estimator, accept_checkpoint_artifact, validate_sha256_hex (correctly rejects non-64-length, non-hex, and uppercase hex digests), and authority_recovery_rate (fails closed on empty/length-mismatch, computes matches/len). No logic errors found. The new crate satisfies the workspace contract checks in check_workspace_contract.py (name, publish=false, workspace lints, inherited fields, lib.rs docs/forbid/deny, crate_contract.rs test present).
Was this helpful? React with 👍 or 👎 to provide feedback.
| crate_roots = sorted(REPOSITORY_ROOT.glob("crates/*/src/lib.rs")) | ||
| self.assertEqual(len(crate_roots), 10) | ||
| self.assertEqual(len(crate_roots), len(workspace_contract.EXPECTED_CRATES)) |
There was a problem hiding this comment.
📝 Info: Docstring-count test now derives crate count from shared constant
test_check_docstrings.py replaced the hard-coded 10 with len(workspace_contract.EXPECTED_CRATES), which now resolves to 11 after adding checkpoint_authority. This keeps the assertion in sync with the workspace crate list automatically, avoiding a future stale-magic-number mismatch. Consistent with the Cargo.toml members and default-members updates. Not a bug.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
ADR 0001/0014 remaining buyer-visible scientific-authority increment: a model checkpoint is not the CPU
f64estimator. No new migration (0008stays unallocated; #113 remains the entity/project SQL vehicle).refuse_checkpoint_as_estimatorfails closed when amodel_checkpointis treated ascpu_f64_estimator.accept_checkpoint_artifactrequires identity, model-run provenance, and canonical lowercase hexSHA-256; success does not grant estimator authority.Test plan
checkpoint_authority_contractfailed to compile (E0432) before the module existedcargo test -p checkpoint_authority --offline(lib + 5 contract tests)cargo clippy -p checkpoint_authority --all-targets --offline -- -D warningspython3 scripts/check_docstrings.py/check_workspace_contract.py/validate_documentation.pycargo test --workspace --offline --lib --testsDo not self-approve or merge until exact-head required checks and a qualifying independent review pass. Keep this PR a draft. Do not empty-commit #46.