Skip to content

Enhance testBg9Recycle function#294

Open
andy1li wants to merge 1 commit into
mainfrom
andy/harden-fy4
Open

Enhance testBg9Recycle function#294
andy1li wants to merge 1 commit into
mainfrom
andy/harden-fy4

Conversation

@andy1li

@andy1li andy1li commented Jun 15, 2026

Copy link
Copy Markdown
Member

Note

Low Risk
Changes are limited to integration test expectations in stage_bg9.go; no production shell behavior is modified.

Overview
testBg9Recycle now models job-number recycling with three background jobs still running when job 2 finishes, instead of only two.

A sleep 50 background job is started as job 3 before the FIFO is closed so job 2 can be reaped. Expectations for the reaped cat job use PreviousJob (-) rather than CurrentJob, and the follow-up background launch uses sleep 10 assigned to recycled job 2, with an updated success message.

The final jobs assertion expects three running entries (jobs 1, 2, 3) with markers unmarked, current (+), and previous (-) respectively.

Reviewed by Cursor Bugbot for commit b1fddf4. Bugbot is set up for automated code reviews on this repo. Configure here.

@andy1li andy1li self-assigned this Jun 15, 2026
@andy1li andy1li added the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jun 15, 2026
@github-actions

Copy link
Copy Markdown

Triggered a Github Actions job to update fixtures.

@github-actions github-actions Bot removed the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jun 15, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0fa8dc3. Configure here.

Comment thread internal/stage_bg9.go
…st and updating job number handling for recycled jobs
@andy1li andy1li added the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jun 15, 2026
@github-actions

Copy link
Copy Markdown

Triggered a Github Actions job to update fixtures.

@github-actions github-actions Bot removed the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jun 15, 2026
cursor Bot pushed a commit that referenced this pull request Jun 17, 2026
- Investigated hypothesis that bash version in CI is too low
- Hypothesis is FALSE: Alpine uses bash 5.3.3 which is modern
- Real issue: Test has incorrect expectations about job number recycling
- Bash only recycles job numbers after jobs are fully removed from table
- Tested and verified behavior across bash 5.2 and 5.3
- Provided recommendations for fixing the test

Co-authored-by: Andy Li <andy1li@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant