Skip to content

epic(F2): extract DAG foundation as pheno-dag crate (standalone)#242

Open
KooshaPari wants to merge 1 commit into
mainfrom
epic/F2-extract-pheno-dag
Open

epic(F2): extract DAG foundation as pheno-dag crate (standalone)#242
KooshaPari wants to merge 1 commit into
mainfrom
epic/F2-extract-pheno-dag

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Jun 25, 2026

Copy link
Copy Markdown
Owner

User description

Summary


CodeAnt-AI Description

Add a WASM-compatible BytePort CLI for creating S3 upload instructions

What Changed

  • Added a new byteport CLI subset that can run in wasm32-wasi
  • Users can create S3 upload instructions from the command line and get the result as formatted JSON
  • The upload command supports custom endpoint, bucket, object key, content type, and content length, with sensible defaults for endpoint, bucket, and content type
  • Failed upload instruction creation now prints a clear error message and exits with a non-zero status

Impact

✅ WASM-ready CLI uploads
✅ Faster S3 upload setup
✅ Clearer CLI error output

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@KooshaPari KooshaPari added the area:compute-infra Phenotype compute/infra epic label Jun 25, 2026
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions

Copy link
Copy Markdown

Legacy Tooling Scan Report

Severity Count
Critical 0
High 0
Medium 0
Low 0

No violations detected.

This is a WARN-mode scan. Fix before strict enforcement begins.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​log@​0.4.3310010093100100
Updatedcargo/​clap@​4.6.1 ⏵ 4.5.619910093100100
Updatedcargo/​http@​1.4.0 ⏵ 1.4.210010093100100
Updatedcargo/​uuid@​1.23.1 ⏵ 1.20.0100 +110093100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: cargo zerocopy is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/tauri-plugin-log@2.8.0cargo/zerocopy@0.8.52

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/zerocopy@0.8.52. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Jun 25, 2026
@sonarqubecloud

Copy link
Copy Markdown

Comment on lines +55 to +56
#[arg(long, default_value_t = 0)]
content_length: u64,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: content_length is optional with a default of 0, so omitting --content-length silently generates an instruction with content-length: 0. For any non-empty upload this will produce a mismatched header and failed upload behavior; make this argument required (or compute it from an input file) instead of defaulting to zero. [logic error]

Severity Level: Major ⚠️
- ❌ CLI generates upload instructions with zero content-length by default.
- ⚠️ Automation using these instructions may fail uploading non-empty objects.
Steps of Reproduction ✅
1. Build and run the WASM CLI defined in `crates/byteport-cli/src/main.rs:16-80`, invoking
`byteport transport create-upload --object-key test.bin` without a `--content-length`
flag.

2. Clap populates `TransportAction::CreateUpload` in `main.rs:38-57`, using the
`#[arg(long, default_value_t = 0)]` on `content_length: u64` at lines 55-56, so
`content_length` is set to `0`.

3. `main()` forwards this value into `cmd_transport_create_upload` at `main.rs:63-77`,
which constructs an `UploadRequest` at `main.rs:91-94` with `content_length` equal to `0`.

4. `S3UploadTransport::create_upload` in `crates/byteport-transport/src/lib.rs:67-87`
inserts a `content-length` header from `request.content_length` at line 79, and the CLI
then prints JSON at `main.rs:96-99` showing `"content-length": "0"`, even though the
intended upload (e.g. `test.bin`) is non-empty, producing an instruction with a mismatched
payload size.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/byteport-cli/src/main.rs
**Line:** 55:56
**Comment:**
	*Logic Error: `content_length` is optional with a default of `0`, so omitting `--content-length` silently generates an instruction with `content-length: 0`. For any non-empty upload this will produce a mismatched header and failed upload behavior; make this argument required (or compute it from an input file) instead of defaulting to zero.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .cargo/config.toml
Comment on lines +30 to 31
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "instrument-coverage"]

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 Target coverage rustflags at the host platform

This table only applies when Cargo is building for x86_64-pc-windows-msvc, but the Rust coverage workflow I checked runs on ubuntu-latest and local Linux hosts use x86_64-unknown-linux-gnu. Replacing the previous global [build] rustflags with this Windows-only target means the documented native coverage instrumentation no longer applies in the CI environment that enforces cargo llvm-cov; use a cfg/host-target entry that includes the Linux host while still excluding wasm cross-builds.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:compute-infra Phenotype compute/infra epic size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant