Failed to authenticate. API Error: 401 Invalid authentication credentials

[2026-05-15] vault sync
This commit is contained in:
Alexey Martemyanov
2026-05-15 15:10:41 +06:00
parent adc343805c
commit f64dfc02de
2 changed files with 162 additions and 9 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ media-pipeline (~/Developer/media_files_db, ветка kraken-agent)
| Принцип | Описание |
|---------|----------|
| **NFO как evidence** | LocalEvidenceStrategy читает NFO только если они пришли с контентом (торрент). Pipeline-generated NFO не должны читаться как входные данные — это circular dependency. Сейчас защита через `.media-pipeline-canonical` маркер (FileScanner пропускает canonical dirs). Долгосрочно: добавить `<generator>media-pipeline</generator>` тег в generated NFO и фильтровать в LocalEvidenceStrategy. |
| **Классификация по жанрам провайдера** | Роутинг в cartoons/documentaries — только по жанрам из API (TMDb/KP), через `MediaSearchCandidate.genres → NFOMetadataFact`. Не по source path, не по локальным NFO. |
| **Классификация по жанрам провайдера** | Роутинг в cartoons/documentaries — **только по жанрам из API** (TMDb/KP), через `MediaSearchCandidate.genres → NFOMetadataFact → movieOutputDir(forGenres:)`. Source path **никогда не используется** для категоризации. |
| **resolve-manual — не решение** | `unresolved.json` — очередь для автоматического резолва. resolve-manual только для экстренных случаев. |
@@ -131,11 +131,13 @@ This is the same bug as **PR #4544 — Bugbot r3234645543** below. Fix is in `di
- `iOS/DuckDuckGo/MainViewController.swift`
- `iOS/DuckDuckGo/NewTabPageControllerDelegate.swift`
- `iOS/DuckDuckGo/NewTabPageViewController.swift`
- `iOS/DuckDuckGo/OnboardingFlow/LinearOnboarding/OnboardingIntroViewModel.swift`
- `iOS/DuckDuckGo/OnboardingView+DuckAIExperimentSearchContent.swift`
- `iOS/DuckDuckGo/OnboardingFlow/LinearOnboarding/OnboardingIntroViewModel.swift` — also needs `!restorePromptHandler.isEligibleForRestorePrompt()` added (see PR #4855 Alessandro line 450)
- `iOS/DuckDuckGo/OnboardingView+DuckAIExperimentSearchContent.swift` — label currently "Ask AI", needs correction to **"Ask.ai"** (with dot)
- `iOS/DuckDuckGo/UserText.swift` + all 26 lproj files
**Action:** Commit and push before #4855 can be reviewed.
**Action:** Fix "Ask.ai" copy + add `isEligibleForRestorePrompt` guard, then commit and push before #4855 can be reviewed.
> **Color legend:** 🟠 fix in working tree, uncommitted — 🟡 fix in another PR in stack, not merged to this one — 🔴 not fixed / blocked — ✅ done
---
@@ -181,7 +183,7 @@ This is the same bug as **PR #4544 — Bugbot r3234645543** below. Fix is in `di
---
### 🟠 PR #4855 — Bugbot: Nav bar not restored when NTP dismissed during visit-site dialog
### 🟠 [Resolved] PR #4855 — Bugbot: Nav bar not restored when NTP dismissed during visit-site dialog
**Source:** Bugbot on PR #4855, `NewTabPageViewController.swift:281`
@@ -233,7 +235,7 @@ This is the same bug as **PR #4544 — Bugbot r3234645543** below. Fix is in `di
---
### 🔴 PR #4544 — Bugbot (r3234645543) / SR GJ6b/: Chat-path EOJ not shown after tapping tracker dialog CTA
### 🟡 PR #4544 — Bugbot (r3234645543) / SR GJ6b/: Chat-path EOJ not shown after tapping tracker dialog CTA
**Source:** [Bugbot comment r3234645543 on PR #4544](https://github.com/duckduckgo/apple-browsers/pull/4544#discussion_r3234645543), `TabViewController.swift:4214`. Also reported as SR GJ6b/ by [Gary Apr 29](https://app.asana.com/1/137249556945/task/1214147157456478/comment/1214409112744728) — same bug.
@@ -245,17 +247,17 @@ This is the same bug as **PR #4544 — Bugbot r3234645543** below. Fix is in `di
---
### 🔴 PR #4544 — Bugbot: Chat-path completion dialog shown twice via competing paths
### ✅ [Resolved] PR #4544 — Bugbot: Chat-path completion dialog shown twice via competing paths
**Source:** Bugbot on PR #4544, `MainViewController.swift:4711`
**Issue:** Two independent paths both call `presentChatPathOnboardingCompletionIfNeeded()``tabDidRequestNewTab` dispatch and a direct call — potentially showing the completion dialog twice.
**State:** `presentChatPathOnboardingCompletionIfNeeded()` has a guard on `chatPathPhase == .trackerToEOJ` — once the EOJ fires, phase advances and the second call is a no-op. **Needs manual verification.** GitHub thread NOT resolved.
**State:** `presentChatPathOnboardingCompletionIfNeeded()` has a guard on `chatPathPhase == .trackerToEOJ` — once the EOJ fires, phase advances and the second call is a no-op. GitHub thread is **[Resolved]**.
---
### 🔴 PR #4544 — Bugbots (outdated): hardcoded cohort / promo override / missing pixels / commented-out redirect
### ✅ [Resolved] PR #4544 — Bugbots (outdated): hardcoded cohort / promo override / missing pixels / commented-out redirect
**Source:** Four Bugbot comments on early commits of PR #4544.
@@ -270,6 +272,157 @@ This is the same bug as **PR #4544 — Bugbot r3234645543** below. Fix is in `di
---
### 🔴 PR #4544 — Bugbot: Dead property `pendingCompletionDialogMessage` never set non-nil (`NewTabDaxDialogFactory.swift:192`)
**Source:** Bugbot on PR #4544, `NewTabDaxDialogFactory.swift:192`
**Issue:** `NewTabDaxDialogFactory.createFinalDialog` was updated with chat-path conditional logic (`chatPathPhase == .trackerToEOJ && isAIChatEnabled` choosing a different message + pixel), but `RebrandedNewTabDaxDialogFactory.createFinalDialog` was not updated to match — despite its section mark being renamed to "Chat-Path Completion". The `.final` spec is currently unreachable for chat-path + AI-enabled users (the chat EOJ is driven by `presentChatPathOnboardingCompletionIfNeeded` instead), so `pendingCompletionDialogMessage` is always nil.
**State:** 🔴 [OPEN] on GitHub. The dead branching in `NewTabDaxDialogFactory` was removed in a later commit; verify `RebrandedNewTabDaxDialogFactory` is consistent.
---
### 🔴 PR #4544 — Bugbot: Rebranded factorys final dialog missing chat-path branching (`RebrandedNewTabDaxDialogFactory.swift:202`)
**Source:** Bugbot on PR #4544, `RebrandedNewTabDaxDialogFactory.swift:202`
**Issue:** `NewTabDaxDialogFactory.createFinalDialog` has chat-path branching (`chatPathPhase == .trackerToEOJ && isAIChatEnabled`), but `RebrandedNewTabDaxDialogFactory.createFinalDialog` does not — both are selected by the `onboardingRebranding` feature flag. While `.final` is currently unreachable for chat-path + AI-enabled users, divergence could cause the wrong message + pixel if the flow changes.
**State:** 🔴 [OPEN] on GitHub. Needs symmetry check between the two factories.
---
### 🔴 PR #4544 — Alessandro (DaxDialogs.swift:125): `DaxDialogProvider` refactoring suggestion
**Source:** [Alessandro May 7 review on PR #4544](https://github.com/duckduckgo/apple-browsers/pull/4544), `DaxDialogs.swift:125`
**Issue:** Alessandro asked whether having a `DaxDialogProvider` that internally delegates to either `DaxDialogs` or a new `DuckAIDaxDialogs` would be a significant change — to separate responsibilities since the chat-path flow doesnt need search dialogs.
**State:** 🔴 [OPEN] on GitHub. Alessandros own follow-up (May 10): “No time for this, lets re-assess once the experiment is live.” → Deferred to post-experiment follow-up.
---
### 🔴 PR #4544 — Alessandro (ContextualOnboardingNewTabDialogFactoryTests.swift:172): Tests are for the legacy factory
**Source:** [Alessandro May 7 review on PR #4544](https://github.com/duckduckgo/apple-browsers/pull/4544), `ContextualOnboardingNewTabDialogFactoryTests.swift:172`
**Issue:** “Just bear in mind that these tests are for the legacy factory.” Tests added under `// MARK: - Chat Path Subsequent Dialog` target `NewTabDaxDialogFactory` (legacy), not `RebrandedNewTabDaxDialogFactory` (active under the rebranding flag).
**State:** 🔴 [OPEN] on GitHub. Rebranded factory coverage may be insufficient.
---
### ✅ [Resolved] PR #4544 — Bugbots (additional resolved threads)
All resolved on GitHub. Fixed in later commits on the `#4544` branch.
| Thread | Fix |
|---|---|
| `DefaultDaxDialogsSettings.chatPathPhase` missing `isChatFirstPath` guard | Added in later commit |
| Chat-path tests miss `isChatFirstPath` setup | Fixed in tests |
| Debug reset omits clearing `isChatFirstPath` flag | Fixed in `OnboardingDebugView` |
| Duplicated `chatPathPhase` logic across `DaxDialogs` + `ContextualDaxDialogsFactory` | Consolidated into `DaxDialogsSettings` |
| `TrackerToEOJ` phase test also needs browsing dialog flag | Fixed in tests |
| Missing fallback when AI Chat disabled during chat path (`MainViewController.swift:4712`) | Fallback to `.final` added |
| `isChatPath` logic in `createFinalDialog` is unreachable | Dead branching removed |
| Alessandro: tests replicating real `DaxDialogsSettings` logic | Simplified tests |
---
## Open Items — PR #4591
> PR #4591 (`demo-tracker-blocking-onboarding-ui-polish`) is **Approved**. Open threads still need resolving before merge.
### 🔴 PR #4591 — Alessandro (RebrandedNewTabDaxDialogFactory.swift): Closure sent via notification
**Source:** [Alessandro review on PR #4591](https://github.com/duckduckgo/apple-browsers/pull/4591), `RebrandedNewTabDaxDialogFactory.swift`
**Issue:** “Not a big fan of sending this closure in a notification, but I guess this would require some refactoring to change it.” Settings deep-link callback dispatched via `NotificationCenter` with a closure payload.
**State:** 🔴 [OPEN] on GitHub. Alessandro acknowledged its a refactor; no fix required to merge.
---
### 🔴 PR #4591 — Alessandro (MainViewController.swift): `as? (() -> Void)` runtime cast
**Source:** [Alessandro review on PR #4591](https://github.com/duckduckgo/apple-browsers/pull/4591), `MainViewController.swift`
**Issue:** `as? (() -> Void)` cast is only checked at runtime — if the factorys closure signature ever changes, it will silently fail.
**State:** 🔴 [OPEN] on GitHub. This was fixed in commit `482056566b` on `sr-feedback` (wrapped in a typed `SettingsDeepLinkCallback` struct). Fix is NOT on #4591 branch; will land when stack merges.
---
### 🟡 PR #4591 — Alessandro (NewTabPageViewController.swift): GJ3 — hide address bar
**Source:** [Alessandro review on PR #4591](https://github.com/duckduckgo/apple-browsers/pull/4591), `NewTabPageViewController.swift`
**Issue:** Alessandro flagged the GJ3 requirement to hide the address bar for the visit-site step.
**State:** 🟡 [OPEN] on GitHub thread. Fix implemented in `sr-feedback` branch (PR #4855) via `setBarsHidden`. Will land when stack merges.
---
### 🔴 PR #4591 — Bugbot (SyncSettingsViewController.swift:738): Experiment pixel skips `.connect` receiver
**Source:** Bugbot on PR #4591, `SyncSettingsViewController.swift:738`
**Issue:** The experiment success pixel fires for `.recovery` sync path but skips `.connect`. mallexxx acknowledged ([comment](https://github.com/duckduckgo/apple-browsers/pull/4591)): pixel originates in upstream PR #4575, not this PR.
**State:** 🔴 [OPEN] on GitHub. Acknowledged as upstream issue.
---
### 🔴 PR #4591 — Bugbot (SyncSettingsViewController.swift:588): Missing experiment success pixel in `controllerDidCreateSyncAccount`
**Source:** Bugbot on PR #4591, `SyncSettingsViewController.swift:588`
**State:** 🔴 [OPEN] on GitHub. Needs verification / fix.
---
### 🔴 PR #4591 — Bugbot (MainViewController.swift): Removed `performCancel` may leave omnibar in editing state
**Source:** Bugbot on PR #4591, `MainViewController.swift`
**Issue:** Removing `performCancel` call may leave the omnibar stuck in editing state in certain paths.
**State:** 🔴 [OPEN] on GitHub. Needs verification.
---
### 🔴 PR #4591 — Bugbot (RebrandedNewTabDaxDialogFactory.swift): `onPresented` passes `false` but sheet was shown
**Source:** Bugbot on PR #4591, `RebrandedNewTabDaxDialogFactory.swift`
**Issue:** `onPresented` closure is called with `false` despite the subscription sheet having been shown, leading to incorrect state tracking.
**State:** 🔴 [OPEN] on GitHub. Needs fix.
---
### ✅ [Resolved] PR #4591 — Bugbots (resolved threads)
| Thread | State |
|---|---|
| Missing experiment success pixel when `shouldShowSyncEnabled` is true (`SyncSettingsViewController.swift:567`) | [Resolved] |
| Duplicated editing-state embedding constraint logic (`NewTabPageViewController.swift`) | [Resolved] — `embedDialogInEditingState` removed in `sr-feedback` |
| Verbose multi-line comments explain standard patterns | [Resolved] |
| Missing `?? parent` fallback when finding editing controller | [Resolved] — editing state approach removed |
| Private method `embedDialogInEditingState` is never called | [Resolved] — method removed in `sr-feedback` |
---
### ✅ [Resolved] PR #4664 — Bugbot: NTP dialog title changed for all paths, not just chat-path
**Source:** Bugbot + [Alessandro review on PR #4664](https://github.com/duckduckgo/apple-browsers/pull/4664), `RebrandedNewTabDaxDialogFactory.swift`
**Fix:** `isChatPath` check added — title now conditional on `chatPathPhase == .visitSite`.
**State:** ✅ [Resolved] on GitHub. Fixed in PR #4664.
---
### 🔴 PR #4668 — aataraxiaa: Commented-out `Config(...)` line in `FeatureFlag.swift:635`
**Source:** [aataraxiaa review comment on PR #4668](https://github.com/duckduckgo/apple-browsers/pull/4668), `FeatureFlag.swift:635`