Skip to content

fix(python-sdk): preserve boolean defaults in agent CLI calls - #1151

Merged
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-42db8ecf9102
Nov 4, 2026
Merged

santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-42db8ecf9102

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Summary

When python main.py call omits a boolean option, it passes False to the skill or reasoner even if the function declares a default of True. Use the function's declared default when the option is omitted. A supplied flag still enables the option, and a boolean parameter without a declared default still falls back to False.

Type of change

  • Bug fix

Test plan

  • Run the CLI tests. Both new cases reproduced the bug on the base commit. After the fix, 19 passed and 1 existing test was skipped.
  • Run ./scripts/test-all.sh. The Go control plane and Go SDK passed. Python SDK reported 2,950 passed, TypeScript SDK core reported 1,383 passed, and Web UI reported 837 passed.
  • Run make fmt tidy, Python SDK Ruff and mypy, memory-event tests with websockets 12.0 and 15.0.1 (28 passed each), and the Python performance benchmark.

Test coverage

  • I ran tests for the surface I changed locally.
  • The CLI regression covers an omitted default-on option, an omitted default-off option, and an explicitly supplied flag.
  • The coverage gate check is green in CI before requesting review. Pending CI.

Checklist

  • I read docs/CONTRIBUTING.md and docs/DEVELOPMENT.md.
  • Commits are signed and follow Conventional Commits. The commit follows Conventional Commits and is unsigned.

Copilot AI balanced review requested due to automatic review settings November 4, 2026 08:05

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.1 KB - 0.21 µs -40% ✓ ✓

✓ No regressions detected

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 88.20% 87.40% ↑ +0.80 pp 🟡
sdk-go 93.70% 92.00% ↑ +1.70 pp 🟢
sdk-python 94.73% 93.73% ↑ +1.00 pp 🟢
sdk-typescript 92.27% 90.42% ↑ +1.85 pp 🟢
web-ui 84.90% 84.79% ↑ +0.11 pp 🟡
aggregate 86.12% 85.75% ↑ +0.37 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 — ➖ no changes
sdk-go 0 — ➖ no changes
sdk-python 0 — ➖ no changes
sdk-typescript 0 — ➖ no changes
web-ui 0 — ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the argparse default handling and its regression coverage. The focused CLI tests, CLA, and required checks are green.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Nov 4, 2026
Merged via the queue into Agent-Field:main with commit 462d1cd Nov 4, 2026
28 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.

3 participants