Repository navigation
fix(observability): preserve title and work stage - #7
Merged
Merged
Conversation
itstimwhite
marked this pull request as ready for review
September 6, 2026 03:14
Comment on lines
+1598
to
+1600
| defp pick_retry_title(previous_retry, metadata) do | ||
| metadata[:title] || Map.get(previous_retry, :title) | ||
| end |
There was a problem hiding this comment.
Bug: The pick_retry_title/2 function incorrectly uses a stale title from a previous retry when the current issue's title is nil, due to the behavior of the || operator.
Severity: MEDIUM
Suggested Fix
Modify pick_retry_title/2 to explicitly prioritize the title from the metadata map, even when it is nil. Instead of using the || operator, check if the :title key exists in metadata. If it does, use its value. Otherwise, fall back to the title from the previous_retry map. For example: if Map.has_key?(metadata, :title), do: metadata[:title], else: Map.get(previous_retry, :title).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: elixir/lib/symphony_elixir/orchestrator.ex#L1598-L1600
Potential issue: The function `pick_retry_title/2` uses the `||` operator to select a
title. In Elixir, `nil` is a falsy value. If an issue's title is updated to be `nil` in
the tracker, the `metadata[:title]` passed during a retry will be `nil`. The `||`
operator will then incorrectly fall back to using a stale title from a `previous_retry`
attempt. This violates the system's specification, which requires that missing titles
remain `null` and are not synthesized from other fields, leading to incorrect data in
observability outputs.
Did we get this right? 👍 / 👎 to inform future reviews.
24 of 32 tasks
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.
Context
The Gem HUD receives issue identifiers from Symphony but not their titles or lifecycle stage, so active work renders as UNKNOWN and the consumer has to infer process state. JOV-5609 tracks the HUD repair; JOV-6010 tracks the runtime truth boundary.
TL;DR
Preserve tracker titles and expose additive lifecycle stages in the observability API.
Summary
Alternatives
Test Plan
make -C elixir all(run asmake MIX='mise exec -- mix' allinsideelixir/)mix test test/symphony_elixir/extensions_test.exs test/symphony_elixir/core_test.exs(77 tests)