Skip to content

regression: watch.sh no longer folds sentinel - #855

Description

@apstndb

Summary

#477 taught callers to pass "${GROK_SESSION_ID:--}" (and the same
pattern for other hosts) so a launcher that drops a quoted-empty first
arg cannot shift project/type. watch.sh was supposed to fold the
literal - into the empty-session-id path.

On current main the callers and grok-build _delivery.sh comments
still describe that contract, but watch.sh does not fold. The bats
case that locked it is also gone. This is a regression of #477, not a
missing caller fix.

Do not change grok-build "${GROK_SESSION_ID:--}" sites.

Repro

Join as grok-build, then (no session id in that argv):

bash scripts/watch.sh - /path/to/project grok-build

Expected: run/watch.agmsg-*.pid or a grok composite id; no
run/watch.-*.pid.

Actual on main / v1.2.0: run/watch.-.pid.

Observed 2026-08-18: vanilla v1.2.0 via grok monitor tool (session
var set in the grok Shell, unset in monitor re-eval) produced argv
watch.sh - … and watch.-.pid. Same host, fold restored: no
watch.-*.

Suggested fix (one PR, one file)

SESSION_ID="${1:-}"
[ "$SESSION_ID" = "-" ] && SESSION_ID=""

Restore the bats case from #477 in the same PR if CI should lock it.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions