Improve comment-memory config test coverage - #51622
Conversation
PR Triage
Notes: Draft PR, 0 files changed / 0 additions so far — agent has not yet pushed any code (description says work is starting). CI check
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Expands comment-memory configuration tests to cover parser branches and map-form behavior.
Changes:
- Tests all map-form fields and defaults.
- Covers invalid
maxandfootervalues. - Directly tests boolean and nil parser branches.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/comment_memory_config_test.go |
Adds comprehensive comment-memory configuration coverage. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.individual.githubcopilot.com"See Network Configuration for more information.
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check.
|
There was a problem hiding this comment.
The test improvements look solid. Replacing the boolean flag with *CommentMemoryConfig makes assertions more precise and self-documenting. The new test cases for invalid fields and bool/nil config values fill meaningful coverage gaps. No issues found.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 16.1 AIC · ⌖ 6.79 AIC · ⊞ 5.4K
🏗️ Design Decision Gate — No ADR RequiredVolume threshold reached (111 new lines in 📋 Analysis summaryFiles changed: 1 — What this PR does: Expands test coverage for existing ADR warrant check: Test coverage improvements without design trade-offs do not warrant an ADR. The No action required. ✅
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd — approving with one minor coverage suggestion.
📋 Summary
Positive Highlights
- ✅ Refactored table-driven test to use full struct equality instead of a boolean flag — much stronger assertion
- ✅
TestExtractCommentMemoryConfigInvalidFieldscleanly verifies thenil-return error paths - ✅
TestParseCommentMemoryConfigValueBoolAndNilgives direct unit coverage for the three scalar branches - ✅ Map-form case covers all documented fields (
max,memory-id,target,target-repo,allowed-repos,footer)
One gap
The map-form test always supplies max and memory-id, leaving the default-fill branches (if config.Max == nil / if config.MemoryID == "") untested through that path. See inline comment for a suggested fix.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 35.4 AIC · ⌖ 7.53 AIC · ⊞ 7.1K
Comment /matt to run again
Comments that could not be inline-anchored
pkg/workflow/comment_memory_config_test.go:68
[/tdd] The map-form test case always explicitly sets max and memory-id, so the default-fill paths in parseCommentMemoryConfigValue (the if config.Max == nil / if config.MemoryID == "" branches) are never exercised through the map-config route.
<details>
<summary>💡 Suggested additional test case</summary>
Add a map-form case that omits max and memory-id to verify defaults are applied:
{
name: "map config applies defaults when max and memory-id absent",
comment…
</details>|
@-
|
|
@copilot Quick triage nudge for this PR. Please review the remaining feedback and finish the last test-coverage polish before maintainer handoff, then run the Open review context (newest first):
Run: https://github.com/github/gh-aw/actions/runs/31331372172
|
comment-memoryconfig tests only exercised workflow parsing for boolean/null cases, leaving map-form fields and direct parser branches uncovered.Map-form coverage
max,memory-id,target,target-repo,allowed-repos, andfooter.Invalid config coverage
maxandfootervalues disableCommentMemory.Parser branch coverage
parseCommentMemoryConfigValuewithnil,false, andtrue.