Skip to content

fix: findings of the reviews before 0.54.0 (prepare in the main tree, lane usage limit, clone address) - #637

Merged
7schmiede merged 1 commit into
mainfrom
fix/review-findings-0.54
Nov 26, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/review-findings-0.54

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

The code review (/code-review high) and a security review of
v0.53.0..7f159a2 before 0.54.0 found twelve points; the reports are kept
internally. This fixes ten of them; one is #636, one cleanup is folded in.

  • prepare in the main tree (Main tree: restart does not re-run prepare after its inputs changed, dev server runs on stale node_modules #630):
    • A restart that prepares stops the other running services whose
      prepare names the same outputs and starts them again after it; a
      start that would prepare under such a service is refused with a hint
      (npm ci failed on their locked files on Windows, elsewhere they lost
      node_modules under them).
    • The mark takes the key of the inputs as prepare left them: an npm install that rewrites the lockfile is not due again, and its own write
      is no notice (the notice now checks the inputs against the mark).
    • The notice goes when the service stops.
    • The watcher passes whether restart_on restarts the service (no
      per-event clone and glob compile); a key that cannot be read goes
      through restart_failed.
  • Node (ADR-0119, security): at most 1 MiB of a lane daemon's
    /v1/usage is read (http_body_util::Limited); what answers on that
    port is the lane's.
  • POST /hub/clone (feat(hub,ui): Add a stack clones with the users Git client #629, security): %3F, %23 and %25 are
    refused, so no encoded query or fragment reaches GitHub Desktop's link.
  • main stopped (ADR-0119): a service's view says kept_for_lanes
    (a singleton and what it comes after, transitively; the same function
    as the daemon's stop), and the dashboard counts those, not only the
    singletons. Additive field, older daemons fall back to singleton.
  • Memory: Windows before 10 21H2 gives the whole working set where the
    private one stays zero; the macOS footprint test compares within a
    tolerance instead of exactly.

Decided on my own: kept_for_lanes as a new view field (additive, in
docs/dashboard-api.md); refusing a plain start under a sharer instead of
stopping it from inside the start.

Verified

  • Red first, then green: a_prepare_that_rewrites_its_inputs_is_not_due_again
    (red: "due again after its own write"),
    outputs_a_running_service_shares_are_not_prepared_under_it (red: the
    prepare ran under admin), the node test with a body past the limit (red:
    read whole), a_clone_url_is_https_and_a_plain_path (red: %23), the
    store test for kept_for_lanes (red: mainActive stayed true).
  • New without red: what_a_singleton_comes_after_is_kept_for_the_lanes
    (the extracted closure), a_windows_without_the_private_figure_gives_the_whole_working_set.
  • cargo fmt, cargo clippy --workspace --all-targets -D warnings,
    cargo test --workspace (923 passed); ui: typecheck, 326 tests, build.
  • Not run locally: the macOS test (CI macos-15).

Bug-Class: shared-output-race, stale-cache, unbounded-input

🤖 Generated with Claude Code

… lane usage limit, clone address)

- prepare in the main tree (#630): a restart that prepares stops the other
  running services with the same outputs and starts them again after; a
  start that would prepare under one is refused. The key is taken from the
  inputs as prepare left them, so `npm install` rewriting the lockfile is
  not due again and its own write is no notice. The notice goes when the
  service stops. The restart_on match comes from the watcher; a failed key
  goes through restart_failed.
- The node reads at most 1 MiB of a lane daemon's /v1/usage (S1).
- clone_url refuses %3F, %23 and %25 (S2).
- kept_for_lanes on a service's view: a singleton and what it comes after;
  the dashboard counts the same services as the daemon's stop.
- Windows before 10 21H2: the whole working set where the private one is
  missing; macOS: the footprint test compares within a tolerance.

Bug-Class: shared-output-race
Bug-Class: stale-cache
Bug-Class: unbounded-input
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit c1303a9 into main Nov 26, 2026
14 checks passed
@7schmiede
7schmiede deleted the fix/review-findings-0.54 branch November 26, 2026 16:01
@7schmiede 7schmiede mentioned this pull request Nov 26, 2026
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