Skip to content

Bug sweep: JavaScript, Java and C# (8 findings) #18

Closed

Description

@otzpt

Found by a read-and-run sweep of this area on 2026-11-09. Each item was reproduced by a finder and checked by a second agent that tried to refute it.

Status key: fix drafted = a change exists on a local branch (fix/bug-sweep) but is not reviewed or merged. refuted = the second agent could not confirm it; kept here for a human decision.

  • JS-1 (fix drafted) javascript/src/lessons_more.js:88: Module 6 exercise answers the sort question with "2 10 9", but the real default sort order is 10 2 9. The lesson's own live output a few screens earlier shows the real order.
  • JS-2 (fix drafted) javascript/src/lessons_more.js:211: Module 7 challenge says the output must be [2, 1], but console.log of that array in Node prints [ 2, 1 ]. The 'output is the whole specification' text is therefore false for the example solution.
  • JS-3 (fix drafted) javascript/src/lessons_more.js:95: Module 6 challenge expects [1, 2, 3] and [3, 1, 2], but Node prints [ 1, 2, 3 ] and [ 3, 1, 2 ] (spaces inside the brackets).
  • JS-4 (fix drafted) javascript/src/lessons_advanced.js:441: Module 13 shows this file's module.exports as three names (lesson11Promises, lesson12Apis, lesson13Modules), but the file exports four, including lesson14NodeStdlib.
  • JAVA-1 (fix drafted) java/run:16: ./run does java Main.java, which only works on JDK 22+ (multi-file source launcher). Main.java also uses record, which needs JDK 16+. README says only 'You need a JDK' (default-jdk, jdk-openjdk), with no version requirement and no check in run.
  • JAVA-2 (fix drafted) java/src/LessonsMore.java:296: Module 8 says the enhanced for works on anything Java calls Iterable, 'which ArrayList is and a plain array also counts as'. A Java array is not Iterable.
  • JAVA-3 (fix drafted) java/src/Main.java:75: If stdin hits EOF inside a module (Ctrl-D, or piped input ending mid-lesson), the Scanner throws NoSuchElementException. Main's catch then calls Ui.waitEnter(), which throws again outside any try, so the program dies with a raw stack trace. The menu loop checks hasNextLine, and the JS and C# courses handle EOF.
  • JAVA-4 (fix drafted) java/src/LessonsBasics.java:187: Typing a non-number at the Age prompt in module 3 makes nextInt() throw InputMismatchException with a null message. Main prints 'Something went wrong: null', and the bad token stays in the Scanner buffer.

Not run in this sweep (tool missing or out of scope):

  • Java: javac is not installed. Nothing was compiled, so -Xlint:all -Werror was not checked. Only ./run was run (it fails on JDK 11; see JAVA-1). The Java findings other than JAVA-1 come from reading source and are UNRUN.
  • C#: dotnet, mono and csc are not installed. Nothing was built or run. No C# finding is reported, because no source error was unambiguous.
  • C# unverified claim: Module 13 says an unconstrained a.CompareTo(b) gives CS7036 via MemoryExtensions.CompareTo. By my reading of C# extension-method lookup, a plain T has no conversion to ReadOnlySpan, so the expected error is CS1061. This was not verified and is not reported as a bug.
  • C# unverified: net8.0 target. On a machine with only a newer .NET SDK/runtime (for example Arch's dotnet-sdk), dotnet run for a net8.0 app may fail for lack of the 8.0 runtime. Not run, not reported.
  • C# and Java nullable, CS8600/CS8602, CS0122, CS0070 and CS1579 compiler messages quoted in the lessons were not checked against a real compiler.
  • JS Module 9 says the private-field SyntaxError was 'Verified on Node 26'. Only Node v24.18.0 is installed. The message text itself matched here ('SyntaxError: Private field '#g' must be declared in an enclosing class').
  • JS Module 12 fetch calls: the sandbox did reach the network (status 200 output seen), but the offline fallback branch was not exercised.
  • I did not run the C#/Java challenge solutions, and I did not check README prose beyond the JDK/.NET install lines.
  • JS Module 13, 14 and 3 tests used piped stdin with blank lines or y lines, as an exception and hang check only. A real terminal or FIFO with delays was not used. All 14 JS modules exited rc=0 with empty stderr under both pipes. node --check passed on all five JS files, and tools/check-teaching-order.py reported all 151 exercises clean.

Activity

  1. added
    bug
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions