Skip to content

feat(selection): add advance_on_view to LabelingSelection - #943

Merged
LinoGiger merged 1 commit into
mainfrom
feat(selection)/advance-on-view
Oct 10, 2026
Merged

LinoGiger merged 1 commit into
mainfrom
feat(selection)/advance-on-view

Conversation

@RapidPoseidon

@RapidPoseidon RapidPoseidon commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

A/B experiments measure accuracy by position (1st, 2nd, 3rd session per person). With Shuffled/Sequential, a task an annotator saw but skipped is served to them again, which skews that measurement. The backend now has LabelingSelection.advanceOnView (rapidata-backend#5592, live in prod) to move the annotator past a task once it has been shown. This exposes it in the SDK as LabelingSelection(..., advance_on_view=True).

Builds on the regenerated client from #941 (merged).

Flow

flowchart LR
  user["LabelingSelection(advance_on_view=True)"]:::changed ==>|"_to_model()"| model["ISelectionLabelingSelection.advanceOnView"]
  model ==>|"POST /job (selections)"| order["Order / Campaign service"]
  classDef changed fill:#fff3bf,stroke:#f08c00,color:#000
Loading
API Change Before → After
LabelingSelection.__init__ changed — → advance_on_view: bool = False; ValueError with Random

Decisions

  • Random with advance_on_view=True raises at construction time, so callers get the error up front rather than as a backend 400 on job creation.

Verified

New tests/rapidata_client/selection/test_labeling_selection.py; pyright src/rapidata/rapidata_client reports 0 errors.

Agent skill unchanged: src/rapidata/_skill/ does not document LabelingSelection or retrieval modes.

🔗 Session: node-04de9e35

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

⚠ Agent skill not updated

This PR does not modify src/rapidata/_skill/. That directory is the agent skill that ships in every SDK release and that coding agents read through python -m rapidata skill.

Before merging, pick one:

  1. The change affects what an agent needs to know (new or renamed API, changed parameter, default or result field, new gotcha): update src/rapidata/_skill/SKILL.md (or a companion guide next to it) in this PR.
  2. Nothing the skill documents changed: a reviewer applies the skill-unchanged-approved label. New commits remove the label again.

@RapidPoseidon

Copy link
Copy Markdown
Contributor Author

The only red check is Agent Skill, and that's the intended review gate, not a code failure: build, test and type-check are green. src/rapidata/_skill/ (SKILL.md, reference.md, examples.md, flows-for-preference-data.md) never mentions LabelingSelection, retrieval modes or max_iterations, so adding advance_on_view changes nothing the skill documents. A reviewer needs to apply skill-unchanged-approved to clear it.

@lindeli31
lindeli31 marked this pull request as ready for review October 10, 2026 07:14
@lindeli31
lindeli31 requested a review from LinoGiger as a code owner October 10, 2026 07:14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: deli@rapidata.ai <deli@rapidata.ai>
@RapidPoseidon
RapidPoseidon force-pushed the feat(selection)/advance-on-view branch from 929fadd to ccc033c Compare October 10, 2026 07:15
@RapidPoseidon

Copy link
Copy Markdown
Contributor Author

After the rebase onto main (ccc033c, now that #941 is merged), build, test and type-check are green. Agent Skill is still the only red check. It is the reviewer gate, not a code failure: src/rapidata/_skill/ never mentions LabelingSelection or retrieval modes, so applying skill-unchanged-approved clears it.

@RapidPoseidon

Copy link
Copy Markdown
Contributor Author

@LinoGiger thanks for the approval! Agent Skill is still red because the skill-unchanged-approved label is missing (the skill doesn't document LabelingSelection). Could you add it? I'll merge as soon as the check turns green.

@LinoGiger
LinoGiger merged commit a1fd89d into main Oct 10, 2026
7 of 8 checks passed
@LinoGiger
LinoGiger deleted the feat(selection)/advance-on-view branch October 10, 2026 08:05
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