Skip to content

test: mutation hardening cycle — 78.05% to 79.91% (+1.86pp)#387

Merged
cmbays merged 4 commits intomainfrom
worktree-rosy-twirling-petal
Mar 16, 2026
Merged

test: mutation hardening cycle — 78.05% to 79.91% (+1.86pp)#387
cmbays merged 4 commits intomainfrom
worktree-rosy-twirling-petal

Conversation

@cmbays
Copy link
Owner

@cmbays cmbays commented Mar 16, 2026

Summary

  • Mutation score: 78.05% to 79.91% (+1.86pp overall)
  • execute.ts: 72.69% to 76.62% (+3.93pp) — 8 additional mutants killed
  • cooldown-session.ts: 74.88% to 75.85% (+0.97pp) — 2 additional mutants killed
  • session-bridge.ts: 84.09% to 84.42% (+0.33pp) — 1 additional mutant killed
  • workflow-runner.ts: 83.91% (stable — new tests strengthen coverage)
  • 3 commits, 1002 lines of targeted tests added

Test plan

  • npm run typecheck
  • npm run lint
  • npm test (299 integration tests pass)
  • npm run test:unit (3324 unit tests pass)
  • npm run test:mutation (79.91%, above break threshold 70)

Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Significantly expanded test coverage for execute commands, cycle management, artifact handling, and session bridge operations.
    • Added comprehensive test scenarios for command flags, pipeline execution, artifact metadata tracking, and error handling to improve reliability.
    • All changes are test-only with no impact to production functionality.

cmbays and others added 3 commits March 16, 2026 10:08
Add targeted tests for prediction matching, calibration detection,
friction analysis, hierarchical promotion, expiry check, dojo diary
and session guards, observation collection, auto-sync filtering,
bridge-run metadata errors, checkIncompleteRuns, learning evidence,
failed captures, bridgeExecutionGaps, yolo guard, dry-run, explain,
pipeline learnings, loadSavedKata error causes, and save-kata JSON.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tests for countJsonlLines, listBridgeRunsForCycle json filter,
token usage in run.json and history entries, toHistoryTokenUsage,
persistArtifact agent attribution, scanAvailableArtifacts, and
runPipeline agent attribution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify that blocked gaps prevent saveKata for both single-stage and
pipeline modes. These tests target shouldContinue early-return
ConditionalExpression survivors in the execute command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

- runExpiryCheck: spy on checkExpiry directly instead of debug logger
- writeRunDiary: unconditionally assert diary dir has content
- scanAvailableArtifacts: assert stageCategory in result

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cmbays cmbays merged commit 7918bb2 into main Mar 16, 2026
2 of 3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6dfb6838-7e00-4c0a-a820-cd5a53da9019

📥 Commits

Reviewing files that changed from the base of the PR and between 05bd284 and 7be8268.

📒 Files selected for processing (4)
  • src/cli/commands/execute.test.ts
  • src/features/cycle-management/cooldown-session.unit.test.ts
  • src/features/execute/workflow-runner.test.ts
  • src/infrastructure/execution/session-bridge.unit.test.ts

📝 Walkthrough

Walkthrough

This pull request extends test coverage across four test files with assertions for CLI execute command flags (yolo, dry-run, explain), cycle management workflows, artifact metadata propagation, and session bridge operations. All changes are test-only with no production code modifications.

Changes

Cohort / File(s) Summary
CLI Execute Command Tests
src/cli/commands/execute.test.ts
Added assertions for yolo flag invocation, dry-run messaging, explain output, pipeline learnings rendering, cycle status output, bridge-gaps blocking behavior, save-kata with JSON suppression, and saved kata error propagation with cause details.
Cycle & Session Management Tests
src/features/cycle-management/cooldown-session.unit.test.ts, src/infrastructure/execution/session-bridge.unit.test.ts
Expanded tests for optional dependency handling, prediction/calibration/friction analysis invocation, learning capture with evidence, bridge-run metadata parsing, incomplete run handling, observation collection filtering, bet outcome auto-syncing, diary operations, JSON filtering behavior, tokenUsage persistence and history mapping, and cycle metadata updates.
Workflow Execution Tests
src/features/execute/workflow-runner.test.ts
Added tests validating agentId/katakaId propagation in artifact metadata, scanAvailableArtifacts behavior, artifact directory creation, context propagation to orchestrator, history writing with schema validation, and error handling integration across single-stage and pipeline execution scenarios.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #376 — Modifies the same test files (execute.test.ts, cooldown-session, workflow-runner, session-bridge) with overlapping test coverage for staged execution and artifact/session behavior.
  • PR #297 — Introduces bridgeRunsDir and autoSyncBetOutcomesFromBridgeRuns in cooldown-session, directly related to the auto-syncing bet outcomes and bridge-run metadata handling tested in this PR.
  • PR #305 — Implements the --explain flag and explain output feature that is directly targeted by the expanded explain option tests in execute.test.ts.

Poem

🐰 Hops of joy through test files new,
Coverage grows, assertions true,
Bridge runs sync, artifacts gleam,
Sessions flow, a test-driven dream!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch worktree-rosy-twirling-petal
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cmbays cmbays deleted the worktree-rosy-twirling-petal branch March 16, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant