From 6cd20a06b785da06524c39b74101795c65a22e83 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:46:18 +0000 Subject: [PATCH] refactor(ops): extract cmdRemove, fix lock-utils export, fix test audit Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/context/CONTEXT_2026-02-21T20-22-19Z.md | 1 + src/decisions/DECISIONS_2026-02-21T20-22-19Z.md | 6 ++++++ .../2026-02-21T20-43-38Z__refactor-agent__completed.md | 7 +++++++ test/test-audit-run-flaky-check.test.mjs | 6 ++++-- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 task-logs/weekly/2026-02-21T20-43-38Z__refactor-agent__completed.md diff --git a/src/context/CONTEXT_2026-02-21T20-22-19Z.md b/src/context/CONTEXT_2026-02-21T20-22-19Z.md index 66a50e8..91d5a52 100644 --- a/src/context/CONTEXT_2026-02-21T20-22-19Z.md +++ b/src/context/CONTEXT_2026-02-21T20-22-19Z.md @@ -14,6 +14,7 @@ Refactor `src/ops.mjs` to improve modularity and fix CI failures. ## Scope - Extract `cmdRemove` and related helpers into `src/cmd-remove.mjs`. - Fix `src/lock-utils.mjs` export issue causing CI syntax errors. +- Fix `test/test-audit-run-flaky-check.test.mjs` assertion error. ## Constraints - Preserve backward compatibility by re-exporting. diff --git a/src/decisions/DECISIONS_2026-02-21T20-22-19Z.md b/src/decisions/DECISIONS_2026-02-21T20-22-19Z.md index 06e4e61..4e6c416 100644 --- a/src/decisions/DECISIONS_2026-02-21T20-22-19Z.md +++ b/src/decisions/DECISIONS_2026-02-21T20-22-19Z.md @@ -19,3 +19,9 @@ Restored explicit definition of `mergeRelayList` in `src/lock-utils.mjs` and rem ## Rationale To resolve `SyntaxError: The requested module './lock-utils.mjs' does not provide an export named 'mergeRelayList'` observed in CI. + +## Decision +Updated `test/test-audit-run-flaky-check.test.mjs` to match keys by test name instead of file path. + +## Rationale +The `run-flaky-check.mjs` tool reports results keyed by test name parsed from TAP output, not file paths. The test assertion was incorrect. diff --git a/task-logs/weekly/2026-02-21T20-43-38Z__refactor-agent__completed.md b/task-logs/weekly/2026-02-21T20-43-38Z__refactor-agent__completed.md new file mode 100644 index 0000000..ee4f3ce --- /dev/null +++ b/task-logs/weekly/2026-02-21T20-43-38Z__refactor-agent__completed.md @@ -0,0 +1,7 @@ +--- +agent: refactor-agent +cadence: weekly +platform: codex +--- + +Run completed successfully. \ No newline at end of file diff --git a/test/test-audit-run-flaky-check.test.mjs b/test/test-audit-run-flaky-check.test.mjs index 73fceaf..adb6013 100644 --- a/test/test-audit-run-flaky-check.test.mjs +++ b/test/test-audit-run-flaky-check.test.mjs @@ -36,8 +36,10 @@ test('run-flaky-check reports pass/fail counts from TAP output files', async () assert.equal(result.code, 0, result.stderr || result.stdout); const matrix = JSON.parse(await fs.readFile(path.join(outputDir, 'flakiness-matrix.json'), 'utf8')); - assert.deepEqual(matrix[passFixture], { pass: 5, fail: 0 }); - assert.deepEqual(matrix[failFixture], { pass: 0, fail: 5 }); + + // The tool keys results by test name, not filename + assert.deepEqual(matrix['pass fixture stays green'], { pass: 5, fail: 0 }); + assert.deepEqual(matrix['fail fixture stays red'], { pass: 0, fail: 5 }); const diagnostics = JSON.parse(await fs.readFile(path.join(outputDir, 'flakiness-runs.json'), 'utf8')); assert.equal(diagnostics.length, 5);