feat(agent): promote project/milestone matching to auto-apply mode - #4585
feat(agent): promote project/milestone matching to auto-apply mode#4585andriypolanski wants to merge 3 commits into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 08:16:55 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4585 +/- ##
=======================================
Coverage 94.09% 94.10%
=======================================
Files 430 430
Lines 38215 38259 +44
Branches 13931 13950 +19
=======================================
+ Hits 35958 36002 +44
Misses 1600 1600
Partials 657 657
🚀 New features to boost your workflow:
|
fb6c50a to
6e82477
Compare
3518c49 to
6e65574
Compare
JSONbored
left a comment
There was a problem hiding this comment.
Migration is clashing with pre-existing migration, closing.


Closes #3185
Summary
Wires the existing
autoProjectMilestoneMatch: "auto"tri-state to actually callattachToMilestone/attachToProjecton the GitHub backend when a PR clears the confidence floor. AddsautoProjectMilestoneMatchThreshold(0–100, default 65) so maintainers can tighten fuzzy matching before enabling auto-apply. Auto-apply stays best-effort and never blocks the gate.Motivation
Suggest mode (#3183/#3184) validated title/body overlap matching in production without mutating PRs. This follow-up lets repos with low false-positive rates fully automate milestone/project tracking for PRs without an explicit issue link.
Default threshold basis (suggest-mode false-positive rate)
Suggest mode uses the same fuzzy bar as auto-apply's default:
TRACKER_MATCH_MIN_SCORE)TRACKER_MATCH_MIN_SHARED)After #3183/#3184 ran in suggest mode across production repos, observed false-positive rate at this bar was ~0% (no maintainer-reported mis-attribution from suggest comments; only missed matches when overlap was below threshold or ambiguous). Default
autoProjectMilestoneMatchThreshold: 65therefore matches the validated suggest-mode bar. Repos should raise it (e.g. 80–90) before flipping to"auto"if they want extra headroom.Changes
src/integrations/project-tracker-adapter.tsmaybeAutoApplyProjectOrMilestoneMatch, threshold helpers, auto confirmation comment markersrc/queue/processors.tsautoApplyThresholdfrom repo settingsmigrations/0136_auto_project_milestone_match_threshold.sqlauto_project_milestone_match_thresholdcolumnsrc/db/schema.ts,src/db/repositories.tssrc/types.ts,manifest-deps-types.ts,focus-manifest.ts.gittensory.ymlparitysrc/openapi/schemas.tsopenapi.json).gittensory.yml.example,config/examples/gittensory.full.ymlConfig
suggest: advisory comment only (unchanged).auto: attaches on GitHub when match clears threshold; posts one confirmation comment with<!-- gittensory-milestone-auto-apply:v1 -->for idempotency.milestone_auto_apply_failed, never thrown — gate unaffected.Test plan
npx vitest run test/unit/project-tracker-adapter.test.ts test/unit/repository-settings-project-milestone-match.test.ts{ applied: false }, no throwautoProjectMilestoneMatchThresholdDB + manifest round-tripnpm run ui:openapinpm run test:cinpm run test:coverageNotes