Repository navigation
feat(cli): setup ends by offering the first audit; install scripts lead with it #1195 - #1201
Conversation
|
Review of #1201 (setup ends with a first-audit offer). The core logic reads sound: the non-interactive,
|
|
Triage: fixed bare localhost and IPs default to http (tested); retry hint says what to type; added tests for accept, skip, retry-then-skip, retry-then-accept and non-interactive/dry-run (offerFirstAudit exported with a fake asker). Confirmed: audit is awaited in-process so process.exitCode from a failed audit propagates; trackFirstAudit is once-only (module guard plus on-disk marker) and does not throw (updateSettings returns a Result), so the catch path cannot double report. setup's own flags are not forwarded by design (--yes/--dry-run never reach the offer). |
5edc3ea to
34d6fac
Compare
… setup_audit_* events (owned by #1201) Signed-off-by: Nik Cubrilovic <[email protected]>
… setup_audit_* events (owned by #1201) Signed-off-by: Nik Cubrilovic <[email protected]>
34d6fac to
2024086
Compare
|
Review of #1201: the setup flow, parser and telemetry look sound. I found two medium issues and some small ones. I did not run the tests.
|
…ad with it #1195 Signed-off-by: Nik Cubrilovic <[email protected]>
…tests for the offer paths #1195 Signed-off-by: Nik Cubrilovic <[email protected]>
…vent union (#1198 left them to this PR) Signed-off-by: Nik Cubrilovic <[email protected]>
2024086 to
4c11c91
Compare
|
Review of #1201. The code is small and the tests cover the parser and the non-interactive paths. I found one real problem (the CHANGELOG) and a few small things.
No security issues. The typed URL goes only to the audit and is not sent in telemetry. |
Closes #1195. Depends on #1198 (this branch is built on its head, so the diff shows its commits until it merges; I rebase once it lands). Tracked internally.
What
squirrel audit https://your-site.com(one line saying what it does);squirrel setupcomes second.squirrel setupends by asking for a site URL and offering to run the audit now. A bare host (example.com) is taken as https; a typed URL runs the audit in-process; enter skips; one retry on a malformed answer.--yesand--dry-runnever ask or block: they print the audit command.setup_audit_accepted/setup_audit_declined(no URL), the two event names feat(cli): measure the first run: setup, login and first-audit telemetry, persist install source #1194 #1198 added to the allow-list.--yeshelp text. CHANGELOG. No new flag, so no completion change.Skill
No change needed to the squirrelscan skill (no new command or flag).
Verified
format:check, lint, typecheck, tangly strict; tests by path (setup-audit-offer: URL parser +
--yes/--dry-runprint the command and make no network call; setup-telemetry). Smoke: built binary, isolated HOME under ops/scratch, pty-drivensquirrel setup: declined sign-in and skills, typed a site at the offer, the audit ran (3 pages via a project max_pages) and printed the report;setup --yes </dev/nulland--dry-runprint the command and exit. Nothing was written to the real ~/.squirrel.