This repository was archived by the owner on Aug 12, 2026. It is now read-only.
Repository navigation
feat(api)!: expose reported Metropolis transitions #153
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
16d1c76
feat(api)!: expose reported Metropolis transitions
acgetchell e955ee6
fix(api): harden transition and documentation validation
acgetchell f183f07
style(api): format transition validation
acgetchell 70ab238
test(api): verify unknown moves preserve transition traces
acgetchell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| if(NOT DEFINED TEST_EXECUTABLE OR NOT EXISTS "${TEST_EXECUTABLE}") | ||
| message(FATAL_ERROR "TEST_EXECUTABLE must name a built executable") | ||
| endif() | ||
|
|
||
| if(NOT DEFINED TEST_OUTPUT OR TEST_OUTPUT STREQUAL "") | ||
| message(FATAL_ERROR "TEST_OUTPUT must name the quickstart payload") | ||
| endif() | ||
|
|
||
| file(REMOVE "${TEST_OUTPUT}" "${TEST_OUTPUT}.meta") | ||
|
|
||
| execute_process( | ||
| COMMAND "${TEST_EXECUTABLE}" "${TEST_OUTPUT}" | ||
| RESULT_VARIABLE run_result | ||
| OUTPUT_VARIABLE run_output | ||
| ERROR_VARIABLE run_error) | ||
| if(NOT run_result EQUAL 0) | ||
| message(FATAL_ERROR "C++ API quickstart failed:\n${run_output}\n${run_error}") | ||
| endif() | ||
|
|
||
| set(move_pattern "[(](2,3|3,2|2,6|6,2|4,4)[)]") | ||
| set(result_pattern "accepted=(yes|no), successful=(yes|no)") | ||
| foreach(proposal RANGE 1 10) | ||
| if(NOT run_output | ||
| MATCHES "proposal ${proposal}: move ${move_pattern}, ${result_pattern}") | ||
| message( | ||
| FATAL_ERROR | ||
| "Quickstart did not report proposal ${proposal} completely:\n${run_output}") | ||
| endif() | ||
| endforeach() | ||
|
|
||
| string( | ||
| REGEX MATCHALL | ||
| "proposal [0-9]+: move ${move_pattern}, ${result_pattern}" | ||
| proposal_lines "${run_output}") | ||
| list(LENGTH proposal_lines proposal_count) | ||
| if(NOT proposal_count EQUAL 10) | ||
| message(FATAL_ERROR "Expected 10 proposal reports, found ${proposal_count}:\n${run_output}") | ||
| endif() | ||
|
|
||
| if(NOT run_output | ||
| MATCHES | ||
| "There were 10 proposed moves with [0-9]+ accepted moves and [0-9]+ rejected moves[.]") | ||
| message(FATAL_ERROR "Quickstart aggregate proposal summary is missing:\n${run_output}") | ||
| endif() | ||
| if(NOT run_output | ||
| MATCHES | ||
| "There were 10 candidate construction attempts with [0-9]+ successful candidates and [0-9]+ failed candidates[.]") | ||
| message(FATAL_ERROR "Quickstart candidate summary is missing:\n${run_output}") | ||
| endif() | ||
|
|
||
| if(NOT EXISTS "${TEST_OUTPUT}" OR NOT EXISTS "${TEST_OUTPUT}.meta") | ||
| message(FATAL_ERROR "Quickstart did not publish its payload and metadata sidecar") | ||
| endif() | ||
| file(READ "${TEST_OUTPUT}.meta" metadata) | ||
| if(NOT metadata MATCHES "transition_trace[.]count=10") | ||
| message(FATAL_ERROR "Quickstart metadata does not record all ten transitions:\n${metadata}") | ||
| endif() | ||
| if(NOT metadata MATCHES "configured_attempts=10") | ||
| message(FATAL_ERROR "Quickstart metadata does not record its explicit attempt plan:\n${metadata}") | ||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.