Skip to content

feat(sbp2): add session registry and command flow - #5

Closed
gly11 wants to merge 23 commits into
pr/foundation-async-discoveryfrom
pr/sbp2-session-core
Closed

gly11 wants to merge 23 commits into
pr/foundation-async-discoveryfrom
pr/sbp2-session-core

Conversation

@gly11

@gly11 gly11 commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR is stacked on pr/foundation-async-discovery and adds the SBP-2 session and command core on top of the foundation fixes.

SBP-2 Session Core

  • Add login, reconnect, and logout session state handling, including bus-reset retry behavior, busy-timeout replay, and unsolicited status setup
  • Add a session registry for discovered SBP-2 units and command lifecycle management
  • Add command submission helpers for standard SCSI command flow and task management
  • Wire SBP-2 session operations through ControllerCore, DriverContext, and the user-client handler

ORB and Addressing

  • Extend management and command ORB layout and status handling
  • Add full bus/node embedded-address handling and page-table/direct-descriptor updates
  • Add command wire formats for the user-client boundary

Tests

  • Add login-session and session-registry coverage
  • Extend ORB and address-space tests for timeout, status, embedded-address, and command lifecycle behavior

Why this PR

This layer adds SBP-2 session and command behavior without mixing in controller bring-up policy, Swift connector APIs, app UI, local diagnostic scripts, or documentation-only planning notes.

Verification

Local verification completed for this slice:

cmake -S . -B /tmp/asfw-pr19-build -DCMAKE_BUILD_TYPE=Debug
cmake --build /tmp/asfw-pr19-build --target AddressSpaceManagerTests SBP2ORBTests SBP2LoginSessionTests SBP2SessionRegistryTests --parallel 8
/tmp/asfw-pr19-build/tests/AddressSpaceManagerTests
/tmp/asfw-pr19-build/tests/SBP2ORBTests
/tmp/asfw-pr19-build/tests/SBP2LoginSessionTests
/tmp/asfw-pr19-build/tests/SBP2SessionRegistryTests
xcodebuild -project ASFW.xcodeproj -scheme ASFW -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build

@gly11
gly11 force-pushed the pr/sbp2-session-core branch 2 times, most recently from eff2132 to 76a8f1d Compare May 27, 2026 14:44
@gly11
gly11 force-pushed the pr/sbp2-session-core branch from 76a8f1d to 166b8a7 Compare May 27, 2026 14:59
@gly11

gly11 commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Superseded by mrmidi#19, which has been merged. Closing this fork-side draft; follow-up SBP-2 work will be re-split against the current upstream architecture.

@gly11 gly11 closed this Jun 2, 2026
gly11 pushed a commit that referenced this pull request Jun 24, 2026
Fix analysis findings and prep local Sonar runs
gly11 pushed a commit that referenced this pull request Jul 25, 2026
…ation

44100.md:
- §12: reverse-engineer RME FirefaceAudioDriver's 44.1 cadence — DCL-branch
  Bresenham (increment = rate/8000), closed-loop RX clock recovery via the
  +276 per-group target table and a 1/16 IIR estimate, and per-rate startup
  latency anchors. Behavioral/algorithm observations only (proprietary binary).
- Extend the IDA evidence index and add RME-specific open questions.
- Mark all open questions with status: #6 RESOLVED (Linux cross-check),
  #8 RESOLVED-by-decision (resync branch not needed under replay),
  mrmidi#12 RESOLVED design / capture-gated value; flag #1–#5 as legacy-DCL
  archaeology, not blockers.

SAMPLE_RATE_EXPANSION.md:
- §3: minimal TX cadence contract ({data/no-data, SYT}; DBC free; SYT =
  delta replay + per-rate phase re-anchor; payload separate; RX carries none)
  and what "device-as-master" does and does not remove.
- §8: consolidate the capture-gated items into one measurement (per-rate
  presentation lead + startup-prefix tolerance) in one gated session, partly
  self-instrumented via [TxSyt]/[Zts] traces; #9/#10 moot under replay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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