Skip to content

Comments

SDL parity tests#169

Open
vertex451 wants to merge 26 commits intomainfrom
artem/sdl-parity-tests
Open

SDL parity tests#169
vertex451 wants to merge 26 commits intomainfrom
artem/sdl-parity-tests

Conversation

@vertex451
Copy link
Contributor

@vertex451 vertex451 commented Dec 1, 2025

Parity Testing

./testdata/sdl/ contains test scenarios. Each directory has:

  • input.yaml — SDL input
  • manifest.json — Generated manifest (from Go parser)
  • groups.json — Generated deployment groups (from Go parser)

Tests validate both parsers(Golang and TS) produce identical output from the same input.

Resolves

akash-network/support#408

Schema Validation

Three schemas validate the SDL pipeline:

  • sdl-input.schema.yaml — Validates input YAML (required fields, formats, enums, patterns)
  • manifest-output.schema.yaml — Validates manifest JSON output
  • groups-output.schema.yaml — Validates groups JSON output

Test Fixtures

  • testdata/sdl/v2.0/, v2.1/ — Valid fixtures for parity tests
  • testdata/sdl/invalid/ — Both schema and parsers reject
  • testdata/sdl/schema-only-invalid/ — Schema rejects, Go accepts (stricter schema rules)

IDE validation

IDE supports YAML validation against the schema when creating manifests in the editor.

Screenshot 2025-12-02 at 16 19 34 Screenshot 2025-12-02 at 16 19 42

Important note:

  1. I generated input and output for tests using AI, let me know if it makes sense for you.
  2. Parity tests run 3 times in CI. The dedicated sdl-parity job is is redundant but it is visible in CI status.

🔧 Purpose of the Change

  • Other: [tests]

📌 Related Issues

✅ Checklist

  • I've updated relevant documentation
  • Code follows Akash Network's style guide
  • I've added/updated relevant unit tests
  • Dependencies have been properly updated
  • I agree and adhered to the Contribution Guidelines

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds SDL schema files, a thread-safe Go schema validator, fixture generation tooling, extensive schema-driven tests, TypeScript SDL output shape changes (stringified resource units and renamed fields), parity test suites for Go and TS, makefile/CI wiring for SDL parity, and many new input/output test fixtures.

Changes

