Repository navigation
feat(fleet-queue): carry issue labels from the GitHub mirror at enqueue (#12744) - #12755
Merged
Merged
Conversation
added 3 commits
November 23, 2026 01:04
…ue (#12744) Slice 1 of #7030 (PR #12464) made the stored row priority derive from payload.labels, but no producer writes payload.labels, so the selection never fired on a live packet (0 of 70 post-merge tasks). The broker now fills payload.labels from github_mirror_issues — the GitHub mirror in the same store — whenever an enqueue packet identifies an issue and carries no labels array of its own, so the ratified bands (expedite 15, next-up 25) apply at the single source of truth regardless of producer discipline. A producer- supplied array stands untouched; a mirror miss or lookup failure leaves the packet exactly as before (the enqueue warns and proceeds — the mirror never gates work). The triage completion follow-on, the broker's own fix producer, gets the same carriage: its payload is enriched the same way and its stored priority is the label band when one applies, the triage row's priority otherwise.
|
Warning Review limit reachedYou'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 35 minutes. View limit details
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. |
This was referenced Nov 23, 2026
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.
Closes #12744
Problem
Slice 1 of #7030 (PR #12464) made the stored row priority derive from
payload.labels(expedite⇒ 15,next-up⇒ 25) attask_from_packet. Verified live during the #7030 re-band: no producer writespayload.labels— 0 of 70 tasks created after the merge carry a labels array — so the selection never fires in production and bands reach the store only via manual re-bands.Fix: the broker carries the labels
Rather than depending on every present and future producer's discipline, the broker fills the labels at the single source of truth, from the GitHub mirror it already shares a store with (
github_mirror_issues, maintained by the github-ci Worker; itslabelscolumn is the issue's GitHub label names as a JSON array — the exact shape everypayload.labelsreader already consumes).turso_queue/label_enrich.rs—payload_issue_ref(the issue a payload identifies:repo+issue.number, with the repo-health dedupe key as the repo fallback),mirror_issue_labels(the one PK lookup),enrich_payload_labels(fill only when the payload carries no labels array of its own),band_or_inherited(the follow-on's priority selection).verb_enqueueenriches the packet after validation and beforetask_from_packet, so the stored payload and the band selection see the labels together. This also makes the claim filter's label field match on real labels for the first time.validate::label_band_prioritybecomespub(crate)so the follow-on selects through the same function; the validation-contract note in validate.rs records the carriage.Semantics, deliberately narrow (documented in label_enrich.rs):
Evidence (laptop,
fleet-build-lock,cargo test -p fleet-queue --all-features)github_mirror_issueslookup for the packet's repo), producer-labels-stand, mirror-miss, mirror-error-warns-and-proceeds, plus pure oracles for the identity shapes and the follow-on selection.enqueue_mirror_labels_select_band_12744andenqueue_mirror_error_warns_and_proceeds_12744fail (priority stays 30, no labels, no warning); the two regression guards pass on both sides, as designed.cargo fmtreports is pre-existing on main inwork/sqlite_replica.rs; untouched here).Readback demonstration
The live store's broker still runs the pre-fix build, so the acceptance readback was run against a scratch store through the real verb stack (validation → enrichment → dedupe → insert) over a real SQL engine (a python3 stdlib pipeline server on sqlite3, speaking the Turso wire protocol), with the mirror row carrying #12228's real labels copied from the live mirror (
mirrored_at2026-11-23T00:53:26Z). A production-shaped packet (stated priority 30, no labels) stored as:No manual update. The remaining step is deployment: once the broker runs a build with this change, the same readback against the live store closes the acceptance loop, and manual re-bands become unnecessary.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.