From 20a295b17050ef6cce1956a8f281fe40d46decb5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 21:10:58 +0000 Subject: [PATCH] =?UTF-8?q?chore(agents):=20run=20bug-reproducer-agent=20w?= =?UTF-8?q?eekly=20task=20=E2=80=94=20Created=20reproducer=20for=20hashtag?= =?UTF-8?q?=20preferences=20flakiness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- docs/agents/WEEKLY_AGENT_TASK_LOG.csv | 1 + .../reproducers/hashtag-flakiness/README.md | 20 ++++++++ .../reproducers/hashtag-flakiness/repro.mjs | 47 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 examples/reproducers/hashtag-flakiness/README.md create mode 100644 examples/reproducers/hashtag-flakiness/repro.mjs diff --git a/docs/agents/WEEKLY_AGENT_TASK_LOG.csv b/docs/agents/WEEKLY_AGENT_TASK_LOG.csv index 5f9a889e..3db41fd7 100644 --- a/docs/agents/WEEKLY_AGENT_TASK_LOG.csv +++ b/docs/agents/WEEKLY_AGENT_TASK_LOG.csv @@ -1 +1,2 @@ date,agent_name,prompt_file,status,branch,summary +2026-02-12,bug-reproducer-agent,bitvid-bug-reproducer-agent.md,completed,unstable,"Created reproducer for hashtag preferences flakiness (tests/hashtag-preferences.test.mjs)" diff --git a/examples/reproducers/hashtag-flakiness/README.md b/examples/reproducers/hashtag-flakiness/README.md new file mode 100644 index 00000000..e097b7d6 --- /dev/null +++ b/examples/reproducers/hashtag-flakiness/README.md @@ -0,0 +1,20 @@ +# Hashtag Preferences Flakiness Reproducer + +This reproducer attempts to demonstrate flakiness in the unit test `tests/hashtag-preferences.test.mjs`, specifically the test case `"load defers permission-required decrypts until explicitly enabled"`. + +This test was reported as flaky in CI due to timing issues with `runNip07WithRetry` and microtasks when simulating explicit permission retries. + +## Usage + +Run the reproducer script: + +```bash +node examples/reproducers/hashtag-flakiness/repro.mjs +``` + +This script will run the unit test file 20 times in a loop. If it fails on any iteration, it will exit with an error code and print the iteration number. + +## Expected Behavior + +If the issue is reproducible, the script should fail within the 20 iterations. +If the issue is not reproducible (e.g. fixed, or requires specific CI conditions), the script will complete all 20 iterations successfully. diff --git a/examples/reproducers/hashtag-flakiness/repro.mjs b/examples/reproducers/hashtag-flakiness/repro.mjs new file mode 100644 index 00000000..21da90bf --- /dev/null +++ b/examples/reproducers/hashtag-flakiness/repro.mjs @@ -0,0 +1,47 @@ +import { spawn } from 'node:child_process'; + +const MAX_RUNS = 20; + +async function runTest(iteration) { + return new Promise((resolve, reject) => { + const child = spawn('npm', ['run', 'test:unit', '--', 'tests/hashtag-preferences.test.mjs'], { + stdio: 'inherit', + shell: true, + env: { ...process.env, FORCE_COLOR: '1' } + }); + + child.on('close', (code) => { + if (code === 0) { + resolve(); + } else { + reject(new Error(`Test failed on iteration ${iteration} with exit code ${code}`)); + } + }); + + child.on('error', (err) => { + reject(err); + }); + }); +} + +async function main() { + console.log(`Starting reproduction loop (${MAX_RUNS} runs)...`); + + for (let i = 1; i <= MAX_RUNS; i++) { + console.log(`\n--- Iteration ${i}/${MAX_RUNS} ---`); + try { + await runTest(i); + } catch (error) { + console.error(`\n❌ REPRODUCTION SUCCESSFUL: ${error.message}`); + process.exit(1); + } + } + + console.log(`\n✅ Passed ${MAX_RUNS} iterations without failure.`); + // If we reach here, we failed to reproduce the issue (or it's not flaky enough). + // We exit with 0 to indicate the script ran successfully, even if reproduction failed. + // But strictly speaking, if the goal is to reproduce, maybe we should warn. + process.exit(0); +} + +main();