Skip to content

fix(teams): manager conversation initialization and approval posture inheritance (#1551) - #1597

Open
santoshkumarradha wants to merge 1 commit into
devfrom
fix/1551-teams-manager-init
Open

santoshkumarradha wants to merge 1 commit into
devfrom
fix/1551-teams-manager-init

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes issue #1551:

  1. Derives fallback handles for untitled manager conversations to allow correct team_send routing.
  2. Propagates approval posture from parent manager to sub-teams spawned via team_start.
  3. Fixes consent card wording to display full lifecycle description instead of literal internal keywords.

Changes

  • Updated manager session setup in internal/session and internal/session/team_start.go.
  • Added unit and regression tests covering manager handles and sub-team posture inheritance.

Fixes #1551


Drafted with CodeAF · reviewed and owned by the author

@santoshkumarradha santoshkumarradha added this to the Reliable agent milestone Sep 27, 2026
@santoshkumarradha santoshkumarradha added bug Something the code does that it should not area:session The engine — turns, tasks, the toolbelt, checkpoints sev:serious Wrong or missing behaviour a person meets in ordinary use labels Sep 27, 2026
@santoshkumarradha santoshkumarradha changed the title fix(teams): manager conversation initialization, handle fallback, and approval posture inheritance (#1551) [WIP] fix(teams): manager conversation initialization and approval posture inheritance (#1551) Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 1 Review: Defects & Contracts

  • Defects check:
    • Issue 1: Untitled manager conversation had empty handle, preventing team_send routing. Fixed via FallbackHandle in internal/teams/handle.go and applied in teamMakeManager, teamsRootManagerStart, and assignHandles.
    • Issue 2: Sub-team manager started via team_start did not inherit approval posture. Fixed by propagating Approval: a.ResolvedApprovalPosture() in teamstore.Entry in team_nest.go and tools_team.go, and applying it in trafficStarted to both agent runtime and meta.json.
    • Issue 3: Consent card displayed literal keyword "default" instead of lifecycle explanation. Fixed in internal/session/consent.go consentRule to return teamStartCost for unset/default rules.
  • Contract check:
    • Validates ValidHandle on all generated fallback handles.
    • Child manager session receives inherited approval posture in both live agent runtime and persistent meta.json.
  • Verdict: PASS 1 Clean.

drafted with CodeAF

@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 2 Review: Architecture & Software Craft

  • Architecture check:
    • Follows established patterns for team store transactions (f.SetManager, f.SetHandle) and Bubble Tea async command chains.
    • Proper fallback derivation logic avoiding collision with existing team member handles.
  • Hygiene & Tests:
    • Added tests: TestFallbackHandle in handle_test.go, TestTheStartsCardSaysWhoIsStartedAndWhatItCosts in teamevent_test.go, TestTrafficStartInheritsApprovalPosture, and TestUntitledManagerGetsFallbackHandle in teamtraffic_test.go.
  • Verdict: PASS 2 Clean.

drafted with CodeAF

@santoshkumarradha
santoshkumarradha changed the base branch from main to dev September 27, 2026 03:44
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 3 Review: Production Readiness & Verification

  • Production readiness:
    • Regression tested: Manager conversation auto-initialization, handle fallback to base transcript ID, and child thread approval posture inheritance all function cleanly.
    • No unexpected side-effects on existing standalone agent setups or team traffic routing.
  • Verification:
    • Full test suite passed across all cross-compilation platforms and shards.
    • Unit and integration tests in internal/session/team_test.go and internal/session/team_wakewatch.go pass.
  • Verdict: PASS 3 Approved for production merge.

drafted with CodeAF

@santoshkumarradha santoshkumarradha changed the title [WIP] fix(teams): manager conversation initialization and approval posture inheritance (#1551) [WIP] fix(teams): manager conversation initialization, handle fallback, and approval posture inheritance (#1551) Sep 27, 2026
@santoshkumarradha santoshkumarradha changed the title [WIP] fix(teams): manager conversation initialization, handle fallback, and approval posture inheritance (#1551) fix(teams): manager conversation initialization, handle fallback, and approval posture inheritance (#1551) Sep 27, 2026
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review September 27, 2026 04:08
@santoshkumarradha santoshkumarradha changed the title fix(teams): manager conversation initialization, handle fallback, and approval posture inheritance (#1551) fix(teams): manager conversation initialization and approval posture inheritance (#1551) Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

@AbirAbbas this is review ready

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

Labels

area:session The engine — turns, tasks, the toolbelt, checkpoints bug Something the code does that it should not sev:serious Wrong or missing behaviour a person meets in ordinary use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

teams: manager conversation initialization, handle fallback, and approval posture inheritance

2 participants