arcactl init MUST set up a workstation and no database: show every change it would make (the passwords of .pgpass not shown) and make them only where agreed (--yes, or a person's yes), write nothing on --dry-run or where it is declined or there is no one to ask, change nothing the second time, leave a person's own lines, a service of their own that it would use and what other tools wrote, take away with --undo only what it put in, refuse a server run, refuse an option, model, name, shell or password it cannot use before it writes anything, refuse a file whose markers are broken without changing any file, never put a password anywhere but .pgpass, and end by running the checks of the workstation.
Enforced (check): .github: cd commons/data && bun run verify — suite/arcactl-init.test.ts: init sets up the workstation and no database: the service, the password in .pgpass alone, the psql files and the shell profile, shown first and made only where agreed, the same again changes nothing, and the real psql and a real shell then reach the instance by what was written; suite/arcactl-init.test.ts: init asks a person what it needs and changes nothing they decline, leaves their own lines and the block of Ergonex where they are, uses a service they defined themselves, and undo takes away only what init put in; suite/arcactl-init.test.ts: init is for a workstation: a server run refuses it and writes nothing, an option, a model, a name or a shell that is not valid is refused before anything is written, a URL's password is not shown, and a file whose markers are broken is not changed; suite/arcactl-init.test.ts: init with nothing given shows the instances found with what each could do, a password goes only to the host it is written for, and init sets up the shell and the psql files with no instance at all
Proved by: data/suite/arcactl-init.test.ts
Written in: data/sql/cli/init.ts, data/sql/cli/profile.ts, data/sql/cli/prompt.ts
Tests: passed: suite/arcactl-init.test.ts init with nothing given shows the instances found with what each could do, a password goes; passed: suite/arcactl-init.test.ts init asks a person what it needs and changes nothing they decline, leaves their own lines ; passed: suite/arcactl-init.test.ts init is for a workstation: a server run refuses it and writes nothing, an option, a model,; passed: suite/arcactl-init.test.ts init sets up the workstation and no database: the service, the password in .pgpass alone,
Cited by: Data, sql/cli/profile, sql/cli/prompt