Skip to content

Rebuild compare projections and renderers around typed changes#106

Merged
corymhall merged 1 commit intomasterfrom
st-ac3.17.3.8-remove-legacy-engine
Mar 2, 2026
Merged

Rebuild compare projections and renderers around typed changes#106
corymhall merged 1 commit intomasterfrom
st-ac3.17.3.8-remove-legacy-engine

Conversation

@corymhall
Copy link
Member

@corymhall corymhall commented Feb 27, 2026

Summary

This PR rebuilds compare projections and renderers to consume typed change data directly.

It removes legacy rendering assumptions and aligns JSON/text output contracts with the typed engine introduced in #105.

What Changed

  • Reworked compare projection logic to build structured changes and grouped views from typed events.
  • Updated JSON and text renderers to use the structured model consistently.
  • Removed dead legacy-engine artifacts from compare internals.
  • Added/updated golden fixtures and renderer tests for deterministic contract coverage.
  • Added compare-level structured golden coverage for fixture parity.

Why

Renderer/projection behavior should be derived from one typed source of truth.

Doing this here makes later normalization lookups additive, instead of requiring command-layer patchups.

Context

@corymhall corymhall changed the title st-ac3.17.3.8-remove-legacy-engine: squash branch history Rebuild compare projections and renderers around typed changes Feb 27, 2026
@corymhall corymhall marked this pull request as ready for review February 27, 2026 13:40
@corymhall corymhall requested a review from a team February 27, 2026 13:42
@corymhall corymhall force-pushed the st-ac3.17.3.1-typed-change-engine branch from 5048446 to cf2f789 Compare March 2, 2026 11:16
@corymhall corymhall force-pushed the st-ac3.17.3.8-remove-legacy-engine branch from c40a092 to 78cc2b5 Compare March 2, 2026 11:16
corymhall added a commit that referenced this pull request Mar 2, 2026
#105)

## Summary
This PR establishes typed `Change` items as the canonical output of the
internal compare engine.

It replaces violation plumbing with a typed-first contract that
downstream renderers can consume directly.

## What Changed
- Reworked `internal/compare` model and engine output to emit typed
change records.
- Removed legacy violation-oriented report fields and bridging logic.
- Strengthened engine/requiredness tests around deterministic typed
output and removed-output edge cases.
- Kept category semantics explicit in one place so later PRs can
project/render from a stable contract.

## Why
The stack needs a single canonical change model before
projection/rendering and lookup normalization can be simplified safely.

This is the foundation for follow-up projection and lookup integration
work in #106 and above.
Base automatically changed from st-ac3.17.3.1-typed-change-engine to master March 2, 2026 11:55
Squash details:
- Branch: st-ac3.17.3.8-remove-legacy-engine
- Base: st-ac3.17.3.1-typed-change-engine
- Squashed commits: 9

Original commits:
- 754a3c1 internal/compare: remove legacy diagtree engine path
- e7c9ab9 Rebuild compare breaking-change projections from typed changes
- 3d8723b Keep nested breaking lines when direct change exists
- c803a52 Fix compare maxChanges entry semantics and kind mapping
- eee787a Track total breaking count independent of max-changes
- c62ff6f Restore compare structured changes/grouped output contract
- db468ce Align compare cmd tests with structured changes/grouped contract
- 3b16bea Centralize compare Result structured model and JSON goldens
- 4182404 Align text formatting to structured golden and add golden test
@corymhall corymhall force-pushed the st-ac3.17.3.8-remove-legacy-engine branch from 78cc2b5 to 8ad024b Compare March 2, 2026 11:57
@corymhall corymhall merged commit 63bad80 into master Mar 2, 2026
5 checks passed
@corymhall corymhall deleted the st-ac3.17.3.8-remove-legacy-engine branch March 2, 2026 15:24
corymhall added a commit that referenced this pull request Mar 2, 2026
## Summary
This PR introduces deterministic token lookup resolution from metadata
history.

Lookup behavior is exposed as direct per-call APIs so compare-time
decisions can query resolution state without precomputed global
services.

## What Changed
- Added token lookup logic for resolved/ambiguous/none outcomes.
- Added fixtures for single-rename, multi-hop, and ambiguity scenarios.
- Added tests for determinism, candidate handling, and conservative
behavior.
- Extended normalize type surfaces needed by token lookup APIs.

## Why
Token equivalence is required to classify missing/add/remap changes
correctly during compare generation.

This isolates token lookup as a focused primitive before integrating it
into compare behavior in #109.

## Context
- Depends on projection cleanup in #106.
- Consumed by token integration in #109.
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.

2 participants