Skip to content

Fix trailing-slash project_name and add force-update test#190

Merged
xsovad06 merged 2 commits into
mainfrom
fix/coderabbit-189-findings
Jun 19, 2026
Merged

Fix trailing-slash project_name and add force-update test#190
xsovad06 merged 2 commits into
mainfrom
fix/coderabbit-189-findings

Conversation

@xsovad06

Copy link
Copy Markdown
Owner

Summary

Address CodeRabbit review findings from PR #189:

  • Fix _derive_project_name() to normalize trailing slashes ("owner/" no longer produces empty string)
  • Add force=True test path for guideline conflict resolution
  • Add trailing-slash edge case test for build_variables()

Test Plan

  • make check passes (1596 tests)
  • New trailing-slash test validates the fix
  • Existing tests unaffected

@xsovad06 xsovad06 self-assigned this Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f98d418b-fa5a-4bcb-b98d-60855d3fbfc0

📥 Commits

Reviewing files that changed from the base of the PR and between b8b4e41 and 2e209f1.

⛔ Files ignored due to path filters (2)
  • .claude/agent-memory/cookbook.md is excluded by !.claude/** and included by none
  • .claude/rules/bash-patterns.md is excluded by !.claude/** and included by none
📒 Files selected for processing (2)
  • sova/commands/templates.py
  • tests/test_commands.py

Walkthrough

_derive_project_name in templates.py is updated to strip whitespace and trailing slashes from cfg.github_repo, extract the last path segment when / is present, and fall back to "project" for empty results. Two test additions cover the trailing-slash case and assert force=True behavior in the conflict scenario.

Changes

Project name normalization

Layer / File(s) Summary
_derive_project_name normalization and test coverage
sova/commands/templates.py, tests/test_commands.py
_derive_project_name now trims whitespace, strips trailing slashes, and extracts the last path segment from github_repo, falling back to "project" when the result is empty. New test asserts "owner/""owner". test_update_guidelines_detects_conflicts extended to assert force=True clears conflicts and produces exactly one update.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes: fixing trailing-slash handling in project_name derivation and adding a force-update test.
Description check ✅ Passed The description covers the summary, type of change (bug fix + tests), and test plan verification, though some checklist items are not explicitly addressed.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@xsovad06 xsovad06 force-pushed the fix/coderabbit-189-findings branch from b8b4e41 to 2e209f1 Compare June 18, 2026 18:56
xsovad06 added 2 commits June 19, 2026 16:32
Address CodeRabbit findings from PR #189: normalize trailing slashes
in _derive_project_name to prevent empty template output, add force=True
test path for guideline conflict resolution, and add trailing-slash
edge case test.
- Add broken-pipe-with-pipefail gotcha to bash-patterns.md (Tier 1)
- Confirm guideline dual-file pattern in cookbook
- Bump CodeRabbit wait-before-merge to confirmed:2
@xsovad06 xsovad06 force-pushed the fix/coderabbit-189-findings branch from 2e209f1 to 42dd0d2 Compare June 19, 2026 14:32
@sonarqubecloud

Copy link
Copy Markdown

@xsovad06 xsovad06 merged commit 107c9a0 into main Jun 19, 2026
16 checks passed
@xsovad06 xsovad06 deleted the fix/coderabbit-189-findings branch June 19, 2026 14:37
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.

1 participant