Skip to content

scripts: resolve a relative CARGO_TARGET_DIR before deriving the .s path - #444

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/bpe-tokenization-architecture-3xd4eh
Nov 30, 2026
Merged

AdaWorldAPI merged 1 commit into
masterfrom
claude/bpe-tokenization-architecture-3xd4eh

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Follow-up to #443, addressing its three review comments (codex P2, two CodeRabbit).

What changes

#443 made both assembly scripts name their output with --emit=asm=<path>. Cargo resolves a relative CARGO_TARGET_DIR against the directory it runs in, while rustc resolves the --emit path against the package directory. With a relative target dir, the scripts created the assembly directory in one place and asked rustc to write the file in another.

  • scripts/codegen-witness.sh runs cargo from the repository root, so a relative TD is now resolved against the root and exported as CARGO_TARGET_DIR.
  • scripts/neon-asm-rung3.sh runs cargo from the caller's directory, so a relative TD is now resolved against PWD (CodeRabbit's suggestion).

Absolute paths, including both defaults, are unchanged.

Verification

  • bash -n passes on both scripts.
  • I reproduced the reported case: starting from scripts/ with CARGO_TARGET_DIR=target CARGO_ARGS='--config .cargo/config-v3.toml' ./codegen-witness.sh avx2, the witness passes. The assembly lands in <root>/target/codegen-witness/ and no stray scripts/target is created.
  • neon-asm-rung3.sh was not re-run: it needs the aarch64 target.

Generated by Claude Code

Review follow-up to #443. Cargo resolves a relative CARGO_TARGET_DIR
against the directory it runs in, while rustc resolves
`--emit=asm=<path>` against the package directory, so a relative target
dir made the scripts create the assembly directory in one place and ask
rustc to write it in another. codegen-witness.sh runs cargo from ROOT,
so a relative TD is resolved against ROOT (and exported); neon-asm-rung3.sh
runs cargo from the caller's directory, so it is resolved against PWD.
Absolute defaults are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T02:07:26.890081Z 99ff6de PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 55 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 0222c1eb-c6d0-4622-b1e9-f764639c96dd
Commits

Reviewing files that changed from the base of the PR and between 82b2d90 and 99ff6de.

Files selected for processing: 2

  • scripts/codegen-witness.sh
  • scripts/neon-asm-rung3.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@AdaWorldAPI
AdaWorldAPI merged commit 2d730df into master Nov 30, 2026
30 checks passed
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