Repository navigation
drop the feed aliases; fail on any alias or forwarder; add the gitlab golden - #249
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
|
Claude finished @adssib's task in 1m 50s —— View job ✅ Ready to merge: the aliases are removed cleanly, the new forwarder check passes on every file, the GitLab golden matches its existing pair test, and everything I ran passes. Rules
BugsNone found. Things I checked:
Verified
Non-blocking
|
| imported := map[string]bool{} | ||
| for _, imp := range f.Imports { | ||
| path := strings.Trim(imp.Path.Value, `"`) | ||
| name := path[strings.LastIndex(path, "/")+1:] |
There was a problem hiding this comment.
Non-blocking: this takes the last path element as the package name, so gopkg.in/yaml.v3 becomes yaml.v3 and a .../v2 module path becomes v2. A forwarder to one of those (var X = yaml.Marshal) would get past the check. It only causes misses, never false failures, and no such import exists today. If you want it tighter, strip a trailing .vN and skip a final /vN element when deriving the name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: adssib <75389300+adssib@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
No forwarders, enforced. A follow-up to #247.
import core/extract directly; drop the feed aliases: deletedkinds/notices/feed/extract.go, which keptfeed.Entry,feed.Section,feed.Parse,feed.Text,feed.Lines,feed.SplitBy,feed.Dateandfeed.Codesas aliases ofcore/extract. Every caller now importscore/extract: thefeedkind itself (Readertakes anextract.Entry),providers/{cloudflare,github,google}and their tests, andcmd/new-plugin'snotices/feedscaffold. The feed parser's tests moved with the parser, tocore/extract/feed_test.go(ParseFeed). Also deletedopenStoreinkinds/openapi/openapi_test.go, a leftover wrapper that only calledkittest.NewMem().fail on a package-level alias or forwarder:providers/all/aliases_test.gowalks every.gofile in the module (tests included,testdata/skipped) and fails on a package-level type alias (type X = …), a var/const that is only another package's symbol (var X = otherpkg.Y), or a func whose body only calls another package's func with its own parameters. A genuine one passes if its doc comment says why withalias-ok: <reason>; none needs it today. A second test checks each shape is caught and the marker lets one through. AGENTS.md's layout rule says so.add the gitlab rest-api golden:providers/gitlabhad a pair test but no golden file. The existing test over the saved, trimmedv18.11.0-ee→v19.0.0-eespec excerpts now also writestestdata/golden/gitlab-rest-api.json(the 4 Bitbucket import events), withsource_urlset to the URL GitLab publishes the spec at (as Appwrite's golden does), not the local test server.The sweep found no other alias, re-export or forwarder (the new test is the sweep: it passes on every file).
Checklist
git commit -s, DCO)gitlab/rest-api; every other golden is byte-identical (git diff origin/main -- '*golden*'shows only the new file)providers/gitlab/testdata/README.mdalready lists both saved specs (unchanged)APIEntitiesBadgeresponse-side retyping); unchangedproviders/<provider>/; a kind imports no providerenv.Get/core/kit/make checkpasses locally (go1.27.1)Notes for the reviewer
feed.Entry& co. are gone; useextract.Entry& co. fromcore/extract), so this needs a release after merge. The aliases were added in v0.7.0's layout and nothing outside this module uses them, so a patch release (v0.7.1) is enough; releases are cut by a maintainer.pkg.Namevalue; a call topkg.Func(a, b)passing exactly the params). Something cleverer (a wrapper that reorders args) gets past it; review still applies.source_urlis GitLab's API raw-file URL for the tag (what the adapter fetches in production).🤖 Generated with Claude Code