apache / apache/maka

feat(bots): expose bounded redacted onboarding retry health

Open
#4,745 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
716

Description

Parent tracker: #4327

## Problem

Bot onboarding already retries transient polling failures with bounded consecutive-failure and interval limits, but the renderer projection hides those intermediate failures. A user sees the session remain in `waiting` or `scanned` without knowing whether the provider is simply pending or Maka is backing off after a network/rate-limit/server failure.

The raw provider error must not cross the main-process boundary because it may contain credentials, URLs, response bodies, or provider-specific secrets.

## Desired outcome

Expose one bounded, redacted onboarding retry-health projection so the settings UI can distinguish an ordinary pending poll from a transient failure that will be retried.

The projection should contain only a stable failure category, the consecutive failure count, and the next retry time/interval needed for user-facing status. It must clear after a successful provider response and stop changing after cancellation, expiry, denial, terminal failure, or session supersession.

## Scope

- Extend the existing onboarding snapshot/IPC contract with bounded retry-health fields.
- Derive the fields from the current main-process poll/backoff owner; do not introduce another retry loop or health authority.
- Redact failures before projection using a finite classification rather than forwarding arbitrary error text.
- Render concise actionable status in the existing Bot settings onboarding surface.
- Add deterministic tests for transient failure, backoff, recovery/clear, terminal failure, cancellation, supersession, and secret-like error content.

## Non-goals

- Changing retry thresholds, polling intervals, or provider protocol behavior.
- Persisting raw provider errors or credentials.
- General Bot runtime health, analytics export, OpenTelemetry, or notification delivery.
- Provider-specific onboarding redesign.

## Verification

Run focused Desktop onboarding main/renderer tests, Core contract tests if the shared snapshot changes, Desktop typecheck, and redaction regressions.

_Issue drafted with OpenAI Codex assistance on behalf of @testikun._

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing onboarding snapshot/IPC contract to the main-process poll and backoff owner, then inspect the Bot settings onboarding surface in the renderer. Add bounded, redacted retry-health projection fields that clear or stop changing on the specified terminal states, and run the focused Desktop onboarding main/renderer tests, Core contract tests, Desktop typecheck, and redaction regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
api, backend, desktop, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.