Dedupe RepositoryFeatures build-tag mirror struct; document raw-ANSI exception in console - #54379
Conversation
…onsole Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR does not have the implementation label and has only 18 new lines of code in business logic directories (threshold: 100).
|
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped.
|
|
❌ Ponytail Reviewer failed. Please review the logs for details. 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
Clean deduplication — moving RepositoryFeatures to a build-tag-free file is the right pattern for preventing native/WASM field drift, and the console comment accurately explains the raw-ANSI exception. No issues found.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 13.4 AIC · ⌖ 8.76 AIC · ⊞ 5.7K
There was a problem hiding this comment.
Pull request overview
Deduplicates RepositoryFeatures across native/WASM builds and documents intentional raw ANSI terminal controls.
Changes:
- Moves
RepositoryFeaturesinto a shared file. - Removes build-specific duplicate definitions.
- Documents the Lipgloss exception.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/repository_features.go |
Adds the shared struct definition. |
pkg/workflow/repository_features_validation.go |
Removes the native duplicate. |
pkg/workflow/repository_features_validation_wasm.go |
Removes the WASM duplicate. |
pkg/console/terminal.go |
Explains raw ANSI usage. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
| // RepositoryFeatures holds cached information about repository capabilities. | ||
| // In WASM builds its fields are never populated because feature queries require | ||
| // GitHub API access; see repository_features_validation_wasm.go for details. | ||
| type RepositoryFeatures struct { |
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
There was a problem hiding this comment.
Verdict
Non-blocking cleanup only; the changes are mechanical deduplication plus documentation, and I did not find an actionable correctness or performance regression in the changed lines.
Highlights
RepositoryFeaturesis now defined once for both build variants, which reduces drift risk instead of increasing it.- The ANSI comment in
pkg/console/terminal.gois explanatory only and does not alter behavior. - I found no missing tests or edge cases that are newly introduced by this patch.
🔎 Code quality review by PR Code Quality Reviewer · gpt54 · 2.31 AIC · ⌖ 6.83 AIC · ⊞ 4.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design — changes approved.
📋 Key Themes & Highlights
Key Themes
- Single source of truth for
RepositoryFeatures: extracting the struct to a build-tag-free file is a textbook deep-module improvement — the interface (struct definition) is now centralised, and both build variants compile against it without any risk of field drift. - Documentation of intentional deviation: the comment in
terminal.goclearly explains the raw-ANSI exception — exactly the kind of in-place rationale that makes the codebase navigable for future contributors.
Positive Highlights
- ✅ New file comment accurately describes the purpose and the WASM field-population caveat.
- ✅ No behaviour change; purely structural, low-risk.
- ✅ No new tests needed — struct definitions and comment additions don't require unit tests.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 13.7 AIC · ⌖ 9.84 AIC · ⊞ 7.8K
Comment /matt to run again
|
@copilot Quick triage nudge for PR #54379.
Run: https://github.com/github/gh-aw/actions/runs/32432532165
|
🔍 PR TriageCategory: Score: 41/100 (impact 15/50 + urgency 10/30 + quality 16/20) Recommended action: Small internal dedupe + doc comment. CI passing. Low risk cleanup. Automated triage — run 32432526976
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in |
|
🎉 This pull request is included in a new release. Release: |
Two low-urgency cleanups from a deep-report audit: the
RepositoryFeaturesstruct was byte-identical across the native and WASM build-tag variants with no mechanism to keep them in sync, andpkg/console/terminal.goused raw ANSI escapes without explaining why it deviates from the Lipgloss styling used elsewhere in the package.Dedupe
RepositoryFeaturespkg/workflow/repository_features.go, shared by both variants:repository_features_validation.go(!js && !wasm) andrepository_features_validation_wasm.go(js || wasm), so both variants now compile against a single definition and can't drift apart if a field is added later.Document raw-ANSI exception
pkg/console/terminal.gonoting that clear-screen/clear-line escape sequences are an intentional exception, since Lipgloss has no equivalent for cursor/screen-control operations.