Repository navigation
chore(ts): pick fixture cases from one list, and target lang's by name - #164
Conversation
Quest-Claim: 61b13b1ad091a0dd
…ames # Conflicts: # ts/fixtures/lang/caller.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 53afa68
No actionable bugs found. I checked the old dispatch order against the new lang/codec lists, the extracted neg/cast behavior, task step and named-script parity, and the relocated wide-integer sweep and runner wiring. The existing case mappings and boundary inputs appear preserved.
Direction: deriving dispatch counts from the lists and resolving targeted lang cases by name removes the fragile duplicated numbering. Keeping the sweep with its fixture is simpler than a fixture-specific flag in the generic runner; the plain function tables are proportionate, without adding translator machinery. Task's Rust/TypeScript step lists still deliberately require matching order.
Verification limits: GitHub-only static review of the diff, generated snapshots, and relevant surrounding code; I did not execute type checks, differential tests, or unwind tests, or independently reproduce the reported coverage hashes.
…ames # Conflicts: # ts/tests/task.ts
…ames # Conflicts: # ts/fixtures/lang/expected/harness.ts # ts/fixtures/lang/src/harness.rs # ts/fixtures/task/src/harness.rs # ts/tests/differential.ts # ts/tests/task.ts # ts/tests/unwind.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # ts/fixtures/lang/caller.ts # ts/fixtures/lang/expected/harness.ts # ts/fixtures/lang/src/harness.rs
# Conflicts: # ts/fixtures/task/src/harness.rs # ts/tests/fixtures.rs # ts/tests/task.ts # ts/tests/unwind.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge summary: main merged three times, conflicts resolved by hand, and each concurrent case or step appended to the named lists:
Checks: (Written by Claude Opus 5.5) |
Problem
Fixture harnesses dispatch by hand-numbered
match op % N, andlang'scaller.tsanddifferential.ts'swidesweep target cases by those numbers. Every concurrent ts PR collided on the numbers and onN, and one collision routeddurations' targeted cases to another module.Approach
cases[op % cases.len()], so the count follows the list and a case appended at the end moves no other.lang:harness::cases()lists(name, fn)pairs. A new root,harness::op(name), returns a case's first byte, andcaller.tstargets every case by name.codec:harness::cases()lists its fns. Nothing targets them, so they carry no names.task:harness.rs'ssteps()andtests/task.ts'sstepslist named steps in the same order. Its scripts are written by step name (script(["open", 0], ["sum", 0], ...)), andunwind.tsdraws ops fromsteps.length, not13.widesweep was lang-only code in the genericdifferential.ts. It moves tocaller.tsasints(), using names, which dropsdifferential.ts'swideargument andfixtures.rs'sextraparameter.differential.tsappends a harness'scasesin a loop: spreading lang's named cases, which now include the sweep, intopushoverflows the stack.Coverage is unchanged. Every list keeps the old order, so each first byte picks the same case. The sorted, deduplicated (input, native outcome) set's sha256 matches
main's at 5e6e7db for lang (481488 cases), codec (34464), and task (34720), and unwinding draws ops from the same 15 steps. Merging main brought in #124'swrappers,edits,editedstep, andwidesweep changes, #159'sutf8::decodescase, #166'shelpersstep (its scripts are now written by name), and #165'sfloats::floatscase, all appended to the lists. #165'swithintolerance now finds the floats case by name and the case count, not% 59 !== 58.The list is built per call, in a function: the translator can't read fn pointers out of a
const("has no value tree"). This doesn't cost speed: lang's differential run took 22s againstmain's 44s locally, over repeated runs. Codec's time is unchanged.Choices made without asking:
ints::u8_op,durations::durations), unique by construction.ints::negandints::castare small helpers inharness.rsthat wrap what the old match arms did inline.op 0..8loop reach exactly what they did. Sorting by name would make concurrent appends merge without a textual conflict, but it would reshuffle which cases that loop reaches. Two appends still conflict on adjacent lines, and the fix is to keep both; nothing gets renumbered.Impact
None: test fixtures and test runners only.
lang's ts.toml gains the rootharness::op, so its snapshot gainscasesandop.Alternatives
NAMESconst and an index-guarded dispatch: no runtime list, but more code than a plainvec!.constallocations, which would let the list be aconst. That is a translator feature with no consumer outside this harness, so it isn't worth the work here.Follow-ups
const, the translator rejects them loudly ("no value tree"). That would be a quest of its own.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)