Skip to content

Fix report-pipe scope, Java release selection and the Cypress handoff found by the Claude eval - #306

Merged
juan-fernandez merged 18 commits into
mainfrom
juan-fernandez/claude-eval-fixes
Nov 5, 2026
Merged

juan-fernandez merged 18 commits into
mainfrom
juan-fernandez/claude-eval-fixes

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

  • A CI step that only converts the tests' report after them (cat report.json | cucumber-junit > junit.xml, junit-merge, jrm, mochawesome-merge, marge, xunit-viewer, allure, junit2html…) is now a caveat, not unresolved CI scope.
  • When CI pipes a direct Cucumber invocation into a converter (cucumber-js --format json | cucumber-junit > x.xml), onboard --apply returns ci_edit_required with the one exact command to write: (status=0; rm -f cucumber-report.json; <scoped tests writing --format json:cucumber-report.json> || status=$?; cat cucumber-report.json | <rest of the pipe> || { converted=$?; [ "$status" -ne 0 ] || status=$converted; }; exit "$status"). It converts the report whether the tests pass or fail, first removing any earlier intermediate report so a run that fails before writing one never converts a stale report, and fails the step with the tests' status, or the conversion's when only the conversion fails, with errexit on or off. ddtest prescribes it only after reading it back with its own CI reader. Rerunning onboard --apply accepts it. The intermediate report gets a name used neither in the pipe nor by a file in the step's directory (cucumber-report-1.json and so on), and only external programs or the builtins :, [, test, echo, true, false, pwd may run after the tests in that command (no printf builtin). On Jenkins, the command comes escaped for the string literal the sh step already uses (\$ and \\ in a double-quoted GString, plus \" in "…"; \\ in a single-quoted one, plus \' in '…'), so you replace only the test command inside that string and its other ${…} interpolations keep working. After the tests, test/[ may only run as a file test, -n/-z, =/!= or a literal-integer comparison.
  • Java setups name the dd-java-agent release ddtest resolves from Maven Central (or --tracer-version) instead of <exact dd-java-agent release>. This covers GitLab, CircleCI (orb and no-Bash setup), Buildkite, Jenkins, the GitHub action instructions, hand-written downloads and the Jenkins plugin pin. A floating --tracer-version is refused. ddtest falls back to 1.67.1 only when Maven Central can't be read. An explicit --tracer-version latest resolves to that exact release, which the handoff and testdrive carry.
  • For Cypress (no automatic CI setup), ci_edit_unsupported now returns next_command: onboard --framework cypress --instructions and names the release to write, in place of "framework-specific CI loader/hook integration". With a non-default --site, the handoff also names that site in place of the example datadoghq.com, as do the other handoffs that point at onboard --instructions.

Why

The first Claude run of the onboarding eval catalog found three issues:

  • E04 battleship: following ddtest's own advice ("run the test command as a CI command of its own"), the agent split the pipe. ddtest then flagged the conversion line as "Cannot statically resolve command: cat", so CI runtime and tracer agreement became inconclusive.
  • E11, E12 and E15: ddtest left the Java release to the agent. Claude picked 1.68.1, the GitHub path used 1.67.1, so the validated release depended on the agent and the date.
  • E08 kitchensink: the Cypress text was vague, and the agent improvised a hook before it found onboard --instructions.

E2E testing

