Repository navigation
conformance: harden curl harness checks - #761
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 746fb286d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [ "$normalized" = "$expected" ] | ||
| printf '%s\n' "$normalized" |
There was a problem hiding this comment.
Make normalized response check fail the case
RunCase executes specs via bash -c without errexit (see internal/conformance/runner.go OracleCommandArgs), so the [ "$normalized" = "$expected" ] result here is overwritten by the next printf command’s zero exit code. That means if /include or /head response shape changes in the same way for both oracle curl and gbash, the check fails silently and the case can still pass, which weakens the hardening this commit is trying to add.
Useful? React with 👍 / 👎.
Summary
/tmpfiles/echo/bodyhelper so-d,--data-urlencode, and-Tcases catch HTTP verb regressionsWhy
The original harness additions could miss real regressions and could also flake under parallel execution.
Root Cause
grep -Eassertions for-iand-Isucceeded on partial matches instead of proving the full response shapeValidation
go test ./internal/conformanceenv GBASH_RUN_CONFORMANCE=1 GBASH_CONFORMANCE_BASH=/nix/store/zk0hi525wn70pm93gzgdbb5k07y6x2lm-bash-interactive-5.3p9/bin/bash GBASH_CONFORMANCE_CURL=/nix/store/p8kxfnihxlh5yww8q3lhl79l2hjpgkia-curl-8.18.0-bin/bin/curl go test ./internal/conformance -run 'TestConformance/curl' -count=1