Skip to content

Background Jobs (Stages 7 and 8)#268

Open
UdeshyaDhungana wants to merge 14 commits intobg-jobs-3from
bg-jobs-4
Open

Background Jobs (Stages 7 and 8)#268
UdeshyaDhungana wants to merge 14 commits intobg-jobs-3from
bg-jobs-4

Conversation

@UdeshyaDhungana
Copy link
Contributor

@UdeshyaDhungana UdeshyaDhungana commented Feb 26, 2026

Note

Medium Risk
Adds new background-jobs stages and assertions that change the tester’s expected output ordering and job-number semantics, which could introduce flaky process-timing or output-matching issues. Changes are test-harness scoped (not runtime application code) but affect core stage validation.

Overview
Adds Background Jobs stages 7–8 (bv8, fy4) to validate (1) completed jobs are reaped and printed before the next prompt/command output, and (2) job numbers are recycled/reset after all jobs are reaped (including across a shell restart).

Updates the tester harness accordingly: introduces CommandResponseWithReapedJobsTestCase to assert command output followed by reaped-job lines, refactors jobs output expectations into BackgroundJobStatusEntry with a shared ExpectedOutputAndRegex() builder, and wires the new stages into tester_definition, stages_test, course definition, Makefile stage lists, and fixtures (including a new failing scenario for non-recycled job numbers).

Written by Cursor Bugbot for commit 7b26cc1. This will update automatically on new commits. Configure here.

cursoragent and others added 4 commits February 26, 2026 09:16
- Fix Bug 1: Move return statement outside for loop in main.py (line 92)
  to process all background jobs instead of returning after the first one

- Fix Bug 2: Add ExpectedOutputAndRegex() method to BackgroundJobStatusEntry
  to centralize job entry formatting logic. Update both
  CommandResponseWithReapedJobsTestCase and JobsBuiltinResponseTestCase
  to use the shared method, including proper 'Running' status handling.
cursor[bot]

This comment was marked as outdated.

[your-program] $ echo mango
[your-program] mango
[your-program] [1]+ Done grep -q raspberry /tmp/pear-70
[tester::#FY4] ✓ Received command output followed by an entry for the reaped job
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a test for when the command output is not followed by an entry

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added another command test case following this one

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.

3 participants