Prerequisites: Go from go.mod, Node 24 with npm, git, network access to GitHub, npm and Maven Central. Build this branch with make build and put ddtest on PATH. Work in an empty scratch folder.

  1. Cucumber report pipe (GitLab):
    git clone https://github.com/proscrumdev/battleship-nodejs.git && cd battleship-nodejs
    git checkout 488895ecab3f3f4d43b9740d0235a47aa5b57f4d
    npm ci --no-audit --no-fund && npm install --save-dev --no-audit --no-fund nyc@17.1.0 && git commit -qam "Add nyc"
    ddtest onboard --framework cucumber --apply --yes --ci-provider gitlab --agent
    
    Expected: "code":"ci_edit_required", and reason says Replace this CI command with exactly this one, which removes any earlier intermediate report, writes the report to a file, converts it whether the tests pass or fail, and exits with the tests' status, or the conversion's when only the conversion fails: (status=0; rm -f cucumber-report.json; NODE_OPTIONS="${NODE_OPTIONS:-} ${DD_CUCUMBER_NODE_OPTIONS:-}" DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED=false npx --no-install nyc -- ./node_modules/.bin/cucumber-js ./GameController_ATDD --format json:cucumber-report.json || status=$?; cat cucumber-report.json | ./node_modules/.bin/cucumber-junit > testresults_cucumber.xml || { converted=$?; [ "$status" -ne 0 ] || status=$converted; }; exit "$status").
  2. In .gitlab-ci.yml, replace the acceptance test script line with that command as a single - entry. Then run ddtest onboard --framework cucumber --apply --yes --ci-provider gitlab --agent --allow-dirty.
    Expected: "status":"complete_locally". In .testoptimization/testdrive.json, summary.status is COMPLETE LOCALLY, ci_configuration is compatible, and scope.commands[0].step_scope_notes includes "This CI step runs cat cucumber-report.json | ./node_modules/.bin/cucumber-junit > testresults_cucumber.xml after its cucumber tests, whether they pass or fail, then exits with the tests' status, or with the status of a command after them that fails when they pass." (plus a note that the cat part can't start cucumber).
  3. Failure path: add GameController_ATDD/zz_fail.feature with a scenario whose step is undefined, then run bash -eo pipefail -c '<the command from step 1>; echo next'. Expected: exit status 1, testresults_cucumber.xml written, and no next printed. Remove the feature and rerun: exit 0 and next printed. With a passing suite and the converter replaced by sh -c 'cat > testresults_cucumber.xml; exit 5', bash -c (without -e) exits 5; with the failing feature as well, it exits 1.
  4. Edge: change the converter inside the command to ./convert.sh (an unknown script), then run ddtest testdrive --framework cucumber --ci-provider gitlab --check-only --agent --yes. Expected: scope.unresolved in .testoptimization/testdrive.json names the step: "CI runs cat cucumber-report.json | ./convert.sh > testresults_cucumber.xml after the tests in the same command, and it may start cucumber itself…". Also put exit 0; before exit "$status" and rerun: the acceptance-test step is unresolved and no cucumber command is accepted. With read status <<<0 (or printf -v status 0) as the converter, the step is also unresolved. With an existing cucumber-report.json in the repository root, the prescription uses cucumber-report-1.json and leaves the file untouched.
  5. Java release (GitLab):
    git clone https://github.com/open-eid/cdoc2-auth.git && cd cdoc2-auth && git checkout c78912288ef933e31c483c1b8759df468740baf9
    curl -fsSL https://repo1.maven.org/maven2/com/datadoghq/dd-java-agent/maven-metadata.xml | grep '<release>'
    ddtest onboard --framework junit5 --instructions --ci-provider gitlab | grep -E 'JAVA_TRACER_VERSION|The setup installs'
    
    Expected: the snippet has JAVA_TRACER_VERSION="<release>", with the release that curl printed (1.68.1 today), and the note says The setup installs dd-java-agent <release>, the exact release ddtest selected. No <exact dd-java-agent release> placeholder is left.
  6. ddtest onboard --framework junit5 --ci-provider gitlab --agent --tracer-version 1.67.1. Expected: the instruction has JAVA_TRACER_VERSION=\"1.67.1\", and resume_command carries --tracer-version 1.67.1. Then run it with --tracer-version 1.67. Expected: "code":"invalid_options" with the Java tracer version must be an exact dd-java-agent release, such as 1.67.1, or latest: 1.67. Then run it with --tracer-version latest: the instruction pins JAVA_TRACER_VERSION to the current Maven Central release, and resume_command carries --tracer-version <that release>, not latest.
  7. Optional, Jenkins plugin pin: in a Jenkins repo whose host stage pins DATADOG_JENKINS_PLUGIN_TRACER_DISTRIBUTION_URL to 1.66.0 and that also has a container stage, ddtest onboard --apply --yes writes DD_SET_TRACER_VERSION_JAVA="1.66.0" in the container snippet.
  8. Cypress handoff (GitLab):
    git clone https://github.com/cypress-io/cypress-example-kitchensink.git && cd cypress-example-kitchensink
    git checkout 154c81326d90c4c442a20dc469977b5f1f291136 && npm ci --no-audit --no-fund
    ddtest onboard --framework cypress --apply --yes --ci-provider gitlab --agent
    
    Expected: "code":"ci_edit_unsupported" and "next_action":"run_command", with next_command ending in onboard --framework cypress --instructions --ci-provider gitlab. reason says onboard --apply does not write the Cypress CI setup on GitLab CI. next_command prints it: apply that setup exactly as shown, with dd-trace 6.23.0 in place of its tracer release placeholder (JS_TRACER_VERSION: 6.23.0) (the release is the one ddtest selects that day). resume_command is testdrive ... --tracer-version <same release> ... --resume <id>. Running next_command prints the GitLab setup entry.
    Rerun with --site datadoghq.eu. Expected: reason, needs and required_input contain "the Datadog site datadoghq.eu in place of the example site datadoghq.com, and dd-trace in place of its tracer release placeholder"; next_command has no --site, and resume_command has --site datadoghq.eu.

🤖 Generated with Claude Code

juan-fernandez and others added 4 commits November 5, 2026 09:35
A CI step that only converts the tests' report, such as
cat report.json | cucumber-junit > junit.xml after the Cucumber command,
was unresolved scope: cucumber-junit was an unknown executable that might
start tests, which made CI runtime and tracer agreement inconclusive (E04).

Report converters, mergers and viewers (cucumber-junit, junit-merge, jrm,
mochawesome-merge, marge, xunit-viewer, allure, junit2html...) read result
files and write a report, so ddtest now reads them as non-test tools in
every language's CI. A step after the job's last test that runs only such
tools becomes a caveat through the existing post-test rule; unknown tools,
and scoped packages of the same name, still may start tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
onboard --apply refused cucumber-js --format json | cucumber-junit > x.xml
as a compound command and told the agent to run the tests as a command of
their own, leaving it to improvise the conversion. NYC, which the scoped
command adds, also prints its summary to standard output, so the pipe
can't stay.

For a pipe from one Cucumber formatter on standard output into commands
that can't start tests, ddtest now returns ci_edit_required with the two
exact commands: the scoped test command writing the same report to a file
(--format json:cucumber-report.json), then cat of that file into the rest
of the pipeline. Rerunning onboard --apply accepts both. Other compound
commands keep the general advice, which now explains the same shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Java setups printed <exact dd-java-agent release> and "such as 1.67.1", so
agents picked the release themselves (1.68.1 on GitLab and CircleCI, 1.67.1
on GitHub) and validation depended on the agent and the date.

ddtest now reads the latest release from Maven Central's dd-java-agent
metadata once per run, where a Java setup is first written, and names it in
the GitLab, CircleCI, Buildkite and Jenkins snippets, the setup without Bash
or curl, the GitHub action instructions, the hand-written download and the
Jenkins plugin pin. An exact --tracer-version wins and a floating one is
refused; the CI-pinned release stays the one validated, and the Jenkins
container snippet still follows the host stages' plugin pin.
javaRecommendedTracer remains only as the offline fallback. Tests inject the
resolver and never reach the network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a framework onboard --apply doesn't set up (Cypress), the result said
"framework-specific CI loader/hook integration", and agents improvised a
hook before finding the instructions (E08). The result now returns
next_command onboard --framework <name> --instructions, as unresolved scope
does, names the tracer setting with the selected release, forbids a
hand-made loader or hook, and keeps resume_command for validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 87.73% (-0.90%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d3d6df7 | Docs | View more details | Give us feedback!

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T15:42:40.532169Z e4d9952 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 6f56c3d798

ℹ️ 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/testdrive/onboard.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

The prescribed Cucumber split skips JUnit report conversion when tests fail. The Cypress handoff also loses an explicitly selected Datadog site, so following its instructions can configure CI for a different site than validation.

Open Bits AI session

🤖 Bits Code Review · Commit 6f56c3d

Comment thread internal/onboard/apply_scoped.go Resolved
Comment thread internal/testdrive/onboard.go Resolved
juan-fernandez and others added 2 commits November 5, 2026 10:35
With --site datadoghq.eu (any non-US1 site), the Cypress ci_edit_unsupported
handoff sent the agent to onboard --instructions, which renders the setup
for datadoghq.com, and told it to apply that setup exactly as shown, while
resume_command kept the selected site. onboard --instructions takes no
--site, like the tracer release it leaves as a placeholder, so the handoff
now names the site the same way: "the Datadog site datadoghq.eu in place of
the example site datadoghq.com, and dd-trace X in place of its tracer
release placeholder", in reason, needs and required_input.

The unresolved-scope handoff and the manual CI hook handoffs
(ci_edit_unsupported, ci_edit_required), which also point at onboard
--instructions, name a non-default site for setup written by hand too. The
default site needs no substitution and adds nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prescribed split of cucumber-js --format json | cucumber-junit > x.xml
into two CI commands lost the report when scenarios failed: GitLab,
CircleCI, Buildkite and Jenkins stop at the first failing script command,
so the conversion never ran. The original pipe always converted; with
pipefail (GitLab, CircleCI) it failed on failing tests, and without it
(Buildkite, Jenkins sh) it took the converter's status and hid them.

ddtest now prescribes one CI command that converts the report whatever the
result and exits with the tests' status:

  (status=0; <scoped tests> || status=$?; cat cucumber-report.json | <converter>; exit "$status")

The || keeps errexit from stopping at failing tests, and the subshell keeps
the exit to this command, so a passing run continues with the script's
later commands. Buildkite gets it with $$ escapes.

Every provider's reader now takes that exact subshell as its tests (the
configuration, with the scoped prefix and NYC read as before) plus the
commands before the exit, which resolution checks can't start the tests
and records as a step note outside validation. Any other shape, a
conversion that may start tests, or an exit with another value stays
unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: 5d891662e2

ℹ️ 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/onboard/apply_scoped.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

Report-pipe handling can prescribe edits that remove conversion commands or corrupt a report by aliasing its input and output. It also hides preparation needed by later tests and rejects valid quoted formatter options.

Open Bits AI session

🤖 Bits Code Review · Commit 5d89166

Comment thread internal/onboard/scripts.go Resolved
Comment thread internal/onboard/apply_scoped.go Resolved
Comment thread internal/onboard/apply_scoped.go Resolved
Comment thread internal/onboard/apply_scoped.go Resolved
Review follow-ups on the status-preserving subshell that onboarding
prescribes for a Cucumber report pipe, and on the pipe rewrite itself.

- Each command between the tests and the saved-status exit must fall
  through to it: one foreground command, or a pipeline of them, whose
  literal program is no flow-changing builtin (exit, return, exec, break,
  continue, set, eval, source, trap, ...), with no && or || list and no
  read or assignment of the status variable. Otherwise the subshell is not
  read and the step stays unresolved, so
  (status=0; cucumber-js || status=$?; exit 0; exit "$status") no longer
  passes with its failures masked.
- Those commands are now resolved as the same commands after the tests in
  a plain sequence: a file change such as cp ci.env .env stays setup for a
  later test step, and a command ddtest can't resolve is reopened when a
  later test step follows it. The check that rejects a tail that may start
  the tests still runs first.
- When the tests inside an existing subshell still need the scoped prefix
  or NYC, the prescribed command is the whole subshell with only its tests
  edited, keeping the conversion and the exit with the tests' status.
- The intermediate report takes a numeric suffix until the pipeline names
  it nowhere, so cucumber-js --format junit | tee cucumber-report.xml reads
  from cucumber-report-1.xml instead of aliasing its input and output.
- A quoted formatter option such as '--format=json' is rewritten from its
  decoded text and quoted only when needed, so the prescription parses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: 6987d5dfc0

ℹ️ 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/onboard/apply_scoped.go Resolved
Comment thread internal/onboard/apply_scoped.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

Cucumber report pipelines ending with a semicolon or inline comment produce syntactically invalid onboarding replacements. Bounding the converter to its parsed statement fixes the reproduced failures while preserving ordinary pipelines.

Open Bits AI session

🤖 Bits Code Review · Commit 6987d5d

Comment thread internal/onboard/apply_scoped.go Resolved
The prescribed status subshell now records the conversion's failure when
the tests pass, and keeps the tests' status when both fail:

  (status=0; <tests> || status=$?; <conversion> || { converted=$?; [ "$status" -ne 0 ] || status=$converted; }; exit "$status")

so a missing or broken report fails the step with errexit off too, as the
original pipe did. The conversion pipe keeps the CI shell's own pipefail
setting, as the original pipe's status did. ddtest reads only that guarded
form back.

ddtest also prescribes only a command it reads back as the same tests and
conversion, falling back to the general compound-command advice otherwise
(a conversion through a { ...; } group, or one that reads the status
variable), and the conversion now ends at the pipeline's last stage, so a
trailing ; or comment no longer breaks the prescription.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: dec93ebe8f

ℹ️ 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/onboard/java_release.go Resolved
Comment thread internal/onboard/apply_scoped.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

The new wrapper reader accepts variable-writing builtins that erase a saved test failure. Consequently, scope discovery can accept CI commands as preserving test failures even though they exit successfully.

Open Bits AI session

🤖 Bits Code Review · Commit dec93eb

Comment thread internal/onboard/apply_scoped.go Resolved
juan-fernandez and others added 3 commits November 5, 2026 12:33
A status subshell's commands between its tests and its exit may now start
any external program, but of the shell's builtins only those that print or
test (:, [, echo, false, printf without options, pwd, test, true). read,
printf -v, mapfile, getopts and the like write the saved status through a
literal argument, which the assignment check didn't see, so a command that
masks failing tests stays unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The report a split Cucumber pipe writes before its conversion now also
skips names that are a file, or a path git tracks, in the directory the
CI command runs in, so the tests never overwrite a fixture such as a
tracked cucumber-report.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For Java, --tracer-version latest now selects the exact latest
dd-java-agent release, as no --tracer-version does, and the onboarding
handoff and testdrive carry that release: the setup pins it, so the resumed
validation compares the same release with the CI pin instead of reporting
the literal latest as a mismatch. Other languages keep latest, which their
registry resolves when the tracer installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: 83d3f9dedc

ℹ️ 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/onboard/apply_scoped.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

Bash’s printf %n can overwrite the saved test status, and the new wrapper reader accepts that command as status-preserving. This allows a CI wrapper that hides failed tests to be accepted.

Open Bits AI session

🤖 Bits Code Review · Commit 83d3f9d

Comment thread internal/onboard/apply_scoped.go Resolved
@juan-fernandez
juan-fernandez marked this pull request as ready for review November 5, 2026 12:49
@juan-fernandez
juan-fernandez requested a review from a team as a code owner November 5, 2026 12:49

@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: 83d3f9dedc

ℹ️ 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/onboard/apply_scoped.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

Broader testdrive behavior remains incompletely verified because nodejs.org metadata requests returned HTTP 502; focused verification of the changed onboarding paths succeeded.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 83d3f9d

juan-fernandez and others added 2 commits November 5, 2026 14:06
The report-pipe prescription now removes the intermediate report inside
the status subshell before the tests, so Cucumber failing before it writes
the report leaves cat a missing file instead of converting an earlier
run's report. The CI reader accepts only that rm -f of the file the tests
write and the conversion reads.

printf is no longer a builtin allowed between the tests and the exit:
bash's printf writes a variable through -v or a %n in its format.
External programs, /usr/bin/printf included, stay allowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A report pipe whose tests or conversion read a shell variable named status
or converted got a prescription that shadowed it with the subshell's own
status. The prescription now records into status and converted only when
the pipe references neither, and otherwise into datadog_status and
datadog_converted, then those with a numeric suffix. The reader rejects a
status subshell whose tests read its status variable or a saved conversion
status, so the old shadowing form stays unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: c988f33c6e

ℹ️ 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/onboard/apply_provider.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The completed static review produced no reportable findings. Broader testdrive validation was limited by HTTP 502 responses from nodejs.org.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit c988f33

juan-fernandez and others added 3 commits November 5, 2026 15:29
…holds them

A container stage's report-pipe split, status-subshell edit and direct
scoped command were handed off as raw shell, which Groovy interpolates
($status, ${NODE_OPTIONS}) or rejects ($?) when pasted into a
double-quoted sh string. They now come as sh '''…''' holds them, with
backslashes and runs of three quotes escaped, and say to replace a
double-quoted script with sh '''…''', as the setup snippet's
instructions already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The real-shell checks of the status subshell started one shell from the
test per case, and one bash -n and dash -n per prescription. Each shell
now runs all of a test's cases from one process, each case still in a
fresh shell and directory of its own, and one bash -n and one dash -n
parse every prescription, each the body of its own function.

sh runs every combination of errexit, the tests' result and the
conversion's; bash, with pipefail, and dash run a smoke subset where the
tests, the conversion or both fail. Each provider reaches the reader's
rejections of a removal and of an unsafe builtin through two
representative forms, one that Buildkite escapes, since the reader
tables check every form; the reader table gains rm -rf ., the one form
only the provider loop had. The fresh report name tests run on one
provider: the name doesn't depend on it, and every provider's escaping
keeps its own end-to-end test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@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: e4d9952489

ℹ️ 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/onboard/apply_provider.go Resolved

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bits Code Review: FAIL

The new status-wrapper reader accepts a Bash test operand that overwrites the saved exit status, allowing it to approve a CI command that returns success after failing tests.

Open Bits AI session

🤖 Bits Code Review · Commit e4d9952

Comment thread internal/onboard/apply_scoped.go Resolved
juan-fernandez and others added 2 commits November 5, 2026 17:51
…eral

A container stage's report-pipe split, status-subshell edit and direct
scoped command came escaped for sh '''…''', with an instruction to switch
a double-quoted script to it. In a GString that also interpolates other
expressions, such as echo ${env.BUILD_NUMBER}, the switch handed the
shell ${env.BUILD_NUMBER}, a bad substitution.

The prescription now follows the literal type Groovy's lexer read for the
step's script: in "…" or """…""" each backslash and $ is escaped (and in
"…" each double quote and line break), in '…' each backslash, single
quote and line break, and in '''…''' each backslash and run of three
quotes. The user replaces only the test command inside the existing
string, whose other expressions stay interpolated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rands

bash evaluates an array subscript in some test operands, so test -v
'BASH_VERSINFO[status=0]' after the tests reset the saved status and the
subshell exited 0, while the reader read it as status-preserving.

test and [ now qualify only as a file test, -n or -z on a literal, = or
!= between literals, or a comparison of literal integers, each operand a
literal without $, a backslash, [ or a glob character. -v, -o/-a and !
combinations, and any other operand set, leave the subshell unresolved.
The guard's own [ "$status" -ne 0 ] is a separate shape, still read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juan-fernandez
juan-fernandez merged commit df9c150 into main Nov 5, 2026
130 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/claude-eval-fixes branch November 5, 2026 17:14
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.

2 participants