Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions analysis/issue-2472-tracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Issue #2472 Tracking Plan

- Issue: https://github.com/shakacode/react_on_rails/issues/2472
- Title: Improve uploadRaceCondition.test.ts to verify truly concurrent asset writes
- Status: Draft tracking PR opened to attach implementation work.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The status says "Draft tracking PR" but the PR body contains Closes #2472, which will close the issue on merge — before the actual implementation work is done. This is likely unintentional. Consider changing to Related to #2472 so the issue stays open until the implementation PR lands.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The status says "Draft tracking PR opened to attach implementation work" but this PR uses Closes #2472 in its description, which will auto-close the issue on merge without any implementation having landed. Consider changing to Related to #2472 here and in the PR description until the actual implementation is done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Closing the issue with only a planning document is premature.

The PR description marks this as closing issue #2472, but the issue describes a concrete implementation task (concurrent write verification in uploadRaceCondition.test.ts) that has not yet been done. Closing it now would lose the open signal needed to track the actual work. Consider either keeping the issue open and marking this PR as "related to" rather than "closes", or converting the issue into a separate task/milestone.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@analysis/issue-2472-tracking.md` at line 5, The PR currently marks issue
`#2472` as closed even though the concrete implementation (concurrent write
verification in uploadRaceCondition.test.ts) is not done; update the PR
description to remove the closing keyword and either change "closes `#2472`" to
"relates to `#2472`" (or "see `#2472`") or explicitly mark the issue as still open /
convert it into a task/milestone, and ensure the PR text references
uploadRaceCondition.test.ts as related work rather than completing the issue.


## Plan

1. Reproduce current test behavior and identify where writes are effectively serialized.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing uploadRaceCondition.test.ts already has an addBarrier() function that blocks requests at the preHandler lifecycle stage until all concurrent onFile writes complete, making writes deterministically concurrent. Step 1 should reflect whether this analysis has already been done and what gap remains — otherwise this plan is not actionable.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing uploadRaceCondition.test.ts already has the addBarrier mechanism (synchronizing at preHandler, after onFile completes) and uses Promise.all to fire concurrent requests. This step should clarify what is still serialized despite the barrier — otherwise it reads as if the current tests have no concurrency, which isn't accurate.

2. Update the test to create truly concurrent write paths and assert race-condition resilience.
3. Validate with focused test runs and update documentation/comments as needed.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing success criteria. What does "validated" look like? Consider adding: which test commands to run, what assertion failures would indicate the race condition is properly exercised, and whether any CI job specifically covers this test file.