Fixes "Request status unavailable" when the Console is started as node packages/webui/src/cli.mjs serve ... with a relative script path.
Cause: packages/bus/src/principal.mjs checks that the parent cmdline argv[1] is the absolute same-tree Console path. A relative launch kept the relative spelling, so every request read against an org bus came back human-required.
Fix: on Linux, packages/webui/src/cli.mjs reads /proc/self/cmdline at load; a relative script re-execs once with the same node, execArgv, arguments and environment, and the absolute path. PID, parent, uid and the agent marker are unchanged. The second commit skips Node's -- delimiter (Sol review P3).
Proof:
console-relative-launch.test.mjs red on edec4e1d0, green here (2/0). The delimiter case is red on 744753d7e (2 loads vs 1) and green on 791791360.
Sol review: APPROVE 0/0/1, 115/0 across 14 files plus a 19-case launch matrix. The P3 is fixed in 791791360.
principal.test.mjs 5/0 on the head.
Fixes "Request status unavailable" when the Console is started as `node packages/webui/src/cli.mjs serve ...` with a relative script path.
Cause: `packages/bus/src/principal.mjs` checks that the parent cmdline argv[1] is the absolute same-tree Console path. A relative launch kept the relative spelling, so every request read against an org bus came back human-required.
Fix: on Linux, `packages/webui/src/cli.mjs` reads `/proc/self/cmdline` at load; a relative script re-execs once with the same node, execArgv, arguments and environment, and the absolute path. PID, parent, uid and the agent marker are unchanged. The second commit skips Node's `--` delimiter (Sol review P3).
Proof:
- `console-relative-launch.test.mjs` red on edec4e1d0, green here (2/0). The delimiter case is red on 744753d7e (2 loads vs 1) and green on 791791360.
- Sol review: APPROVE 0/0/1, 115/0 across 14 files plus a 19-case launch matrix. The P3 is fixed in 791791360.
- `principal.test.mjs` 5/0 on the head.
Node leaves the -- option delimiter out of process.execArgv, so
'node -- /abs/cli.mjs' picked '--' as the script and re-executed an
already absolute launch, running preloads twice. Review P3 on #1873
reqget-2.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes "Request status unavailable" when the Console is started as
node packages/webui/src/cli.mjs serve ...with a relative script path.Cause:
packages/bus/src/principal.mjschecks that the parent cmdline argv[1] is the absolute same-tree Console path. A relative launch kept the relative spelling, so every request read against an org bus came back human-required.Fix: on Linux,
packages/webui/src/cli.mjsreads/proc/self/cmdlineat load; a relative script re-execs once with the same node, execArgv, arguments and environment, and the absolute path. PID, parent, uid and the agent marker are unchanged. The second commit skips Node's--delimiter (Sol review P3).Proof:
console-relative-launch.test.mjsred onedec4e1d0, green here (2/0). The delimiter case is red on744753d7e(2 loads vs 1) and green on791791360.791791360.principal.test.mjs5/0 on the head.