Skip to content

refactor: switch custom predicate stdout to JSONL#252

Open
kurasaiteja wants to merge 1 commit into
symposium-dev:mainfrom
kurasaiteja:tejakura-custom-predicate-jsonl
Open

refactor: switch custom predicate stdout to JSONL#252
kurasaiteja wants to merge 1 commit into
symposium-dev:mainfrom
kurasaiteja:tejakura-custom-predicate-jsonl

Conversation

@kurasaiteja

Copy link
Copy Markdown

What does this PR do?

  • Switch custom predicate stdout protocol from a single JSON object ({"selectedCrates": [...]}) to JSON Lines ie. one tagged record per line
  • Replace PredicateOutput struct in symposium-sdk with a streaming PredicateEmitter API
  • Rename the wire field from "crate" to "name" inside selectedCrate records for consistency
  • This enables adding future record types (e.g. watchedFile for cache invalidation) without breaking the schema
  • unknown keys are skipped for, not rejected for forward compatibility as this is a breaking change to symposium-sdk

Wire format

Each non-blank stdout line is a JSON object with exactly one key:

{"selectedCrate": {"name": "serde", "version": "1.0.217"}}
{"selectedCrate": {"name": "tokio", "version": "1.40.0"}}
Disclosure questions

AI disclosure.

  • The AI tool authored small parts of the code (e.g., autocomplete, comments)

Questions for reviewers.

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.

1 participant