Repository navigation
register: parse describe's JSON and check its protocol version (#524, #525) - #530
Merged
Merged
Conversation
…525) morca register parses describe's output with json_mlake instead of matching the `{"pipeline": ` prefix and searching for `"morca": "`, so compact JSON registers. describe now says `"protocol": 1`, which register checks; a describe with `protocol` and no `morca` registers, one with neither registers unchecked as before, and morca-mojo binaries keep `pipeline` first and `morca` last for older schedulers. Closes #524, closes #525. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #524. Closes #525. Both block #521 (pure-Rust pipelines,
morca-sdk).#524: parse describe.
morca registerparses describe's output with json_mlake (parse_describeinmorca._internal.version) instead of checking for the{"pipeline":prefix, andbuilt_withreads the parsedmorcakey instead of searching the text for"morca": ". Compact JSON (serde_json's default) now registers. Output that isn't a JSON object with a non-empty stringpipelineis refused, as before.#525: protocol version.
describenow prints"protocol": 1(PROTOCOL_VERSION), and register checks it:protocolthat isn't an integer from 1 toPROTOCOL_VERSIONis refused, whateverMORCA_MIXED_VERSIONSsays;protocoland nomorcaregisters with no version check;"morca": MORCA_VERSION, and the mismatch check andMORCA_MIXED_VERSIONSwork as before.Older schedulers. A scheduler before this PR needs the bytes
{"pipeline":first and finds"morca": "by searching from the end. Soprotocolgoes second to last, andpipelinestays first andmorcalast. The only change is the added field.tests/versions.sh's sed on"morca": "…"}$andtest_steps.mojo's prefix check still match.Registry hashes are unchanged, since the hash isn't computed from the describe text: toy 0xa3bcc571ad7c6939, daily 0x81ead348d0a21c1f, fanout 0x1f0ebf1f2a93d993.
Docs. docs/pipeline-protocol.md (
describe, the describe section and field table, Versions, the first-implementation checklist) and docs/binaries.md.Tests. tests/conformance.py no longer marks
register.compactanddescribe.protocolas known failures, and it checks thatprotocolis an int. tests/versions.sh adds two checks: a compact, protocol-only describe registers without a warning, and protocol 2 is refused even withMORCA_MIXED_VERSIONS=1.Run locally (
pixi run -e ouromo conformance build/<p> tests/conformance/<p>.json) for toy, daily and fanout, over SQLite and Postgres: each passed 49 checks, failed 0, had 0 known failures and 0 unexpected passes, and skipped 1 (sqlite/cancel.due).pg/register.compactanddescribe.protocolpass.🤖 Generated with Claude Code
https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6