Skip to content

register: parse describe's JSON and check its protocol version (#524, #525) - #530

Merged
winding-lines merged 2 commits into
mainfrom
describe-protocol
Nov 17, 2026
Merged

winding-lines merged 2 commits into
mainfrom
describe-protocol

Conversation

@winding-lines

Copy link
Copy Markdown
Contributor

Closes #524. Closes #525. Both block #521 (pure-Rust pipelines, morca-sdk).

#524: parse describe. morca register parses describe's output with json_mlake (parse_describe in morca._internal.version) instead of checking for the {"pipeline": prefix, and built_with reads the parsed morca key 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 string pipeline is refused, as before.

#525: protocol version. describe now prints "protocol": 1 (PROTOCOL_VERSION), and register checks it:

  • a protocol that isn't an integer from 1 to PROTOCOL_VERSION is refused, whatever MORCA_MIXED_VERSIONS says;
  • a describe with protocol and no morca registers with no version check;
  • a describe with neither registers unchecked, as it does today;
  • a Mojo binary still reports "morca": MORCA_VERSION, and the mismatch check and MORCA_MIXED_VERSIONS work as before.

Older schedulers. A scheduler before this PR needs the bytes {"pipeline": first and finds "morca": " by searching from the end. So protocol goes second to last, and pipeline stays first and morca last. The only change is the added field. tests/versions.sh's sed on "morca": "…"}$ and test_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.compact and describe.protocol as known failures, and it checks that protocol is an int. tests/versions.sh adds two checks: a compact, protocol-only describe registers without a warning, and protocol 2 is refused even with MORCA_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.compact and describe.protocol pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6

winding-lines and others added 2 commits November 16, 2026 21:47
…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
@winding-lines
winding-lines merged commit c1da0f5 into main Nov 17, 2026
35 checks passed
@winding-lines
winding-lines deleted the describe-protocol branch November 17, 2026 06:35
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.

A pipeline-protocol version, separate from MORCA_VERSION register: parse describe's JSON instead of matching its spacing

1 participant