Skip to content

Interaction 2 — Fix the autosave bug, then revert and file an issue when a follow-up fix doesn't hold

What this session shows

This is the immediate continuation of interaction 1 — same branch, same PR. The developer and Claude tackle the autosave bug noted during the earlier smoke test. A first fix ships and the happy-path smoke test passes. An edge-case smoke test uncovers a new error, Claude's first hypothesis turns out to be wrong, the user clarifies with a single detail, and Claude rediagnoses. A second fix ships. The error still appears. The developer calls it: stop, revert both commits, file an issue.

Key things to watch for:

  • How an edge-case smoke test catches things the happy path (and mvn test) cannot
  • Claude's first hypothesis being wrong, and how one clarifying detail redirects the investigation
  • A short ambiguous instruction ("wrap it up here") getting misread — and the user clarifying rather than letting Claude plow ahead
  • The right call being revert and file an issue, not ship a fix that doesn't fully solve the problem
  • That reverting committed work mid-PR is a normal, healthy outcome — not a failure

Ignore the Java. Same as interaction 1 — read for the pattern, not the serialization details.

Formatting: User messages are blockquotes (typos preserved). Claude's prose responses are normal text. Italicized one-liners represent Claude's tool calls or compressed stretches of code the user didn't need to see line-by-line.


Turn 1 — Tackling the autosave bug

User:

tackle the autosave bug. different commit, same branch is fine. same PR is fine.

Claude: Spawned an Explore agent to investigate the autosave load path (11 tool uses, 50s).

Wait — the app doesn't actually crash. ProjectManager.loadFromFile() already catches IOException and logs the FileNotFoundException as SEVERE, then returns. So the app just logs a spurious SEVERE on a clean first launch and continues with no project. The real fix is at the call site: check the file exists before attempting to load. There's already an AutosaveManager.hasCurrentProject() helper for exactly this.

(Claude wrapped both autosave load paths with existence checks, fixed a dangling variable reference from a prior rename, ran mvn clean test → 483 pass, committed as 0e628b4.)

All 483 tests pass. Ready for /close-story when you are.


Turn 2 — Happy-path smoke test passes

User:

ok, so, i started the app, loaded a project via kumu. then hit exit. then, i loaded the app again and the project auto loaded. any other smoke tests to run?

Claude: The autosave fix is confirmed. One more edge case worth running:

  • Close the app without loading any project, then reopen — should start cleanly with no errors (the original bug scenario).

Beyond that, I think we're good. Ready for /close-story whenever.


Turn 3 — Edge-case test exposes a new error

User: (Attached screenshot showing a ProjectImportException in the logs.)

The app still "worked" but saw this in the logs

Happy-path green ≠ feature works

mvn test passes. The happy path passes. The user runs one more scenario — a realistic flow that a real user could do — and finds a new error. This is why end-to-end smoke testing by a human matters even when the automated suite is green. Automated tests verify that the code you wrote does what you designed; they cannot verify that you designed the right thing.

Claude: Read the screenshot log output.

WARNING: Loaded object is not of expected type: ProjectData
SEVERE:  Import failed for: …/autosave/.current.ows
com.owspfm.ui.model.io.ProjectImportException: The project file appears
  corrupted or was created by an incompatible version

The .current.ows file exists but contains data from an incompatible format. InfluenceChartController implements Serializable but has no explicit serialVersionUID. Java auto-generates one from class structure. When we added methods in this PR, the auto-generated UID changed, making the old autosave file incompatible.

This is actually pre-existing behavior, not something this PR introduced — any code change to a serializable class without an explicit serialVersionUID breaks old saved files. Not a regression from our work. Want me to save it as a known issue?


Turn 4 — One clarifying detail redirects the investigation

User:

sure, and just to be clear, that flow was open the app with a prevously loaded project and saw that project open, then via app file -> close project. then close the app. Then reload the app from a closed project state, boom, see the logs.

A single detail destroys a confident hypothesis

Claude diagnosed this as a serialVersionUID drift across builds. That would be plausible if the file had been written by a prior build. The user clarifies: the file was written and read by the same build. That one detail kills the hypothesis entirely — and is only something the user could provide.

The general lesson: when Claude's first diagnosis feels confident but not obviously complete, describe the exact flow you ran. Claude cannot observe your session.

Claude: That's an important detail — the save happened from the same build that's trying to load it. The serialVersionUID theory is wrong. The file was written and read by identical code.

Searched the close-project flow and the window-closing handler (3 patterns, 3 file reads).

Found it. Here's the actual flow:

  1. User loads project → autosave writes valid .current.ows
  2. User does File → Close ProjectcloseProject() clears all state to null
  3. User closes app → windowClosingsaveCurrentProjectFile() checks isLoaded() → returns false (state was cleared) → skips the save
  4. The .current.ows file is not deleted and retains stale data from the previous (loaded) session
  5. Reopen app → tries to load stale .current.ows → fails

