

# Changelog

All notable changes to this project will be documented in this file.

This project follows a pragmatic interpretation of Semantic Versioning.
Given its role as CI automation infrastructure, behavioral changes may be considered breaking even if the API surface remains stable.

## [2.0.2] — 2026-03-29

This release fixes the GitHub release workflow after the GitHub connector launch.

### Fixed

- The release job now passes `--repo "${GITHUB_REPOSITORY}"` to `gh release` commands, so publishing release assets no longer depends on a checked-out `.git` directory.
- The release workflow now also triggers on published GitHub Releases, covering the GitHub UI release path in addition to raw tag pushes.

## [2.0.0] — 2026-03-29

This release adds first-class GitHub pull request support and formalizes the connector-neutral runtime model.

### Added

- GitHub review connector with snapshot loading, reviewer assignment, summary comment upsert, and pagination-aware API access.
- GitHub Actions workflows for:
  - pull request `observe` execution
  - tag-based GitHub Releases that publish both GitLab and GitHub binaries
- GitHub-specific flavor example in `mr-milchick.github.toml`.
- Connector-specific release assets for:
  - `mr-milchick-gitlab-linux-x86_64-musl`
  - `mr-milchick-github-linux-x86_64-musl`

### Changed

- CI context loading is now review-platform aware and can read either GitLab CI or GitHub Actions metadata.
- Flavor templates now support both `[templates.gitlab]` and `[templates.github]`.
- Capability reporting now prints the actually compiled review connector instead of assuming GitLab.
- Documentation now describes both supported review connectors and the GitHub release workflow.

### Breaking Changes

- Public Rust context types were renamed to connector-neutral forms:
  - `ProjectId` -> `ProjectKey`
  - `MergeRequestRef` -> `ReviewContextRef`
  - `MergeRequestIid` -> `ReviewId`
- Public `CiContext` helpers were renamed from merge-request-specific names to review-neutral names.
- Summary rendering is now selected by review platform rather than a GitLab-only public function path.
- The default build now compiles the GitHub connector plus Slack sinks.

## [1.4.0] — 2026-03-28

This release adds connector-owned message templating and a much better local iteration loop for notification work.

### Added

- Connector message templates in `mr-milchick.toml` for:
  - GitLab summary comments
  - Slack app root and thread messages
  - Slack workflow title and thread messages
- Field-level template override validation with fallback to built-in defaults when a template field is invalid.
- Fixture-backed `observe`, `explain`, and `refine` runs for local scenario testing without a live merge request.
- Fixture-driven Slack delivery via `refine --fixture ... --send-notifications`.
- Explicit fixture notification variants:
  - `notification_variant = "first"`
  - `notification_variant = "update"`
- CLI override for fixture notification rendering with `--fixture-variant first|update`.
- Starter fixture scenarios for:
  - `fixtures/first-notification.toml`
  - `fixtures/update-notification.toml`
  - `fixtures/blocking-refine.toml`

### Changed

- Connector notification templates are now split into `first_*` and `update_*` fields instead of a single shared Slack message shape.
- Default Slack notification copy now uses a neutral `first` lifecycle framing instead of the older review-request-specific wording.
- Template placeholders were simplified:
  - added `notification_subject`
  - removed `notification_subject_action`
  - removed `notification_subject_suffix`
  - removed `mr_line`
- Documentation now includes full template examples, fixture-testing guidance, and starter config snippets based on the current built-in defaults.

## [1.1.0] — 2026-03-24

This release makes Slack app review notifications capable of pinging the right people directly.

### Added

- Slack app user mapping via `MR_MILCHICK_SLACK_USER_MAP`, using a JSON object keyed by GitLab username.
- Optional `[slack_app.user_map]` configuration in `mr-milchick.toml`.
- Repository TOML scaffolding for every username currently present in the checked-in `CODEOWNERS` file.

### Changed

- Slack app notifications now rewrite mapped GitLab-style mentions like `@principal.engineer` into Slack user mentions like `<@U01234567>` in both the compact channel message and the threaded follow-up.
- When both config sources are present, the environment-provided Slack user map takes precedence over the TOML mapping.
- Documentation and local testing examples now describe Slack user-ID based mentions instead of plain `@username` references.

## [1.0.0] — 2026-03-23

This release is the connector architecture reset.

Mr. Milchick is now organized as a workspace with a thin app crate, a platform-neutral core, a runtime wiring layer, and connector-owned integrations. It is the first release where the codebase reflects the intended long-term capability model: exactly one compiled review connector plus zero or more notification sinks.

### Added

- Cargo workspace layout with:
  - `apps/mr-milchick`
  - `crates/milchick-core`
  - `crates/milchick-runtime`
  - `crates/milchick-connectors`
- Neutral review domain model:
  - `ReviewSnapshot`
  - `ReviewAction`
  - `RenderedMessage`
  - `NotificationMessage`
- Runtime traits and wiring for:
  - `ReviewConnector`
  - `NotificationSink`
  - capability-aware execution flow
- GitLab review connector implementation behind the new connector boundary
- Slack sink split into:
  - `slack-app`
  - `slack-workflow`
- Connector-owned integration tests for GitLab and both Slack sink variants
- `mr-milchick.toml` flavor file for compiled review/sink intent

### Changed

- Core planning and analysis now operate on platform-neutral types instead of GitLab-specific snapshot structs.
- Summary generation now produces a neutral rendered message model before connector-specific formatting.
- CLI integration coverage was reduced to thin app-level smoke tests; connector behavior now lives in connector crate tests.
- Slack workflow notifications now use `MR_MILCHICK_SLACK_WEBHOOK_URL` and render a simplified plain-text thread body.
- Documentation now reflects the workspace layout, connector model, and sink split.

### Removed

- Legacy root single-crate source layout in favor of the workspace structure.

### Breaking Changes

- The published crate/binary version moves from `0.x` to `1.0.0`.
- Slack notification configuration is now connector-specific:
  - Slack app sink uses `MR_MILCHICK_SLACK_BOT_TOKEN`
  - Slack workflow sink uses `MR_MILCHICK_SLACK_WEBHOOK_URL`

## [0.4.0] — 2026-03-23

This release tightens the Slack review-request experience and aligns the binary versioning/docs with the new Slack app messaging shape.

### Changed

- Slack review notifications now use a more compact top-level channel message that links directly to `MR #iid` and names the MR author.
- The threaded Slack follow-up now renders as a strict three-line mrkdwn message with a bold opener and emphasized reviewer assignment line.
- README examples and Slack documentation now reflect the Slack app-oriented notification format.

### Added

- Release metadata for the Slack messaging refresh in the changelog and crate version.

## [0.3.1] — 2026-03-18

This release corrects reviewer assignment behavior in active monorepos and hardens the CLI integration harness.

### Fixed

- `refine` now preserves reviewers already assigned on the merge request and complements them with Milchick's recommendations instead of replacing them.
- Slack review-request follow-up now reflects the final merged reviewer set actually assigned on the merge request.
- The CLI integration mock server now tolerates transient nonblocking socket reads during full test runs, preventing spurious connection resets under `cargo test --all --locked`.

### Added

- Reviewer-merge coverage in both unit tests and CLI integration tests, including a case where an existing reviewer remains assigned after refinement.

## [0.3.0] — 2026-03-18

This release hardens day-to-day operability with better diagnostics, stronger integration confidence, and tighter project documentation.

### Added

- End-to-end CLI integration tests covering mode output, GitLab HTTP behavior, and idempotency across repeated `refine` runs.
- README guidance for running the integration harness locally.

### Changed

- Structured `tracing` spans and logs now cover snapshot fetch, reviewer planning, execution, and notification decisions.
- Contributor and user docs now consistently describe runtime configuration as environment-driven.
- Small dead-code cleanup to keep the codebase intentional as it grows.

## [0.2.0] — 2026-03-17

Configuration architecture has been intentionally broken and rebuilt around pipeline-provided environment variables.

This release removes the bundled `mr-milchick.toml` model and replaces it with runtime configuration sourced directly from CI.

### Changed

- Reviewer routing is now configured through `MR_MILCHICK_REVIEWERS` JSON instead of repository TOML.
- `MR_MILCHICK_MAX_REVIEWERS` now controls reviewer selection limits at runtime.
- CODEOWNERS integration is now controlled through `MR_MILCHICK_CODEOWNERS_ENABLED`, which defaults to `true`.
- CODEOWNERS path resolution now auto-discovers common file locations when `MR_MILCHICK_CODEOWNERS_PATH` is not set.

### Removed

- `mr-milchick.toml` as a runtime configuration source.
- Embedded default config fallback baked into the binary.
- TOML-based reviewer pool configuration.

### Migration Notes

- Pipelines must now provide reviewer capability data explicitly through environment variables.
- Teams upgrading from `0.1.0` should replace TOML reviewer pools with JSON entries shaped like `{"username":"alice","areas":["frontend","packages"]}`.
- If CODEOWNERS-based routing should be disabled, set `MR_MILCHICK_CODEOWNERS_ENABLED=false`.

## [0.1.0] — 2026-03-16

Initial public foundation of Mr Milchick, a deterministic merge-request governance steward designed to operate inside GitLab CI pipelines.

This release establishes the architectural baseline, execution model, and policy enforcement primitives.

### Added

#### Core CLI framework
- Initial CLI interface with commands:
  - `observe`
  - `refine`
  - `explain`
- Async runtime execution model
- Centralized application orchestration layer

#### CI context intelligence
- Structured parsing of GitLab CI environment variables
- Merge-request pipeline detection logic
- Context normalization for rule evaluation
- Graceful handling of missing CI metadata

#### Rule engine foundation
- Initial policy evaluation engine
- Finding severity classification (blocking vs informational)
- Branch policy validation primitives
- Deterministic rule evaluation pipeline

#### Tone system (deterministic communication engine)
- Tone categories:
  - Observation
  - Refinement
  - Resolution
  - Blocking
  - Praise (reserved for future behavioral activation)
- Deterministic tone selection seeded by MR identity
- Structured message registry
- Configurable tone mode architecture (future-ready)

#### GitLab snapshot intelligence
- Initial GitLab API integration layer
- Merge request snapshot model
- Changed file surface retrieval
- Snapshot-driven evaluation entry point

#### Path topology classification
- File path → engineering domain classification
- Support for shared / frontend / backend surface detection
- Aggregated area summary model for routing logic

#### Reviewer routing engine
- Deterministic reviewer recommendation logic
- Author exclusion safeguards
- Dominant area inference for reviewer selection
- Config-driven routing policy model
- Max reviewer enforcement

#### CODEOWNERS support
- CODEOWNERS file parsing and matching engine
- Per-file ownership resolution
- Aggregated ownership extraction
- Hybrid routing policy:
  - CODEOWNERS preferred
  - topology routing fallback

#### Action planning system
- Action planning abstraction separating evaluation from execution
- Initial action types:
  - Assigned reviewers
  - Post summary comment
  - Fail pipeline
- Deterministic planning flow

#### Execution strategy layer
- Strategy-driven execution model:
  - Dry-run executor
  - GitLab mutation executor
- Environment-controlled mutation safety
- Idempotent action execution principles

#### MR communication system
- Structured summary comment renderer
- Tone-aligned decision reporting
- Human-readable governance output

#### Ownership context refactor
- Introduction of:
  - `CodeownersContext`
  - `AppConfigContext`
- Single-pass CODEOWNERS parsing per run
- Planner-owned ownership decision logic
- Alignment between explain and refine decision paths

### Changed

- Reviewer routing now incorporates hybrid ownership + topology logic
- Summary comment planning behavior standardized
- Tone resolution alignment improved for final MR state reporting
- Internal architectural boundaries clarified between:
  - evaluation
  - planning
  - execution

### Fixed

- Inconsistent reviewer recommendation resolution when CODEOWNERS present
- Tone selection drift between execution modes
- Planner decision leakage into explain-only pathways
- Summary comment tone mismatches in non-blocking scenarios

### Architectural Guarantees Established

This release formalizes the following system invariants:

- Deterministic MR evaluation given identical inputs
- CI-native operation without persistent infrastructure
- Policy logic isolated from mutation logic
- Tone generation treated as first-class system concern
- Ownership intelligence treated as governance signal, not authority override

### Known Limitations

- Risk scoring engine not yet implemented
- Reviewer load balancing not yet supported
- Governance DSL not yet available
- Merge readiness modeling not yet introduced
- Policy configuration still code-driven
- Partial GitLab API coverage
- No persistent decision telemetry

### Project State

At this stage, Mr Milchick has transitioned from:

concept → executable governance engine

Future releases will focus on:

- risk modeling
- organizational topology awareness
- policy declarative configuration
- autonomous merge stewardship
