{"record":{"id":"489684eba4c9dca7","repo":"gastownhall/beads","slug":"failed-to-push-issues-in-s-s","errorCode":null,"errorMessage":"Failed to push issues in %s: %s","messagePattern":"Failed to push issues in (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/tracker/engine.go","lineNumber":1016,"sourceCode":"\t\t\t\treturn stats, nil\n\t\t\t}\n\t\t} else {\n\t\t\tbatchResult, err := batchTracker.BatchPush(ctx, pushIssues, forceIDs)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"batch pushing issues: %w\", err)\n\t\t\t}\n\t\t\te.applyBatchPushResult(ctx, batchResult)\n\t\t\tstats.Created += len(batchResult.Created)\n\t\t\tstats.Updated += len(batchResult.Updated)\n\t\t\tstats.Skipped += len(batchResult.Skipped)\n\t\t\tstats.Errors += len(batchResult.Errors)\n\t\t\tstats.Warnings = append(stats.Warnings, batchResult.Warnings...)\n\t\t\tfor _, item := range batchResult.Errors {\n\t\t\t\tif item.LocalID != \"\" {\n\t\t\t\t\te.warn(\"Failed to push %s in %s: %s\", item.LocalID, e.Tracker.DisplayName(), item.Message)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\te.warn(\"Failed to push issues in %s: %s\", e.Tracker.DisplayName(), item.Message)\n\t\t\t}\n\t\t\treturn stats, nil\n\t\t}\n\t}\n\n\tfor _, issue := range issues {\n\t\t// Limit to parent and its descendants if requested.\n\t\tif descendantSet != nil && !descendantSet[issue.ID] {\n\t\t\tstats.Skipped++\n\t\t\tcontinue\n\t\t}\n\t\t// Skip filtered types/states/ephemeral\n\t\tif !e.shouldPushIssue(issue, opts) {\n\t\t\tstats.Skipped++\n\t\t\tcontinue\n\t\t}\n\n\t\t// ShouldPush hook: custom filtering (prefix filtering, etc.)","sourceCodeStart":998,"sourceCodeEnd":1034,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/tracker/engine.go#L998-L1034","documentation":"Batch-level variant of the real-push warning: the tracker's BatchPush returned an error item with no LocalID, so the engine cannot attribute the failure to a specific issue and reports it against the whole batch for that tracker. The push still returns stats with nil error; the message is the only diagnostic for what went wrong inside the batch.","triggerScenarios":"Non-dry-run BatchPush call returning an item whose LocalID is empty — adapter-level failures such as authentication errors, network/timeout mid-batch, rate limit exhaustion across the batch, or the remote API rejecting the batch request itself.","commonSituations":"Token expired mid-sync, repository archived or renamed so the batch target is invalid, network interruption during a large batch, or API rate limits hit partway through the batch leaving remaining items unpushed.","solutions":["Inspect the message for cause; re-authenticate the tracker if it indicates 401/403/bad credentials.","If rate limited, wait for the reset window and re-push; unchanged items are skipped via push hashes so only failures retry.","Verify the target repo/project still exists and the configured name matches after any rename.","For network errors, re-run the sync — the batch is resumable since successfully pushed items are skipped on the next pass."],"exampleFix":"// before: renamed repo makes whole batch fail\n// tracker: github:acme/old-repo\n// after: update config to current name\n// tracker: github:acme/new-repo","handlingStrategy":"retry","validationCode":"// Preflight: ensure tracker auth and target are valid before batch push\n// (e.g. call a cheap read API or the adapter's Ping/health method):\nif err := preflightTracker(ctx, tracker); err != nil {\n    return fmt.Errorf(\"aborting batch push, tracker not ready: %w\", err)\n}","typeGuard":"batchTracker, ok := tracker.(BatchPushTracker) // knowing the batch path is used helps interpret batch-level (no-LocalID) failures","tryCatchPattern":"stats, err := engine.Sync(ctx, opts)\nif err != nil {\n    if errors.Is(err, context.DeadlineExceeded) || isRateLimit(err) {\n        time.Sleep(backoff) // wait out rate limit / transient outage\n        stats, err = engine.Sync(ctx, opts)\n    }\n    return err\n}\n// batch-level (no LocalID) failures appear only in stats.Warnings","preventionTips":["Use exponential backoff on rate-limit or 5xx messages before re-pushing.","Keep batch sizes within tracker API limits by syncing incrementally.","Verify credentials and target repository/project validity before each sync run.","Chunk large initial imports rather than pushing thousands of issues in one batch."],"tags":["sync","push","batch-push","authentication"],"backgroundTag":"batch-push-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}