S16 Phase 3, slice 3: griff swang build — law 5, selection from the unchanged set - #120
Conversation
select_ranked arrives as an unimplemented skeleton beside ranked_candidates — the same seam every frontend generates through — with four failing core tests: None is the reranked winner (today's behavior, by pointer identity); a named strategy is the FIRST ranked candidate of that strategy from the set whose (strategy, seed) order is fingerprinted before and after — selection only, never a re-ranking; every strategy in a full set is selectable; an absent one selects nothing, never a fallback. Two failing CLI tests hold griff swang build to the law's halves: under strategy auto the export's bytes equal griff generate's output for the equivalent command; under repeat_variation the run names the selected strategy and builds the same bytes twice. A third guard — build takes no output flag (the program is the output's single owner) — already holds at clap's edge and is pinned so it stays held. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NkqJUU6d1sW1RAfvyHrqVM
… ranking select_ranked lives beside ranked_candidates — the seam every frontend generates through: None returns the reranked winner (today's behavior, verified by pointer identity), Some(strategy) the first ranked candidate of that strategy from the same borrowed set. Nothing is regenerated, reordered, or reseeded — the named choice is a reading of the ranking. cmd_swang_build runs the program end to end: parse with spans, the program's own source score, the shared pattern compiler (flaws render exactly as expand renders them), ranked_candidates under the same ask the transport builds, selection per law 5, and the winner written to the program's export — the only output path that exists. rhythm_args_from_program is the one mapping expand and build share, so the two frontends cannot drift. Auto parity proven end to end: the export's bytes equal griff generate's output for the equivalent command. 4/4 core, 15/15 CLI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NkqJUU6d1sW1RAfvyHrqVM
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NkqJUU6d1sW1RAfvyHrqVM
There was a problem hiding this comment.
💡 Codex Review
griff/core/src/generation_input.rs
Lines 248 to 251 in bbe9e9f
The repository's AGENTS.md TDD workflow says, “Never commit new pub fn / pub struct implementation in the same commit as the tests that cover it.” This commit adds the new public select_ranked API here and also adds core/tests/strategy_selection.rs covering it, so the commit sequence violates the required red-then-green workflow; please split the failing tests into an earlier commit and the implementation into a later commit.
ℹ️ 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".
What
The last behavioral slice of Phase 3:
griff swang buildruns a program end to end — expansion, generation, strategy selection, and the program's ownexport. Strictly law 5 (spec §3.5), red→green:test: red— four failing core tests + two failing CLI tests (a third guard — no output flag — already held at clap's edge and is pinned).feat: green—select_rankedbesideranked_candidates, the seam every frontend generates through:None(=strategy auto) returns the reranked winner — today's behavior, verified by pointer identity againstranked[0];Some(strategy)returns the first ranked candidate of that strategy from the same borrowed set — the set's(strategy, seed)order is fingerprinted before and after: nothing regenerated, reordered, or reseeded. A named strategy is a reading of the ranking, not a different ranking;Law 5 at the CLI
griff generate's output MIDI for the equivalent command (same seeds, same rhythm pipeline) — proven end to end inswang_cmd.rs.RepeatVariation) and builds identical bytes across runs.buildtakes no output flag; the MIDI lands at the program'sexportand nowhere else.rhythm_args_from_programis the one program→compiler mappingexpandandbuildshare, so the two frontends cannot drift; pattern flaws render exactly asexpandrenders them (NodePath / quoted source value / owning value).Phase 3 law scoreboard
Remaining for Phase 3 closure: fuzz targets for the parser and expansion limits (ADR-0010) — proposed as the next, final slice.
Known local-only failure:
missing_file_goldenon Russian-locale Windows (pre-existing).🤖 Generated with Claude Code
https://claude.ai/code/session_01NkqJUU6d1sW1RAfvyHrqVM