Skip to content

feat: IProgramContext.ProgramDirectory — repository-backed in-repo adaptation (epic-029 F2 ADR-E)#14

Merged
DanielKow merged 1 commit into
masterfrom
feature/epic-29-program-directory
Jun 14, 2026
Merged

feat: IProgramContext.ProgramDirectory — repository-backed in-repo adaptation (epic-029 F2 ADR-E)#14
DanielKow merged 1 commit into
masterfrom
feature/epic-29-program-directory

Conversation

@DanielKow

Copy link
Copy Markdown
Contributor

Summary

Epic 029 · Feature 002 (Visual Program Builder), S1 — the SDK half of ADR-E (in-repo adaptation data source).

Adds a single additive, non-breaking member to IProgramContext:

/// Absolute path to the running program's self-contained repository directory, or null when the
/// program is not repository-backed. ...
string? ProgramDirectory => null;

A default-implemented interface member returning null, following the exact precedent of RunId and GetData/SetData (added the same way for source-compat). It lets the runtime carry the running program's repository directory so a host can resolve adaptive-point data (master pose, offset, feature, captured frames, capture-poses) from the program's repository instead of the robot-global event-store catalogue. Copying the directory yields a complete, runnable program (AC-3, I-1/I-2).

Why this is the whole SDK change

ADR-D: offset propagation reuses the already-shipped (v2.5.0) ctx.AdaptOffsetAsync(...) + Pose3 + Vector3 — generated .cs is unchanged, no new emit surface.
ADR-E: only the data source binding moves. The resolution pipeline, the capture-data record, and the surface/segmentation types are all host-side. The host already owns a per-program IAdaptivePointService factory seam; this PR gives that binding a clean, formal home on the SDK contract (the program's repository directory) at minimal surface. The repository-backed IAdaptivePointService + on-disk file format/reader-writer are rw2 work (B2), bound off ctx.ProgramDirectory.

Tests

No dedicated unit test added, matching the established precedent: the existing RunId and GetData/SetData DIMs have no concrete-implementer unit tests, and there are no concrete IProgramContext implementers in the SDK (all live in the host). The member's behaviour is exercised end-to-end by the rw2 override and the F2 copy-and-run integration scenarios (I-1/I-2, event store unavailable). Full SDK solution builds clean (0 errors).

Release

Family-lockstep: after merge, release.sh --minor mints v2.6.0 (from v2.5.0) → GitHub Actions publishes all packages at 2.6.0. rw2 bumps its SDK family reference to 2.6.0 in B7.

@DanielKow

Copy link
Copy Markdown
Contributor Author

✅ Reviewer PASS — ADR-E + standards/dotnet.md

(Posted as a comment — the API rejects a formal APPROVE since the review token is the PR author's account.)

The change is a single additive default-implemented interface member, string? ProgramDirectory => null; on IProgramContext. Verified:

  • Additive / non-breaking. DIM with a => null body — source- and binary-compatible. No concrete IProgramContext implementer exists in the SDK (grep: no : IProgramContext class declarations; implementers are host-side / test mocks), so nothing is forced to implement it.
  • Follows the established precedent. Mirrors RunId RunId => default; (same file, line 63) and GetData/SetData — the exact source-compat pattern.
  • Matches ADR-E's minimal-additive intent. Only the data-source binding moves to the SDK contract; the repository-backed IAdaptivePointService + on-disk reader/writer are rw2 (B2). Exposing the directory path rather than inlining adaptation data aligns with ADR-E (rejected alt. feat: Robotics.Core — FK, IK, SimulatedRobot (Epic 021 Iter 4) #3: inline data into code).
  • Standards. XML <summary> + <remarks> present (required for public APIs); string? nullable annotation correct; PascalCase. No version edits in the diff — correct, the family versions from the publish tag (v2.6.0 at release).
  • CI green: publish-csharp-preview ✓, publish-python-preview ✓, preview-version ✓.

No SDK unit test is acceptable — there is no concrete IProgramContext implementer in the SDK to test, matching the RunId/GetData DIM precedent; runtime behaviour is verified rw2-side (B2 repo-backed source override + I-1/I-2 copy-and-run with the event store down) and in e2e.

Observation (non-blocking): ADR-E speaks of binding "an adaptive-point source"; this PR exposes the repository directory as the binding key, leaving the source host-side. That's the simpler, correct minimal cut — flagging only so the rw2 B2 side genuinely binds its repo-backed source off ctx.ProgramDirectory.

Clear to merge + publish v2.6.0 on moderator GO.

— .NET Reviewer

@DanielKow DanielKow merged commit 994ebae into master Jun 14, 2026
3 checks passed
@DanielKow DanielKow deleted the feature/epic-29-program-directory branch June 14, 2026 16:08
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.

1 participant