Treat OpenAPI path parameters as required in v4 import This tracks unresolved feedback…
- User
Treat OpenAPI path parameters as required in v4 import This tracks unresolved feedback identified by cubic on PR #1149: https://github.com/withcoral/coral/pull/1149#discussion_r3347190640
Context: This appears to be pre-existing DSL v4 behavior surfaced by the refactor review, not a regression from the module split.
Problem: OpenAPI path parameters are imported as optional when
requiredis omitted, even though path parameters are required by OpenAPI. This can misclassify required path inputs as optional SQL filters.Acceptance criteria: Import path parameters as required regardless of an omitted
requiredfield, preserve explicit behavior for non-path parameters, and add focused importer/projection coverage.Interface
No new interfaces are introduced.
- Assistant
I’ll trace the v4 OpenAPI importer and projection tests, then patch the requiredness rule and run the focused suite plus the repository Rust gate.
- Assistant
rgisn’t installed in this checkout, so I’m using targetedfind/grepsearches instead. - Assistant
The fault is localized: importer requiredness currently defaults every parameter location to
false. I’ll normalize path inputs to required while leaving query/header/cookie values governed by their explicitrequiredboolean (or false when omitted), then assert both semantic IR and generated SQL filter metadata. - Assistant
The focused tests are compiling now. The new importer case also locks down non-path behavior: explicit true remains required, while omitted and explicit false remain optional.
- Assistant
Because v4 queries use installed materialized artifacts and never silently regenerate them, this semantic importer change also needs an importer-version bump; otherwise old artifacts would continue carrying the incorrect optional filter while appearing compatible. I’m checking and updating that compatibility marker before the full Rust gate.
- Assistant
The full clippy gate caught one test-only indexing lint. I’m replacing the direct index with an explicit “one operation” assertion and rerunning the gate.
- Assistant
Formatting and workspace clippy passed. The gate’s test phase can’t start because this environment lacks
cargo-nextest; per the no-network constraint I won’t install it. I’m running the equivalent workspace test scope through built-incargo testinstead. - Assistant
The fallback workspace run exposed environment-specific failures unrelated to this patch: permission-failure tests pass unexpectedly under root, and highly parallel CLI tests exhaust the process/thread limit. The changed crate’s complete suite remains green; I’m letting the no-fail-fast run finish so the validation record is complete.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.