Skip to content

feat: deliver compatible serialized activity detail - #840

Merged
AlexanderZ-Band merged 40 commits into
mainfrom
feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744
Oct 21, 2026
Merged

AlexanderZ-Band merged 40 commits into
mainfrom
feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744

Conversation

@AlexanderZ-Band

@AlexanderZ-Band AlexanderZ-Band commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Why

A room can show what an agent is doing (reasoning, a tool by name, waiting on a person, memory), but older platforms and boolean-only callers must keep working. The earlier version kept detail in a per-room reporter slot, which needed ownership guards that proved unreachable or wrong, and it learned platform support from GET /api/version, which serves HTML on prod.

What

  • Each turn keeps its own detail (TurnScope.activity, in the new leaf band.runtime.activity). The room shows the live owner's detail and none while an aborted owner unwinds; reporting a change never starts reporting, takes ownership, or waits on the network.
  • A visible change wakes the reporter's keep-alive, the only sender of working: true, so changes made while a report is in flight coalesce to the latest. Stop and the duration cap are unchanged.
  • Detail is attached once an activity response's X-API-Version advertises 1.25.0 or later. A detail-bearing 422 resends once without detail within the same deadline and disables detail for the process.
  • Names only: a tool shows its name, never arguments.

Scope

First feature layer of INT-1744. ReportFn(bool) and enable_working_state (still the only switch) are unchanged. The unused _on_activity_clear seam is replaced by per-turn detail rather than filled. band-client-rest 0.0.46 already ships AgentActivityDetail, so there is no bump. A tool shorter than one report round trip may never appear, which INT-1741 accepts. The producer helpers have no callers yet; Band tools and adapters report through them in the PRs stacked above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb

@linear-code

linear-code Bot commented Oct 18, 2026

Copy link
Copy Markdown

INT-1744

@AlexanderZ-Band
AlexanderZ-Band added this pull request to stack #842 October 18, 2026 08:05
@AlexanderZ-Band AlexanderZ-Band changed the title feat: Deliver compatible activity detail through the working-state reporter feat: Deliver compatible serialized activity detail Oct 18, 2026
@AlexanderZ-Band
AlexanderZ-Band marked this pull request as ready for review October 18, 2026 08:09
@AlexanderZ-Band
AlexanderZ-Band force-pushed the feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744 branch from f3dbba8 to ca0a239 Compare October 18, 2026 08:12

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cycle 1: no verified findings in the independently reviewed compatible detail-delivery delta. Combined producer-triggered findings are recorded on the producer PR.

@AlexanderZ-Band
AlexanderZ-Band requested review from a team and amit-gazal-band October 18, 2026 08:50
@AlexanderZ-Band
AlexanderZ-Band force-pushed the feat/python-sdk-report-activity-detail-to-the-platform-INT-1744 branch from 6e4277a to 8bfeac0 Compare October 18, 2026 10:35
@AlexanderZ-Band
AlexanderZ-Band force-pushed the feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744 branch from 3bbf453 to 1f251c5 Compare October 18, 2026 10:35
@AlexanderZ-Band
AlexanderZ-Band force-pushed the feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744 branch from 1f251c5 to 1842638 Compare October 18, 2026 11:04
@AlexanderZ-Band AlexanderZ-Band changed the title feat: Deliver compatible serialized activity detail feat: deliver compatible serialized activity detail Oct 19, 2026
bandzalkin

This comment was marked as outdated.

bandzalkin
bandzalkin previously approved these changes Oct 19, 2026

@bandzalkin bandzalkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope

Approval is limited to #840's reviewed delta at 06d8124481475460782840b8854285cf7c0a2d92 against #839 at a397d8cb905d5316a87f62da23c8c5af1895e78e, as requested. This supersedes the earlier stack-level hold only for this individual PR's code review.

Constraints

Preserve boolean reporting, names-only detail, the shared request deadline, and the explicit process-wide compatibility policy.

Decisions

Platform-owned negotiation and one serialized reporter fit the existing boundaries. No parallel reporting owner or transport is needed.

Findings and proof

No new findings. Head/base and all review discussions were rechecked and are unchanged since the detailed review. The completed combined-tip verification was 1,466 passed / 69 skipped in the core contract suites and 1,372 passed / 10 skipped in coding-adapter, ACP and turn-admission suites. No additional tests were rerun for this unchanged-head approval; live platform/model acceptance and the full repository gate were not run.

Architectural / review verdict

APPROVED for the reviewed #840 delta. This does not approve #841 or clear the stack's five outstanding findings. Re-review material changes introduced by rebasing or resolving the root PR's merge conflict.

AlexanderZ-Band and others added 2 commits October 20, 2026 13:08
…t-activity-detail-to-the-platform-INT-1744

Keep main's BackendTurns ownership of OpenCode cancellation and register the
watcher as a turn worker so activity reporting outlives the handler. Reporter
unit tests move to tests/runtime/workingreporter; main's workingstate package
keeps the execution-level tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
…detail-to-the-platform-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744

Port the startup-backlog claim-failure test edit to the split
tests/runtime/execution package.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgnNR4uiqD787Bg3yKdZpL
…detail-to-the-platform-INT-1744' into feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744
Run exact-body activity tests on a controlled clock, pin the shared report
deadline against a slow rejection, and cover a fresh process learning detail
mid-turn, a mid-turn 422 latch, interrupt-then-new-message, a STOP echoed on
a detail refresh, the working-state cap through ExecutionContext, and the
producer helpers on tools without an observer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking — would be REQUEST_CHANGES on a PR by someone else.

Cycle 2: two test issues (the flow tests don't prove a change is reported immediately, and a transient-turn observation is masked by the owner's wait), eight nits. Both issues sit in code no fix touched. The aborted-previous-owner branch in _start_activity (from #839) was examined: it isn't reachable with an aborted owner and this PR doesn't rely on it, so it is out of scope.

Comment thread tests/runtime/activityownership/kit.py
Comment thread tests/runtime/activityownership/test_detail.py Outdated
Comment thread tests/runtime/activityownership/test_detail.py Outdated
Comment thread tests/runtime/activityownership/test_detail.py Outdated
Comment thread tests/runtime/activityownership/test_control.py
Comment thread tests/runtime/activityownership/test_observerless.py
Comment thread tests/platform/activity/kit.py Outdated
Comment thread tests/runtime/activity/test_turndetail.py
Comment thread src/band/runtime/working_state.py Outdated
Comment thread docs/turn-outcome.md Outdated
AlexanderZ-Band and others added 4 commits October 21, 2026 15:16
The producers map tool events to activity detail, which is not keep-alive
reporting, so they live with ActivityObserver and tool_call_activity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>
The platform and turn-ownership suites retyped the same request bodies; tests/activitysupport.py now owns them, built from the runtime's activity kinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>
…p-alive

shown() records any body that needed virtual time, which only a keep-alive
could supply, and the platform fixture fails the test on it. The settled-owner
test splits so a busy delivery reports while the owner shows a tool, waits on
reported bodies instead of fixed sleeps, and post-turn observations are checked
after a keep-alive could have fired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>
The platform reads a report without activity as reasoning, so the room shows reasoning, not nothing, while an aborted owner unwinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>

@AlexanderZ-Band AlexanderZ-Band left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cycle 3: converged, no issues. The flow mapping found no new hypothesis, and the producer move changed no behaviour. Five test nits, fixed in this round.

Comment thread tests/runtime/activityownership/test_detail.py Outdated
Comment thread tests/runtime/activityownership/kit.py
Comment thread tests/runtime/activityownership/test_observerless.py Outdated
Comment thread tests/runtime/activityownership/test_detail.py Outdated
Comment thread tests/runtime/activityownership/test_detail.py
AlexanderZ-Band and others added 2 commits October 21, 2026 15:45
…ative checks

Each activity concern (owned detail, non-owner observations, controlled
turns, exclusion, non-blocking delivery) gets its own class, every
"nothing posted" check flushes past a keep-alive under looptime, and a
late visible change now names the body that waited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>
…t-activity-detail-to-the-platform-delivery-INT-1744
@AlexanderZ-Band
AlexanderZ-Band removed this pull request from stack #842 October 21, 2026 14:50
AlexanderZ-Band and others added 4 commits October 21, 2026 17:53
…t-activity-detail-to-the-platform-delivery-INT-1744

# Conflicts:
#	tests/runtime/activityownership/conftest.py
#	tests/runtime/activityownership/kit.py
…t-activity-detail-to-the-platform-delivery-INT-1744

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFmR3J53UqbsYDMmTUd3Rb
Signed-off-by: Alexander Zaikman <alexander.zaikman@band.ai>
@AlexanderZ-Band
AlexanderZ-Band added this pull request to the merge queue Oct 21, 2026
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
Merged via the queue into main with commit d966170 Oct 21, 2026
35 checks passed
@AlexanderZ-Band
AlexanderZ-Band deleted the feat/python-sdk-report-activity-detail-to-the-platform-delivery-INT-1744 branch October 21, 2026 16:43
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 21, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 22, 2026
Select upstream band-ai#841 (activity producers, carrying band-ai#839/band-ai#840 via
forward merges), band-ai#874 after 841 (tool-name emit gate with the I-08
name clamp), the host stack ahead of band-ai#763, band-ai#763 after 874 (native OMP
with the tool/permission activity hooks and omp_acp retirement), and
band-ai#854/band-ai#795/band-ai#848 after 763. Replayed from the branches' live heads.
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