Skip to content

fix: trim repeat-dict metadata before validation - #166

Merged
njzjz merged 2 commits into
deepmodeling:masterfrom
njzjz-bot:codex/scan-fix
Aug 31, 2026
Merged

fix: trim repeat-dict metadata before validation#166
njzjz merged 2 commits into
deepmodeling:masterfrom
njzjz-bot:codex/scan-fix

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reproduce the behavior described in trim_pattern="_*" not supported for repeat dict Argument #70 on the current master branch
  • trim keys matching trim_pattern at repeat-dict containers before iterating item values
  • skip non-string Python mapping keys during pattern matching
  • preserve existing item-level trimming and add regression tests for scalar metadata and integer item keys

Fixes #70

Validation

  • PYTHONPATH=. python -m pytest -q — 60 passed, 4 skipped
  • PYTHONPATH=. python -m unittest discover -q — 63 tests passed, 4 skipped
  • ruff check dargs/dargs.py tests/test_normalizer.py — passed
  • python -m compileall -q dargs tests — passed

Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 642953d0-7af9-4701-af52-e0d338960bee


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.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.89%. Comparing base (c2c0a83) to head (037aa3c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   78.84%   78.89%   +0.04%     
==========================================
  Files           9        9              
  Lines         884      886       +2     
==========================================
+ Hits          697      699       +2     
  Misses        187      187              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Trim keys matching the configured pattern before iterating repeat dictionaries, so container-level metadata is not treated as an item. Non-string Python mapping keys are ignored by pattern matching.

Coding-Agent: Codex
Codex-Version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@njzjz-bot

Copy link
Copy Markdown
Contributor Author

Review summary

Three independent subagent reviews were performed for this PR:

  • Logic review: the Issue trim_pattern="_*" not supported for repeat dict Argument #70 fix correctly trims repeat-dict container metadata before item traversal; no blocking correctness findings.
  • Compatibility review: identified a P2 edge case where non-string Python mapping keys (for example, integer keys) were passed to the trim regex. This was fixed in commit f973619 by matching only string keys.
  • Test review: confirmed the main regression and recommended broader edge coverage; regression tests now cover scalar container metadata and non-string repeat-dict keys.

Validation is green:

  • PYTHONPATH=. python -m pytest -q: 60 passed, 4 skipped
  • PYTHONPATH=. python -m unittest discover -q: 63 passed, 4 skipped
  • Ruff and compileall passed
  • Build, type check, pre-commit, Codecov, and Read the Docs checks passed

Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz
njzjz merged commit 196976f into deepmodeling:master Aug 31, 2026
8 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.

trim_pattern="_*" not supported for repeat dict Argument

2 participants