Cohort / File(s) Summary
CI & Make targets
/.github/workflows/tests.yaml, make/test.mk
Added sdl-parity GitHub Actions job; added generate-sdl-fixtures and test-sdl-parity Make targets and orchestrated fixture generation before parity tests.
Go: schema validator & integration
go/sdl/schema_validator.go, go/sdl/sdl.go, go/sdl/sdl-input.schema.yaml
New embedded YAML schema, SchemaValidator with sync.Once caching and logger injection; Read() now runs schema validation pre/post and reports diagnostics.
Go: fixture tooling & helpers
go/sdl/tools/generate-sdl-fixtures/main.go, go/sdl/schema_test_helpers.go
New CLI tool to generate manifest.json/groups.json fixtures; test builder helper to assemble SDL snippets for tests.
Go: tests (schema & parity)
go/sdl/parity_test.go, go/sdl/schema_validation_test.go, go/sdl/schema_aggressive_test.go, go/sdl/schema_complex_rules_test.go, go/sdl/schema_edge_cases_test.go, go/sdl/schema_additional_props_test.go
Large set of new schema validation and parity tests covering credentials, ports, GPU/storage rules, HTTP options, edge cases, and additional-properties checks.
Go: test refactors
go/sdl/gpu_test.go, go/sdl/storage_test.go, go/sdl/schema_test_helpers.go
Consolidated many per-case tests into table-driven tests and added schema-specific test suites.
Go: deterministic ordering
go/sdl/groupBuilder_v2.go, go/sdl/groupBuilder_v2_1.go
Collect-and-sort map keys for storage params to ensure deterministic StorageParams ordering.
Go: utilities
go/util/noop/logger.go
Added a no-op logger implementation used as the default logger for schema validator.
Go: module deps
go/sdl/go.mod, go/cli/go.mod
Added/promoted dependencies for gojsonschema, gojsonpointer, gojsonreference and cosmossdk.io/log adjustments.
TypeScript: SDL output & types
ts/src/sdl/SDL/SDL.ts, ts/src/sdl/types.ts
Refactored resource unit construction to always emit string unit values; renamed public fields (signedBy→signed_by, allOf/anyOf→all_of/any_of); price amounts normalized to high-precision decimal strings; updated method signatures accordingly.
TypeScript: parity tests
ts/src/sdl/SDL/parity.spec.ts
Added Jest parity suite that loads fixtures, validates inputs against schema, generates manifests/groups and compares outputs.
Specs & schemas (outputs)
specs/sdl/manifest-output.schema.yaml, specs/sdl/groups-output.schema.yaml, specs/sdl/README.md
Added strict JSON/YAML schemas for manifest and groups outputs and documentation describing the schema system.
Fixtures: inputs & outputs
testdata/sdl/input/**, testdata/sdl/output-fixtures/**, ts/test/fixtures/sdl/*
Added ~18 valid fixture sets and ~29 invalid fixture cases; updated TS snapshot fixtures to reflect new string-based unit shapes.
Misc
.gitignore
Added coverage-related ignore entries (coverage-go-cli.txt, coverage-go-sdl.txt, coverage-go.txt).

Sequence Diagram(s)

sequenceDiagram
  participant Tool as generate-sdl-fixtures (CLI)
  participant FS as Filesystem
  participant SDL as sdl.Read / SDL lib
  participant Schema as SchemaValidator

  Tool->>FS: enumerate testdata input dirs
  Tool->>FS: read input.yaml
  Tool->>Schema: (implicit) ensure schema compiled
  Tool->>SDL: sdl.ReadFile(input.yaml)
  SDL->>Schema: validateInputAgainstSchema(buf)
  Schema-->>SDL: validation result
  SDL-->>Tool: SDL object (manifest/groups)
  Tool->>FS: write manifest.json
  Tool->>FS: write groups.json
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • PR #184: Adds JSON Schema–based SDL validation and test infrastructure — strongly related to schema and validator work.
  • PR #4: Edits go/sdl/sdl.go and SDL reading flow — directly overlaps Read() changes.
  • PR #34: Modifies go module dependency entries (gojsonschema/gojsonpointer/etc.) — related dependency adjustments.

Suggested reviewers

  • troian
  • cloud-j-luna

Poem

🐰 I hopped through schemas, files, and tests,
Sorting storage keys and stringing the rest.
Manifests and groups now dance in a row,
Parity proves where the outputs go —
A rabbit's clap: validations blessed! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.19% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'SDL parity tests' is concise and clearly summarizes the main change: adding parity tests for SDL parsers.
Description check ✅ Passed The description provides clear context on what was added (parity tests, schemas, test fixtures), explains the purpose, and documents related issues. However, it deviates from the template structure by using a different format.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch artem/sdl-parity-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vertex451 vertex451 changed the title Artem/sdl parity tests SDLparity tests Dec 1, 2025
@vertex451 vertex451 changed the title SDLparity tests SDL parity tests Dec 1, 2025
@vertex451 vertex451 force-pushed the artem/sdl-parity-tests branch from c464548 to c669081 Compare December 2, 2025 15:56
@vertex451 vertex451 marked this pull request as ready for review December 2, 2025 16:02
@vertex451 vertex451 requested a review from a team as a code owner December 2, 2025 16:02
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
go/sdl/go.mod (1)

7-15: gojsonschema dependency is used in production JWT schema validation

The gojsonschema dependency is imported in go/util/jwt/schema.go for production JWT schema validation (initialized at package level), in addition to its use in SDL parity tests. The dependency is appropriate for these use cases, though be aware it initializes at package load time and uses reflection, which incurs startup overhead.

ts/src/sdl/SDL/SDL.ts (1)

834-846: Essential change: Deterministic storage ordering for parity testing.

Sorting storage keys alphabetically before mapping ensures consistent, reproducible manifest output. This is critical for cross-language parity validation.

♻️ Duplicate comments (1)
go/sdl/groupBuilder_v2.go (1)

100-121: Sorted iteration over storage volumes for deterministic manifests

Using storageNames + sort.Strings before appending StorageParams eliminates Go map iteration nondeterminism and keeps v2 output stable across runs and in parity tests. Implementation mirrors the v2.1 path and looks correct.

🧹 Nitpick comments (11)
go/sdl/groupBuilder_v2_1.go (1)

100-131: Deterministic storage params ordering is correct

Sorting svc.Params.Storage keys before building params.Storage removes map‑iteration nondeterminism and aligns with parity/determinism needs. Logic is sound and nil‑safe; any future refactor could share this helper with the v2 builder, but it’s not required now.

make/test.mk (1)

51-63: Parity test workflow is solid; align TS path with existing TS_ROOT

The new generate-sdl-fixtures and test-sdl-parity targets wire the Go and TS parity tests together cleanly, and the sequencing (fixtures → Go tests → TS tests) makes sense.

For consistency with test-ts/test-coverage-ts, consider using $(TS_ROOT) instead of a hard-coded ts path:

-	@cd ts && npm test -- --testPathPattern=parity.spec.ts
+	@cd $(TS_ROOT) && npm test -- --testPathPattern=parity.spec.ts

This avoids future drift if the TS root directory is ever renamed.

go/sdl/cmd/generate-sdl-fixtures/main.go (1)

13-13: Consider making the fixtures root path configurable.

The hard-coded relative path "../../../testdata/sdl" assumes the command is executed from a specific directory (likely go/sdl/cmd/generate-sdl-fixtures). If the tool is run from a different location or installed elsewhere, it will fail.

Consider accepting the fixtures root as a command-line argument with a default value:

+import (
+	"flag"
+	// ... existing imports
+)
+
 func main() {
-	fixturesRoot := "../../../testdata/sdl"
+	fixturesRoot := flag.String("fixtures", "../../../testdata/sdl", "Path to SDL fixtures root directory")
+	flag.Parse()
+
 	versions := []string{"v2.0", "v2.1"}
 
 	for _, version := range versions {
-		versionDir := filepath.Join(fixturesRoot, version)
+		versionDir := filepath.Join(*fixturesRoot, version)
testdata/sdl/v2.0/persistent-storage/groups.json (1)

1-87: Add missing trailing newline.

The file is missing a trailing newline at EOF. While some build systems are forgiving, most linters and Git conventions expect JSON files to end with a newline character for POSIX compliance.

Add a newline after the closing bracket at line 87.

]
+
testdata/sdl/v2.0/simple/groups.json (1)

1-67: Add missing trailing newline.

Per the file structure, the JSON is valid but ends without a trailing newline. Add a newline after the closing bracket for POSIX compliance.

]
+
testdata/sdl/v2.0/storage-classes/groups.json (1)

1-87: Add missing trailing newline.

The file is missing a trailing newline at EOF, violating POSIX conventions and typical linter expectations.

]
+
specs/sdl/sdl-input.schema.yaml (1)

10-24: Consider using integer type for counters instead of number

Fields like deployment.*.*.count (and similar count-like fields elsewhere) are conceptually integers. Using "type": "integer" instead of "type": "number" would prevent fractional values from passing schema validation while keeping current fixtures valid.

Also applies to: 41-65

specs/sdl/groups.schema.yaml (1)

45-65: Tighten groups schema for count and price.denom

To better reflect the data model and avoid subtle mistakes:

  • resources[*].count should be an integer (non-negative) rather than a generic number.
  • price currently requires amount but not denom; in practice both are always present, so making denom required too would strengthen validation without affecting existing fixtures.
go/sdl/parity_test.go (1)

17-46: Optional: reuse compiled JSON Schemas across fixtures

validateAgainstSchema reads and compiles the schema file for every manifest/groups validation. With many fixtures this adds unnecessary overhead. Consider caching compiled schemas keyed by schemaPath (e.g., package-level map[string]*gojsonschema.Schema protected by sync.Mutex/sync.Once) so each schema file is loaded and compiled only once per test run.

Also applies to: 94-118

ts/src/sdl/SDL/parity.spec.ts (1)

81-101: Optional: cache compiled schemas to avoid recompiling on every fixture

validateAgainstSchema reads and compiles the YAML schema on every call. For many fixtures this adds overhead in test runs. You could cache the compiled Ajv validators by schemaPath (e.g., a simple Map<string, ValidateFunction>) so each schema file is parsed/compiled only once per test run. This follows Ajv's recommended pattern of compiling once and reusing the validate function rather than recompiling on each invocation.

specs/sdl/manifest.schema.yaml (1)

1-3: Add $schema and $id metadata for schema documentation and tooling.

This is a new public schema file. It lacks standard JSON Schema metadata fields that aid documentation, versioning, and integration with schema validators.

Add $schema (to declare the JSON Schema version) and $id (for schema identification and URL resolution) at the root level:

+$schema: 'https://json-schema.org/draft/2020-12/schema'
+$id: 'https://akash.network/schemas/sdl/manifest.schema.json'
+title: Akash SDL Manifest Schema
+description: Validates the structure of a compiled SDL manifest, including services, resources, and deployment configurations.
 items:
   additionalProperties: false
   properties:

Also applies to: 328-328

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01f2e37 and c669081.

⛔ Files ignored due to path filters (3)
  • go/sdl/go.sum is excluded by !**/*.sum
  • ts/package-lock.json is excluded by !**/package-lock.json
  • ts/src/sdl/SDL/__snapshots__/SDL.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (50)
  • .github/workflows/tests.yaml (1 hunks)
  • .gitignore (1 hunks)
  • go/sdl/cmd/generate-sdl-fixtures/main.go (1 hunks)
  • go/sdl/go.mod (2 hunks)
  • go/sdl/groupBuilder_v2.go (1 hunks)
  • go/sdl/groupBuilder_v2_1.go (1 hunks)
  • go/sdl/parity_test.go (1 hunks)
  • make/test.mk (1 hunks)
  • specs/sdl/groups.schema.yaml (1 hunks)
  • specs/sdl/manifest.schema.yaml (1 hunks)
  • specs/sdl/sdl-input.schema.yaml (1 hunks)
  • specs/sdl/validation-limitations.md (1 hunks)
  • testdata/sdl/invalid/credentials-missing-host.yaml (1 hunks)
  • testdata/sdl/invalid/endpoint-not-used.yaml (1 hunks)
  • testdata/sdl/invalid/invalid-port.yaml (1 hunks)
  • testdata/sdl/invalid/missing-deployment.yaml (1 hunks)
  • testdata/sdl/invalid/missing-image.yaml (1 hunks)
  • testdata/sdl/invalid/missing-version.yaml (1 hunks)
  • testdata/sdl/invalid/negative-cpu.yaml (1 hunks)
  • testdata/sdl/invalid/persistent-without-mount.yaml (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/groups.json (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/input.yaml (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/manifest.json (1 hunks)
  • testdata/sdl/v2.0/http-options/groups.json (1 hunks)
  • testdata/sdl/v2.0/http-options/input.yaml (1 hunks)
  • testdata/sdl/v2.0/http-options/manifest.json (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/groups.json (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/input.yaml (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/manifest.json (1 hunks)
  • testdata/sdl/v2.0/multiple-services/groups.json (1 hunks)
  • testdata/sdl/v2.0/multiple-services/input.yaml (1 hunks)
  • testdata/sdl/v2.0/multiple-services/manifest.json (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/groups.json (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/input.yaml (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/manifest.json (1 hunks)
  • testdata/sdl/v2.0/simple/groups.json (1 hunks)
  • testdata/sdl/v2.0/simple/input.yaml (1 hunks)
  • testdata/sdl/v2.0/simple/manifest.json (1 hunks)
  • testdata/sdl/v2.0/storage-classes/groups.json (1 hunks)
  • testdata/sdl/v2.0/storage-classes/input.yaml (1 hunks)
  • testdata/sdl/v2.0/storage-classes/manifest.json (1 hunks)
  • testdata/sdl/v2.1/credentials/groups.json (1 hunks)
  • testdata/sdl/v2.1/credentials/input.yaml (1 hunks)
  • testdata/sdl/v2.1/credentials/manifest.json (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/groups.json (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/input.yaml (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/manifest.json (1 hunks)
  • ts/package.json (1 hunks)
  • ts/src/sdl/SDL/SDL.ts (9 hunks)
  • ts/src/sdl/SDL/parity.spec.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
ts/src/sdl/SDL/parity.spec.ts (1)
ts/src/sdl/SDL/SDL.ts (3)
  • validate (128-138)
  • validate (246-261)
  • SDL (88-1315)
go/sdl/cmd/generate-sdl-fixtures/main.go (1)
go/sdl/sdl.go (1)
  • ReadFile (83-89)
go/sdl/parity_test.go (2)
go/sdl/sdl.go (1)
  • ReadFile (83-89)
go/testutil/deployment.go (1)
  • DeploymentGroups (54-62)
ts/src/sdl/SDL/SDL.ts (2)
ts/src/sdl/index.ts (1)
  • SdlValidationError (28-28)
ts/src/sdl/types.ts (1)
  • v3Sdl (100-105)
🪛 GitHub Actions: lint
go/sdl/cmd/generate-sdl-fixtures/main.go

[error] 87-87: gofmt formatting issue detected. File is not properly formatted. Run 'gofmt -w' or 'go fmt ./...' to fix.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: coverage
🔇 Additional comments (42)
.gitignore (1)

27-34: Well-organized additions supporting the testing infrastructure.

The new entries appropriately capture test/build artifacts and coverage outputs introduced by the SDL parity testing changes. The naming conventions align with existing patterns, and the logical grouping with comments enhances clarity.

testdata/sdl/invalid/missing-image.yaml (1)

1-30: Invalid SDL fixture for missing image looks correct

SDL structure is consistent with other v2.0 fixtures, and omitting services.web.image should exercise the intended invalid case.

testdata/sdl/invalid/invalid-port.yaml (1)

1-32: Invalid‑port SDL fixture is well‑formed for the negative test

The SDL is structurally valid but uses port: 99999, which is out of the allowed port range, making it a good fixture to assert that validation rejects out‑of‑range ports.

testdata/sdl/v2.0/ip-endpoint/manifest.json (1)

1-103: ip‑endpoint manifest fixture appears structurally consistent

The manifest structure (group → service → resources/endpoints → expose with ip and endpointSequenceNumber) looks consistent with the v2.0/ip‑endpoint scenario and suitable for parity tests. Assuming this JSON was generated by the fixture tool, it should accurately represent the expected manifest; if it was edited manually, it’s worth re‑generating once to ensure it matches generator output and the companion groups.json.

testdata/sdl/invalid/negative-cpu.yaml (1)

1-32: Negative‑CPU SDL fixture correctly targets invalid resource values

Using cpu.units: -100m in an otherwise valid deployment is an appropriate way to exercise validation for disallowing negative CPU values.

ts/package.json (1)

69-81: AJV is correctly placed as a devDependency

AJV (^8.12.0) is used only in test files (ts/src/sdl/SDL/parity.spec.ts), confirming it should remain in devDependencies and not be added to dependencies. No runtime code imports or depends on AJV.

testdata/sdl/invalid/credentials-missing-host.yaml (1)

1-35: LGTM! Invalid fixture correctly tests missing host credential validation.

This fixture appropriately tests the credential validation pathway by intentionally omitting the required host field while providing username and password. The validation logic in ts/src/sdl/SDL/SDL.ts (lines 301-310) will correctly reject this SDL.

testdata/sdl/v2.0/http-options/manifest.json (1)

1-73: LGTM! HTTP options manifest fixture is well-structured.

The manifest correctly defines HTTP options with appropriate retry policies and timeout configurations for parity testing.

testdata/sdl/v2.0/storage-classes/manifest.json (1)

1-117: LGTM! Storage classes manifest correctly demonstrates multiple storage volumes.

The fixture properly defines storage with varying attributes (persistent flags, storage classes) and the storage params section follows the alphabetically sorted order (cache, data, logs) as enforced by the updated SDL.ts logic.

testdata/sdl/invalid/endpoint-not-used.yaml (1)

1-35: LGTM! Invalid fixture correctly tests unused endpoint detection.

This fixture appropriately validates that endpoints defined but never referenced in service exposures are detected as errors. The validateEndpointsUtility method in SDL.ts will correctly flag this scenario.

testdata/sdl/v2.0/gpu-basic/manifest.json (1)

1-76: LGTM! GPU manifest fixture correctly represents GPU configuration.

The fixture properly defines GPU resources with NVIDIA RTX 3080 specification, suitable for testing GPU-enabled deployment parity.

ts/src/sdl/SDL/SDL.ts (5)

2-2: LGTM! Named import improves clarity.

Using the named load import from js-yaml is more explicit and follows better practices than relying on default exports.


114-121: LGTM! Version field validation enhances robustness.

Adding an explicit check for the required version field with a clear error message improves SDL validation. The type cast to v3Sdl appropriately follows the validation.


285-299: LGTM! Service image and port validations strengthen SDL integrity.

Both validation methods correctly enforce essential constraints:

  • Empty image names are rejected
  • Port values are constrained to valid range (1-65535)

The error messages are clear and helpful.


848-864: LGTM! Proper null handling and deterministic storage ordering.

The method correctly handles undefined/null params by returning null, and ensures deterministic storage parameter ordering through alphabetical sorting.


899-916: LGTM! Conditional params assignment prevents unnecessary fields.

Computing params via v3ManifestServiceParams and only assigning when not null prevents adding empty params fields to the manifest, resulting in cleaner output.

.github/workflows/tests.yaml (1)

57-76: LGTM! SDL parity CI job is properly configured.

The new job correctly mirrors the setup steps from the coverage job and executes the SDL parity tests. The setup includes both Node.js and Go environments as required for cross-language parity validation.

testdata/sdl/v2.1/credentials/manifest.json (1)

1-75: LGTM! Credentials manifest correctly includes all required fields.

This fixture appropriately tests the valid credentials scenario with all required fields (host, email, username, password) present, complementing the invalid credentials fixtures.

testdata/sdl/v2.0/gpu-basic/groups.json (1)

1-65: GPU basic group fixture looks structurally consistent

The JSON structure (requirements/resources/price) is consistent with other group fixtures, and the numeric values (CPU/memory/storage/GPU/price) look coherent for a minimal GPU case.

testdata/sdl/v2.0/multiple-services/groups.json (1)

1-130: Multiple-services group fixture is coherent and well-formed

Requirements, resource variants, and pricing are internally consistent and align with the structure used in the other group fixtures in this PR.

testdata/sdl/invalid/missing-deployment.yaml (1)

1-27: Invalid “missing deployment” fixture matches its intent

YAML is structurally valid, and omitting the deployment block accurately represents the intended invalid case for tests.

testdata/sdl/invalid/persistent-without-mount.yaml (1)

1-35: Persistent-without-mount invalid fixture is clearly defined

The compute/storage and deployment sections are well-formed, and the missing mount for a persistent: true volume cleanly expresses the invalid scenario the tests will exercise.

testdata/sdl/v2.0/http-options/input.yaml (1)

1-50: HTTP-options SDL fixture is well-structured and expressive

The http_options block and its parameters (timeouts, retries, next_cases) are clearly defined, and the compute/placement/deployment sections follow the established SDL v2.0 pattern, making this a good parity fixture.

testdata/sdl/v2.0/ip-endpoint/input.yaml (1)

1-49: IP-endpoint SDL fixture cleanly exercises named IP exposure

The service/expose blocks correctly reference ip: myendpoint, and the matching endpoints.myendpoint definition (kind ip) plus standard compute/placement/deployment make this a solid parity case.

testdata/sdl/v2.1/credentials/groups.json (1)

1-59: Credentials group fixture matches existing group schema usage

The requirements, resource definition, and pricing fields align with the other v2.0/v2.1 group fixtures and look appropriate for a credentials-focused parity test.

testdata/sdl/v2.0/simple/input.yaml (1)

1-47: LGTM! Well-structured SDL v2.0 test fixture.

The fixture provides good coverage with multiple expose configurations (HTTP and UDP), placement attributes, and signedBy constraints with both anyOf and allOf.

testdata/sdl/v2.0/persistent-storage/manifest.json (1)

1-92: LGTM! Comprehensive manifest fixture for persistent storage.

The manifest correctly captures persistent storage configuration with volume attributes (persistent: true, class: beta2) and mount parameters. The structure aligns with the expected manifest schema for v2.0.

testdata/sdl/invalid/missing-version.yaml (1)

1-31: LGTM! Valid negative test case for missing version.

This fixture appropriately tests SDL validation by omitting the required version field while maintaining otherwise valid structure. This ensures error handling for missing version information is properly exercised.

testdata/sdl/v2.0/gpu-basic/input.yaml (1)

22-27: LGTM! Well-structured GPU resource configuration.

The GPU attributes correctly specify the vendor (nvidia) and model (rtx3080) in nested format, which aligns with SDL v2.0 GPU specifications. This provides good test coverage for GPU-enabled deployments.

testdata/sdl/v2.0/http-options/groups.json (1)

1-59: LGTM! Valid groups fixture with proper structure.

The groups data correctly defines requirements (signed_by, attributes), resources (compute specs, endpoints), and pricing. The 18-decimal precision for the amount field is standard for cryptocurrency denominations.

testdata/sdl/v2.1/ip-endpoint/input.yaml (1)

67-72: LGTM! Proper v2.1 IP endpoint configuration.

The endpoints section correctly defines IP endpoints (endpoint1, endpoint2) which are referenced by the services' expose configurations. This provides good test coverage for the v2.1 IP endpoint feature.

testdata/sdl/v2.0/persistent-storage/input.yaml (1)

13-17: LGTM! Correct persistent storage configuration.

The fixture properly links storage parameters (lines 14-17) with the compute profile's storage definition (lines 27-31). The storage volume is correctly marked as persistent with a storage class, and the mount point is properly specified.

Also applies to: 27-31

go/sdl/cmd/generate-sdl-fixtures/main.go (1)

60-60: File permissions 0644 are appropriate for generated test fixtures.

The codebase shows a consistent pattern: test and configuration files use 0644 permissions (owner read/write, group/others read-only), while sensitive files like key imports and governance data use 0o600. Since the manifest and groups JSON files are test fixtures intended to be committed and read by the build system, 0644 is the correct choice.

specs/sdl/validation-limitations.md (1)

1-12: All file references in the documentation are accurate. The schema file specs/sdl/sdl-input.schema.yaml and parser files go/sdl/v2.go and go/sdl/v2_1.go all exist at the paths specified in the documentation.

testdata/sdl/v2.1/ip-endpoint/manifest.json (1)

36-45: Verify if mixed endpoint structures between services are intentional.

The manifest defines asymmetric endpoint configurations: the "api" service (lines 36-45) has consistent endpoints with both kind and sequence_number, while the "web" service (lines 104-120) has mixed endpoints—some with only sequence_number, others with both fields. Confirm whether this variation represents intentional test coverage for different endpoint types or if it's an inconsistency requiring alignment.

Also applies to: 104-120

testdata/sdl/v2.1/credentials/input.yaml (1)

1-43: Schema reference and fixture consistency verified.

The relative schema path ../../../../specs/sdl/sdl-input.schema.yaml is correct and the schema file exists. The input.yaml file is consistent with its corresponding groups.json and manifest.json fixtures: the service "private-app" maps to the "akash" group, and all resource specifications (CPU 500m, memory 1Gi, storage 5Gi, pricing 250 uakt) and credentials match across all three files.

testdata/sdl/v2.1/ip-endpoint/groups.json (1)

1-114: ip-endpoint groups fixture shape looks consistent with schema

The group structure (requirements.signed_by/attributes, resources with cpu/memory/storage/gpu/endpoints, count, and price) matches the new groups.schema.yaml expectations and provides good coverage of endpoint kinds/sequence numbers. I don’t see structural or obvious value issues here.

testdata/sdl/v2.0/storage-classes/input.yaml (1)

1-59: Storage-classes SDL input aligns with the new SDL input schema

Service, profiles (compute/placement), and deployment sections — including per-volume storage attributes and the signedBy/pricing structure — all line up with sdl-input.schema.yaml. This fixture should be a solid basis for exercising storage-class handling.

testdata/sdl/v2.0/multiple-services/manifest.json (1)

1-193: multiple-services manifest fixture is internally consistent

Service definitions (images, env, counts), inter-service expose wiring, resource IDs, and endpoint/httpOptions structures are coherent and match what the v2.0 multiple-services SDL input describes. This looks like a good “golden” manifest for parity tests.

testdata/sdl/v2.0/multiple-services/input.yaml (1)

1-93: multiple-services SDL input matches schema and manifest/groups fixtures

The service graph (web → api → db), compute/placement profiles, pricing, and deployment counts are coherent and line up with the generated manifest/groups fixtures. The $schema header also correctly references sdl-input.schema.yaml.

specs/sdl/manifest.schema.yaml (2)

140-157: Clarify intentional structural difference between params.storage and resources.storage.

Storage appears in two locations with differing structures:

  • params.storage (lines 140-157): Array of objects with {name, mount, readOnly}
  • resources.storage (lines 277-313): Array of objects with {name, size, attributes}

These serve different purposes, but the schema does not document this. Confirm this is intentional and document the distinction.

Verify that these storage structures represent different semantic concepts (e.g., params storage = mount points, resources storage = resource specifications) and not a schema inconsistency.

Also applies to: 277-313


67-92: httpOptions is universally required and consistently applied across all protocols in valid manifests.

Verification of test fixtures confirms that all nine manifest files (v2.0 and v2.1) include httpOptions for every expose entry, regardless of protocol type (TCP, UDP, HTTP). No counter-examples exist where expose entries lack httpOptions. Non-HTTP protocols like TCP and UDP are fully supported and already accompanied by httpOptions in production fixtures, indicating this is an intentional schema design rather than an oversight. The concern that non-HTTP services would be rejected is unfounded—they are validated and expected to include httpOptions as part of the uniform expose specification.

@vertex451 vertex451 force-pushed the artem/sdl-parity-tests branch 2 times, most recently from 37393d8 to 204e70b Compare December 2, 2025 16:21
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
ts/src/sdl/SDL/parity.spec.ts (1)

163-169: Bug: finalValue is computed but immediately overwritten, making the clamping logic a no-op.

This was flagged in a previous review. Line 167 assigns finalValue (with the clamped endpointSequenceNumber), but line 169 immediately overwrites it with the original value, negating all finalValue adjustments.

       if (key === "endpointSequenceNumber" && typeof value === "number" && value > 1) {
         finalValue = 1;
       }

       normalized[normalizedKey] = finalValue;
-
-      normalized[normalizedKey] = value;
🧹 Nitpick comments (4)
specs/sdl/sdl-input.schema.yaml (2)

211-215: Fix indentation inconsistency for accept.items.

The items and type under accept have extra indentation compared to sibling properties.

             accept:
-                    items:
-                      type: string
-                    type: array
+                items:
+                  type: string
+                type: array

287-291: Consider adding services and profiles to required fields.

Currently only version and deployment are required. While semantic validation is deferred to runtime, a valid SDL structurally requires services and profiles sections. Adding them to required would catch malformed SDLs earlier during IDE validation.

 required:
   - version
   - deployment
+  - services
+  - profiles
ts/src/sdl/SDL/SDL.ts (1)

290-299: LGTM with minor suggestion.

Port validation logic is correct. Consider a clearer error message:

-        `Service "${serviceName}" has invalid port value. Port must be 0 < value <= 65535.`,
+        `Service "${serviceName}" has invalid port value. Port must be between 1 and 65535.`,
ts/src/sdl/SDL/parity.spec.ts (1)

404-413: Consider testing invalid fixtures against both beta2 and beta3.

Invalid fixtures are only tested with beta3. If validation differs between versions (e.g., the invalid-port.yaml uses version "2.0"), testing only beta3 may miss version-specific edge cases.

entries.forEach((filename) => {
  ["beta2", "beta3"].forEach((version) => {
    it(`should reject ${filename} (${version})`, () => {
      const input = fs.readFileSync(
        path.join(invalidDir, filename),
        "utf8",
      );
      expect(() => SDL.fromString(input, version as "beta2" | "beta3")).toThrow();
    });
  });
});
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c669081 and 204e70b.

⛔ Files ignored due to path filters (3)
  • go/sdl/go.sum is excluded by !**/*.sum
  • ts/package-lock.json is excluded by !**/package-lock.json
  • ts/src/sdl/SDL/__snapshots__/SDL.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (50)
  • .github/workflows/tests.yaml (1 hunks)
  • .gitignore (1 hunks)
  • go/sdl/cmd/generate-sdl-fixtures/main.go (1 hunks)
  • go/sdl/go.mod (2 hunks)
  • go/sdl/groupBuilder_v2.go (1 hunks)
  • go/sdl/groupBuilder_v2_1.go (1 hunks)
  • go/sdl/parity_test.go (1 hunks)
  • make/test.mk (1 hunks)
  • specs/sdl/groups.schema.yaml (1 hunks)
  • specs/sdl/manifest.schema.yaml (1 hunks)
  • specs/sdl/sdl-input.schema.yaml (1 hunks)
  • specs/sdl/validation-limitations.md (1 hunks)
  • testdata/sdl/invalid/credentials-missing-host.yaml (1 hunks)
  • testdata/sdl/invalid/endpoint-not-used.yaml (1 hunks)
  • testdata/sdl/invalid/invalid-port.yaml (1 hunks)
  • testdata/sdl/invalid/missing-deployment.yaml (1 hunks)
  • testdata/sdl/invalid/missing-image.yaml (1 hunks)
  • testdata/sdl/invalid/missing-version.yaml (1 hunks)
  • testdata/sdl/invalid/negative-cpu.yaml (1 hunks)
  • testdata/sdl/invalid/persistent-without-mount.yaml (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/groups.json (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/input.yaml (1 hunks)
  • testdata/sdl/v2.0/gpu-basic/manifest.json (1 hunks)
  • testdata/sdl/v2.0/http-options/groups.json (1 hunks)
  • testdata/sdl/v2.0/http-options/input.yaml (1 hunks)
  • testdata/sdl/v2.0/http-options/manifest.json (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/groups.json (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/input.yaml (1 hunks)
  • testdata/sdl/v2.0/ip-endpoint/manifest.json (1 hunks)
  • testdata/sdl/v2.0/multiple-services/groups.json (1 hunks)
  • testdata/sdl/v2.0/multiple-services/input.yaml (1 hunks)
  • testdata/sdl/v2.0/multiple-services/manifest.json (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/groups.json (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/input.yaml (1 hunks)
  • testdata/sdl/v2.0/persistent-storage/manifest.json (1 hunks)
  • testdata/sdl/v2.0/simple/groups.json (1 hunks)
  • testdata/sdl/v2.0/simple/input.yaml (1 hunks)
  • testdata/sdl/v2.0/simple/manifest.json (1 hunks)
  • testdata/sdl/v2.0/storage-classes/groups.json (1 hunks)
  • testdata/sdl/v2.0/storage-classes/input.yaml (1 hunks)
  • testdata/sdl/v2.0/storage-classes/manifest.json (1 hunks)
  • testdata/sdl/v2.1/credentials/groups.json (1 hunks)
  • testdata/sdl/v2.1/credentials/input.yaml (1 hunks)
  • testdata/sdl/v2.1/credentials/manifest.json (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/groups.json (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/input.yaml (1 hunks)
  • testdata/sdl/v2.1/ip-endpoint/manifest.json (1 hunks)
  • ts/package.json (1 hunks)
  • ts/src/sdl/SDL/SDL.ts (9 hunks)
  • ts/src/sdl/SDL/parity.spec.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • specs/sdl/validation-limitations.md
  • testdata/sdl/invalid/negative-cpu.yaml
🚧 Files skipped from review as they are similar to previous changes (37)
  • go/sdl/groupBuilder_v2.go
  • .github/workflows/tests.yaml
  • testdata/sdl/invalid/endpoint-not-used.yaml
  • testdata/sdl/invalid/missing-version.yaml
  • testdata/sdl/v2.0/persistent-storage/manifest.json
  • go/sdl/parity_test.go
  • make/test.mk
  • testdata/sdl/v2.0/storage-classes/groups.json
  • go/sdl/go.mod
  • testdata/sdl/v2.0/multiple-services/groups.json
  • testdata/sdl/v2.1/ip-endpoint/manifest.json
  • testdata/sdl/v2.0/ip-endpoint/manifest.json
  • testdata/sdl/v2.0/multiple-services/manifest.json
  • testdata/sdl/v2.0/simple/groups.json
  • testdata/sdl/v2.0/gpu-basic/groups.json
  • testdata/sdl/invalid/missing-deployment.yaml
  • testdata/sdl/v2.0/http-options/input.yaml
  • testdata/sdl/v2.0/simple/manifest.json
  • testdata/sdl/v2.0/http-options/groups.json
  • testdata/sdl/invalid/missing-image.yaml
  • testdata/sdl/v2.0/ip-endpoint/groups.json
  • ts/package.json
  • go/sdl/cmd/generate-sdl-fixtures/main.go
  • testdata/sdl/v2.0/gpu-basic/manifest.json
  • testdata/sdl/v2.0/storage-classes/manifest.json
  • specs/sdl/manifest.schema.yaml
  • testdata/sdl/v2.1/credentials/groups.json
  • testdata/sdl/v2.0/simple/input.yaml
  • testdata/sdl/invalid/credentials-missing-host.yaml
  • testdata/sdl/v2.1/ip-endpoint/input.yaml
  • testdata/sdl/v2.0/gpu-basic/input.yaml
  • testdata/sdl/v2.1/ip-endpoint/groups.json
  • testdata/sdl/invalid/persistent-without-mount.yaml
  • testdata/sdl/v2.1/credentials/manifest.json
  • specs/sdl/groups.schema.yaml
  • .gitignore
  • testdata/sdl/v2.0/http-options/manifest.json
🧰 Additional context used
🧬 Code graph analysis (1)
ts/src/sdl/SDL/SDL.ts (2)
ts/src/sdl/index.ts (1)
  • SdlValidationError (28-28)
ts/src/sdl/types.ts (1)
  • v3Sdl (100-105)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: coverage
  • GitHub Check: test
  • GitHub Check: go
🔇 Additional comments (14)
testdata/sdl/v2.0/persistent-storage/input.yaml (1)

3-48: SDL configuration is well-formed and consistent.

The YAML SDL v2.0 configuration correctly defines:

  • Persistent storage setup with Postgres database service
  • Compute profile with appropriate resource specifications (500m CPU, 1Gi RAM, 50Gi storage)
  • Placement constraints (region us-west, signed_by policy)
  • Pricing and deployment mappings

Cross-referenced against the companion groups.json fixture, resource specifications are consistent.

testdata/sdl/v2.0/persistent-storage/groups.json (1)

1-70: JSON fixture data is accurate and consistent with input.yaml.

Byte conversions are correct:

  • Memory: 1,073,741,824 bytes = 1 GiB ✓
  • Storage: 53,687,091,200 bytes = 50 GiB ✓

All resource specifications (CPU 500 units, storage class/attributes, pricing, count) align with the corresponding input.yaml file. The data structure appears well-suited for parity test validation.

testdata/sdl/v2.0/storage-classes/input.yaml (2)

1-1: The schema reference path is correct and resolves properly. The file specs/sdl/sdl-input.schema.yaml exists at the expected location, and the relative path ../../../../specs/sdl/sdl-input.schema.yaml correctly references the SDL input schema from the file's location at testdata/sdl/v2.0/storage-classes/input.yaml.


2-58: LGTM! Comprehensive storage-classes fixture.

The SDL v2.0 manifest provides a well-structured test fixture that exercises the storage-classes feature with parametric storage definitions, mixed storage attributes (persistent flags and class names), and proper deployment configuration. The mixed attribute patterns (cache/logs minimal vs. data with both persistent and class) are intentional for testing edge cases. The fixture validates successfully against the sdl-input.schema.yaml schema.

go/sdl/groupBuilder_v2_1.go (1)

115-121: LGTM! Deterministic ordering ensures parity testing reliability.

The implementation correctly addresses non-deterministic Go map iteration by collecting storage names, sorting them, and iterating in sorted order. This ensures consistent output across runs, which is essential for the parity tests between Go and TypeScript implementations.

testdata/sdl/v2.0/ip-endpoint/input.yaml (1)

1-49: LGTM!

Well-structured SDL v2.0 test fixture for IP endpoint functionality. The configuration correctly demonstrates:

  • Dual port exposure (80 and 443) with IP endpoint references
  • Proper endpoint declaration matching the IP references in the service expose section
  • Valid compute profile and placement configuration
testdata/sdl/v2.0/multiple-services/input.yaml (1)

1-93: LGTM!

Comprehensive multi-service SDL v2.0 test fixture demonstrating:

  • Service dependency chains (web → api → db)
  • Multiple compute profiles with varying resource allocations
  • Both anyOf and allOf signedBy constraints
  • Inter-service expose configurations

The hardcoded credentials (lines 29, 18) are appropriate for test fixtures.

testdata/sdl/invalid/invalid-port.yaml (1)

1-32: LGTM!

Valid negative test fixture with intentionally invalid port value (99999 > 65535). This tests the port validation logic in validateServicePorts which enforces port > 0 && port <= 65535.

testdata/sdl/v2.1/credentials/input.yaml (1)

1-43: LGTM!

Well-structured SDL v2.1 test fixture for private registry credentials. Correctly demonstrates the credentials block structure (host, email, username, password) for private container registry authentication.

ts/src/sdl/SDL/SDL.ts (3)

113-122: LGTM!

Good addition of version field validation in fromString. This catches malformed SDLs early and provides a clear error message.


834-864: LGTM!

Good addition of deterministic storage key ordering via .sort() in both v2ManifestServiceParams and v3ManifestServiceParams. This ensures consistent output for parity testing between Go and TypeScript implementations.


899-917: LGTM!

Clean refactor of params handling. The conditional assignment (if (params !== null)) prevents null params from polluting the manifest output.

ts/src/sdl/SDL/parity.spec.ts (2)

24-79: LGTM!

makeSchemaLenient appropriately relaxes JSON Schema constraints for flexible parity testing. The recursive handling of nested structures (properties, items, anyOf, oneOf, allOf) is thorough.


303-315: Verify: v2.0 fixtures use v3Manifest method.

The tests call sdl.v3Manifest(true) for v2.0/beta2 fixtures instead of sdl.v2Manifest(). The normalization handles GPU filtering for beta2, but verify this is the intended parity comparison approach.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
specs/sdl/manifest.schema.yaml (1)

1-6: Consider adding standard JSON Schema root declarations.

The schema starts directly with items: without a root-level type: array declaration or $schema identifier. While this may work with some validators, adding these improves compatibility and clarity:

+$schema: "https://json-schema.org/draft/2020-12/schema"
+type: array
 items:
   additionalProperties: false
   properties:
     name:
       type: string
ts/src/sdl/SDL/parity.spec.ts (2)

68-76: Redundant processing for array items.

Lines 68-76 re-check additionalProperties and required on itemsSchema, but makeSchemaLenient was already called on lenient.items at line 53, which would have handled these. This block is defensive but unnecessary.

-  if (lenient.type === "array" && lenient.items) {
-    const itemsSchema = lenient.items as Record<string, unknown>;
-    if (itemsSchema.additionalProperties === false) {
-      itemsSchema.additionalProperties = true;
-    }
-    if (itemsSchema.required && Array.isArray(itemsSchema.required)) {
-      delete itemsSchema.required;
-    }
-  }
-
   return lenient;

81-101: Schema is recompiled on every validation call.

ajv.compile() is called each time validateAgainstSchema is invoked. Since the same schemas are validated multiple times across fixtures, consider caching compiled validators.

+const schemaCache = new Map<string, ReturnType<typeof ajv.compile>>();
+
 function validateAgainstSchema(actual: unknown, schemaPath: string): { valid: boolean; errors: string[] } {
   if (!fs.existsSync(schemaPath)) {
     return { valid: true, errors: [] };
   }

+  let validate = schemaCache.get(schemaPath);
+  if (!validate) {
     const schemaContent = fs.readFileSync(schemaPath, "utf8");
     const schema = load(schemaContent) as JSONSchema;
     const lenientSchema = makeSchemaLenient(schema);
-  const validate = ajv.compile(lenientSchema as Record<string, unknown>);
+    validate = ajv.compile(lenientSchema as Record<string, unknown>);
+    schemaCache.set(schemaPath, validate);
+  }
   const valid = validate(actual);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 204e70b and 2565b0b.

📒 Files selected for processing (2)
  • specs/sdl/manifest.schema.yaml (1 hunks)
  • ts/src/sdl/SDL/parity.spec.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: proto
  • GitHub Check: go
  • GitHub Check: sdl-parity
  • GitHub Check: test
  • GitHub Check: coverage
🔇 Additional comments (7)
specs/sdl/manifest.schema.yaml (2)

295-314: Good use of $defs for reusable credentials schema.

The credentials schema is now properly defined once in $defs and referenced via $ref at lines 26 and 105, eliminating the previous duplication.


33-95: LGTM!

The expose schema is well-structured with proper nesting for httpOptions, required fields, and nullable patterns using anyOf with type: 'null'.

ts/src/sdl/SDL/parity.spec.ts (5)

103-171: LGTM!

The normalizeKeys function correctly handles key transformations and value normalization. The previous issue with finalValue being overwritten has been addressed—now only finalValue is assigned to normalized[normalizedKey].


179-188: Numeric string normalization may have edge cases.

The logic at lines 181-186 only normalizes strings containing . and checks for specific trailing zero patterns. Integer strings (e.g., "100") won't be converted, and strings like "1.0" might not match the .000000000000000000 pattern.

If this is intentional to handle specific Go/TS output differences, consider adding a brief comment explaining the expected scenarios.


251-280: LGTM!

The loadFixtures function correctly discovers and validates fixture directories, ensuring only complete fixtures (with input.yaml, manifest.json, and groups.json) are returned.


402-411: Invalid fixtures only tested against beta3.

The invalid fixtures test uses hardcoded "beta3" version. If v2.0/beta2 has different validation rules, consider also testing invalid fixtures against beta2, or documenting that invalid fixtures are version-specific.


295-329: LGTM!

The v2.0 test suite correctly loads fixtures, normalizes both actual and expected outputs, compares them, and validates against schemas. The error logging on validation failure aids debugging.

@github-actions github-actions bot removed the C:go/cli label Feb 11, 2026
Copy link
Contributor

@stalniy stalniy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert changes in ts folder. they are breaking changes. I think there is some misconfiguration which leaded to this changes

@vertex451 vertex451 requested a review from stalniy February 12, 2026 18:33
@github-actions github-actions bot removed the C:specs label Feb 13, 2026
@vertex451 vertex451 requested a review from stalniy February 13, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate possibility to compile GoLang SDL builder to webassembly

3 participants