Repository navigation
refactor(provider)!: remove Conn.List and Observe's marker parsing - #247
Merged
gusfcarvalho merged 13 commits intoOct 28, 2026
Merged
Conversation
Implements P3 §No rebuild from markers and §Rollout PR 6 (FND + GH): - provider.Conn loses List; github/list.go, its search helpers and githubtest's search go - Observation.Projections and the GitHub adapter's projectionsIn go; Observe reads only the comment count, so no comment text and no ObserveComments pages - Project keeps reading the App's own markers; tests move from Observe's goldens to Project - the fake keeps projections in its own store (ProjectionsOn) - webhook refusals answer application/problem+json (provider.WriteProblem), as receiveWebhook documents; 202 and 200 unchanged - github-provider.md and contracts.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, package doc Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e problem writer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
size-exception (Gustavo, 2026-10-28): most of this diff is removal: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erve and projection Gustavo's decision on #247: fix the provider-interface doc lines here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, fake's 413 ccf-review on #247 (review 5682090415): - observePerms' comment no longer names List; - observeQuery's PullRequest fragment drops comments { totalCount } (nothing reads it), as do the recorded PR responses and githubtest's model; - the fake's handler answers an oversized body 413 payload-too-large, like GitHub's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fx/imp5b-6-provider-no-list
… fx/imp5b-6-provider-no-list
… fx/imp5b-6-provider-no-list
… fx/imp5b-6-provider-no-list
…mp5b-6-provider-no-list The stack below was rebased onto main; this keeps the branch's own changes on the new base.
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.
Task: IMPROVEMENTS item 5(b), stack 5 PR 6 of 8: fx/imp5b-6-provider-no-list on fx/imp5b-5-serve-state-url. Design: P3 (#223).
Workstreams: FND (the
internal/providerinterface,provider.WriteProblemandinternal/provider/fake) and GH (internal/provider/github, itsgithubtest, and github-provider.md).Summary
Implements P3 §No rebuild from markers ("What goes" and "Projections stay") and §Rollout PR 6: the provider side of the rebuild's removal, which #246 started.
provider.Conn.Listis gone: from the interface, the GitHub adapter (github/list.go: the two searches per repo, the scope's repo globs,ListWindow) and the fake (List,MethodList, its glob helper).containsFold,validRepoandtokens.NextPagehave other users and stay.tokens.Minter.InstallationReposstays too:MissingInstallationsuses it.githubtestlosesGET /search/issues(RouteSearch), which onlyListused.scope.orgsbounded onlyList, sogithub.Connno longer keeps it (see Decisions).Observestops parsing markers:Observation.Projections,projectionsInand the sentence about them inprovider.goare gone.comments { totalCount }(a PR's count was never read, so it goes too). With no marker to find, the comment bodies and theObserveCommentsfollow-up pages had no reader. Observe now reads no untrusted comment text, and makes no follow-up call for comments.testdata/graphqlkeep only the count.issue-train.comments-2.jsonis gone, and the three goldens loseprojections.Projectkeeps reading the App's own markers.markers,markerCommentandparsedMarkermoved fromobserve.gotoproject.gounchanged, somineandothersOwnbehave as before.marks, by ref):ProjectionsOn(ref)returns them, as copies sorted by work item;ProjectCall.Changedstill compares against them.Observationused to.Projections(), the call log RT's and cmd's tests read since feat(serve)!: --state-url, one leader, and no rebuild from markers #246, is unchanged.application/problem+json, asreceiveWebhookdocuments (docs(api): readiness without a rebuild, and a store that stopped writing #234). This uses the newprovider.WriteProblem(w, status, code, detail)(FND), built ongen.Problem. It writes the status, its text as the title,internal/server's code, the detail (left out on a 5xx, as the server'serrorHandlerdoes), and the server'sX-Request-Idasinstance.server.Code*: 400invalid-request, 401unauthenticated, 405method-not-allowed, 413payload-too-large, 503unavailable.serve --dev-fake-providersmounts) answers the same way, an oversized body included (413payload-too-large; it was 400). It can't importinternal/server, because the server's package tests import the fake. That is why the writer lives ininternal/provider.List, and the markers are for people. The restart gap no longer mentions the rebuild. The handler's problem bodies are described, and there is a new §Decisions taken with P3. 02-architecture.md's and definitions.md's links now point at#observe-and-projection.ListinConn, noProjectionsinObservation, no projection round-trip (this supersedes ADR-0001's "every adapter must implementList"), webhook refusals, and the fake's records (ProjectionsOn).Tests
fake_test.go: drops theListcases and the seeded projection.TestProjectchecksProjectionsOn(contents, copies, cleared bySeed).TestHandlerchecks each refusal's problem code and that 202 and 200 have no body.TestConcurrentalso callsProjectionsOn.github/observe_test.go: drops the projection case, and the train issue keeps its own checks. NewTestObserveReadsNoComments: an issue with 150 comments is observed with one GraphQL request, its count is 150, andobserveQueryselects nobody.github/project_test.go:TestProjectRoundTripreplacesTestRebuildRoundTrip: whatProjectwrote on the issue and the PR parses back, throughgithub.ParseMarker, to the projection.TestProjectReadsOnlyItsMarkerscarries over Observe's golden marker cases forProject. A human's look-alike, the reviewer App's, a deleted account's and a v2 marker own no labels and are never edited. Of two App markers for one work item the oldest is edited. The markers are spread over three pages of comments.TestListandTestListErrorsare gone.github/ingress_test.go: each refusal is checked as a problem (content type, status, title, code, the request id asinstance, a detail on each 4xx and none on a 5xx).provider/problem_test.go:TestWriteProblem.Verification
make reviewable(with a golangci-lint built with go1.26 onPATH), after merging feat(serve)!: --state-url, one leader, and no rebuild from markers #246's head e680de5, and again at adebedf after merging 536bd87 and the doc fixes: exit 0 both times. That covers the generated-code check, lint with 0 issues,go test -racewith every packageok, catalog checks (66 cases ok), and openapi-lint at 100.grep -rnE 'Conn\.List|\.List\(ctx, v1alpha1\.Scope|Observation\.Projections|projectionsIn|o\.Projections|\)\.Projections\b' internal cmdfinds nothing.\.Projections\b) also matches the fake's accessorgh.Projections()/c.Projections(), which is expected, so this one is narrowed toObservation.ProjectionsandprojectionsIn.grep -rn 'Conn.List\|\.Projections\b\|projectionsIn' internal cmd | grep -v 'Projections()'is empty too.observePerms' comment no longer namesList; the PR fragment, the recorded PR responses andgithubtest's model dropcomments { totalCount }; the fake answers an oversized body 413payload-too-large(errors.Ason*http.MaxBytesError).make reviewablepasses at 546603c (exit 0, 0 lint issues).size-exceptionlabel (below).comments { totalCount }withoutfirst/last. GitHub only requires them whennodesoredgesare selected, butgithubtestdoesn't check that.Ownership
Every file is under FND's or GH's Owns line:
internal/provider/*.go,internal/provider/fake/,internal/provider/github/(withgithubtest/andtestdata/), github-provider.md (GH's LLD) and contracts.md (FND's LLD). No contract file (api/,internal/apis/,schemas/) changes.Decisions (Gustavo, 2026-10-28)
size-exceptionapplied, with a justification comment on the PR. The PR counts about 1165 lines excluding testdata (+398/−767), mostly the deletion ofList, its helpers,githubtest's search and their tests.scope.orgs: left as is. It is read by nothing now thatListis gone, and it stays in the contract (internal/apis/v1alpha1/config_types.go:78-81,catalog/providers/github-public.yaml:33), unused for now.provider.ProblemContentTypeandserver.ProblemContentType, the fake's literal codes, andmethod-not-allowedinserver.toProblemand the GitHub handler.observationDigest(internal/controllers/workitem.go, which still deletes aprojectionskey that no longer exists): feat(serve)!: --state-url, one leader, and no rebuild from markers #246 handles it, since it's RT's.Listmentions outside the LLDs: fixed here in d3029af, since they are doc lines about the interface this PR changes.design/workstreams/definitions.md:197: the fake seeds objects forObserve, withProjectionsOn.:384: GH-S1-T03'sListis marked as removed with P3.design/02-architecture.md:146: the link now reads §Observe and projection.#observe-and-projection, so github-provider.md's explicitobserve-list-and-projectionanchor is gone, since nothing links to it any more.Deviations from the spec
ObserveCommentspages had no other reader. Leaving them would keep fetching untrusted text, and up to 10 extra calls per object, for nothing.ingress.go, but contracts.md now says everyConn.Handlerdoes, andserve --dev-fake-providersmounts the fake's.provider.WriteProblem(FND), used by both handlers, rather than a private helper in GH's package. The GitHub adapter can importinternal/server's codes, and it does, but the fake can't.githubtestloses its search route andObserveComments, andgithub.Connlosesorgs: nothing used them onceListand the comment pages were gone.🤖 Generated with Claude Code