Files
bitvid/issues/todo-issue-1.md
T
google-labs-jules[bot]andPR0M3TH3AN c3f386a62b chore(ai): triage TODOs and create issues
- Scan repository for TODO/FIXME comments.
- Generate `artifacts/todos.txt` with identified items.
- Create `issues/todo-issue-1.md` for flaky hashtag preferences test.
- Create `issues/todo-issue-2.md` for failing visual moderation tests.
- No trivial fixes found; all identified TODOs require investigation.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-01 01:08:37 +00:00

1.1 KiB

todo: Investigate flaky hashtag preferences test in CI

File: tests/hashtag-preferences.test.mjs (Line 307) Priority: Medium Tags: ai, needs-review

Description: The test "load defers permission-required decrypts until explicitly enabled" contains commented-out code marked with a TODO indicating flakiness in CI environments.

Context:

      // TODO: This part of the test is flaky in CI environments.
      // Logs confirm the code attempts decryption ("Attempting decryption via window.nostr fallback"),
      // but the mock spy is not consistently called, likely due to runNip07WithRetry/microtask timing.
      //
      // await hashtagPreferences.load(pubkey, { allowPermissionPrompt: true });
      //
      // assert.equal(
      //   decryptCalls.length,
      //   1,
      //   "explicit permission prompts should retry decryption",
      // );
      // assert.deepEqual(hashtagPreferences.getInterests(), ["late"]);

Suggested Next Step: Investigate the timing issues with runNip07WithRetry and the microtask queue to reliably mock the permission prompt behavior in tests.