Skip to content

conformance: harden curl harness checks - #761

Merged
ewhauser merged 2 commits into
mainfrom
ewhauser/curl-conformance-harness-fixes
Mar 28, 2026
Merged

ewhauser merged 2 commits into
mainfrom
ewhauser/curl-conformance-harness-fixes

Conversation

@ewhauser

Copy link
Copy Markdown
Owner

Summary

  • make the curl header cases compare the full normalized response instead of passing on any single matching line
  • give the curl conformance file-writing cases deterministic per-case temp paths so parallel execution does not race on shared /tmp files
  • include the request method in the /echo/body helper so -d, --data-urlencode, and -T cases catch HTTP verb regressions

Why

The original harness additions could miss real regressions and could also flake under parallel execution.

Root Cause

  • the grep -E assertions for -i and -I succeeded on partial matches instead of proving the full response shape
  • several cases reused the same absolute temp paths even though the conformance harness runs cases in parallel
  • the echo helper only compared request bodies, so method selection bugs would still compare equal

Validation

  • go test ./internal/conformance
  • env 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

@ewhauser ewhauser changed the title [codex] conformance: harden curl harness checks conformance: harden curl harness checks Mar 28, 2026
@ewhauser
ewhauser marked this pull request as ready for review March 28, 2026 16:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread internal/conformance/curl/curl.test.sh Outdated
Comment on lines +49 to +50
[ "$normalized" = "$expected" ]
printf '%s\n' "$normalized"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@ewhauser
ewhauser merged commit 7f7d50d into main Mar 28, 2026
15 checks passed
@ewhauser
ewhauser deleted the ewhauser/curl-conformance-harness-fixes branch March 28, 2026 16:32
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