Skip to content

test: harden mutation gate with bounded orchestration#383

Merged
cmbays merged 2 commits intomainfrom
codex-stryker-thresholds-20260315-231830
Mar 16, 2026
Merged

test: harden mutation gate with bounded orchestration#383
cmbays merged 2 commits intomainfrom
codex-stryker-thresholds-20260315-231830

Conversation

@cmbays
Copy link
Owner

@cmbays cmbays commented Mar 16, 2026

Summary

  • raise Stryker thresholds to high 90 / low 80 / break 70
  • bound cooldown-session and execute orchestration with direct helper and unit coverage
  • add targeted survivor coverage for session-bridge and related command wiring

Verification

  • npm run test:acceptance
  • npm run test:coverage:unit
  • npm run test:crap
  • npm run lint
  • npm run test:arch
  • npm run build
  • npm run test:mutation

Summary by CodeRabbit

  • New Features

    • Improved CLI output for prepared runs/cycles and clearer agent-context blocks.
    • New parsing and validation for run artifacts and token usage; stricter kata name validation.
    • New cooldown-session helpers to generate diary, learning drafts, budget alerts, and dojo session requests.
  • Bug Fixes

    • Better handling of terminal/invalid bridge runs and resilient rollback on failures.
    • More robust handling of malformed artifact/metadata files and persistence/analytics failures.
  • Tests

    • Vastly expanded test coverage across cycle management, execution flows, and session bridging.

@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.

@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: 654a2599-8a36-4f56-bb57-8e8789d902db

📥 Commits

Reviewing files that changed from the base of the PR and between 4978f2d and fd43234.

📒 Files selected for processing (2)
  • src/features/cycle-management/cooldown-session.helpers.test.ts
  • src/features/cycle-management/cooldown-session.helpers.ts

📝 Walkthrough

Walkthrough

Centralizes execute-related parsing/formatting helpers and refactors execute command flows; adds parsing/validation utilities for completed runs and token usage; refactors cooldown-session into lazy, resolver-driven orchestration with many small helpers; and substantially expands test coverage across CLI, cooldown-session, bridge, and runner components.

Changes

Cohort / File(s) Summary
Execute CLI Helpers
src/cli/commands/execute.helpers.ts, src/cli/commands/execute.helpers.test.ts
Adds types (CompletedRunArtifact, CompletedRunTokenUsage, PreparedCycleOutput/PreparedRunOutput), validation schemas, parsing utilities (parseCompletedRunArtifacts, parseCompletedRunTokenUsage), formatting helpers (formatAgentLoadError, mergePinnedFlavors), output builders (buildPreparedCycleOutputLines, buildPreparedRunOutputLines), and kata name validation (assertValidKataName) plus comprehensive tests.
Execute CLI Refactor & Tests
src/cli/commands/execute.ts, src/cli/commands/execute.test.ts
Replaces ad-hoc output/error logic with centralized helpers; introduces runSingleCategoryMode/runPipelineMode and bridgeExecutionGaps; integrates token-usage parsing and pin merging; expands tests (dry-run, prepared outputs, gap bridging, agent error paths).
Cooldown Session Helpers & Tests
src/features/cycle-management/cooldown-session.helpers.ts, src/features/cycle-management/cooldown-session.helpers.test.ts
Adds a library of helpers and types for cooldown lifecycle: outcome resolution, diary/Dojo wiring, budget usage/clamping, learning draft construction, expiry/belt messages, and synthesis input builders with full unit tests.
Cooldown Session Core & Tests
src/features/cycle-management/cooldown-session.ts, src/features/cycle-management/cooldown-session.test.ts, src/features/cycle-management/cooldown-session.unit.test.ts, src/features/cycle-management/cooldown-session-prepare.test.ts
Refactors CooldownSession to lazy resolve optional subsystems, adds many private orchestration helpers (beginCooldown, rollbackCycleState, readAppliedSynthesisProposals, writeSynthesisInput, buildAgentPerspectiveFromProposals, etc.), guards non-fatal errors, and expands tests covering prepare/complete/run/rollback and integration points.
Execution Runner & Bridge Tests
src/features/execute/workflow-runner.test.ts, src/infrastructure/execution/session-bridge.test.ts, src/infrastructure/execution/session-bridge.unit.test.ts
Increases coverage for non-fatal analytics/persistence failures, artifact parsing warnings, bridge-run terminal handling, run-id recovery, history writing, and related logging assertions.
Configuration
stryker.config.mjs
Raises mutation testing thresholds: high 80→90, low 70→80, break 60→70.

Sequence Diagram(s)

sequenceDiagram
participant CLI as CLI (execute)
participant Bridge as SessionBridge
participant Cooldown as CooldownSession
participant Store as KnowledgeStore/JsonStore
participant Dojo as Dojo/DiaryWriter

CLI->>Cooldown: prepare/complete/run command
Cooldown->>Bridge: query bridge-run metadata / check gaps
Bridge-->>Cooldown: bridgeRun info (in-progress/terminal)
Cooldown->>Store: write/read synthesis inputs & learnings
Store-->>Cooldown: synthesis results / persisted drafts
Cooldown->>Dojo: optionally build/write dojo diary/session
Dojo-->>Cooldown: ack
Cooldown-->>CLI: buildPrepared* output lines / token usage / status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Poem

🐰
Helpers stitched neat, lines trimmed just right,
Lazy resolvers wake when features invite.
Tests hop around, asserting each trail,
Tokens and bridges — the rabbit leaves a trail.
Cheers to cleaner flows and CI that won't fail! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: harden mutation gate with bounded orchestration' directly reflects the main changes: increasing Stryker thresholds (hardening the mutation gate) and adding bounded orchestration helpers with test coverage.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 codex-stryker-thresholds-20260315-231830
📝 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 merged commit a024d85 into main Mar 16, 2026
2 checks passed
@cmbays cmbays deleted the codex-stryker-thresholds-20260315-231830 branch March 16, 2026 07:35
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