[S5] Emit static tables and gate checked-in generated source against drift - #51
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff877a8eca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review P1: xtask now takes |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0955d35705
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ph-surfaces-bake --emit-rust writes Binary×Binary (optional Bucketed) static tables, PAYLOAD_BYTES, and MAX_ERR_LSB to stdout. cargo xtask generate places the baker-owned fixture; CI re-renders it in memory and compares through text::read_text. Co-authored-by: Steven Giacomelli <swgiacomelli@users.noreply.github.com>
…versized bucket counts. xtask was the only member with a direct path dep, and --x-bucketed 65537 printed uncompilable BucketedAxis source. Align both with the workspace policy and the runtime B <= 65536 bound. Co-authored-by: Cursor <cursoragent@cursor.com>
S5 adds emission on top of the S4 residual kernel; 1,651 lines exceeded 1,600. The cap is a ballooning brake, not a freeze. Co-authored-by: Cursor <cursoragent@cursor.com>
0955d35 to
b93aec9
Compare
…al bucket counts in emit_rust_with. The generated rounding module is excluded from the .crate, so library tests construct the S4 surface in-test. Bucketed emission shares the runtime 1..=65536 bound as BakeError::InvalidBucketCount. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02d55f3189
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Closes #41.
Stacked on
cursor/issue-40-s4-quantize-03fb(S4 quantize, including47bacbawhich folds runtime X-then-Y rounding intoMAX_ERR_LSB). S5 emits tables and gates the checked-in copy; it does not freeze goldens or writedocs/generating-tables.md.Emission
ph-surfaces-bake --emit-rusttakes the same ingest flags as S3/S4, quantizes, and writes Rust source on stdout. The baker does not own the destination path.Emitted source is deterministic (
\nonly, no timestamps, no host paths) and includes:staticX knots, Y knots, and row-majorvalues[y][x]: [[i32; NX]; NY]pub const MAX_ERR_LSB: i32 = …via the existingemit_max_err_lsbhelperPAYLOAD_BYTES(referenced element payload; not RAM/flash/binary/linker cost)--x-bucketed/--y-bucketedemitbucket_index(&KNOTS)+BucketedAxisin the generated source (the baker still has no[dependencies]table;ph-surfacesstays dev only)--emit-goldenstays unimplemented. Unknown args still exit 2.MAX_ERR_LSBremains an i32 value LSB of deviation from supplied samples, including the S4 runtime-rounded X-then-Y path for exact-u16coordinates. It is not a device, accuracy, timing, or flash claim.Checked-in artifact and drift gate
The packaged
ph-surfacesfile set is unchanged. The fixture lives atcrates/surfaces-bake/generated/rounding.rs(S4 rounding 2×2,MAX_ERR_LSB = 1) and is not in bakerinclude/baker.files.cargo xtask generatewrites that path frombaker.generatedinxtask/config.rongenerated sourcecheck re-renders in memory (samechecked_in_sourcethe baker uses), reads disk throughtext::read_text(CRLF-safe), and on mismatch prints a unified diff plusrun cargo xtask generateNot in this PR
--emit-golden(S6 / [S6] Bake frozen golden vectors and adopt the golden read-only rule #42)docs/generating-tables.md, baker status N/A block, AGENTS host/target split section (S7 / [S7] Document the host/target split and the boundary rules #43)genfeature, runtime[dependencies], denyingph-surfaces-bakeindeny.tomlpackage.filesVerification
cargo xtask ci(full profile, not release):src/emit.rsin,generated/out), generated source, manifest floor, publish lock, fmt, test, release test, examples, clippy, doc, package list/build/digest/consumer, code size snapshot, guards fire on mutation (25), deny, core-only thumb/riscv, ordinary thumb/riscvAlso:
cargo xtask ci --only "baker line budget"PASS (1426 / 1500)cargo xtask ci --only "baker package"PASScargo xtask ci --only "generated source"PASScargo test -p ph-surfaces-bake --lockedPASScargo test --manifest-path xtask/Cargo.toml --test mutationPASS (25), including stale-artifact and missing-artifact cases--emit-rustrun twice,cmpidentical;git diff --checkclean;cargo fmt; nounsafe; no baker[dependencies]100644files, not git symlinks (120000)Could not comment on issue #41 (
gh issue commentis not permitted for this integration); verification is recorded here.PR base is
cursor/issue-40-s4-quantize-03fb, notmainand notepic/36-surfaces-bake.