fix: paginate repository-label inventory for gitea_set_issue_labels (Closes #627) #629
Merged
sysadmin
merged 1 commits from 2026-07-10 12:54:23 -05:00
fix/issue-627-set-issue-labels-pagination into master
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#629
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes #627 —
gitea_set_issue_labelsfull-set replacement rejected valid later-page labels as nonexistent because inventory used a single-pageGET .../labels?limit=100. Gitea caps pages at 50 (api_get_all), so names such astype:featureandworkflow-hardeningcan fall beyond the first page.Background (not implementation scope of this PR):
Changes
_repo_label_id_mapapi_get_all; first-seen id for duplicate names_put_issue_label_namesgitea_set_issue_labelslabels?limit=100)release_in_progress_label, stale-claim cleanup use_repo_label_id_mapmark_issue.py,manage_labels.pyuseapi_get_alltests/test_set_issue_labels_pagination.pymulti-page + #601 regressionHard rules preserved
Validation
Pinned head:
f32aaaa3b5ec2917e39d6fd98d58e4bc70dec0f5Closes #627
Canonical Issue State
STATE:
needs-review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Review PR #629 at head
f32aaaa3b5ec2917e39d6fd98d58e4bc70dec0f5for Issue #627 only.NEXT_PROMPT:
WHAT_HAPPENED:
Author implemented #627, pushed head
f32aaaa3b5, opened PR #629. #601 remains closed; its labels were not modified.WHY:
Single-page label inventory falsely rejected later-page names during full-set replacement; reconciler path for #601 residual status:pr-open needs complete inventory after this fix merges and MCP runtime refreshes.
RELATED_DISCUSSION:
none
RELATED_ISSUES:
RELATED_PRS:
BRANCH:
fix/issue-627-set-issue-labels-pagination
HEAD_SHA:
f32aaaa3b5VALIDATION:
pytest suite 53 passed + 5 subtests; git diff --check clean
BLOCKERS:
none for reviewer path
LAST_UPDATED_BY:
jcwalker3 / prgs-author / author / 2026-07-10
CTH: Author Handoff
Status: pr_open_needs_review
Next owner: reviewer
Current blocker: none
Decision: implementation complete; PR #629 open at pinned head for #627
Proof:
f32aaaa3b5Next action: reviewer reviews PR #629 at pinned head
Ready-to-paste prompt: see NEXT_PROMPT above
[THREAD STATE LEDGER] PR #629 / Issue #627 — implementation pushed; awaiting formal review
What is true now:
f32aaaa3b5What changed:
What is blocked:
Who/what acts next:
f32aaaa3b5using prgs-reviewerf32aaaa3b5Canonical Issue State
STATE:
needs-review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Review PR #629 at head
f32aaaa3b5NEXT_PROMPT:
WHAT_HAPPENED:
Author opened PR #629 for #627; ledger records needs-review handoff
WHY:
Code and tests for paginated label resolution are on a new head awaiting independent review
RELATED_PRS:
BLOCKERS:
none
VALIDATION:
53 passed; git diff --check clean
LAST_UPDATED_BY:
jcwalker3 / prgs-author / 2026-07-10
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #629
issue: #627
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 24673-e1f77e3794cc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-629
phase: claimed
candidate_head:
f32aaaa3b5target_branch: master
target_branch_sha:
5347b313ealast_activity: 2026-07-10T17:47:42Z
expires_at: 2026-07-10T19:47:42Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #629
issue: #627
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 24673-e1f77e3794cc
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-629
phase: claimed
candidate_head:
f32aaaa3b5target_branch: master
target_branch_sha:
5347b313ealast_activity: 2026-07-10T17:51:31Z
expires_at: 2026-07-10T19:51:31Z
blocker: none
Canonical PR State
STATE:
approved
WHO_IS_NEXT:
merger
NEXT_ACTION:
Adopt the merger lease and merge PR #629 at head
f32aaaa3b5.NEXT_PROMPT:
WHAT_HAPPENED:
Independent reviewer (sysadmin / prgs-reviewer) approved PR #629 at live head
f32aaaa3b5after sanctioned cleanup of the obsolete PR #625 review-decision lock (approve at 1be460026110f69f51f6578a34c87efc8bdfa83d; audit comment 9533).WHY:
ISSUE:
#627
HEAD_SHA:
f32aaaa3b5REVIEW_STATUS:
approved
MERGE_READY:
true
BLOCKERS:
none
VALIDATION:
pytest tests/test_set_issue_labels_pagination.py tests/test_manage_labels.py tests/test_python_cli.py tests/test_issue_write_tool_gates.py tests/test_issue_workflow_labels.py -q → 53 passed, 5 subtests passed; git diff --check clean
LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-10
CTH: Reviewer Handoff
Status: approved_at_current_head
Next owner: merger
Current blocker: none
Decision: APPROVED posted at head
f32aaaa3b5Proof:
Next action: merger merges PR #629 at pinned head if merge gates pass
Ready-to-paste prompt: see NEXT_PROMPT in Canonical PR State below
Canonical PR State
STATE:
approved / ready-to-merge
WHO_IS_NEXT:
merger
NEXT_ACTION:
Merge PR #629 at head
f32aaaa3b5if live gates passNEXT_PROMPT:
WHAT_HAPPENED:
Reviewer cleaned moot #625 decision lock (audit 9533), re-validated PR #629 at
f32aaaa, and posted formal APPROVE.WHY:
Pagination fix for gitea_set_issue_labels is correct and tested; prior #625 terminal lock was blocking fresh review_pr mutations and is now cleared because #625 is merged.
RELATED_ISSUES:
RELATED_PRS:
BRANCH:
fix/issue-627-set-issue-labels-pagination
HEAD_SHA:
f32aaaa3b5REVIEW_STATUS:
approved at current head
MERGE_READY:
true
BLOCKERS:
none
VALIDATION:
53 passed + 5 subtests; git diff --check clean; approval_at_current_head=true
LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-10
[THREAD STATE LEDGER] PR #629 / Issue #627 — formal APPROVE visible at current head; merger next
What is true now:
f32aaaa3b5What changed:
f32aaaaWhat is blocked:
Who/what acts next:
f32aaaa3b5using prgs-merger after re-checking live head and approvalf32aaaa3b5with formal APPROVE visibleCanonical Issue State
STATE:
approved_at_current_head
WHO_IS_NEXT:
merger
NEXT_ACTION:
Merge PR #629 at head
f32aaaa3b5NEXT_PROMPT:
WHAT_HAPPENED:
Reviewer cleaned moot #625 lock and posted formal APPROVE on #629; handoff to merger stored
WHY:
Approval is live at current head; merger is the correct next role
RELATED_PRS:
BLOCKERS:
none
VALIDATION:
53 passed; approval_at_current_head=true
LAST_UPDATED_BY:
sysadmin / prgs-reviewer / 2026-07-10
adopted_at: 2026-07-10T17:54:13Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 24673-e1f77e3794cc
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 9536
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #629
issue: #627
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 37702-960736541445
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-629
phase: adopted
candidate_head:
f32aaaa3b5target_branch: master
target_branch_sha:
5347b313ealast_activity: 2026-07-10T17:54:13Z
expires_at: 2026-07-10T19:54:13Z
blocker: none
CTH: Merger Handoff
Status: merged_at_current_head
Next owner: controller / reconciler
Current blocker: none for #627/#629 merge path
Decision: PR #629 merged via gitea_merge_pr at approved head
f32aaaa3b5Proof:
f32aaaais ancestor of prgs/masterNext action: refresh MCP runtime so pagination fix is live; then reconciler may clean residual #601 status:pr-open via fixed gitea_set_issue_labels if still incomplete
Ready-to-paste prompt: see NEXT_PROMPT below
Canonical PR State
STATE:
merged
WHO_IS_NEXT:
controller
NEXT_ACTION:
Refresh MCP runtime; then schedule residual #601 label hygiene only if still needed after live re-check
NEXT_PROMPT:
WHAT_HAPPENED:
Merger adopted reviewer lease and merged PR #629 for Issue #627 at the approved head.
WHY:
Canonical handoff said merger was next; live APPROVE was visible at pinned head; eligibility and merge gates passed.
RELATED_ISSUES:
RELATED_PRS:
BRANCH:
fix/issue-627-set-issue-labels-pagination
HEAD_SHA:
f32aaaa3b5MERGE_COMMIT_SHA:
5ab5fe8583BLOCKERS:
none for merge path; residual #601 label cleanup waits for MCP runtime refresh
VALIDATION:
pre-merge: approval_at_current_head=true; mergeable=true; post-merge: PR closed with merge_commit_sha
5ab5fe8583LAST_UPDATED_BY:
sysadmin / prgs-merger / 2026-07-10
[THREAD STATE LEDGER] PR #629 / Issue #627 — merged; controller/reconciler next for residual #601 label hygiene after MCP refresh
What is true now:
f32aaaa3b55ab5fe8583What changed:
f32aaaa3b5What is blocked:
5ab5fe8so fixed gitea_set_issue_labels is liveWho/what acts next:
5ab5fe8583after MCP refreshCanonical Issue State
STATE:
merged
WHO_IS_NEXT:
controller
NEXT_ACTION:
Refresh MCP runtime; then residual #601 label hygiene if still needed
NEXT_PROMPT:
WHAT_HAPPENED:
Merger merged PR #629; handoff for residual #601 label cleanup after runtime refresh stored
WHY:
#627 tool fix is on master; #601 residual labels need the deployed tool
RELATED_PRS:
BLOCKERS:
none for merge path; residual #601 label hygiene depends on MCP runtime refresh
VALIDATION:
merge performed; merge_commit_sha 5ab5fe8583c07134d55dadf09381aecb67df246e; head landed on prgs/master
LAST_UPDATED_BY:
sysadmin / prgs-merger / 2026-07-10
CTH: Reconciler Handoff
Status: residual_label_hygiene_complete_for_queued_path
Next owner: controller
Current blocker: none for the queued residual path from merger handoff
Decision: live re-check after MCP runtime at
5ab5fe8583Proof:
5ab5fe8583(pagination fix live)Next action: controller may close or re-label #601 only if policy requires; queue is clear of the #629 residual path
Ready-to-paste prompt: see NEXT_PROMPT below
Canonical Issue State
STATE:
reconciled_residual_path_complete
WHO_IS_NEXT:
controller
NEXT_ACTION:
If Issue #601 should be closed after #625 land, close via author/controller policy; otherwise no work remains from #629 residual handoff
NEXT_PROMPT:
WHAT_HAPPENED:
Reconciler re-checked #601 after runtime refresh; residual status:pr-open already absent. Cleaned #627 residual status:pr-open with sanctioned paginated set_issue_labels.
WHY:
Merger handoff required residual label hygiene only if still incomplete; #601 residual was already gone; #627 still had stale status:pr-open after close.
RELATED_ISSUES:
RELATED_PRS:
BLOCKERS:
none
VALIDATION:
set_issue_labels succeeded including workflow-hardening; MCP parity at
5ab5fe8LAST_UPDATED_BY:
sysadmin / prgs-reconciler / 2026-07-10
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-reviewer2026-07-10T20:29:02.267844+00:00approveon PR fix: paginate repository-label inventory for gitea_set_issue_labels (Closes #627) (#629)closed(merged=True)5ab5fe8583c07134d55dadf09381aecb67df246e1prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.