feat(code): Sentry error watcher with automatic bugfix creation - #26
Open
danii1 wants to merge 3 commits into
Open
feat(code): Sentry error watcher with automatic bugfix creation#26danii1 wants to merge 3 commits into
danii1 wants to merge 3 commits into
Conversation
New `devintern sentry` command (and worker-mode acquirer) polls Sentry for unresolved error groups and turns valid ones into bugfix tasks run through the standard pipeline. - Minimal Sentry API client (sentry.io + self-hosted via SENTRY_BASE_URL) - Validity gate: min event count, actionable metadata, optional injected validator; the pipeline clarity check remains the final gate - Deduplication: handled group ids persist in queue.db processed_events and are marked before execution, so restarts, overlapping ticks, and failing runs never re-process the same error across modes - Worker auto-registers the acquirer when SENTRY_AUTH_TOKEN + SENTRY_ORG are configured; standalone and worker modes share dedupe state
The shim had only 250ms to spawn sh, fork sleep, and write the child pid before the timeout fired, so the pid-file read hit ENOENT on loaded machines and failed the pre-push suite. 2000ms keeps the assertion meaningful while leaving realistic startup headroom.
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.
Summary
[[error_monitors]]inworkspace.tomlenv_fileand[error_monitors.env]Workspace configuration
Add one entry per Sentry project.
repois required when the workspace has multiple repositories. Source IDs namespace durable deduplication, so identical Sentry issue IDs from different projects cannot collide.A Sentry DSN is not used here: DSNs ingest events, while issue polling requires an auth token plus organization/project slugs.
Extensibility
ErrorMonitorProvidernormalizes provider-specific issues and rendering.ErrorMonitorAcquirerowns polling, occurrence thresholds, lifecycle, deduplication, deferral handling, and dispatch. Adding Datadog therefore only requires another configuration union member and provider adapter/factory case.Validity and deduplication
An issue must meet the configured occurrence threshold and pass the provider actionability check. It is claimed before execution to prevent duplicate fixes. Failed fix attempts remain handled; capacity-deferred attempts are unclaimed and retried on a later poll.
Validation
main; PR is conflict-freebun run formatbun run lintbun run typecheck@getdevintern/codetest suiteThe monorepo-wide suite additionally encountered one unrelated flaky
agent-harnessprocess-group test; the complete code-package suite passes.