rename LightMeter → hdr::Cascade (SESSION_B_HDR_RENAME)#10
Merged
Conversation
- git mv light_meter.rs → hdr.rs - mod.rs: pub mod light_meter → pub mod hdr - LightMeter → Cascade (all 21 occurrences) - cascade_query() → query() - Add expose() and test_distance() thin wrappers - Update hdr_proof.rs references - Fix clippy: add is_empty(), use is_multiple_of() 435 tests pass, clippy clean. https://claude.ai/code/session_01Mcj8GxEtzmVba6RmuT7AjD
AdaWorldAPI
pushed a commit
that referenced
this pull request
Apr 21, 2026
… construction)
Applies the CODING_PRACTICES "builder is the only path" principle at
the type-system level. Ten key Wire DTOs now forbid raw struct-literal
construction from external crates:
WireCalibrateRequest WireSweepGrid
WireCalibrateResponse WireSweepRequest
WireCodecParams WireSweepResult
WireTensorView WireSweepResponse
WireTokenAgreement WireTokenAgreementResult
External callers (hypothetical downstream consumer crates) are now
forced through one of these paths to construct these types:
1. serde deserialize — JSON/YAML at REST/gRPC ingress (the intended
path per Rule F "serialise once at edges only")
2. TryFrom<WireCodecParams> for CodecParams — the shipped validated
conversion that runs precision-ladder + overfit guard
3. Future Builder::build() if one is added for a specific DTO
Internal construction (tests in wire.rs, grpc.rs conversion code,
serve.rs handler body) is UNAFFECTED — #[non_exhaustive] only
gates external-crate callers. Same-crate code retains struct-literal
access.
Why this matters in practice:
- `WireCodecParams { subspaces: 6, centroids: 0, ... }` compiled
today (skipping the ZeroDimension guard). External users can now
only get a CodecParams through the TryFrom conversion, which
runs the full validation chain at ingress.
- Future new fields on these DTOs won't break external callers
(they were already non-exhaustive-forbidden from raw struct
literals), so downstream rebuilds don't need coordinated updates.
- The "object does the work" principle now has teeth — the type
system enforces what the docs say.
Test Plan:
- cargo test --features lab --lib: 118/118 pass (unchanged)
- cargo clippy --features lab -- -D warnings: CLEAN
- No internal construction path broken (tests + grpc.rs +
serve.rs handler all inside the crate)
Also in this commit (cherry-picked from orphan branch state that was
not in the #239 merge):
- scripts/codec_sweep.sh: Codex P2 fix — stub honesty check now
exits 3 on missing/false flag instead of just logging. Script
actually enforces the anti-#219 safeguard it documents.
- CODING_PRACTICES.md: polyfill chain diagram + mandatory cargo
clippy + feature-matrix discipline section (~131 LOC).
Cross-ref: CODING_PRACTICES.md anti-pattern #10 "Raw struct literals
bypassing builders"; session epiphany "the object does the work";
Codex P2 review 2026-04-21 on the stub honesty script.
https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
5 tasks
AdaWorldAPI
added a commit
that referenced
this pull request
May 6, 2026
…ITICAL fixes required) Meta-1 review surfaces 10 findings; 2 CRITICAL fixes block Round 2 opening: CRITICAL #1: Doctor.Anamnese Full predicate-write violates BMV-Ä §57 append-only → fix: empty writable_predicates, keep only "append" action CRITICAL #2: Receptionist clinical-blind fails safety (no Identity-read for allergy/triage lookup before scheduling) → fix: merge Patient permission to Detail-depth + 3 demographic writes, add Identity-read on Diagnosis + LabResult HIGH #3-#4 (defer to Round 3 gate.rs): Diagnosis finalize/retract Escalate + Patient anonymize/merge/delete Escalate (GDPR Art.17 + §35 BDSG) MEDIUM #5-#8 (backlog): Missing entities (Termin, Recall, ePA) + audit trail hook LOW #9-#10 (backlog): PKV/GKV modulation + dynamic reason strings Round 2 implications surfaced for W5/W8. Round 3 implications surfaced for W9/W12 (Escalate wrapping + §73 SGB V test). Concrete diff for W3-revision-2 included at end of file. Next commit: W3-revision-2 applies the two CRITICAL fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
435 tests pass, clippy clean.
https://claude.ai/code/session_01Mcj8GxEtzmVba6RmuT7AjD