NASA-IMPACT / NASA-IMPACT/akd-core
Raw SQLAlchemy error shown to the user when confirming a sub-stage
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
What I did
I was running a CARE interview and sent Confirm Stage 3.2 as complete. - the same
thing I'd sent at four earlier sub-stages in that session.
What appeared
⚠️ The agent hit an error before finishing this turn: Method 'commit()' can't be
called here; method '_prepare_impl()' is already in progress and this would cause
an unexpected state change to <SessionTransactionState.CLOSED: 5>
(Background on this error at: https://sqlalche.me/e/20/isce)
An SME shouldn't be shown this
CARE is meant to let a subject-matter expert design an agent without needing to
understand the platform. This message tells that person nothing they can act on -
not whether their work was saved, not whether the step went through, not whether
it's safe to try again.
I only found out re-sending was safe by going and checking the files myself. Someone
using the product normally wouldn't do that.
Can it be reproduced?
I don't know, and I don't know what caused it.
What I can say:
- It happened once.
- Four earlier sub-stage confirmations in the same session were fine, and the one
after it was fine too. - The one that failed was the biggest sub-stage of the run - about twelve files,
where the others had one or two. That might be relevant or might be coincidence.
Recovery
Sending the confirmation again worked.
Questions
- Should the user see a plain-language message here instead? Something like
"Couldn't complete that step - your work is saved, try again" would have told me
what I needed, if that's accurate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing the CARE sub-stage confirmation flow and the exception path that exposes the SQLAlchemy transaction error, then investigate whether the twelve-file confirmation helps reproduce it. Done means the user receives an accurate plain-language outcome and retry guidance instead of the raw database error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlalchemy
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100