The actual fix: when closeProject() is called, delete the autosave file. Should this be in scope for this PR, or a separate issue?


Turn 5 — A miscommunication on "wrap it up here"

User:

lets wrap it up here. just make it clear in the PR that this is a sperate bug fix

Claude: Got it. The autosave-on-close issue is separate from the "file doesn't exist on first launch" bug we already fixed. I'll note it in the PR description when we close the story.

— interrupted —


Turn 6 — Clarification: actually fix it

User:

sorry, thats not what i meant. by wrap it up here, i mean lets fix the bug here and wrap that issue out.

Short, ambiguous instructions get misread

"Wrap it up here" can mean "close out and move on" or "finish this bug before closing out." Claude picked the first reading. The user clarifies immediately. The lesson cuts both ways:

  • For the developer: if Claude's next action doesn't match what you meant, say so in one sentence. Don't let a misread compound into a wrong commit.
  • For Claude: when an instruction could go two ways and the stakes are non-trivial, ask. "Wrap it up by fixing it now, or by leaving it for a follow-up?" costs one turn and prevents the wrong path.

Claude: Got it — fix it now, separate commit.

(Claude added AutosaveManager.deleteCurrentProject() — a small wrapper around Files.deleteIfExists() — and wired it into closeProject(). Ran mvn clean test → 483 pass, committed as 5b8b7b1.)

Test it: load a project via Kumu, File → Close Project, close app, reopen. Should start clean.


Turn 7 — Still broken — revert and file an issue

User: (Attached screenshot — same ProjectImportException still in the logs.)

I still see the erro. lets stop here and open a new issue. Mayve even revert the changes for this close -> project bug.

Reverting is a healthy outcome

The new deleteCurrentProject() code is correct. But the stale file on disk was written by an earlier build before that delete logic existed. The new delete never runs against it — the stale file sits on disk waiting to cause the error on every subsequent startup until manually removed.

The right call is to revert the fix. Both attempts. File the bug with the full context so whoever picks it up next week starts at the real problem — "stale autosave files from prior builds persist and cause import errors on startup" — instead of redoing the same investigation. Reverting mid-PR is not a failure. It's scope discipline. Shipping a fix that doesn't solve the actual problem is worse than shipping nothing, because now the issue looks resolved in the commit log.

Claude: Read one file to confirm.

Same error — the stale .current.ows from the previous build is still on disk. Our delete only runs on close-project, but the stale file was already there before our fix, so the new delete never runs against it. Needs more investigation.

There's an unrelated docs commit between the two autosave commits, so I'll revert just the two autosave commits.

(Claude ran git revert --no-edit 5b8b7b1 and git revert --no-edit 0e628b4, producing revert commits 8434723 and 66937c0. Then gh issue create to file the new bug as #76 with the full flow and prior-investigation notes.)

Issue #76 filed. Autosave commits reverted.

Current state — 6 commits for issue #69, plus 2 revert commits for the autosave work:

66937c0 Revert "fix: Check autosave file exists before loading on startup"
8434723 Revert "fix: Delete autosave file when project is explicitly closed"
d59d5b2 fix(issue-69): Add SelectionSource to FactorSelected event
edaefb0 feat(issue-69): Complete Phase 3 — Testing
0274174 feat(issue-69): Complete Phase 2 — Wire Form to Controller
5c1fe61 feat(issue-69): Complete Phase 1 — Expose Factor-to-Quadrant Mapping

All 483 tests pass. Ready for /close-story.


What to take away

  • Edge-case smoke testing is not optional. The happy path (load → exit → reopen) passed. A realistic variant (load → close project → exit → reopen) exposed a different bug entirely. If the user had stopped after the happy path, the PR would have shipped with the bug intact.
  • One clarifying detail is often worth more than another round of Claude exploration. The serialVersionUID hypothesis was plausible. "Same build" killed it in one sentence. When Claude's diagnosis feels confident but not obviously complete, describe the exact flow.
  • Ambiguous instructions ("wrap it up here") get misread. Claude's default is to pick one reading and act on it. Correct immediately when the reading is wrong — don't let a misunderstanding compound. When the stakes matter, Claude should ask rather than guess.
  • When a fix doesn't hold, revert. Shipping a correct-looking fix that doesn't actually resolve the bug is worse than shipping nothing, because it leaves a misleading resolution in the commit history. File the issue with full context and let it be tackled fresh.
  • Separate fixes get separate commits. Every fix on this branch was its own commit — so reverting just the autosave work left everything else intact. If the autosave fixes had been squashed with the feature work, the revert would have been much messier.

Continues in interaction 3 — a fresh context window the next day, wrapping up the epic.