Repository navigation
✨ config: add project.reference_repos with tier validation and ReferenceRepoTier accessor - #18027
hivecommons-hive[bot] wants to merge 9 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap check✅ Resolved: no conflicting open PRs or same-file overlaps remain against |
Mutation testing✅ Resolved: no surviving or uncovered mutants in changed files on the current head. Verdict: |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: merged v5 into branch (baseline triage: MERGE_BASE); CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 Review findings from This conflicts with #18023, which already carries this change (and the rest of #18015). Both PRs create What I verified (read both diffs in full):
Semantically they validate the same four rules (explicit On this PR's own code: I found no defects. Flagging for a maintainer: #18023 already has the Review findings from Reviewer adjudication: DE-ESCALATE — evidence: the only failing check is native-queue-policy ('#18027: head/base moved, draft, closed, or held'), a queue-harness error raised while the head moved (a v5 merge landed as 86e61f7); it is not a code failure. All build, lint, gosec, govulncheck and test shards are green; branch merge-base equals current origin/v5 (bafc68a). Diff/test parity vs v5: only WriteLabel's body is removed (now delegates to Tier().String()), no tests dropped, TestReference* count 3 -> 5; still wanted (#18018, child of #18015). changes: none needed, branch already current. tests: not run locally (go test blocked in pod); relied on CI shards, all passing. remaining risk: none beyond native-queue-policy re-evaluating on the current head. Review findings from Intent-alignment, delta re-review at eb50f9e. Prior finding (scope superseded by merged #18023, duplicate accessors): mostly fixed. The diff is now 3 files. It adds only the Remaining in-scope gap:
The Review findings from Reviewer adjudication: DE-ESCALATE — evidence: the only failing check, native-queue-policy, errored with '#18027: head/base moved, draft, closed, or held' (a policy-runner race on a stale head, not a code failure); every build, lint, security and test shard passed. Branch scanner/fix-18018 is 0 commits behind v5 (already merged in at 86e61f7), so no rebase push was needed. Lossless vs base: no tests removed, +2 test funcs, the diff only adds ReferenceRepoTier/Tier()/String() and makes WriteLabel delegate to it, and nothing in the tree references the dropped ValidateReferenceRepos wrapper. changes: none pushed; tests: not run locally (disabled for agents), relying on the green CI shards; remaining risk: native-queue-policy needs to re-run on the current head 86e61f7. Review findings from Reviewer adjudication: DE-ESCALATE — evidence: only failing check is native-queue-policy ("head/base moved, draft, closed, or held"), an environmental race, not a code failure; branch already contains current v5 tip bafc68a (merge-base == origin/v5), so no rebase/push needed; all Go test shards, coverage, patch-coverage, lint, gosec and DCO checks pass on the prior head. Diff is additive (ReferenceRepoTier, Tier(), String(), ProjectConfig.ReferenceRepoTier; WriteLabel delegates) with +51 test lines and zero tests removed vs base (lossless). changes: none; tests: not run locally (go test blocked for agents), relied on CI; remaining risk: native-queue-policy needs to re-evaluate on the current head; PR title still says 'add project.reference_repos' though that landed in #18023 (cosmetic). Review findings from Reviewer adjudication: DE-ESCALATE — evidence: only failing check was native-queue-policy ('head/base moved, draft, closed, or held'), an environmental queue-state error, not a code failure; all build/test/lint checks green. Still wanted: ReferenceRepoTier accessor (#18018) absent from v5, no superseding PR. Lossless: diff vs v5 is the same 3 files (+93/-11) with its 51 added test lines intact. changes: none by me; the branch was already merged with v5 by another actor (head 86e61f7, 0 behind v5) while I was rebasing, so my duplicate push was dropped. tests: not run locally (go test blocked for agents); relying on CI. remaining risk: native-queue-policy must re-run on the new head; none otherwise. |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether #18027 (child 1 of the #18015 split) should land at all, given #18023 already carries the full #18015 implementation including this config layer and is labelled approved — the two define the same config.ReferenceRepo type in the same new file with incompatible APIs and cannot both merge.
Conclusion: the code here is fine, but it collides with #18023 (approved, same base v5), which implements all of #18015 — including this exact config piece — in one PR. Both add src/pkg/config/reference_repos.go declaring type ReferenceRepo struct and both touch config.go, validate.go, settings_parity_allowlist.txt. Whichever lands second will not compile against the other (ReferenceRepo redeclared). A maintainer needs to pick one line of work before the remaining children (#18019–#18022) build on this one.
What I verified (read both diffs in full):
Same semantic change:
- Entry is bare
owner/nameor{repo, write: [issues, prs]}; scalar form = read-only (reference_repos.goUnmarshalYAML/MarshalYAMLin both). - Validation at load: slug shape, case-insensitive clash with
project.repos, duplicate entry, unknownwritevalue — the same four rules in both, wired intoValidateWithOptionsinvalidate.goin both.
Where they differ (so this is a conflict, not a redundant duplicate):
- #18027 exposes
ProjectConfig.ReferenceRepoTier(slug) (ReferenceRepoTier, bool)withReferenceRepoTier{Issues,PRs}.String(); #18023 exposesConfig.ReferenceRepoFor(repo),ReferenceRepo.WritesIssues()/WritesPRs()/ReadOnly()/WriteLabel()/Owner()/Name(),Config.ReferenceRepoSlugs(),ReferenceReposWithWrite(). The proxy, kick and dashboard code in #18023 is written against the second API; the #18019–#18022 children would be written against the first. - #18023 adds
write_token_fileto the entry (and the rule that it requireswrite); #18027 has no credential field. The proxy write path in #18023 (src/pkg/github/reference_repo_token.go) depends on it. - #18027 uses a regex for the slug and hand-qualifies bare
project.reposnames withp.Org; #18023 reuses the existingQualifyRepo(c.Project.Org, repo)helper. Functionally equivalent for the tests both ship. - #18027 updates
testdata/agent_runtime_golden.json("ReferenceRepos": null) because its field has nojsontag; #18023 tags the fieldjson:"reference_repos,omitempty"so the golden is untouched.
Nothing in this PR is defective on its own; I found no correctness or security issue in reference_repos.go. The question is purely which implementation #18015 should proceed with. If #18023 is the one, this PR and the four sibling children are superseded and could be closed; if the split is preferred, #18023 should be reduced to not carry the config layer. I have not closed anything.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge: Clear the cause and the hive re-evaluates on its next pass; the stage moves to Updated 2026-11-13 20:31 UTC. |
…nceRepoTier accessor Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
866af56 to
f952d24
Compare
|
Rebased onto 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Scanner: 🐝 Hive Agent: — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.322 |
Closes #18018
Part of #18015 (child 1 of 5; the proxy, kick, dashboard and docs children #18019-#18022 remain)
Adds the
ReferenceRepoTieraccessor onProjectConfig(plusReferenceRepo.Tier()andReferenceRepoTier.String()), so the proxy, kick renderer and dashboard share one source of truth for a reference repo's write tier.project.reference_reposand its load-time validation already landed in #18023; this PR does not change them.ReferenceRepo.WriteLabelnow delegates toTier().String(), and the accessor reusesConfig.ReferenceRepoForfor lookup. Additive: no behaviour change.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson