Commit 04712d4
committed
grpc: saturate wire rung before narrowing (codex P2 #626) + repair pre-existing lab-feature breakage
codex P2: DispatchRequest.rung is a proto uint32; 'as u8' truncation made
256 wrap to Surface (the shallowest depth) where the pre-dedup match
saturated any out-of-range value to Transcendent. Fixed via
rung_from_wire_u32 (u8::try_from().unwrap_or(u8::MAX) -> from_u8) +
regression test covering the exact wrap cases (256, 257, u32::MAX).
wire.rs is unaffected (its rung field is already u8).
Verifying the fix required repairing pre-existing --features grpc
breakage (broken on the merge-base too, verified by stash-check):
- wire.rs + grpc.rs ShaderDispatch initializers missing the Pillar-7
merge_override / alpha_saturation_override fields -> None defaults
(the wire DTO / proto do not carry them).
- cypher_bridge.rs tests calling ContextChain::new(8) against the
contract's zero-arg new().
Lab-feature suite now green: 186 lib tests incl. the new saturation
test; default suite still 100/100.
CodeRabbit (2 findings): plan 'Option C' label corrected to 'the dated
ADDENDUM strengthening Option B' (the issue defines only A/B). The
ISSUES.md rewrite request is declined on-thread: board files are
append-only ledgers — corrections append as dated entries, never
rewrite prior text.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c9588b2 commit 04712d4
4 files changed
Lines changed: 41 additions & 4 deletions
File tree
- .claude/plans
- crates/cognitive-shader-driver/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
398 | 402 | | |
399 | 403 | | |
400 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
| |||
0 commit comments