PLATL-650: add soda_runner alongside soda_agent in lint contract schema (backwards-compatible)#14
Merged
Conversation
…ma (backwards-compatible) Mirrors the agent->runner rename landing in soda-server, soda-webapp, soda-core, and soda-extensions. The lint command validates contracts against this embedded JSON Schema; without the change, contracts using the new `soda_runner` key are rejected because the root has `additionalProperties: false`. - Adds `soda_runner` as a new top-level property (same shape as `soda_agent`: `checks_schedule` with cron / timezone / variables). - Rewrites `soda_agent` description to "DEPRECATED: use 'soda_runner' instead. Kept for backwards compatibility." - Adds a root `oneOf` enforcing "exactly one of the two keys, or neither" so contracts that set both fail validation cleanly. No Go code changes -- the schema is consumed via `santhosh-tekuri/jsonschema/v6` as untyped JSON Schema, so there is no key-name lookup to update. Filename is unchanged (`soda_data_contract_json_schema_1_0_0.json`) so the `//go:embed` directive in `schema.go` keeps working; this matches the filename-stability decision in soda-core#2718. Companion PR landing the same rename across the Java backend, the Angular contract editor, and tests: sodadata/soda#12250 Linear: PLATL-650 https://linear.app/sodadata/issue/PLATL-650
…re description, add lint tests
Addresses review feedback on PR 14:
- Schema: replace 3-branch oneOf with {not: {required: [soda_runner, soda_agent]}}.
Logically equivalent; produces a cleaner validator error (`$: 'not' failed`
vs `must be valid to exactly one schema in oneOf`).
- Schema: drop dead `additionalProperties: false` nested inside the variables
value schema. The keyword is unreachable because the value's `type` is
["string", "number"] (never an object). Pre-existing leftover, copied into
the new soda_runner block; fixed in both.
- Schema: align soda_runner description with soda-core PR #2718 wording for
cross-stack consistency.
Tests (lint_test.go):
- TestLintFile_AcceptsSodaRunner
- TestLintFile_AcceptsSodaAgentLegacyAlias
- TestLintFile_RejectsBothSodaRunnerAndSodaAgent
All 9 lint tests pass.
mivds
approved these changes
May 26, 2026
Per second-pass review feedback, the previous version of
TestLintFile_RejectsBothSodaRunnerAndSodaAgent asserted only that the
contract was rejected with at least one error -- not that the error
surfaced at the document root ('$') where the new `not: {required:
[soda_runner, soda_agent]}` constraint produces it. Adds an assertion
that one of the reported errors has Path == "$" so the user-visible
error location doesn't silently regress to e.g. a property-level
report.
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.
Linear: PLATL-650
Summary
Mirrors the agent → runner rename landing across the rest of the stack (soda-server, soda-webapp, soda-core, soda-extensions). The lint command validates contracts against this embedded JSON Schema; without this change, contracts using the new
soda_runnerkey would be rejected here because the schema's root hasadditionalProperties: false.Changes
soda_runneras a new top-level property (same shape assoda_agent:checks_schedulewithcron/timezone/variables).soda_agentdescription to"DEPRECATED: use 'soda_runner' instead. Kept for backwards compatibility."oneOfenforcing "exactly one of the two keys, or neither" so contracts that set both fail validation cleanly.No Go code changes
The schema is consumed via
santhosh-tekuri/jsonschema/v6as untyped JSON Schema; there is no key-name lookup in Go to update. Filename is unchanged (soda_data_contract_json_schema_1_0_0.json) so the//go:embeddirective inschema.gokeeps working — matches the filename-stability decision in sodadata/soda-core#2718.Backwards compatibility
soda_agentcontinue to validate.soda_runnerstart validating.oneOfvalidation error (intentional — keeps schema clean).Companion / related PRs
ContractParser, autopilot serializer), the Angular contract editor, the server schema, and tests.agentId→runnerIdcleanup) — disjoint file sets, land in any order.Test plan
soda contract linton a contract usingsoda_runner:— should passsoda contract linton a contract usingsoda_agent:— should still pass (deprecated alias)soda contract linton a contract with both keys — should fail withoneOfvalidation error