feat: Sentry/GlitchTip incident bridge via incident_links (Closes #612) #623
Merged
sysadmin
merged 1 commits from 2026-07-10 08:36:48 -05:00
feat/issue-612-incident-bridge 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#623
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
Implements #612 phase-1 observability incident bridge on top of:
incident_links(PR #619,10228e1)f20c843)Dependency chain:
#613 substrate → #600 allocator → #612 bridge (this PR)Design (ADR)
Changes
incident_bridge.pycontrol_plane_db.pyget_incident_link_by_providergitea_mcp_server.pygitea_observability_list_projects,reconcile_incident,link_issuetask_capability_map.pytests/test_incident_bridge.pyMCP tools (phase-1)
gitea_observability_list_projectsgitea_observability_reconcile_incident(apply=false|true, JSON observation)gitea_observability_link_issue(explicit link to existing issue)Config:
GITEA_OBSERVABILITY_PROJECTS_JSONorGITEA_OBSERVABILITY_PROJECTS_FILE.Validation
Closes #612
Canonical Issue State
STATE:
awaiting review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
review PR #623 at head
6a179aeb85for issue #612 incident bridge on #613 substrate and #600 allocator; do not reopen #600 or #613NEXT_PROMPT:
WHAT_HAPPENED:
Author implemented phase-1 observability bridge and opened PR #623 with body Closes #612.
WHY:
Dependency chain #613 then #600 is complete; #612 must convert provider observations into durable Gitea issues linked via incident_links without making raw incidents assignable.
RELATED_PRS:
#623 (this PR); #619 closed #613 at 10228e1; #622 closed #600 at
f20c843BLOCKERS:
none that block reviewer validation of PR #623
VALIDATION:
pytest suite for bridge plus control-plane plus allocator reported 49 passed; git diff --check clean; head 6a179aeb8505e581f34a58e858dc2181039ad020; substrates
10228e1andf20c843are ancestorsLAST_UPDATED_BY:
jcwalker3 (prgs-author)
[THREAD STATE LEDGER] PR #623 / Issue #612 — author implementation posted for review
What is true now:
6a179aeb8510228e1c06f20c8436aaWhat changed:
What is blocked:
Who/what acts next:
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #623
issue: #612
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 83954-7189a6540169
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-623
phase: claimed
candidate_head:
6a179aeb85target_branch: master
target_branch_sha:
f20c8436aalast_activity: 2026-07-10T12:40:03Z
expires_at: 2026-07-10T14:40:03Z
blocker: none
Canonical PR State
STATE:
approved awaiting operator merge command
WHO_IS_NEXT:
merger
NEXT_ACTION:
hold PR #623 at head 6a179aeb8505e581f34a58e858dc2181039ad020; merge only on explicit operator command MERGE PR 623 (do not reopen #600 or #613; do not assign raw incidents as work_items)
NEXT_PROMPT:
WHAT_HAPPENED:
Reviewer performed full independent review at the pinned head; validated dry-run/apply, dedupe, redaction, fail-closed mapping/fingerprint, non-assignable incident kinds, and allocator/Gitea boundary. All 17 review-focus items pass; 49 + 209 tests pass; git diff --check clean.
WHY:
#612 phase-1 bridge must convert provider observations into durable Gitea issues linked via #613 incident_links, building on the #600 allocator, without making raw incidents assignable work.
ISSUE:
#612
HEAD_SHA:
6a179aeb85REVIEW_STATUS:
APPROVED
MERGE_READY:
yes (pending explicit operator command MERGE PR 623)
BLOCKERS:
none blocking; three non-blocking phase-2 hardening notes recorded below
VALIDATION:
pytest tests/test_incident_bridge.py tests/test_control_plane_db.py tests/test_allocator_service.py -q → 49 passed; pytest tests/test_mcp_server.py -q → 209 passed; git diff --check f20c8436...HEAD → clean; head 6a179aeb8505e581f34a58e858dc2181039ad020; substrates
10228e1andf20c8436are ancestorsLAST_UPDATED_BY:
sysadmin (prgs-reviewer)
APPROVE — PR #623 / issue #612 (phase-1 incident bridge)
Reviewed at pinned head
6a179aeb8505e581f34a58e858dc2181039ad020(basemaster@f20c8436). Substrates #613 (10228e1) and #600 (f20c8436) are ancestors; both closed.git diff --checkclean; scope = 6 named files only.Review-focus verdicts (all pass):
apply=falsereturns before any create/upsert; only a read of the existing link. ✓gitea_create_issue, issue_type=bug) +incident_linksupsert; never awork_itemsrow. ✓OUTCOME_UPDATED, no new issue). ✓resolve_mappingraises →OUTCOME_BLOCKED). ✓_link_conflict→ blocked, before mutation). ✓sanitize_tagsdrops sensitive keys; body double-redacts summary. ✓work_items—assert_not_raw_incident_work_item+upsert_work_itemrejectssentry_incident(InvalidWorkKindError);raw_incident_assignable=Falsealways. ✓kind=issue(allocator_visible_as). ✓9/10. Gitea durable (
durable_work_system=gitea_issues), DB coordination (substrate=incident_links). ✓incident_linksviaget_incident_link_by_provider+upsert_incident_link. ✓12/13. Builds on #600 allocator; no allocator source reopened; #600/#613 stay closed. The
_allocator_candidates_from_giteaedit only removes the now-obsolete hard-coded#612→#600downstream block (correct post-merge). ✓GITEA_OBSERVABILITY_PROJECTS_JSON/_FILEvalidated (list shape enforced, non-dict items filtered, JSON errors fail closed). ✓gitea.read;apply=trueadditionally gatescreate_issue(author) at runtime. ✓Validation run (reviewer, at pinned head):
pytest tests/test_incident_bridge.py tests/test_control_plane_db.py tests/test_allocator_service.py -q→ 49 passedpytest tests/test_mcp_server.py -q→ 209 passed (server changed beyond bridge)git diff --check f20c8436...HEAD→ cleanNon-blocking notes for phase-2 (do not block this merge):
gitea_observability_link_issue(force_gitea_issue_number=N)can repair it — but a blindreconcileretry would create a duplicate. Consider a pre-create marker check or intent record.provider_base_url/provider_org/provider_projectare written to the issue body without passing throughredact_text(unlike the other fields). Defense-in-depth: runbase_urlthrough redaction to catch a misconfigureduser:pass@host._allocator_candidates_from_gitea("blocked on #"gate) has no direct unit test; add targeted coverage.Raw Sentry/GlitchTip incidents are not assignable work items. Gitea issues remain the durable work system; the control-plane DB stores
incident_linkscoordination only.[THREAD STATE LEDGER] PR #623 / Issue #612 — reviewer APPROVED at pinned head
What is true now:
6a179aeb8510228e1c06(ancestor)f20c8436aa(ancestor)What changed:
6a179aebWhat is blocked:
Who/what acts next:
6a179aebadopted_at: 2026-07-10T13:36:07Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 83954-7189a6540169
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 9362
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #623
issue: #612
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 60591-22c84b555334
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-control
phase: adopted
candidate_head:
6a179aeb85target_branch: master
target_branch_sha:
f20c8436aalast_activity: 2026-07-10T13:36:07Z
expires_at: 2026-07-10T15:36:07Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #623
issue: #612
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 60591-22c84b555334
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-control
phase: released
candidate_head:
6a179aeb85target_branch: master
target_branch_sha:
f20c8436aalast_activity: 2026-07-10T14:15:00Z
expires_at: 2026-07-10T16:15:00Z
blocker: post-merge-moot
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-reviewer2026-07-10T15:41:08.142894+00:00approveon PR feat: Sentry/GlitchTip incident bridge via incident_links (Closes #612) (#623)closed(merged=True)ab1c2d797357614fccf4c94bd1ef36fd2e9f8c701prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.