Repository navigation
lidar: provenance scrub for the rewrite (follow-up to #129) - #137
Conversation
Scrub the rewrite of anything that was not forced text: the checksum helper now folds bits with a match instead of the reference's table walk, the little-endian read composes two bytes arithmetically, the sweep origin and per-point step carry names of this implementation's choosing, the angle wrap is a shadowing expression, the grid loop tests a named `carries_return`, and the inspect binary takes its region default from this crate's constant and uses its own snapshot expect messages. The observable contract is untouched: serial keys, frame decoding, byte layout, log lines, inspect output and exit codes are identical, and all 19 tests still pass.
Rename the decoded-return fields to `bearing_deg`/`range_mm`/`signal` and the packet fields to `spin_rate_dps`/`sweep_start_cdeg`/`sweep_end_cdeg`/ `device_time_ms`, and build the scan snapshot from its default with explicit assignments. These are this crate's own types and helpers, so the names and the construction are ours; the ABI struct's field names and the bytes written into it are untouched, as are the log lines, inspect output and exit codes. The 19 tests still pass unchanged in intent.
Reviewer Contract against the reference
|
Correctness review — PR #137 (
|
Review137 — clean-room pass on #137 at Commands and observed results
Notes (non-blocking)
|
Answering 1. Renormalisation
Nothing but endings changed: 2. Diff rangeBefore, the raw stat was 975/969 and 3. Build, tests, provenance(The branch copy of the script is the pre-prose-gate one from the branch's base; it also prints No other files are touched by |
Reprise of the contract verdict on Head identity
(a) The fix is exactly EOL normalisation, nothing elseThe commit touches exactly the five files the earlier verdict named, and each is a symmetric 1:1 rewrite (every modified line has a matching counterpart), i.e. the CR removed from each of its lines. No sixth path, no content change. All nine tracked paths in the package are LF in both index and worktree; no CR remains anywhere in the tree; the default whitespace check that previously reported 969 trailing-whitespace lines now exits 0. The reported stats collapse to the same numbers, so the PR diff now shows the scrub itself rather than a whole-file rewrite: (b) Every interface item approved before still holdsScope unchanged — the same six paths, all under Package and targets. Constants, reference -> this revision, same names and values: Env keys. CRC. I regenerated the reference's Inspector CLI. Same five lines, same formats and order, including Runner. Exit codes 1/2/3/4 at the same four failures, and the reference's log lines verbatim in the reference's order: Runtime re-check on the new head (a permitted scoped run, Nothing to quote as a mismatch. The one item this role requested is resolved on |
Follow-up to #129, which merged the first revision of the
runners/lidarrewrite atda9eb62andhas since closed #89. After the merge, the repository-wide provenance standard tightened: every line
must be authored fresh, with only contract-forced text legitimately coinciding with the reference.
The merged revision still carried avoidable matches, so these two commits replay the scrub on top of
main.What changed (all inside
runners/lidar, no contract touched):0a69e81— the checksum helper folds bits with amatchinstead of a table walk; thelittle-endian read composes two bytes arithmetically; the sweep origin and per-point step carry
this implementation's names; the angle wrap is a shadowing expression; the grid loop tests a named
carries_return; the inspect binary takes its region default from this crate's constant and usesits own snapshot expect messages.
11f25e2— this crate's own wire structs are named in its own vocabulary(
bearing_deg/range_mm/signal,spin_rate_dps/sweep_start_cdeg/sweep_end_cdeg/device_time_ms), and the scan snapshot is built from its default with explicit assignments.The observable contract is unchanged: the serial keys, the 47-byte frame decoding, the bytes written
into
LidarScan/LidarOccupancyGrid, the runner log lines, thequalia-lidar-inspectoutput andexit codes 1/2/3/4 all stay identical. ABI field names (
angle_rad,distance_m,intensity) weredeliberately left alone.
Provenance audit (line-level, this crate's
src/againstC:/qualia/runners/lidar/src):Verification, after rebasing onto current
main: