Skip to content

SLM-418: add pronoun-focus-followup replay preference pattern (DSH5-10) - #1119

Merged
Tyler-R-Kendrick merged 3 commits into
mainfrom
claude/great-dirac-opju6o
Jul 27, 2026
Merged

SLM-418: add pronoun-focus-followup replay preference pattern (DSH5-10)#1119
Tyler-R-Kendrick merged 3 commits into
mainfrom
claude/great-dirac-opju6o

Conversation

@Tyler-R-Kendrick

Copy link
Copy Markdown
Owner

Summary

Fifth slice of SLM-418's replay-grounded preference extraction (DSH5-10): using undo/redo/fork/checkout/merge/pronoun-focus history as a preference signal for ambiguous follow-up instructions.

Stacked on #1118 (merge-success, 6 of 7) — this PR's base branch is claude/great-dirac-v82ph9, so it should merge after #1118 lands (or be retargeted to main at that point).

  • Adds pronoun_focus_followup, the last of the issue's seven named patterns, as a new branch inside extract_replay_preference_rows's existing turn-pair scan loop (a second consecutive AST_EDIT turn) — unlike merge-success, this reuses the existing scan rather than needing a standalone extraction function.
  • Focus is never a transcript pronoun or a semantic descriptor: it is _touched_refs, the exact OperatorRef values the immediately preceding AST_EDIT turn's own verified OperatorApplicationV1.arguments bound. A pair is classified pronoun_focus_followup only when:
    1. that focus set is non-empty (a zero-argument operator, like the base fixture every other pattern in this module reuses, never establishes one),
    2. the following edit's own bound arguments intersect it (the user kept operating on a ref they had just touched), and
    3. the exact legal set at the shared decision state contains a sibling: another legal action for the same operator whose bound refs do not overlap the focus set — a genuinely available, equally legal "switch to something else" the user did not take.
  • Directly answers the issue's own "ambiguous sibling" and "pronoun focus" matrix rows. Switching to a different, explicit, legal reference (the issue's "exact named reference" case) is honestly left unrowed rather than asserted a correction.
  • Brings named-pattern coverage from 6/7 to 7/7.
  • Corrects the hardcoded evidence strings in advanced_operator_disposition.py accordingly.

No training or held-out evaluation is added — this stays wiring evidence only, the same honesty class as the prior four slices (#1107, #1112, #1115, #1118). Only the issue's own SFT/preference-training, four-baseline comparison, held-out benefit measurement, and turn-depth/context-view ablations remain, as documented in docs/design/dsh5-10-replay-preference-rows.md.

Test plan

  • NODE_OPTIONS= pytest -q tests/test_dsl/test_replay_preference.py tests/test_dsl/test_operator_merge.py tests/test_dsl/test_operator_conversation.py tests/test_evals/test_advanced_operator_disposition.py tests/test_scripts/test_validate_advanced_operator_disposition.py — 61/61 pass (fresh .venv, Python 3.12, pip install -e ".[dev,grammar]", plus NODE_OPTIONS= npm ci in src/apps/openui_bridge for the schema-oracle gates)
  • pytest tests/test_dsl/test_replay_preference.py via the repo's pre-commit hook — 17/17 pass
  • ruff check (via pre-commit hook) — clean
  • python -m scripts.verify_version_stamps --check --base origin/claude/great-dirac-v82ph9 — ok (dsl.operators.replay_preference bumped v5→v6)
  • python -m scripts.repo_policy — ok
  • python -m scripts.verify_decode_invariants — clean

Generated by Claude Code

claude added 2 commits July 27, 2026 05:00
Fourth slice of SLM-418's replay-grounded preference extraction. Adds
extract_merge_preference_row, a standalone extraction path (a merge attempt
is never a recorded ConversationTraceV1 turn, so this is not a trace-turn
scan like extract_replay_preference_rows): one MERGE_SUCCESS row per
successful merge_conversation_branches attempt, grounded at the left branch
tip with merge:<sorted-tip-pair> offered alongside checkout/undo in the
legal set, and replaying to the real BranchMergeContinuationV1 state.

Merge conflict is intentionally not modeled as a row: a conflicting merge
has no successor state to replay to and no recorded "chosen instead"
action, so fabricating one would violate the pattern's own
exact-context-replay requirement. This is honored by construction --
merge:<pair> is only ever offered as a legal candidate once
merge_conversation_branches has already confirmed success -- and proven by
test_merge_conflict_never_yields_a_preference_row.

Brings pattern coverage to 6 of 7; only pronoun/focus follow-ups remain, as
does all SFT/preference training and held-out measurement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LrpUNRDWqyatkAec3MzxLe
Fifth slice of SLM-418's replay-grounded preference extraction (DSH5-10):
completes coverage to 7 of 7 named patterns by adding pronoun_focus_followup,
a new branch inside extract_replay_preference_rows's existing turn-pair scan
for a second consecutive AST_EDIT turn.

Focus is never a transcript pronoun or semantic descriptor -- it is
_touched_refs, the exact OperatorRef values the immediately preceding
AST_EDIT turn's own verified OperatorApplicationV1.arguments bound. A pair
is classified pronoun_focus_followup only when that focus set is non-empty,
the following edit's own bound arguments intersect it, and the exact legal
set at the shared decision state contains a sibling: another legal action
for the same operator whose bound refs do not overlap the focus set (a
genuinely available, equally legal switch the user did not take). Switching
to a different, legal, explicit reference is honestly left unrowed rather
than asserted a correction.

Stacked on #1118 (merge-success, 6 of 7). Corrects the hardcoded evidence
strings in advanced_operator_disposition.py accordingly.

No training or held-out evaluation is added -- this stays wiring evidence
only, the same honesty class as the prior four slices (#1107, #1112,
#1115, #1118).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GyJd3opkGqa6dwne9dXsVT
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
slm-training Ready Ready Preview, Comment Jul 27, 2026 6:57am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Tyler-R-Kendrick, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f32440d-1e5f-4aff-9f9c-06a05c62ac5a

📥 Commits

Reviewing files that changed from the base of the PR and between 278c849 and 78248b5.

📒 Files selected for processing (5)
  • docs/design/dsh5-10-replay-preference-rows.md
  • src/slm_training/dsl/operators/replay_preference.py
  • src/slm_training/evals/advanced_operator_disposition.py
  • src/slm_training/resources/versions.json
  • tests/test_dsl/test_replay_preference.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/great-dirac-opju6o

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from claude/great-dirac-v82ph9 to main July 27, 2026 06:51
@Tyler-R-Kendrick
Tyler-R-Kendrick merged commit 5f94b92 into main Jul 27, 2026
5 of 6 checks passed
@Tyler-R-Kendrick
Tyler-R-Kendrick deleted the claude/great-dirac-opju6o branch July 27, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants