Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,19 @@ jobs:
# Run tests in batches to avoid mock.module() conflicts between test files
# Each batch outputs its own lcov file for later merging

echo "=== Running tests/ (excluding commands/info.test.ts) ===" | tee -a coverage-output.txt
mapfile -t TEST_FILES < <(find tests -type f -name '*.test.ts' ! -path 'tests/commands/info.test.ts' | sort)
echo "=== Running tests/ (excluding commands/info.test.ts and beads-rust-bv-tracker.test.ts) ===" | tee -a coverage-output.txt
mapfile -t TEST_FILES < <(find tests -type f -name '*.test.ts' ! -path 'tests/commands/info.test.ts' ! -path 'tests/plugins/beads-rust-bv-tracker.test.ts' | sort)
bun test "${TEST_FILES[@]}" --coverage --coverage-reporter=text --coverage-reporter=lcov 2>&1 | tee -a coverage-output.txt
cp coverage/lcov.info coverage-parts/tests.lcov

# Run beads-rust-bv-tracker test in isolation: it mocks node:child_process and
# node:fs/promises via mock.module() which is process-wide in Bun and pollutes
# other tests (json-tracker, gemini-agent detect, remote Config Push Feature)
# when run in the same process.
echo "=== Running tests/plugins/beads-rust-bv-tracker.test.ts (isolated) ===" | tee -a coverage-output.txt
bun test tests/plugins/beads-rust-bv-tracker.test.ts --coverage --coverage-reporter=text --coverage-reporter=lcov 2>&1 | tee -a coverage-output.txt
cp coverage/lcov.info coverage-parts/tests-beads-rust-bv.lcov

echo "=== Running tests/commands/info.test.ts (isolated) ===" | tee -a coverage-output.txt
bun test tests/commands/info.test.ts --coverage --coverage-reporter=text --coverage-reporter=lcov 2>&1 | tee -a coverage-output.txt
cp coverage/lcov.info coverage-parts/tests-info.lcov
Expand Down Expand Up @@ -199,7 +207,7 @@ jobs:
uses: codecov/codecov-action@v4
with:
# Upload all batch coverage files - Codecov will merge them correctly
files: ./coverage-parts/tests.lcov,./coverage-parts/tests-info.lcov,./coverage-parts/doctor.lcov,./coverage-parts/info.lcov,./coverage-parts/skills.lcov,./coverage-parts/run.lcov,./coverage-parts/config.lcov,./coverage-parts/engine.lcov,./coverage-parts/beads-bv.lcov,./coverage-parts/beads-rust.lcov,./coverage-parts/beads.lcov,./coverage-parts/plugins.lcov,./coverage-parts/session.lcov,./coverage-parts/sandbox.lcov,./coverage-parts/wizard.lcov,./coverage-parts/setup.lcov,./coverage-parts/skill-installer-spawn.lcov,./coverage-parts/migration-install.lcov,./coverage-parts/templates.lcov,./coverage-parts/tui.lcov,./coverage-parts/prd.lcov,./coverage-parts/chat.lcov,./coverage-parts/parallel.lcov
files: ./coverage-parts/tests.lcov,./coverage-parts/tests-beads-rust-bv.lcov,./coverage-parts/tests-info.lcov,./coverage-parts/doctor.lcov,./coverage-parts/info.lcov,./coverage-parts/skills.lcov,./coverage-parts/run.lcov,./coverage-parts/config.lcov,./coverage-parts/engine.lcov,./coverage-parts/beads-bv.lcov,./coverage-parts/beads-rust.lcov,./coverage-parts/beads.lcov,./coverage-parts/plugins.lcov,./coverage-parts/session.lcov,./coverage-parts/sandbox.lcov,./coverage-parts/wizard.lcov,./coverage-parts/setup.lcov,./coverage-parts/skill-installer-spawn.lcov,./coverage-parts/migration-install.lcov,./coverage-parts/templates.lcov,./coverage-parts/tui.lcov,./coverage-parts/prd.lcov,./coverage-parts/chat.lcov,./coverage-parts/parallel.lcov
fail_ci_if_error: false
verbose: true
env:
Expand Down
8 changes: 8 additions & 0 deletions src/engine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,19 @@ async function buildPrompt(
// Get PRD context if the tracker supports it
const prdContext = await tracker?.getPrdContext?.();

// Build selection reason from bv metadata (if present)
const bvReasons = task.metadata?.bvReasons;
const selectionReason =
Array.isArray(bvReasons) && bvReasons.length > 0
? bvReasons.join('\n')
: undefined;

// Build extended template context with PRD data and patterns
const extendedContext = {
recentProgress,
codebasePatterns,
prd: prdContext ?? undefined,
selectionReason,
};

// Use the template system (tracker template used if no custom/user override)
Expand Down
Loading
Loading