fix(review): map or fail closed before filing Linear issues without a project#273
Merged
unohee merged 1 commit intoJul 10, 2026
Conversation
… project (INT-2619) review --max --fix (and review --issues) filed autonomous follow-up issues with no Linear project when the repo had no openswarm.json mapping, only logging a warning that's easy to miss in unattended runs. Confirmed via Linear: 15 orphan audit issues across vega-agent, OpenSwarm, enzyme, audioman, pykiwoom-rest, ecount-mcp, whisper-diarization, NDrum, and CompanyDataEngine (backfilled to their correct projects; NDrum and CompanyDataEngine had no project at all, so those were created). - ensureProjectMapping() in reviewCommand.ts: when no repo->project mapping exists, map it interactively (same picker as openswarm add) on a TTY, or fail closed headless instead of silently filing a project-less issue. - Wired into runReviewCommand (--issues) and all three reviewMaxCommand.tsx filing paths (filePmSynthesizedIssues / createMasterAuditIssue / filePerAreaFollowups). - resolveLinearCredential() now also checks config.yaml linear.apiKey, the same source ensureTaskSource() uses — closes a gap where the mapping preflight could wrongly conclude Linear wasn't configured and let filing proceed without a project. - no-teams from the mapping picker (team lookup failure) now aborts instead of silently proceeding, since it isn't a user choice to skip mapping. - openswarm.json added for this repo and vega-agent (the two repos without one); enzyme, whisper-diarization, NDrum, CompanyDataEngine also mapped. 179 -> 186 tests passing, tsc clean, oxlint clean.
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
review --max --fix(andreview --issues) filed autonomous Linear follow-ups without a project when the repo had noopenswarm.jsonmapping, only logging a warning that's easy to miss in unattended runs. Confirmed via Linear: 15 orphan audit issues across 9 repos (vega-agent, OpenSwarm, enzyme, audioman, pykiwoom-rest, ecount-mcp, whisper-diarization, NDrum, CompanyDataEngine) — all backfilled to their correct projects as part of this work (NDrum and CompanyDataEngine had no project at all, so those were created).ensureProjectMapping(): when no repo→project mapping exists, map it interactively (same picker asopenswarm add) on a TTY, or fail closed headless instead of silently filing a project-less issue. Wired intorunReviewCommand(--issues) and all threereviewMaxCommand.tsxfiling paths.resolveLinearCredential()now also checksconfig.yamllinear.apiKey, the same sourceensureTaskSource()uses — closes a gap where the mapping preflight could wrongly conclude Linear wasn't configured and let filing proceed without a project.no-teamsfrom the mapping picker (team lookup failure) now aborts instead of silently proceeding, since it isn't a user choice to skip mapping.openswarm.jsonfor this repo (previously missing, which is what let the bug reach OpenSwarm's own Linear project).Test plan
npx vitest run src/cli/— 186 passednpx tsc --noEmit— cleannpx oxlint— 0 warnings/errorsopenswarm reviewself-gate, 3 rounds — 2 real findings fixed (config credential gap, no-teams fail-closed); 1 finding (call-order suggestion) evaluated and declined with rationale (doesn't fix anything sinceensureTaskSource()'s team gate is independent, and would add a confusing UX)get_issue)Tracked in Linear as INT-2619 (Done).