Skip to content

fix(linear): track only sub-issues as action items and re-enable parent reopen#262

Merged
spalmurray merged 3 commits into
mainfrom
spalmurray/subissue-action-items-reopen
Jul 3, 2026
Merged

fix(linear): track only sub-issues as action items and re-enable parent reopen#262
spalmurray merged 3 commits into
mainfrom
spalmurray/subissue-action-items-reopen

Conversation

@spalmurray

@spalmurray spalmurray commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #261. A user flagged that Firetower was treating loosely-related Linear issues as incident action items, which then dragged the parent issue's auto-status around — the confusing behavior #261 tried to fix by making parent status one-way (complete-only, never reopen).

This change addresses the root cause instead:

  1. Only sub-issues (children) of the Linear parent are tracked as action items. Related / blocking / duplicate relations are no longer synced. get_related_issues / _fetch_relations / LINEAR_RELATION_TYPE_MAP are removed.
  2. Re-enable the two-way parent status sync (reverting fix: Make Linear parent status one-way and sync assignee on captain change #261's one-way change). The parent advances to Completed when the incident is resolved (DONE/CANCELED) and all sub-issues are done, and reopens to Started when the incident is reopened or sub-issues remain.
  3. Restored the "Started" status-change comment and its config key PARENT_STATUS_COMMENT_STARTED (still present in the prod config.toml).
  4. Updated LINEAR_PARENT_DESCRIPTION to say only sub-issues are tracked and that the ticket will both auto-complete and reopen.

The captain-change assignee sync from #261 is left untouched. The relation_type field on ActionItem is intentionally kept (now always child).

…nt reopen

Only child (sub-)issues of the Linear parent are synced as action items;
related/blocking/duplicate relations are no longer treated as action
items. This removes the source of confusion behind #261, where loosely
related issues dragged the parent's auto-status around.

With action items now scoped to true sub-issues, re-enable the two-way
parent status sync (revert #261's one-way change): the parent advances to
Completed when the incident is resolved and all sub-issues are done, and
reopens to Started when the incident is reopened or sub-issues remain.
Restores the Started status-change comment and its config key.

Captain-change assignee sync from #261 is left untouched.
Dual-review follow-ups:
- Document the auto-completion direction in the parent issue description
  (it was only describing reopen).
- Handle the zero-action-items case in the Started status comment template,
  mirroring the Completed template.
- Restore CANCELED-incident -> completed parent-status test coverage.
- Reuse the COMPLETED_STATUSES constant instead of an inline literal.
Comment thread src/firetower/incidents/services.py
The re-enabled two-way parent status sync would force a parent whose Linear
state was manually set to 'canceled' back to 'started' on every sync while
the incident is active (and to 'completed' once resolved), because the skip
guard only matched the exact target state. Firetower only ever drives the
parent to 'started'/'completed', so treat 'canceled' as a terminal human
decision and leave it untouched.

Reported by Warden (MAV-TB5).
@spalmurray spalmurray marked this pull request as ready for review July 2, 2026 16:21
@spalmurray spalmurray requested a review from a team as a code owner July 2, 2026 16:21
@spalmurray spalmurray merged commit d85b540 into main Jul 3, 2026
40 checks passed
@spalmurray spalmurray deleted the spalmurray/subissue-action-items-reopen branch July 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants