Skip to content

fix(init): member registration hides why the reports write failed #1267

Closed

Description

@SaulMoro

Problem

teamai init registers the member on the teamai-reports branch, and drops the reason when that write fails:

  • When the write fails before the registration callback runs (for example, the reports worktree cannot be opened or its first commit fails), selfMemberChanged stays false and init prints nothing. The member is not registered, and nothing says so (src/init.ts around the updateReports call in step 6, and the second registration path further down).
  • When the callback runs and the push fails, init prints Member registration could not be pushed (no write access?), a guessed cause, and not the reason that updateReports returned.

Expected

Init branches on the PublishResult status: on failed it prints the returned reason and a retry hint; on busy it says another write holds the reports branch. It stays non-blocking.

Notes

Found while fixing the same pattern in session save --push, which collapsed the result with isPublished and printed "Nothing new to push." for a failed commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions