fix(investigation): the symptom interview never ran for work shaped in discovery#575
Open
leeovery wants to merge 1 commit into
Open
fix(investigation): the symptom interview never ran for work shaped in discovery#575leeovery wants to merge 1 commit into
leeovery wants to merge 1 commit into
Conversation
This was referenced Jul 27, 2026
Open
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:44
efa86fb to
0299954
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:46
9a1439c to
73376d3
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:46
0299954 to
d4ba2c2
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:47
73376d3 to
f73fabc
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:47
d4ba2c2 to
492bab7
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:49
f73fabc to
d6902fc
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:49
492bab7 to
232ea8a
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:50
d6902fc to
29ea473
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:50
232ea8a to
6103e42
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:52
29ea473 to
9b65f33
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:52
6103e42 to
4e42b65
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:53
9b65f33 to
e1768aa
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:53
4e42b65 to
f290f6c
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:54
e1768aa to
f183907
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:54
f290f6c to
a5fc301
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:56
f183907 to
0d521e0
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:56
a5fc301 to
399540b
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:57
0d521e0 to
2898e16
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:57
399540b to
1518746
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:58
2898e16 to
191def2
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:58
1518746 to
0c550a2
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 15:59
191def2 to
f0538ab
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 15:59
0c550a2 to
8070b75
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 16:00
f0538ab to
2bdd2b0
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 16:00
8070b75 to
dfb167e
Compare
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 16:01
2bdd2b0 to
55c5f21
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 16:01
dfb167e to
f20123d
Compare
…n discovery Step 3 asks whether the Symptoms section is already populated and takes that as "a previous session gathered these — don't re-interview". But Step 1 populates Symptoms itself, from the discovery carrier and the seed, precisely so the user is not asked to repeat what they already said. Every path into Step 3 therefore arrives with the section populated: a fresh start, a restart that deletes and rebuilds the file, and a continue where an earlier session's content stands. So the guard is true in all three, and the interview is skipped in all three. For a bugfix shaped in discovery — which is how bugfixes reach investigation — the symptom gathering step never runs at all. It works only when there was no carrier to seed from and the section was left as template placeholders. The guard was asking about the file when the question is about the session. Step 0 already knows: no file means fresh, a continue returns for Step 2 with the earlier session's symptoms standing, a restart deletes the file and returns for Step 1 to rebuild it. That distinction is now held as `resumed` and Step 3 branches on it, so a resumed session skips the interview and a seeded one still has it. An engine fact could not have served here: after Step 1 the topic status is in-progress on both paths, so it cannot tell them apart. Which arm Step 0 took is the only thing that can. Contained to this skill. Discussion and research load the same shared resume reference but their equivalent steps are unconditional guidance loads rather than an interview, so they have nothing to distinguish. The four other "already populated" guards in the system key on engine state — a non-empty map, a key in items, a set review cycle — which cannot be written by the step that precedes them. Only this one keyed on content. Step 0's file-exists arm also gains the routing footer it lacked. The resume reference routes every exit itself, which is the shape that takes `→ On return, proceed as the reference directed.` Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
leeovery
force-pushed
the
test/prose-declare-what-walks
branch
from
July 27, 2026 16:02
55c5f21 to
8f006ce
Compare
leeovery
force-pushed
the
fix/investigation-symptom-guard
branch
from
July 27, 2026 16:02
f20123d to
88b3b1a
Compare
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.
The defect
Step 3 asks whether the Symptoms section is already populated, treating that as "a previous session gathered these — don't re-interview".
But Step 1 populates Symptoms itself, from the discovery carrier and the seed, precisely so the user isn't asked to repeat what they already said. So every path into Step 3 arrives with the section populated:
The guard is true in all three, so the interview is skipped in all three. For a bugfix shaped in discovery — which is how bugfixes reach investigation — symptom gathering never runs. It only works when there was no carrier and the section was left as template placeholders.
The fix
The guard was asking about the file when the question is about the session.
Step 0 already knows which it is: no file means fresh; a continue returns for Step 2 with the earlier session's symptoms standing; a restart deletes the file and returns for Step 1 to rebuild it. That distinction is now held as
resumed, and Step 3 branches on it.An engine fact couldn't serve here. After Step 1 the topic status is
in-progresson both paths, somanifest getcan't discriminate. Which arm Step 0 took is the only thing that can.Scope — checked, not assumed
Contained to this skill. Discussion and research load the same shared resume reference, but their equivalent steps are unconditional guidance loads rather than an interview, so they have nothing to distinguish.
The other four "already populated" guards are sound.
discovery_mapnon-empty, a key initems,review_cycleset — all engine state, none of it writable by the step immediately before. Only this one keyed on content.Nothing downstream reads it.
Symptomsappears only at this guard and in initialisation.Also
Step 0's file-exists arm gains the routing footer it lacked.
resume-detection.mdroutes every exit itself, which is exactly the shape that takes→ On return, proceed as the reference directed.(#570) — its second instance, found incidentally.Test plan and its limit
investigation-initialises-the-phasere-run to confirm the fresh arm and new footer walk cleanlyNot proven by test: the case stops before Step 3, so the resumed arm is unexercised. Catching this defect requires a case that starts with an existing investigation file and takes the continue path — a different fixture, and the one that would actually fail on the old prose. Worth adding; not in this PR.
🤖 Generated with Claude Code
Stack