Skip to content

Repository mock and contract producers must be migrated to the current LatestResult representation used by the public type and dry-run producer #287

Description

@MicroMilo

Summary

The same GET result path teaches two incompatible wire contracts. Dry-run emits the current semantic-string schema, while the repository mock integration emits the former count-object schema. Passing the mock response through the current text renderer yields verdict: —, executionStatus: undefined, and summary: [object Object].

Validation source commit: 60d55e47883e924ff1a5f0ab1fe67a25bc3b0877.

Code path

  • src/lib/dry-run/samples.ts:1-17: Invariant requiring dry-run and mock fixtures to match and change together
  • src/lib/dry-run/samples.ts:269-286: Dry-run LatestResult has semantic string summary, verdict, and executionStatus
  • src/commands/test.ts:250-294: Public LatestResult type says summary replaced the former count object
  • test/mock-backend/fixtures.ts:266-281: Mock LatestResult retains count-object summary and omits verdict/executionStatus
  • test/mock-backend/handlers.ts:240-260: Mock handler serves the stale fixture on the product endpoint
  • src/commands/test.ts:9741-9760: Text renderer consumes the new fields without compatibility normalization

Steps to reproduce

This report is based on a source-control-flow validation against the commit above.

  1. Check out the source commit listed in this report.
  2. Inspect the code path and contract anchors listed above.
  3. Exercise the described boundary/state path: Repository mock and contract producers must be migrated to the current LatestResult representation used by the public type and dry-run producer.
  4. Compare the observed behavior with the expected contract below.

Validation note: It executes both frozen producers: dry-run reports summaryType=string with verdict/executionStatus, while the mock fixture reports summaryType=object without either field; it also projects the deterministic malformed text output.

Expected behavior

The implementation should preserve the repository contract described by the documentation, public type, parser, serializer, or sibling implementation anchors above.

Actual behavior

The same GET result path teaches two incompatible wire contracts. Dry-run emits the current semantic-string schema, while the repository mock integration emits the former count-object schema. Passing the mock response through the current text renderer yields verdict: —, executionStatus: undefined, and summary: [object Object].

Existing coverage

I did not find an existing issue or PR title that appears to cover this exact root cause in the pre-submission check.

Suggested fix

LatestResult legacy mock/contract fixtures and their integration handler

Suggested tests

  • Add a regression test for: Repository mock and contract producers must be migrated to the current LatestResult representation used by the public type and dry-run producer.
  • Include the boundary value or state transition described above so the old behavior fails before the fix.

Submitted with Codex.

Metadata

Metadata

Assignees

Labels

in-progressAssigned and actively being worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions