Repository navigation
π issues the hive files carry the filing agent in the title - #15673
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 checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
stage 080-awaiting-merge-admission β 071-needs-author: optional-check-failing:test (rest 2/4) |
a13e2d5
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
stage 080-awaiting-merge-admission β 050-review-pending: required-check-pending:build-and-test |
Every hive-filed issue title now starts with [<filer>]: one shared issueshape.TitleFor helper (idempotent, never double-prefixes) is applied in CreateIssue for every Go filing site, in the review-backlog, hotspot and upstream-watch title builders, and in the egress proxy for an agent's raw gh issue create. Title dedupe ignores the tag so open items filed before the convention still match their prefixed re-filing. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
β¦ title expectations Signed-off-by: Andrew Anderson <andy@clubanderson.com>
β¦ tagged Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
c43547b to
8cfcf5c
Compare
There was a problem hiding this comment.
Reviewed (security) β no blocker; one advisory on the proxy trust boundary.
Low β proxy title tag is agent-controlled, unlike the label it mirrors (src/crux/proxy/github_proxy_violations.go:190-200, src/crux/issueshape/issueshape.go TitleFor). The label path enforces provenance: config.WithAgentLaneLabel rewrites any agent-supplied agent/<other> to the caller's lane (src/crux/config/origin_labels.go:321-326). The new title path does not: TitleFor(lane, title) returns the title unchanged when it already starts with any [tag], so a scanner lane can gh issue create --title "[reviewer] β¦" through the proxy and the title β which this PR documents as "so a reader can tell which agent filed it" β names the wrong agent. agent/scanner is still applied, so the label stays authoritative; this only weakens the new human-facing signal. Suggested tightening, keeping filer-chosen non-lane tags ([Tests], [DCO]) as intended:
if raw, present := payload["title"]; present {
var title string
if err := json.Unmarshal(raw, &title); err == nil && title != "" {
+ // A leading tag naming a *different known lane* is the caller
+ // impersonating another agent; replace it, as the label path does.
+ if existing := config.OriginLaneFromAgent(issueshape.AgentPrefix(title)); existing != "" && existing != lane && config.IsKnownOriginLane(existing) {
+ title = issueshape.StripAgentPrefix(title)
+ }
if tagged := issueshape.TitleFor(lane, title); tagged != title {β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Reviewed (intent-alignment) β the diff does what #15672 asks: one shared helper (src/crux/issueshape/issueshape.go:116), applied at the single create path (src/pkg/github/issue_request_watcher.go:1292), in the proxy's raw gh issue create (src/crux/proxy/github_proxy_violations.go:190), and dedupe is tag-blind (issue_request_watcher.go:1340, :1819). The living documents (pkg/github/advisory.go:282, pkg/github/recommendations.go:98) call Issues.Create directly, so they stay untagged as the body states. Non-blocking:
- Low (in-scope):
HasAgentPrefixtreats any leading[β¦]as the agent tag, so the dashboard ACMM filing[ACMM L0] Add β¦(src/pkg/dashboard/api_acmm_eval.go:429) never gets a filer β the owner rule in #15672 is[<agent name>], and "ACMM L0" is not an agent. The test atsrc/crux/issueshape/issueshape_test.go:114codifies this. If you want the rule to hold there too, either prepend anyway for that site or narrow the idempotency check to a known origin lane/source:
title = fmt.Sprintf("[dashboard] [ACMM L%d] Add %s", criterion.Level, criterion.Name)
β hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
docs-currency (read at head c43547b)
The three docs the PR touches match the code (hive-open-issue.md:55, review-swarm.md:105, both dedupe-issues.md copies). Two operator-facing descriptions of titles this PR changes were not updated:
src/docs/operator-reference.md:1442still documents the hotspot issue title asrefactor: <path> is a merge hotspot β split into <N> units;src/pkg/hotspot/issue.go:32now returnsissueshape.TitleFor(config.OriginSourceGovernor, β¦), so the filed title starts with[governor]. An operator searching by the documented title will not find the issues.- **One issue per file.** Title `[governor] refactor: <path> is a merge hotspot β split into <N> units` (the `[governor]` tag is the filing-agent prefix every hive-filed issue title carries, `issueshape.TitleFor`), labels `agent/ci-maintainer` + `kind/cleanup`, origin `governor`, body marker `<!-- hive:hotspot file=<path> -->`, evidence table, the top-level units, a concrete split proposal and the don't-splinter rule. While that issue is open no second one is filed; after it closes the file waits `hotspot_refile_days` before it can be filed again. Issues go through the writeback gate as `issue_file` (a paused repo or `writeback.per_repo[<repo>].mode: off` stops them) and are skipped when the GitHub budget governor is skipping optional sweeps.src/pkg/policies/defaults/ci-maintainer.md:133(and the-advisory/-full/-holdgatedvariants plus theirsrc/policies/mirrors β the PR already updatesdedupe-issues.mdin both trees) tells the ci-maintainer "The hive files onerefactor: <path> is a merge hotspotissue per file". Suggestone[governor] refactor: is a merge hotspotissue per fileso the agent recognises the title it is assigned.
Advisory (low): src/docs/github-write-surface.md:172-174 describes the proxy's POST /repos/{o}/{r}/issues rewrite as label-only ("stripping redundant origin/<lane> and bare <lane> aliases"); src/crux/proxy/github_proxy_violations.go:190-202 now also rewrites title. One clause there ("β¦and tags the title with [<lane>]") would keep that write-surface inventory accurate.
β hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Reviewed (style) β approve; two advisory maintainability notes, neither blocking.
- Two definitions of "the agent tag" that already disagree β
src/pkg/github/review_backlog_routing.go:163re-encodes the tag shape as\[[^\]\s]+\](no spaces), while the sharedagentTitlePrefixREatsrc/crux/issueshape/issueshape.go:106deliberately allows spaces ([ACMM L0]). The two will drift;reviewBacklogItemCategory(review_backlog_routing.go:198) can reuse the shared helper instead of a second regex:
- reviewBacklogTitleCategoryRE = regexp.MustCompile(`^\s*(?:\[[^\]\s]+\]\s*)?Review backlog \(([^)]+)\):`)
+ reviewBacklogTitleCategoryRE = regexp.MustCompile(`^\s*Review backlog \(([^)]+)\):`)
...
func reviewBacklogItemCategory(title, body string) string {
- if m := reviewBacklogTitleCategoryRE.FindStringSubmatch(title); m != nil {
+ // Items filed before titles carried the filer have no tag; strip it so both match.
+ if m := reviewBacklogTitleCategoryRE.FindStringSubmatch(issueshape.StripAgentPrefix(title)); m != nil {TitleFilerfallback chain (src/pkg/github/issue_request_watcher.go:1226-1247) has five tiers; tier 4 (OriginSourceOf(r.OriginLabel())) is only reached whenOriginyields no lane, whereOriginLabel()reduces toFirstOriginLabel(r.Labels)β a subset of what tier 5's label loop already returns (they differ only when anagent/*label precedes anorigin/*one). Dropping tier 4 leaves behaviour for every case inTestHiveFiledIssueTitlesCarryTheFilingAgentintact and makes the precedence readable as: known lane β caller's non-lane origin β unknown lane β first provenance label.
Nit: src/pkg/github/issue_request_watcher.go:1819 candidate == title || issueshape.SameTitle(candidate, title) β the first clause is implied by the second.
β hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15672
Every issue the hive files now carries its filer in the title (
[reviewer] Review backlog (security): β¦,[governor] refactor: β¦ is a merge hotspot β¦).crux/issueshape.TitleFor(agent, title)(+HasAgentPrefix,AgentPrefix,StripAgentPrefix,SameTitle), re-exported frompkg/issueshape. Idempotent: an existing leading[tag](same agent, or a filer-chosen[Tests]/[DCO]) is kept, never doubled.CreateIssue(the one create path for the watcher/hive-open-issue, review backlog, fleet report, forge/convergence, hotspot, dashboard ACMM) tags withCreateIssueRequest.TitleFiler()β Origin lane (reviewer-2βreviewer), else a non-lane origin label (convergence through the forge seam), else the Origin source (governor,selfreport,dashboard). Title buildersreviewBacklogIssueTitle,hotspot.Title,upstreamwatchrender tag explicitly too, so callers see the final title.gh issue createhas its title tagged with the lane alongside the existingagent/<lane>label injection.scanOpenIssuesand the FoldMatch exact-title guard compare with the tag ignored;reviewBacklogTitleCategoryREaccepts an optional tag; hotspot (body marker + store) and selfreport (fingerprint) dedupe were already title-independent. Canonical-subject dedupe already stripped the role tag.[dedupe] triage: β¦;hive-open-issue.mdandreview-swarm.mdstate the convention.π Hive Advisory Reportand recommendations living documents, which are found by exact title.Tests:
TestTitleForTagsOnceAndKeepsExistingTag,TestStripAgentPrefixAndSameTitle(crux),TestHiveFiledIssueTitlesCarryTheFilingAgent(helper walk +TitleFiler),TestCreateIssueTagsTitleAndDedupesAgainstUntaggedTwin(dedupe compat), proxy inject cases.