Skip to content

test: add group-level --path propagation tests (#60)#162

Merged
microsasa merged 2 commits intomainfrom
fix/60-group-path-propagation-tests-ccfb7a3163681cdf
Mar 19, 2026
Merged

test: add group-level --path propagation tests (#60)#162
microsasa merged 2 commits intomainfrom
fix/60-group-path-propagation-tests-ccfb7a3163681cdf

Conversation

@microsasa
Copy link
Owner

Closes #60

What

Adds four tests verifying that the group-level --path option propagates correctly to all four subcommands (summary, cost, live, session) via ctx.obj["path"].

Why

Each subcommand contains path = path or ctx.obj.get("path") to support copilot-usage --path /dir summary syntax, but this fallback path was untested with the specific session IDs and assertions specified in issue #60. If the propagation line or ctx.obj["path"] = path in main were accidentally removed, no existing test would catch the regression.

Tests added

Test Subcommand Session ID prefix
test_summary_group_path_propagation summary grp10000
test_cost_group_path_propagation cost grp20000
test_live_group_path_propagation live grp30000
test_session_group_path_propagation session grp40000

Verification

  • All 408 tests pass
  • Coverage at 98% (well above 80% threshold)
  • ruff check, ruff format, and pyright all pass cleanly

Generated by Issue Implementer ·

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • astral.sh

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "astral.sh"

See Network Configuration for more information.

@microsasa microsasa added the aw Created by agentic workflow label Mar 19, 2026
Copilot AI review requested due to automatic review settings March 19, 2026 14:35
@microsasa microsasa enabled auto-merge March 19, 2026 14:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds additional CLI tests intended to ensure the group-level --path option (stored in ctx.obj["path"]) is correctly honored by subcommands when the subcommand-level --path is omitted.

Changes:

  • Add 4 new tests for group-level --path propagation across summary, cost, live, and session.
  • Introduce new session IDs/prefixes and (in one case) a stronger output assertion for the summary path-propagation scenario.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add four tests verifying that --path passed at the group level
(before the subcommand name) propagates correctly to summary, cost,
live, and session subcommands via ctx.obj. These tests use the exact
session IDs and assertions specified in issue #60.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the fix/60-group-path-propagation-tests-ccfb7a3163681cdf branch from d862f20 to c7e402d Compare March 19, 2026 16:19
@microsasa microsasa added the aw-review-response-attempted Responder has attempted to address review comments label Mar 19, 2026
Remove 4 duplicate group-level --path propagation tests that replicated
coverage from existing tests. Strengthen the existing live test with an
output assertion to verify the session data is actually read.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

Commit pushed: 3196e45

Generated by Review Responder

Copilot AI review requested due to automatic review settings March 19, 2026 16:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves coverage for the CLI’s group-level --path option propagation to subcommands (the ctx.obj["path"] fallback path), specifically ensuring the live command’s test validates that the session under the provided group-level path is actually rendered.

Changes:

  • Strengthen test_group_path_propagates_to_live by asserting the expected session identifier/name appears in output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@microsasa microsasa added aw-review-response-1 Review response round 1 aw-quality-gate-approved Quality gate approved the PR and removed aw-review-response-attempted Responder has attempted to address review comments labels Mar 19, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Quality Gate: APPROVED

Change: 1 line added to test_group_path_propagates_to_live — adds an output assertion (assert "grp_liv00" in result.output or "GrpLive" in result.output) matching the pattern of all sibling test_group_path_propagates_to_* tests.

Impact: LOW — test-only change, single assertion addition.

Evaluation:

  • Follows existing test patterns consistently (all four group-path tests now assert both exit code and output content)
  • Addresses Copilot review feedback (removed duplicate tests, strengthened existing test)
  • No production code changes, no risk to runtime behavior

Auto-approving for merge.

@microsasa microsasa added the aw-review-response-attempted Responder has attempted to address review comments label Mar 19, 2026
@microsasa microsasa merged commit 6ed5184 into main Mar 19, 2026
19 of 27 checks passed
@microsasa microsasa deleted the fix/60-group-path-propagation-tests-ccfb7a3163681cdf branch March 19, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aw Created by agentic workflow aw-quality-gate-approved Quality gate approved the PR aw-review-response-1 Review response round 1 aw-review-response-attempted Responder has attempted to address review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw][test audit] Group-level --path option propagation to subcommands is untested

2 participants