Skip to content

fix(watch): fold sentinel '-' into the empty session-id path - #857

Merged
fujibee merged 3 commits into
fujibee:mainfrom
apstndb:fix/855-watch-sentinel-fold
Aug 18, 2026
Merged

fix(watch): fold sentinel '-' into the empty session-id path#857
fujibee merged 3 commits into
fujibee:mainfrom
apstndb:fix/855-watch-sentinel-fold

Conversation

@apstndb

@apstndb apstndb commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #855.

Restores the #477 one-line fold of sentinel - in watch.sh, and the bats case that locked it. Callers that pass "${GROK_SESSION_ID:--}" are unchanged. Problem, repro, and why this is not a caller fix are on the issue.

Independently mergeable. #858 no longer contains these commits (unstacked). Cursor monitor still needs this fold at runtime ("${CURSOR_CONVERSATION_ID:--}"), so please land this before #858. #858 stays a draft until then.

Test plan

  • bats tests/test_watch.bats --filter "sentinel '-' session_id"
  • .github/scripts/check-enforced-assertions.sh at baseline
  • CI green

apstndb and others added 2 commits August 18, 2026 05:00
…#855)

Callers still pass "${GROK_SESSION_ID:--}" from fujibee#477, but watch.sh stopped folding the literal dash, so monitor re-eval wrote watch.-.pid. Restore the one-line fold and the bats case that locked it.

Co-authored-by: Cursor <cursoragent@cursor.com>
…old case

The restored bats locks the fujibee#477 fold, not the later regression ticket.

Co-authored-by: Cursor <cursoragent@cursor.com>
Non-last `! cmd` is silent on bash 3.2, so the new fold case raised the
enforced-assertions baseline. refute fails the test on every platform.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fujibee

fujibee commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Thanks for this, and sorry it sat.

This was red for a reason that had nothing to do with your change. One macOS
shard was stopped at exactly 25 minutes — this workflow's job cap — and GitHub
records a job that hits the cap as cancelled. The aggregate bats check then
went red naming no shard and no test, which from the outside is indistinguishable
from the change being rejected.

Every ubuntu shard, every Windows leg and the other three macOS shards were
green. Re-running the stopped job passed with nothing else changed, so the run
here is green now.

The cap is being hit because a handful of tests are slow: eight cases account for
about 30% of the suite's runtime, seven of them in sync start. Work is open on
that (#876), on the queueing that makes a slow shard slower (#877), and on making
this exact failure legible instead of a bare result: cancelled (#878).

Nothing is needed from you. Review to follow.

@fujibee
fujibee merged commit 626a625 into fujibee:main Aug 18, 2026
79 of 85 checks passed
fujibee added a commit that referenced this pull request Aug 19, 2026
…timeout with real margin (#885)

* fix(ci): pin count-invisible heavy files apart, and raise the shard cap with real margin (#847, #848)

@test count is a loose proxy for wall-clock cost in general, and blind for a
specific shape of file: one whose cost is almost entirely waiting rather than
how many @test blocks it contains. Measured 2026-08-19 (run 32193147987):
test_remote_engine_start_refusal.bats (9 tests, 722s, ~80s/test) and
test_remote_status_liveness.bats (31 tests, 380s, ~12s/test) both sit near the
bottom of the count-weighted sort while carrying two of the largest absolute
durations in the suite -- invisible to the weight the greedy partition uses,
so nothing stops an unrelated test-count change elsewhere from repacking them
onto the same shard (#847's demonstrated failure mode).

shard-tests.sh now seeds these two into distinct shards before the ordinary
count-weighted pass runs, so their placement no longer depends on any other
file's test count.

tests.yml's bats-shard timeout-minutes moves from 25 to 30, with the
arithmetic behind that number in a comment, and its comment claiming a
timeout is always a genuine hang is corrected (#848) -- #857 hit exactly the
opposite: 335/335 tests ok, cancelled 12s after its last one, at the cap.

Files that are merely large by test count (e.g. a 179-test file at an
ordinary ~1.2s/test) were checked and deliberately left unpinned: count
already weights them correctly.

* address co1's static review P2s (#847, #848)

- test name now says >= 2 (total=1 trivially wraps both pins into the same
  slot, same as every other file) instead of claiming a property that does
  not hold there
- shard-tests.sh's pin comment now names a concrete follow-up: re-run the
  same seconds-per-test measurement once #876 et al. land, since they change
  these two files' real cost and can make the pin list stale or incomplete
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.

regression: watch.sh no longer folds sentinel -

2 participants