✨ feat: Add .sweeper/config.toml and Confluent telemetry backend#10
Open
✨ feat: Add .sweeper/config.toml and Confluent telemetry backend#10
Conversation
The kafka.Writer defaulted to RequireNone (fire-and-forget), so the broker never confirmed receipt and messages were silently dropped.
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
.sweeper/config.tomlas primary project config with sectioned TOML layout ([run],[provider],[telemetry],[vm]) and precedence: CLI flags >SWEEPER_*env vars > project.sweeper/config.toml> home~/.sweeper/config.toml> defaultsPublisherinterface from the hardwired JSONL telemetry writer, keeping JSONL as the always-on default and adding Confluent Cloud as an opt-in production backend via a fan-outMultiPublishername,model,api_base,allowed_tools) into[provider]in config.toml, separating AI backend selection from telemetry transportRequireAllacks so messages are confirmed by the broker instead of silently droppedArchitecture
New packages
pkg/dotdir—.sweeper/directory resolution (project > home > empty)pkg/configadditions —TOMLConfigtypes,LoadTOML()loader,applyEnvOverrides(),FromTOML()bridgepkg/telemetry/confluent— Kafka publisher with SASL/TLS for Confluent Cloudpkg/telemetryadditions —Publisherinterface,JSONLPublisher,MultiPublisherConfluent Build Hackathon Application Details
AI Application
Sweeper is an agent-powered code maintenance tool that dispatches parallel sub-agents to automatically fix linter issues, repair broken tests, and run migrations across codebases. It targets engineering teams who want to reduce manual lint-fix toil. The Confluent integration streams telemetry events (init, fix_attempt, round_complete) from sweep runs into a Kafka topic so teams can build real-time dashboards, detect regressions, and track fix success rates across repos at scale.
Confluent Connector(s)
N/A — Sweeper uses the
segmentio/kafka-gowriter directly with SASL/TLS to produce to Confluent Cloud. No managed connectors are used.Flink Stream Processing Query
Schema
{ "type": "record", "name": "SweeperTelemetryEvent", "namespace": "co.papercompute.sweeper", "fields": [ { "name": "timestamp", "type": "string", "doc": "ISO-8601 timestamp" }, { "name": "type", "type": { "type": "enum", "name": "EventType", "symbols": ["init", "fix_attempt", "round_complete"] }}, { "name": "data", "type": { "type": "map", "values": ["null", "string", "int", "long", "boolean", "double"] }, "doc": "Event payload — keys vary by type" } ] }Event types and their
datafields:initname,linterCommand,targetDir,maxRounds,staleThresholdfix_attemptfile,success,duration,issues,error,linter,round,strategy,provider,model,prompt_tokens,output_tokensround_completeround,linter,tasks,fixed,failedTest plan
go test ./...passes (all 15 packages)sweeper run --dry-runloads config from.sweeper/config.tomlwhen presentsweeper run --provider codex --dry-runoverrides TOML configSWEEPER_PROVIDER_NAME=ollama sweeper run --dry-runenv override workssweeper observereads telemetry dir from config[telemetry] backend = "confluent"and valid broker/topic config