Fix silent false-success bug in registration submit flow
Session from merchantscroll-traces on Hugging Face by vedalken · MIT · condensed by Coders Talk
Click a segment to jump to that moment
17ssession
0interventions
GOAL
Run a code review on branch changes and fix any bugs found, specifically a bug where the registration form reported success even when the backend rejected the submission.
- +0Prompt · +0/review — asked which review to run
- +0mAgent did · +0mRan Bugbot review on branch changes; found a high-severity issue: submitTeam treats any HTTP 2xx as success without reading the JSON body, so the form could show success even when the backend rejected the registration.
- +0mPrompt · +0mFix it
- +0mAgent did · +0mInvestigated registration.js, the Apps Script backend, and existing tests to understand the response format and how submitTeam is used, then decided how to distinguish success from failure responses.
- +0mAgent did · +0mUpdated js/registration.js to parse the JSON body and only report success when success:true; also escaped result.message with escapeHtml in registration-form.js to avoid unsafe HTML insertion of server text.
- +0mAgent did · +0mAdded new unit tests covering the fixed submit path in tests/unit/registration.test.js and ran the full suite: all 102 tests passed, including 4 new ones.
- +0mOutcome · +0mBug fixed: submitTeam now only reports success when the backend confirms it; message output escaped; 102/102 tests passing (4 new); lints checked clean.
VERDICT
I'd start the next session the same way — running Bugbot on the branch diff before merging — since it caught a real high-severity bug I'd have missed otherwise. Asking it to just 'fix it' worked well because it investigated the backend response format and existing tests before touching code, and it proactively escaped the message HTML too. No corrections were needed this time; the agent's own research step did the work.