Skip to content

Add measured offline Affordance collection - #653

Draft
yuecideng wants to merge 4 commits into
mainfrom
codex/affordance-offline
Draft

yuecideng wants to merge 4 commits into
mainfrom
codex/affordance-offline

Conversation

@yuecideng

@yuecideng yuecideng commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description

This draft PR provides the measured offline Affordance collection foundation for the later throughput and distribution pipeline.

It connects opt-in Affordance sampling to the synchronous offline Task Program collection path and records row-local provenance and durable receipt outcomes. The manifest now distinguishes physical eligibility, quota selection, dataset writes, and fully committed episodes so later candidate scheduling can consume confirmed evidence without treating planned or partially written data as successful.

Included

  • Bind Affordance sampling to each collection batch and attempt with deterministic row identities.
  • Preserve row-specific sampled poses, candidate metadata, configuration fingerprints, and episode provenance.
  • Separate manifest counters:
    • measured_accepted
    • selected
    • quota_discarded
    • dataset_written
    • committed
  • Keep the legacy accepted field as a compatibility alias for selected.
  • Preserve partial-write evidence when dataset persistence succeeds but a required trajectory/metadata output fails.
  • Keep bounded retries, explicit measured acceptance, synchronous receipt validation, and duplicate receipt rejection.
  • Add focused tests for quota accounting, non-contiguous rows, partial commits, and legacy selector compatibility.

This PR is intentionally Affordance-only. It does not implement trajectory variant expansion, fixed-scene candidate scheduling, manipulability-guided selection, C>B slot scheduling, or asynchronous persistence.

Dependencies and follow-up order

This PR has no dependency on the unmerged trajectory-generation PRs and can merge independently on top of main.

The later integration is dependency-ordered:

  1. PR #651 supplies fixed-waypoint trajectory variants and expansion contracts.
  2. PR #643 supplies manipulability-guided proposals and measured band accounting.
  3. PR #591 supplies fixed-scene restoration, candidate coordination, and confirmed sink infrastructure.
  4. Issue #670 integrates Affordance and trajectory candidates at the Atomic Skill planning boundary.

This PR's counters and receipts are the persistence/accounting foundation for those later layers; it does not assume that any of them has already merged.

Refs #670

Type of change

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change
  • Documentation update

Validation

  • Targeted collection and regression tests: 207 passed, 17 deselected.
  • Changed-file Black formatting check: passed.
  • python docs/scripts/check_api_docs.py: 2083/2083 exports documented.
  • git diff --check: passed.
  • A repository-wide Black check still reports an existing formatting difference in tests/test_main.py, which is unrelated to this PR and was not included in the commit.
  • Physical simulation smoke and the later trajectory-generation integration are not part of this draft.

Checklist

  • I have run Black on the changed files.
  • I have added tests that prove the changed accounting and failure behavior.
  • Public API documentation coverage is aligned.
  • Dependencies have been reviewed; no dependency changes are required.
  • The affected project context remains accurate; no context update is required for this accounting-only change.

@yuecideng yuecideng added enhancement New feature or request dataset gym robot learning env and its related features atomic action atomic action related functionality labels Sep 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic action atomic action related functionality dataset enhancement New feature or request gym robot learning env and its related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant