Skip to content

refactor(feature): share feature discovery - #1570

Merged
skevetter merged 1 commit into
mainfrom
refactor/feature-share-discovery
Oct 19, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/feature-share-discovery

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Share the feature-discovery loop across cmd/feature generate-docs, package, and test. New discoverLocalFeatures in cmd/feature/discover.go replaces scanFeatures, PackageCmd.discoverFeatures, and TestCmd.discoverFeatures. One localFeature type replaces featureDoc, featureSource, and featureEntry.

Why

Three copies of the same ReadDir, parse, skip, and empty-check loop. Behaviour is unchanged:

  • Callers keep their read-error prefixes: read src/ directory (docs, test) and read target directory (package).
  • package still warns on skipped features. docs and test still skip silently.

Validation

  • mise run cli:format: no changes.
  • mise run cli:lint:ci: 0 issues (run before the rebase).
  • golangci-lint run --new-from-rev=origin/main ./cmd/...: 0 issues.
  • go test ./cmd/feature/...: ok (after the rebase).
  • go build ./...: ok (after the rebase).
  • CLI smoke against an origin/main build, on a fixture with one valid and one broken feature: feature docs (success and missing dir), feature package (skip warning, success, missing dir). Exit codes, stdout, and stderr match, apart from the timestamp and output path. Generated docs and the .tgz entries match.
  • Markdown file writing (writeDocs) is not exercised by the smoke run. It is covered by the existing generatedocs_test.go.

CodeRabbit CLI

Completed: 0 findings, 6 files reviewed, against merge-base 7d34768dd.

Auto-merge

  • Eligible: yes. Behaviour-preserving, within caps, no //nolint, no lint disabled, no tests removed or weakened.
  • Non-test changed lines: 193 (77 added, 116 removed) across 4 files. Total 6 files including tests.

Next

Output-mode emit helper and parseFeatureRef duplication in cmd/feature/info*.go. Excluded from this PR.

@skevetter skevetter added the auto-refactor Automated refactor PR label Oct 19, 2026
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 67d0c24
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad57d7bc8f40a52616996e1

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f6bf316-bafa-485f-855c-272959f917d0
📥 Commits

Reviewing files that changed from the base of the PR and between 7d34768 and 67d0c24.

📒 Files selected for processing: 6
  • cmd/feature/discover.go
  • cmd/feature/generatedocs.go
  • cmd/feature/package.go
  • cmd/feature/package_test.go
  • cmd/feature/test.go
  • cmd/feature/test_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 67d0c24
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad57d7bb68f0e44a5174da1

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 03:29
@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@skevetter

Copy link
Copy Markdown
Contributor Author

Auto-merge paused: all CI checks are green and the local CodeRabbit CLI found 0 issues, but the required GitHub CodeRabbit review is terminally rate limited rather than Review completed. Two explicit @coderabbitai review retries were also rate limited. Leaving this PR ready for human review; it was not merged.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@skevetter Understood. The clean local CLI review does not satisfy the required GitHub CodeRabbit review. That review remains incomplete, and the PR remains unmerged pending human review.

You are interacting with an AI system.

@skevetter
skevetter merged commit 00c06b9 into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/feature-share-discovery branch October 19, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-refactor Automated refactor PR size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant