Skip to content

fix(test): remove duplicate ProcessInfo fields in fr007_ps_all_csv (E0062) - #645

Merged
KooshaPari merged 1 commit into
mainfrom
fix/ps-all-csv-dup-fields
Aug 5, 2026
Merged

fix(test): remove duplicate ProcessInfo fields in fr007_ps_all_csv (E0062)#645
KooshaPari merged 1 commit into
mainfrom
fix/ps-all-csv-dup-fields

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Aug 5, 2026

Copy link
Copy Markdown
Owner

User description

Summary

Coverage on main fails at the "Guard - refuse empty test suite" step because tests/fr007_ps_all_csv.rs has duplicate struct fields (E0062: ppid, cwd, env_count, state, disk_read_bytes, disk_write_bytes specified more than once at lines 168-173) - a merge-conflict resolution regression from a recent merged PR.

This PR removes the duplicated field block, restoring the single canonical ProcessInfo initializer (FR-007 / AC-007.46).

Test plan

  • cargo check --workspace --all-targets passes (no E0062)
  • Coverage workflow produces an llvm-cov snapshot on main
  • ci / lint + ci / test required contexts green

CodeAnt-AI Description

Restore the process-list test so the test suite builds successfully

What Changed

  • Removed duplicate process fields from the fr007_ps_all_csv test data
  • Restored successful compilation of the process-list test and coverage checks

Impact

✅ Passing process-list test builds
✅ Unblocked coverage checks

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

Copilot AI lite review requested due to automatic review settings August 5, 2026 23:33
@codeant-ai

codeant-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR c8ef2c9 Aug 05, 2026 · 23:33 23:34

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai

codeant-ai Bot commented Aug 5, 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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6a654bc8-9366-47c7-be75-f035c0d55354

📥 Commits

Reviewing files that changed from the base of the PR and between 12ee872 and c8ef2c9.

📒 Files selected for processing (1)
  • tests/fr007_ps_all_csv.rs
💤 Files with no reviewable changes (1)
  • tests/fr007_ps_all_csv.rs
📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary

📝 Walkthrough

Summary

This PR removes six duplicated ProcessInfo fields from the FR-007 test fixture. It restores a single canonical initializer and resolves compiler error E0062. The change should merge.

Must Fix

None.

Should Fix

None.

Consider

The change affects only test fixture initialization. No public entities or APIs change.

Approve / Request Changes

Approve.

Walkthrough

The FR-007 CSV body-shape test removes duplicated ProcessInfo fixture fields: ppid, cwd, env_count, state, disk_read_bytes, and disk_write_bytes.

Changes

FR-007 fixture cleanup

Layer / File(s) Summary
Remove duplicate fixture fields
tests/fr007_ps_all_csv.rs
The test fixture initializer no longer repeats six ProcessInfo fields.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix but omits the required Linked Issues and Risk & Rollout sections and provides no test evidence. Add the required Linked Issues and Risk & Rollout sections, and include test results or CI evidence for the listed checks.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the test fix and the duplicate-field compiler error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ps-all-csv-dup-fields
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/ps-all-csv-dup-fields

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@KooshaPari
KooshaPari merged commit 4fc11f6 into main Aug 5, 2026
33 of 47 checks passed
@KooshaPari
KooshaPari deleted the fix/ps-all-csv-dup-fields branch August 5, 2026 23:40
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Quality Gate Report

❌ Unit Tests: FAILED
⏭️ E2E Tests: SKIPPED (no e2e directory)
⏭️ Integration Tests: SKIPPED (no integration directory)
✅ FR Annotations: VALID

@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0

Analysis

This PR removes six duplicated ProcessInfo field initializers (ppid, cwd, env_count, state, disk_read_bytes, disk_write_bytes) from the fr007_ps_all_csv_body_shape test fixture in tests/fr007_ps_all_csv.rs, resolving the E0062 compile error that blocked the coverage workflow.

Verification performed:

  1. Struct field completeness — Cross-referenced the resulting initializer against ProcessInfo defined in src/runtime.rs:90-126. All 16 fields (pid, name, cmd, memory_mb, start_time, cpu_percent, project, harness, ppid, cwd, env_count, state, disk_read_bytes, disk_write_bytes, fd_count, thread_count) are present exactly once with matching types.

  2. ProcState::default() — Confirmed ProcState (src/runtime.rs:58-70) derives Default with #[default] on the Unknown variant, so the initializer is valid.

  3. AgentProcRow match — The AgentProcRow initializer at src/commands/proc.rs:552-562 matches the test's usage (pid, family, comm, state, mem_rss_bytes, mem_rss, fd_count: Option<u64>); Some(12) infers to u64.

  4. Test assertions vs. implementation — Traced every assertion in fr007_ps_all_csv_body_shape against render_ps_all_csv_body (src/commands/mod.rs:403-444):

    • body.contains(MANAGED_CSV_HEADER) — header matches the initial out string (line 412). ✓
    • body.contains("process,42,test-agent,128,demo,claude,") — process row format string (lines 414-422) produces this prefix. ✓
    • body.contains("summary,1,128")summary,{},{total_mem} with total_mem=128 (lines 424-426). ✓
    • body.contains("agent_inventory,1,1")agent_inventory,{scanned},{watched} with scanned=1, watched=1 (line 428). ✓
    • body.contains(AGENT_INVENTORY_CSV_HEADER) — pushed at line 429. ✓
    • body.contains("99,claude,claude,S,1048576,1.0M,12") — agent row format (lines 430-441) with fd_count=Some(12) -> "12". ✓
  5. No type/field-order regressions — Rust does not require struct literal fields in declaration order; the retained (first) initializer block has always used this order as pre-existing context.

Notes

  • This PR is already in MERGED state. No inline comments submitted — no issues were found in the changed lines.
  • The CodeRabbit "Description check" pre-merge warning (missing Linked Issues / Risk & Rollout sections, no test evidence) is a PR-metadata concern, not a code-quality defect, and does not block the correctness of the fix.
Files Reviewed (1 file)
  • tests/fr007_ps_all_csv.rs - 6 duplicate field lines removed; 0 issues

Reviewed by laguna-s-2.1:free · Input: 141.1K · Output: 16.2K · Cached: 347.1K

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